PDF Plugin for Xojo

Page Class (console safe)

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

Object
   Page

class Page

Constructors

PageA Private constructor. Use the AddPage function on the PDFDocument class to create instance of the Page class.

Properties

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.
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.
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.
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.
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) Sets dash pattern.
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.
SetSize (console safe) Sets the page size to one of the standard sizes and also sets the direction.
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.

Enumerations

PageSizeEnumEnum that represents standard page sizes.
PageDirectionEnumEnum that represents the direction of the page, as in landscape or portrait.
TextAlignmentEnumEnum that represents text alignment.
LineJoinTypeEnumEnum that represents line join types.
LineCapTypeEnumEnum that represents line cap types.
GraphicsModeEnumEnum that represents the graphics modes that the page can be in.
TextRenderingModeEnumEnum that represents text rendering modes.

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 X Carbon
  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM