Packageorg.purepdf.pdf
Classpublic class ColumnText
InheritanceColumnText Inheritance Object



Public Properties
 PropertyDefined By
  alignment : int
ColumnText
  arabicOptions : int
[write-only] Sets the arabic shaping options.
ColumnText
  canvas : PdfContentByte
ColumnText
  canvases : Vector.<PdfContentByte>
ColumnText
  descender : Number
[read-only]
ColumnText
  extraParagraphSpace : Number
ColumnText
  filledWidth : Number
ColumnText
  followingIndent : Number
ColumnText
  hasZeroHeightElement : Boolean
[read-only] Checks if the element has a height of 0.
ColumnText
  indent : Number
ColumnText
  leading : Number
[read-only]
ColumnText
  multipliedLeading : Number
[read-only]
ColumnText
  rightIndent : Number
ColumnText
  runDirection : int
ColumnText
  spaceCharRatio : Number
ColumnText
  useAscender : Boolean
Simplified method for rectangular columns
ColumnText
  yLine : Number
ColumnText
Protected Properties
 PropertyDefined By
  _alignment : int = 0
ColumnText
  bidiLine : BidiLine
ColumnText
  _canvas : PdfContentByte
ColumnText
  _canvases : Vector.<PdfContentByte>
ColumnText
  composite : Boolean = false
ColumnText
  compositeColumn : ColumnText
ColumnText
  compositeElements : Vector.<IElement>
ColumnText
  currentLeading : Number = 16
ColumnText
  _descender : Number = 0
ColumnText
  _extraParagraphSpace : Number = 0
ColumnText
  fixedLeading : Number = 16
ColumnText
  _followingIndent : Number = 0
ColumnText
  _indent : Number = 0
ColumnText
  leftWall : Vector.<Vector.<Number>>
ColumnText
  leftX : Number = 0
ColumnText
  lineStatus : int = 0
ColumnText
  listIdx : int = 0
ColumnText
  maxY : Number = 0
ColumnText
  minY : Number = 0
ColumnText
  _multipliedLeading : Number = 0
ColumnText
  rectangularMode : Boolean = false
ColumnText
  rectangularWidth : Number = -1
ColumnText
  _rightIndent : Number = 0
ColumnText
  rightWall : Vector.<Vector.<Number>>
ColumnText
  rightX : Number = 0
ColumnText
  _runDirection : int = 0
ColumnText
  waitPhrase : Phrase
ColumnText
  _yLine : Number = 0
ColumnText
Public Methods
 MethodDefined By
  
ColumnText
  
addChunk(chunk:Chunk):void
ColumnText
  
addElement(element:IElement):void
Adds an element.
ColumnText
  
addText(phrase:Phrase):void
ColumnText
  
[static]
ColumnText
  
getWidth(phrase:Phrase, runDirection:int, arabicOptions:int):Number
[static] Gets the width that the line will occupy after writing.
ColumnText
  
go(simulate:Boolean = false):int
Outputs the lines to the document.
ColumnText
  
ColumnText
  
setAlignment(value:int):void
ColumnText
  
setColumns(leftLine:Vector.<Number>, rightLine:Vector.<Number>):void
Sets the columns bounds.
ColumnText
  
setLeading(leading:Number, mul:Number = 0):void
ColumnText
  
setSimpleColumn(llx:Number, lly:Number, urx:Number, ury:Number):void
Simplified method for rectangular columns.
ColumnText
  
setSimpleColumn2(llx:Number, lly:Number, urx:Number, ury:Number, leading:Number, alignment:int):void
Simplified method for rectangular columns.
ColumnText
  
setText(phrase:Phrase):void
ColumnText
  
showTextAligned(canvas:PdfContentByte, alignment:int, phrase:Phrase, x:Number, y:Number, rotation:Number, runDirection:int = 0, arabicOptions:int = 0):void
[static] Shows a line of text.
ColumnText
  
updateFilledWidth(w:Number):void
ColumnText
Protected Methods
 MethodDefined By
  
convertColumn(cLine:Vector.<Number>):Vector.<Vector.<Number>>
Converts a sequence of lines representing one of the column bounds into an internal format.
ColumnText
  
findLimitsOneLine():Vector.<Number>
Finds the intersection between the yLine and the two column bounds
ColumnText
  
findLimitsPoint(wall:Vector.<Vector.<Number>>):Number
Finds the intersection between the yLine and the column
ColumnText
  
findLimitsTwoLines():Vector.<Number>
Finds the intersection between the yLine, the yLine-leading and the two column bounds
ColumnText
  
goComposite(simulate:Boolean):int
ColumnText
Public Constants
 ConstantDefined By
  GLOBAL_SPACE_CHAR_RATIO : Number = 0
[static]
ColumnText
  NO_MORE_COLUMN : int = 2
[static]
ColumnText
  NO_MORE_TEXT : int = 1
[static]
ColumnText
  START_COLUMN : int = 0
