PDF Plugin for Xojo |

# EinhugurPDFWriter.Page Class (console safe)

A PDF Page object that represents a page in a PDF document.

Object
Page

class EinhugurPDFWriter.Page

#### Constructors

Page (console safe) | A Private constructor. Use the AddPage function on the PDFDocument class to create instance of the Page class.

#### Properties

CharSpace (console safe) | Sets the character spacing for text.
FillColor (console safe) | Sets or gets the current fill color
GraphicsMode (console safe) | Returns the current graphics mode of the page. Result can be any one of the values defined in Page.GraphicsModeEnum
Height (console safe) | Sets or gets the height of the page.
HorizontalScaling (console safe) | Sets the horizontal scaling (scaling) for text showing.
LineCapType (console safe) | Sets or gets the line cap type.
LineJoinType (console safe) | Sets or gets the line join type.
LineWidth (console safe) | Gets or sets line width.
StrokeColor (console safe) | Sets or gets the current stroke color
TextLeading (console safe) | Sets or gets the text line space.
TextRenderingMode (console safe) | Sets or gets the text rendering mode of the page.
TextRise (console safe) | Moves the text position in vertical direction by the amount of the given value. This can be useful for making subscripts or superscripts.
TransformCoordinates (console safe) | If set to true then Y will start from top, else Y will start from bottom (Default is false)
Width (console safe) | Sets or gets the width of the page.
WordSpace (console safe) | Sets word spacing for the text.

#### Methods

Arc (console safe) | Appends a circle arc to the current path. Angles are given in degrees, with 0 degrees being vertical, upward, from the (x,y) position
BeginText (console safe) | Begins a text object and sets the current text position to (0,0)
Clip (console safe) | Sets clipping path to the current path.
ConcatMatrix (console safe) | Concatenates the page's current transformation matrix and specified matrix.
CreateDestination (console safe) | Creates a destination object.
CreateLinkAnnotation (console safe) | Creates a Link annotation. Link annotations are used to create clickable zones to link to a different location within the PDF document.
CreateTextAnnotation (console safe) | Creates a text annotation.
CreateURLAnnotation (console safe) | Creates a URL annotation. URL annotations are used to create clickable zones to link to a web page.
CurveTo (console safe) | Appends a Bézier curve to the current path using the control points (x1, y1) and (x2, y2) and (x3, y3), then sets the current point to (x3, y3).
CurveTo2 (console safe) | Appends a Bézier curve to the current path using the current point and (x2, y2) and (x3, y3) as control points. Then, the current point is set to (x3, y3).
CurveTo3 (console safe) | Appends a Bézier curve to the current path using two specified points. The point (x1, y1) and the point (x3, y3) are used as the control points for a Bézier curve and current point is moved to the point (x3, y3)
Draw (console safe) | Draws the current path. The drawing will use the current StrokeColor.
DrawImage (console safe) | Draws a image that has previously been loaded by the LoadImage function on the PDFDocument class.
Ellipse (console safe) | Appends ellipse to the current path.
EndPath (console safe) | Ends the current path without any drawing or filling. This method is often using when making path to define clipping.
EndText (console safe) | Ends a text object.
Fill (console safe) | Fills the current path using the nonzero winding number rule. The fill will use the current FillColor.
FillAndDraw (console safe) | Fills and draws the current path using the nonzero winding number rule, then it draws the line. The fill will use the current FillColor but the draw will use the current StrokeColor.
GetCurrentTextPosition (console safe) | Fetches current text position into ByRef x and y parameters.
LineTo (console safe) | Appends a path from current point to a given point.
MeasureText (console safe) | Measures how many letters of text can fit in a given horizontal space using current font settings.
MeasureText (console safe) | Measures how many letters of text can fit in a given horizontal space using current font settings. This variation can also get physical width of the text through the outWidth ByRef parameter.
MoveTextPosition (console safe) | Moves the current text position by x, y, so after calling this the position will be oldX + x, oldY + y.
MoveTextPositionNextLine (console safe) | Moves the text cursor to next line based on what has been set by the TextLeading property.
MoveTo (console safe) | Starts a new path and sets the starting point of the path. If you are already in path mode then a new subpath is created.
Rectangle (console safe) | Appends rectangle to the current path.
ResetDashPattern (console safe) | Resets the dash pattern to solid line.
RestoreState (console safe) | Restores previously saved graphics state and unwinds the stack of staved states by one.
SaveState (console safe) | Saves the page's current graphics parameters to the stack. Your application can stack up SaveState() calls up to 28 and can restore the saved parameters by calling the RestoreState method.
SetBoundaryBox (console safe) | Sets one of the PDF’s bounding boxes.
SetCMYKFill (console safe) | Sets the current fill color by CMYK color code
SetCMYKStroke (console safe) | Sets the current stroke color by CMYK color code
SetDashPattern (console safe) | The phase which the pattern starts in.
SetExtendedState (console safe) | Sets extended graphics state for the page, alpha values and blend mode.
SetFont (console safe) | Sets font for the graphics context on the page.
SetRGBFill (console safe) | Sets RGB fill color in full precision.
SetRGBStroke (console safe) | Sets Stroke color in full full precision RGB.
SetSize (console safe) | Sets the page size to one of the standard sizes and also sets the direction.
SetSlideShow (console safe) | Configures the setting for slide transition of the page.
SetTextMatrix (console safe) | Sets a transformation matrix for text to be drawn in using ShowText. (Preliminary support only since LibHaru does not fully document this one)
SetTextRotation (console safe) | Sets text rotation for text to be draw using ShowText. (Preliminary support only since LibHaru does not fully document SetTextMatrix which this one is based on)
ShowText (console safe) | Draws text at current position on the page.
ShowTextNextLine (console safe) | Moves the current text position to the start of the next line, then draws the text at the current position on the page.
SuggestedTextLeading (console safe) | Calculates and returns suggested TextLeading for selected font.
TextRect (console safe) | Draws a text within given rectangle.
TextRectBaseline (console safe) | Draws a text within given rectangle where baseline of the first text line is passed in instead of top of the rectangle.
TextRectMeasure (console safe) | Measures height needed to draw given text with given width in a TextRect area. The function also returns number of lines which the text will be split into.

