Xojo Conferences
XDCMay2019MiamiUSA

DynaPDF Manual - Page 710

Previous Page 709   Index   Next Page 711

Function Reference
Page 710 of 766
SetPageBBox
Syntax:
LBOOL pdfSetPageBBox(
IPGE* PagePtr,
// Page pointer return by GetPageObject()
TPageBoundary Boundary, // The bounding box to set
struct TFltRect* BBox)
// Required -> The new bounding box
The function sets or changes the bounding box of a page. This function is intended to be fast as
possible. It requires no open page like SetBBox(), it does not change the default media or crop box,
and it does not adjust the current coordinate system if the media box will be changed.
The function is useful if only one or more bounding boxes must be changed, without editing a page,
or when a specific area of a page should be rendered. In the latter case change the crop box and
restore it to the previous value when finish.
To delete a bounding box set the bounding box to 0, 0, 0, 0. The parameter BBox is required to be
present, it cannot be NULL.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetPageCoords
Syntax:
LBOOL pdfSetPageCoords(
const PPDF* IPDF,
// Instance pointer
TPageCoord PageCoords) // see below
typedef enum
{
pcBottomUp = 0, // Bottom-up coordinates
pcTopDown
= 1
// Top-down coordinates
}TPageCoord;
The native coordinate system of the Portable Document Format is bottom-up. However, DynaPDF
supports also top-down coordinates to make the usage of the library easier. Top-down coordinates
are then converted to bottom-up coordinates by DynaPDF, the coordinate system in the PDF file will
not be changed by this function.
When changing the coordinate system to top-down, the coordinate origin of text (font origin) will
also be changed to the top-left corner (see also SetFontOrigin()). If the coordinate system will be
changed to bottom-up, the font origin is also changed to the down-left corner too.
Default value = pcBottomUp
Remarks:
The property PageCoords is a global property which can be changed at any time. When transforming
the coordinate system, bottom-up coordinates must be used.
 

Previous topic: SetOrientationEx

Next topic: Paper formats: