Xojo Conferences

DynaPDF Manual - Page 307

Previous Page 306   Index   Next Page 308

Function Reference
Page 307 of 750
LBOOL pdfExchangePages(
const PPDF* IPDF, // Instance pointer
UI32 First,
// First page number
UI32 Second)
// Second page number
The function exchanges two pages. Page links, bookmarks, go-to actions, and named destinations are
changed so that the destination page still refers to the correct page. Note that page numbering starts
at 1. It is also possible to move a page to another position in the file (see MovePage() for further
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SI32 pdfFileAttachAnnot(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate for the annotation icon
double PosY,
// Y-Coordinate for the annotation icon
TFileAttachIcon Icon, // Annotation icon
const char* Author,
// Optional author
const char* Desc,
// Optional description
const char* AFile,
// File to be embedded (required)
LBOOL Compress)
// If true, the embedded file is compressed
typedef enum
The function inserts a file attachment annotation on the current open page. If the coordinate system
is bottom-up the point PosX, PosY defines the lower left point of the annotation icon. If the
coordinate system is top-down it defines the upper left point. The width and height of the icon is not
The embedded file is compressed if the parameter Compress is set to true. Otherwise it is left
uncompressed. It is not always useful to compress embedded files especially if the file is already
compressed, e.g. Zip files or already compressed image formats require no further compression. In
the worst case the compressed files becomes larger. However, text files and most document formats
should be compressed to reduce the file size.

Previous topic: ExchangeBookmarks

Next topic: FileLink