[static]
ColumnText
Protected Constants
 ConstantDefined By
  LINE_STATUS_NOLINE : int = 2
ColumnText
  LINE_STATUS_OFFLIMITS : int = 1
ColumnText
  LINE_STATUS_OK : int = 0
ColumnText
Property Detail
_alignmentproperty
protected var _alignment:int = 0

_canvasproperty 
protected var _canvas:PdfContentByte

_canvasesproperty 
protected var _canvases:Vector.<PdfContentByte>

_descenderproperty 
protected var _descender:Number = 0

_extraParagraphSpaceproperty 
protected var _extraParagraphSpace:Number = 0

_followingIndentproperty 
protected var _followingIndent:Number = 0

_indentproperty 
protected var _indent:Number = 0

_multipliedLeadingproperty 
protected var _multipliedLeading:Number = 0

_rightIndentproperty 
protected var _rightIndent:Number = 0

_runDirectionproperty 
protected var _runDirection:int = 0

_yLineproperty 
protected var _yLine:Number = 0

alignmentproperty 
alignment:int


Implementation
    public function get alignment():int
    public function set alignment(value:int):void
arabicOptionsproperty 
arabicOptions:int  [write-only]

Sets the arabic shaping options. The option can be AR_NOVOWEL, AR_COMPOSEDTASHKEEL and AR_LIG.


Implementation
    public function set arabicOptions(value:int):void

See also

bidiLineproperty 
protected var bidiLine:BidiLine

canvasproperty 
canvas:PdfContentByte


Implementation
    public function get canvas():PdfContentByte
    public function set canvas(value:PdfContentByte):void
canvasesproperty 
canvases:Vector.<PdfContentByte>


Implementation
    public function get canvases():Vector.<PdfContentByte>
    public function set canvases(value:Vector.<PdfContentByte>):void
compositeproperty 
protected var composite:Boolean = false

compositeColumnproperty 
protected var compositeColumn:ColumnText

compositeElementsproperty 
protected var compositeElements:Vector.<IElement>

currentLeadingproperty 
protected var currentLeading:Number = 16

descenderproperty 
descender:Number  [read-only]


Implementation
    public function get descender():Number
extraParagraphSpaceproperty 
extraParagraphSpace:Number


Implementation
    public function get extraParagraphSpace():Number
    public function set extraParagraphSpace(value:Number):void
filledWidthproperty 
filledWidth:Number


Implementation
    public function get filledWidth():Number
    public function set filledWidth(value:Number):void
fixedLeadingproperty 
protected var fixedLeading:Number = 16

followingIndentproperty 
followingIndent:Number


Implementation
    public function get followingIndent():Number
    public function set followingIndent(value:Number):void
hasZeroHeightElementproperty 
hasZeroHeightElement:Boolean  [read-only]

Checks if the element has a height of 0.


Implementation
    public function get hasZeroHeightElement():Boolean
indentproperty 
indent:Number


Implementation
    public function get indent():Number
    public function set indent(value:Number):void
leadingproperty 
leading:Number  [read-only]


Implementation
    public function get leading():Number
leftWallproperty 
protected var leftWall:Vector.<Vector.<Number>>

leftXproperty 
protected var leftX:Number = 0

lineStatusproperty 
protected var lineStatus:int = 0

listIdxproperty 
protected var listIdx:int = 0

maxYproperty 
protected var maxY:Number = 0

minYproperty 
protected var minY:Number = 0

multipliedLeadingproperty 
multipliedLeading:Number  [read-only]


Implementation
    public function get multipliedLeading():Number
rectangularModeproperty 
protected var rectangularMode:Boolean = false

rectangularWidthproperty 
protected var rectangularWidth:Number = -1

rightIndentproperty 
rightIndent:Number


Implementation
    public function get rightIndent():Number
    public function set rightIndent(value:Number):void
rightWallproperty 
protected var rightWall:Vector.<Vector.<Number>>

rightXproperty 
protected var rightX:Number = 0

runDirectionproperty 
runDirection:int


Implementation
    public function get runDirection():int
    public function set runDirection(value:int):void
spaceCharRatioproperty 
spaceCharRatio:Number


Implementation
    public function get spaceCharRatio():Number
    public function set spaceCharRatio(value:Number):void
useAscenderproperty 
useAscender:Boolean

Simplified method for rectangular columns


Implementation
    public function get useAscender():Boolean
    public function set useAscender(value:Boolean):void
waitPhraseproperty 
protected var waitPhrase:Phrase

yLineproperty 
yLine:Number


Implementation
    public function get yLine():Number
    public function set yLine(value:Number):void
Constructor Detail
ColumnText()Constructor
public function ColumnText(content:PdfContentByte)



Parameters
content:PdfContentByte
Method Detail
addChunk()method
public function addChunk(chunk:Chunk):void

Parameters

chunk:Chunk

See also

Chunk
addElement()method 
public function addElement(element:IElement):void

Adds an element. Supported elements are Paragraph, List, PdfPTable, ImageElement and Graphic. It removes all the text placed with addText().

Parameters

element:IElement

addText()method 
public function addText(phrase:Phrase):void

Parameters

phrase:Phrase

convertColumn()method 
protected function convertColumn(cLine:Vector.<Number>):Vector.<Vector.<Number>>

Converts a sequence of lines representing one of the column bounds into an internal format.

Parameters

cLine:Vector.<Number>

Returns
Vector.<Vector.<Number>>

Throws
AssertionError
 
RuntimeError
duplicate()method 
public static function duplicate(src:ColumnText):ColumnText

Parameters

src:ColumnText

Returns
ColumnText
findLimitsOneLine()method 
protected function findLimitsOneLine():Vector.<Number>

Finds the intersection between the yLine and the two column bounds

Returns
Vector.<Number>
findLimitsPoint()method 
protected function findLimitsPoint(wall:Vector.<Vector.<Number>>):Number

Finds the intersection between the yLine and the column

Parameters

wall:Vector.<Vector.<Number>>

Returns
Number
findLimitsTwoLines()method 
protected function findLimitsTwoLines():Vector.<Number>

Finds the intersection between the yLine, the yLine-leading and the two column bounds

Returns
Vector.<Number>
getWidth()method 
public static function getWidth(phrase:Phrase, runDirection:int, arabicOptions:int):Number

Gets the width that the line will occupy after writing. Only the width of the first line is returned.

Parameters

phrase:Phrase
 
runDirection:int
 
arabicOptions:int

Returns
Number
go()method 
public function go(simulate:Boolean = false):int

Outputs the lines to the document. The output can be simulated

Parameters

simulate:Boolean (default = false)

Returns
int

Throws
DocumentError
goComposite()method 
protected function goComposite(simulate:Boolean):int

Parameters

simulate:Boolean

Returns
int

Throws
DocumentError
setACopy()method 
public function setACopy(org:ColumnText):void

Parameters

org:ColumnText

setAlignment()method 
public function setAlignment(value:int):void

Parameters

value:int

setColumns()method 
public function setColumns(leftLine:Vector.<Number>, rightLine:Vector.<Number>):void

Sets the columns bounds. Each column bound is described by a Vector.<Number> with the line points [x1,y1,x2,y2,...]. The array must have at least 4 elements.

Parameters

leftLine:Vector.<Number>
 
rightLine:Vector.<Number>

setLeading()method 
public function setLeading(leading:Number, mul:Number = 0):void

Parameters

leading:Number
 
mul:Number (default = 0)

setSimpleColumn()method 
public function setSimpleColumn(llx:Number, lly:Number, urx:Number, ury:Number):void

Simplified method for rectangular columns.

Parameters

llx:Number
 
lly:Number
 
urx:Number
 
ury:Number

setSimpleColumn2()method 
public function setSimpleColumn2(llx:Number, lly:Number, urx:Number, ury:Number, leading:Number, alignment:int):void

Simplified method for rectangular columns.

Parameters

llx:Number — the lower left x corner
 
lly:Number — the lower left y corner
 
urx:Number — the upper right x corner
 
ury:Number — the upper right y corner
 
leading:Number — the leading
 
alignment:int — the column alignment

setSimpleVars()method 
pdf_core function setSimpleVars(org:ColumnText):void

Parameters

org:ColumnText

setText()method 
public function setText(phrase:Phrase):void

Parameters

phrase:Phrase

showTextAligned()method 
public static function showTextAligned(canvas:PdfContentByte, alignment:int, phrase:Phrase, x:Number, y:Number, rotation:Number, runDirection:int = 0, arabicOptions:int = 0):void

Shows a line of text. Only the first line is written.

Parameters

canvas:PdfContentByte — where the text is to be written to
 
alignment:int — the alignment
 
phrase:Phrase — the Phrase with the text
 
x:Number — the x reference position
 
y:Number — the y reference position
 
rotation:Number — the rotation to be applied in degrees counterclockwise
 
runDirection:int (default = 0)
 
arabicOptions:int (default = 0)

updateFilledWidth()method 
public function updateFilledWidth(w:Number):void

Parameters

w:Number

Constant Detail
GLOBAL_SPACE_CHAR_RATIOConstant
public static const GLOBAL_SPACE_CHAR_RATIO:Number = 0

LINE_STATUS_NOLINEConstant 
protected const LINE_STATUS_NOLINE:int = 2

LINE_STATUS_OFFLIMITSConstant 
protected const LINE_STATUS_OFFLIMITS:int = 1

LINE_STATUS_OKConstant 
protected const LINE_STATUS_OK:int = 0

NO_MORE_COLUMNConstant 
public static const NO_MORE_COLUMN:int = 2

NO_MORE_TEXTConstant 
public static const NO_MORE_TEXT:int = 1

START_COLUMNConstant 
public static const START_COLUMN:int = 0