Page object

The Page object implements the IPage interface. This interface defines methods to retrieve information from a page or modify it. A page may also be drawn on a Windows Device Context (DC), but note that access to DCs may not be available in all scripting languages.

IPage properties

Name

Type

Description

Orientation

Integer

Gets/sets the orientation of the page, in degrees. The value is always a multiple of 90 and is the number of degrees the page should be rotated clockwise when displayed or printed.

IPage methods

Name

Return type

Description

ExtractText(left, bottom, right, top)

String

Deprecated. Returns the text located inside the region bounded by the left, bottom, right and top parameters. If multiple lines are found, they are separated by a CR-LF pair.

ExtractText2(left, top, right, bottom)

String

Returns the text located inside the region bounded by the left, top, right and bottom parameters. If multiple lines are found, they are separated by a CR-LF pair.

MediaSize()

IPdfRect

Returns the size of the actual media, i.e. the sheet of paper.

setIncludeBorders(pbIncludeBorders)

 

Sets whether or not borders are included for IPage.ExtractText2(). If true, a character is considered to be inside the region using the 30% rule (i.e. at least 30% of the character must be enclosed in the region). Otherwise, the character must be entirely enclosed in the region to be returned.

setTolerances(tolerableDeltaWidth, tolerableDeltaHeight, tolerableDeltaFontHeight, tolerableGap)

 

Sets the floating point values for the tolerable factors.

Merge(imageFile, left, top, rotateAngle, scaleFactor)

 

Inserts an image file and places it on the page at a specific location.
Supported image types are: JPG and PNG.

Merge2(srcPage, left, top, rotateAngle, scaleFactor)

 

Transparently places a PDF page on top of the current page at a specific location.

MergeToLayer(imageFile, left, top, rotateAngle, scaleFactor, layerName)

 

This method behaves the same as Merge() but allows to insert the image as a layer (aka an Optional Content Group).
Supported image types are JPG and PNG.

MergeToLayer2(srcPage, left, top, rotateAngle, scaleFactor, layerName)

 

This method behaves the same as Merge2() but allows to put the source page as a layer (aka an Optional Content Group).

Size()

IPdfRect

Returns the size of the rectangle that is used to clip (crop) the content of the page before applying it to the medium, in points.