12.4Class Page

Used to manipulate an individual page.

Class Page
Raise
CodeError when tried to be constructed directly.

Doc.addPage or Doc.insertPage create a page.

Methods
beginTextMarks the start of a text object and sets the text position to [0,0].
endTextEnds the current text object.
moveTextPosChanges the current text position, using the specified offset values.
setFontAndSizeSelf explanatory.
showTextPrints text at the current position on the page.
textOutPrints text on the specified position.
textRectPrints the text inside the specified region.

Methods

beginText

Marks the start of a text object and sets the text position to [0,0].

Page.beginText()

endText

Ends the current text object.

Page.endText()

moveTextPos

Changes the current text position, using the specified offset values.

Page.moveTextPos( xOffset, yOffset )
xOffset x offset to new text position.
yOffset y offset to new text position.

If the current text position is (x1, y1), the new text position will be (x1 + xOffset, y1 + yOffset).

setFontAndSize

Self explanatory.

Page.setFontAndSize( font, size )
font An instance of Font.
size An integer that specifies the pt size.

showText

Prints text at the current position on the page.

Page.showText( text )
text String to be displayed

textOut

Prints text on the specified position.

Page.textOut( xPos, yPos, text )
xPos x position measured from the left
yPos y position measured from the bottom
text A string that is to be displayed

Foo.

textRect

Prints the text inside the specified region.

Page.textRect( left, top, right, bottom, text, align )
left x coordinate of the top-left corner of the region to output text.
top y coordinate of the top-left corner of the region to output text.
right x coordinate of the right-bottom corner of the region to output text.
bottom y coordinate of the right-bottom corner of the region to output text.
text String to display
align TextAlignment
Made with http://www.falconpl.org