#### Enumerations

PageSizeEnum | Enum that represents standard page sizes.
PageDirectionEnum | Enum that represents the direction of the page, as in landscape or portrait.
TextAlignmentEnum | Enum that represents text alignment.
LineJoinTypeEnum | Enum that represents line join types.
LineCapTypeEnum | Enum that represents line cap types.
GraphicsModeEnum | Enum that represents the graphics modes that the page can be in.
TextRenderingModeEnum | Enum that represents text rendering modes.
TransitionStyleEnum | Transition styles to use with the SetSlideShow method.
PageBoundaryEnum | Boundary enum to be used with SetBoundaryBox method.

#### Notes:

Note that on PDF pages the coordinate system starts from bottom, so 0,0 is at bottom left.
This class is in the Module EinhugurPDFWriter, so you either have to address it as EinhugurPDFWriter.Page or use the using operator at top like some of our examples do.
You cannot create instance of this class directly with the new operator, the Constructor has been made private to prevent that. Instead you use the AddPage function on PDFDocument object to create instance of this class.
Example:
using EinhugurPDFWriter
Dim pdf as PDFDocument
Dim myPage as Page
pdf = new PDFDocument()
myPage = pdf.AddPage()

#### Supported Platforms:

- macOS Intel 64 bit
- macOS Apple Silicon
- Windows 32 bit
- Windows 64 bit
- Windows ARM 64 bit
- Linux 32 bit
- Linux 64 bit
- Linux ARM 32 bit
- Linux ARM 64 bit
- iOS