HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.MultiColumnText Class Reference
Inheritance diagram for iTextSharp.text.pdf.MultiColumnText:
iTextSharp.text.IElement

Classes

class  ColumnDef
 

Public Member Functions

 MultiColumnText ()
 
 MultiColumnText (float height)
 
 MultiColumnText (float top, float height)
 
bool IsOverflow ()
 
void UseColumnParams (ColumnText sourceColumn)
 
void AddColumn (float[] left, float[] right)
 
void AddSimpleColumn (float left, float right)
 
void AddRegularColumns (float left, float right, float gutterWidth, int numColumns)
 
void AddText (Phrase phrase)
 
void AddText (Chunk chunk)
 
void AddElement (IElement element)
 
float Write (PdfContentByte canvas, PdfDocument document, float documentY)
 
bool Process (IElementListener listener)
 
bool IsContent ()
 
bool IsNestable ()
 
void NextColumn ()
 
void ResetCurrentColumn ()
 
bool ShiftCurrentColumn ()
 
void SetColumnsRightToLeft (bool direction)
 
override string ToString ()
 Gets the content of the text element. More...
 

Static Public Attributes

const float AUTOMATIC = -1f
 

Properties

int Type [get]
 
ArrayList Chunks [get]
 
int CurrentColumn [get]
 
float SpaceCharRatio [set]
 
int RunDirection [set]
 
int ArabicOptions [set]
 
int Alignment [set]
 
- Properties inherited from iTextSharp.text.IElement
int Type [get]
 Gets the type of the text element. More...
 
ArrayList Chunks [get]
 Gets all the chunks in this element. More...
 

Detailed Description

Formats content into one or more columns bounded by a rectangle. The columns may be simple rectangles or more complicated shapes. Add all of the columns before adding content. Column continuation is supported. A MultiColumnText object may be added to a document using Document.add.

Author
Steve Appling

Constructor & Destructor Documentation

◆ MultiColumnText() [1/3]

iTextSharp.text.pdf.MultiColumnText.MultiColumnText ( )

Default constructor. Sets height to AUTOMATIC. Columns will repeat on each page as necessary to accomodate content length.

◆ MultiColumnText() [2/3]

iTextSharp.text.pdf.MultiColumnText.MultiColumnText ( float  height)

Construct a MultiColumnText container of the specified height. If height is AUTOMATIC, fill complete pages until done. If a specific height is used, it may span one or more pages.

Parameters
height

◆ MultiColumnText() [3/3]

iTextSharp.text.pdf.MultiColumnText.MultiColumnText ( float  top,
float  height 
)

Construct a MultiColumnText container of the specified height starting at the specified Y position.

Parameters
height
top

Member Function Documentation

◆ AddColumn()

void iTextSharp.text.pdf.MultiColumnText.AddColumn ( float[]  left,
float[]  right 
)

Add a new column. The parameters are limits for each column wall in the format of a sequence of points (x1,y1,x2,y2,...).

Parameters
leftlimits for left column
rightlimits for right column

◆ AddElement()

void iTextSharp.text.pdf.MultiColumnText.AddElement ( IElement  element)

Add an element to be rendered in a column. Note that you can only add a Phrase or a Chunk if the columns are not all simple. This is an underlying restriction in com.lowagie.text.pdf.ColumnText

Parameters
elementelement to add
Exceptions
DocumentExceptionif element can't be added

◆ AddRegularColumns()

void iTextSharp.text.pdf.MultiColumnText.AddRegularColumns ( float  left,
float  right,
float  gutterWidth,
int  numColumns 
)

Add the specified number of evenly spaced rectangular columns. Columns will be seperated by the specified gutterWidth.

Parameters
leftleft boundary of first column
rightright boundary of last column
gutterWidthwidth of gutter spacing between columns
numColumnsnumber of columns to add

◆ AddSimpleColumn()

void iTextSharp.text.pdf.MultiColumnText.AddSimpleColumn ( float  left,
float  right 
)

Add a simple rectangular column with specified left and right x position boundaries.

Parameters
leftleft boundary
rightright boundary

◆ AddText() [1/2]

void iTextSharp.text.pdf.MultiColumnText.AddText ( Chunk  chunk)

Adds a Chunk to the current text array. Will not have any effect if addElement() was called before.

Parameters
chunkthe text
Since
2.1.5

◆ AddText() [2/2]

void iTextSharp.text.pdf.MultiColumnText.AddText ( Phrase  phrase)

Adds a Phrase to the current text array. Will not have any effect if addElement() was called before.

Parameters
phrasethe text
Since
2.1.5

◆ IsContent()

bool iTextSharp.text.pdf.MultiColumnText.IsContent ( )
See also
com.lowagie.text.Element::isContent()
Since
iText 2.0.8

Implements iTextSharp.text.IElement.

◆ IsNestable()

bool iTextSharp.text.pdf.MultiColumnText.IsNestable ( )
See also
com.lowagie.text.Element::isNestable()
Since
iText 2.0.8

Implements iTextSharp.text.IElement.

◆ IsOverflow()

bool iTextSharp.text.pdf.MultiColumnText.IsOverflow ( )

Indicates that all of the text did not fit in the specified height. Note that isOverflow will return false before the MultiColumnText object has been added to the document. It will always be false if the height is AUTOMATIC.

Returns
true if there is still space left in the column

◆ NextColumn()

void iTextSharp.text.pdf.MultiColumnText.NextColumn ( )

Moves the text insertion point to the beginning of the next column, issuing a page break if needed.

Exceptions
DocumentExceptionon error

◆ Process()

bool iTextSharp.text.pdf.MultiColumnText.Process ( IElementListener  listener)

Processes the element by adding it to an ElementListener.

Parameters
listeneran ElementListener
Returns
true if the element was processed successfully

Implements iTextSharp.text.IElement.

◆ ResetCurrentColumn()

void iTextSharp.text.pdf.MultiColumnText.ResetCurrentColumn ( )

Resets the current column.

◆ SetColumnsRightToLeft()

void iTextSharp.text.pdf.MultiColumnText.SetColumnsRightToLeft ( bool  direction)

Sets the direction of the columns.

Parameters
directiontrue = right2left; false = left2right

◆ ShiftCurrentColumn()

bool iTextSharp.text.pdf.MultiColumnText.ShiftCurrentColumn ( )

Shifts the current column.

Returns
true if the currentcolumn has changed

◆ ToString()

override string iTextSharp.text.pdf.MultiColumnText.ToString ( )

Gets the content of the text element.

Returns
the content of the text element

Implements iTextSharp.text.IElement.

◆ UseColumnParams()

void iTextSharp.text.pdf.MultiColumnText.UseColumnParams ( ColumnText  sourceColumn)

Copy the parameters from the specified ColumnText to use when rendering. Parameters like setArabicOptions must be set in this way.

Parameters
sourceColumn

◆ Write()

float iTextSharp.text.pdf.MultiColumnText.Write ( PdfContentByte  canvas,
PdfDocument  document,
float  documentY 
)

Write out the columns. After writing, use isOverflow() to see if all text was written.

Parameters
canvasPdfContentByte to write with
documentdocument to write to (only used to get page limit info)
documentYstarting y position to begin writing at
Returns
the current height (y position) after writing the columns
Exceptions
DocumentExceptionon error

Member Data Documentation

◆ AUTOMATIC

const float iTextSharp.text.pdf.MultiColumnText.AUTOMATIC = -1f
static

special constant for automatic calculation of height

Property Documentation

◆ Alignment

int iTextSharp.text.pdf.MultiColumnText.Alignment
set

Sets the default alignment

Parameters
alignmentthe default alignment

◆ ArabicOptions

int iTextSharp.text.pdf.MultiColumnText.ArabicOptions
set

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

Parameters
arabicOptionsthe arabic shaping options

◆ Chunks

ArrayList iTextSharp.text.pdf.MultiColumnText.Chunks
get

Returns null - not used

Returns
null

◆ CurrentColumn

int iTextSharp.text.pdf.MultiColumnText.CurrentColumn
get

Gets the current column.

Returns
the current column

◆ RunDirection

int iTextSharp.text.pdf.MultiColumnText.RunDirection
set

Sets the run direction.

Parameters
runDirectionthe run direction

◆ SpaceCharRatio

float iTextSharp.text.pdf.MultiColumnText.SpaceCharRatio
set

Sets the ratio between the extra word spacing and the extra character spacing when the text is fully justified. Extra word spacing will grow spaceCharRatio times more than extra character spacing. If the ratio is PdfWriter.NO_SPACE_CHAR_RATIO then the extra character spacing will be zero.

Parameters
spaceCharRatiothe ratio between the extra word spacing and the extra character spacing

◆ Type

int iTextSharp.text.pdf.MultiColumnText.Type
get

Gets the type of the text element.

Returns
a type

The documentation for this class was generated from the following file: