HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.VerticalText Class Reference

Public Member Functions

 VerticalText (PdfContentByte text)
 
void AddText (Phrase phrase)
 
void AddText (Chunk chunk)
 
void SetVerticalLayout (float startX, float startY, float height, int maxLines, float leading)
 
int Go ()
 
int Go (bool simulate)
 
void SetOrigin (float startX, float startY)
 

Static Public Attributes

static int NO_MORE_TEXT = 1
 
static int NO_MORE_COLUMN = 2
 

Protected Member Functions

PdfLine CreateLine (float width)
 
void ShortenChunkArray ()
 

Protected Attributes

ArrayList chunks = new ArrayList()
 
PdfContentByte text
 
int alignment = Element.ALIGN_LEFT
 
int currentChunkMarker = -1
 
PdfChunk currentStandbyChunk
 
string splittedChunkText
 
float leading
 
float startX
 
float startY
 
int maxLines
 
float height
 

Properties

float Leading [get, set]
 
float OriginX [get]
 
float OriginY [get]
 
int MaxLines [get, set]
 
float Height [get, set]
 
int Alignment [get, set]
 

Detailed Description

Writes text vertically. Note that the naming is done according to horizontal text although it referrs to vertical text. A line with the alignment Element.LEFT_ALIGN will actually be top aligned.

Constructor & Destructor Documentation

◆ VerticalText()

iTextSharp.text.pdf.VerticalText.VerticalText ( PdfContentByte  text)

Creates new VerticalText

Parameters
textthe place where the text will be written to. Can be a template.

Member Function Documentation

◆ AddText() [1/2]

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

Adds a Chunk to the current text array.

Parameters
chunkthe text

◆ AddText() [2/2]

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

Adds a Phrase to the current text array.

Parameters
phrasethe text

◆ CreateLine()

PdfLine iTextSharp.text.pdf.VerticalText.CreateLine ( float  width)
protected

Creates a line from the chunk array.

Parameters
widththe width of the line
Returns
the line or null if no more chunks

◆ Go() [1/2]

int iTextSharp.text.pdf.VerticalText.Go ( )

Outputs the lines to the document. It is equivalent to go(false).

Returns
returns the result of the operation. It can be NO_MORE_TEXT and/or NO_MORE_COLUMN
Exceptions
DocumentExceptionon error

◆ Go() [2/2]

int iTextSharp.text.pdf.VerticalText.Go ( bool  simulate)

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

Parameters
simulatetrue to simulate the writting to the document
Returns
returns the result of the operation. It can be NO_MORE_TEXT and/or NO_MORE_COLUMN
Exceptions
DocumentExceptionon error

◆ SetOrigin()

void iTextSharp.text.pdf.VerticalText.SetOrigin ( float  startX,
float  startY 
)

Sets the new text origin.

Parameters
startXthe X coordinate
startYthe Y coordinate

◆ SetVerticalLayout()

void iTextSharp.text.pdf.VerticalText.SetVerticalLayout ( float  startX,
float  startY,
float  height,
int  maxLines,
float  leading 
)

Sets the layout.

Parameters
startXthe top right X line position
startYthe top right Y line position
heightthe height of the lines
maxLinesthe maximum number of lines
leadingthe separation between the lines

◆ ShortenChunkArray()

void iTextSharp.text.pdf.VerticalText.ShortenChunkArray ( )
protected

Normalizes the list of chunks when the line is accepted.

Member Data Documentation

◆ alignment

int iTextSharp.text.pdf.VerticalText.alignment = Element.ALIGN_LEFT
protected

The column Element. Default is left Element.

◆ chunks

ArrayList iTextSharp.text.pdf.VerticalText.chunks = new ArrayList()
protected

The chunks that form the text.

◆ currentChunkMarker

int iTextSharp.text.pdf.VerticalText.currentChunkMarker = -1
protected

Marks the chunks to be eliminated when the line is written.

◆ currentStandbyChunk

PdfChunk iTextSharp.text.pdf.VerticalText.currentStandbyChunk
protected

The chunk created by the splitting.

◆ height

float iTextSharp.text.pdf.VerticalText.height
protected

The height of the text.

◆ leading

float iTextSharp.text.pdf.VerticalText.leading
protected

The leading

◆ maxLines

int iTextSharp.text.pdf.VerticalText.maxLines
protected

The maximum number of vertical lines.

◆ NO_MORE_COLUMN

int iTextSharp.text.pdf.VerticalText.NO_MORE_COLUMN = 2
static

Signals that there is no more column.

◆ NO_MORE_TEXT

int iTextSharp.text.pdf.VerticalText.NO_MORE_TEXT = 1
static

Signals that there are no more text available.

◆ splittedChunkText

string iTextSharp.text.pdf.VerticalText.splittedChunkText
protected

The chunk created by the splitting.

◆ startX

float iTextSharp.text.pdf.VerticalText.startX
protected

The X coordinate.

◆ startY

float iTextSharp.text.pdf.VerticalText.startY
protected

The Y coordinate.

◆ text

PdfContentByte iTextSharp.text.pdf.VerticalText.text
protected

The PdfContent where the text will be written to.

Property Documentation

◆ Alignment

int iTextSharp.text.pdf.VerticalText.Alignment
getset

Gets the Element.

Returns
the alignment

◆ Height

float iTextSharp.text.pdf.VerticalText.Height
getset

Gets the height of the line

Returns
the height

◆ Leading

float iTextSharp.text.pdf.VerticalText.Leading
getset

Gets the separation between the vertical lines.

Returns
the vertical line separation

◆ MaxLines

int iTextSharp.text.pdf.VerticalText.MaxLines
getset

Gets the maximum number of available lines. This value will change after each call to go().

Returns
Value of property maxLines.

◆ OriginX

float iTextSharp.text.pdf.VerticalText.OriginX
get

Gets the X coordinate where the next line will be writen. This value will change after each call to go().

Returns
the X coordinate

◆ OriginY

float iTextSharp.text.pdf.VerticalText.OriginY
get

Gets the Y coordinate where the next line will be writen.

Returns
the Y coordinate

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