Xojo Conferences

DynaPDF Manual - Page 523

Previous Page 522   Index   Next Page 524

Function Reference
Page 523 of 750
pdfSetImportFlags2(pdf, if2UseProxy | if2DuplicateCheck);
The above flags avoid the conversion of pages to templates, the memory usage will be reduced, and
a duplicate check is applied on images, templates, extended graphics states, and several other PDF
objects which are often used.
Many other flags are available but the above flags can be used by default whenever a PDF file should
be optimized.
Error handling
This function adds warnings to the error log of DynaPDF. The error log can be accessed with
GetErrLogMessageCount() / GetErrLogMessage().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0. No PDF file is
in memory if the function fails. Therefore, it is not required to call FreePDF() on failure.
SI32 pdfPageLink(
const PPDF* IPDF, // Instance pointer
double PosX,
// X-Coordinate of bounding rectangle
double PosY,
// Y-Coordinate of bounding rectangle
double Width,
// Width of bounding rectangle
double Height,
// Height of bounding rectangle
UI32 DestPage)
// Destination page
The function adds a page link to the current open page. The parameter DestPage specifies the
destination page which should be opened (the page number). The function does not check whether
the destination page exists; it can be created later. If the destination page does not exist when the
document is closed it will be set to the first page.
If the coordinate system is bottom-up the point PosX, PosY defines the lower left corner of the
bounding rectangle. If the coordinate system is top-down it defines the upper left corner.
The border of the link annotation is drawn by using the current line width, stroke color and line dash
pattern. If the link should appear without a border set the line width to zero beforehand.
When clicking on a link annotation the rectangle is highlighted, that is a simple visual effect. Several
highlight modes are supported, see SetLinkHighlightMode() for further information.
The destination page is always opened at the top corner. More precise destinations can be created
with the function PageLinkEx(). Page links can also be used to execute an action. The destination
page is ignored in the latter case, the annotation works then like a button.

Previous topic: Recommendations

Next topic: PageLink3