Xojo Conferences

DynaPDF Manual - Page 311

Previous Page 310   Index   Next Page 312

Function Reference
Page 311 of 766
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.
LBOOL pdfExtractText(
const PPDF* IPDF,
// Instance pointer
UI32 PageNum,
// Page number
TTextExtractionFlags Flags, // See below
struct TFltRect* Area,
// Optional -> Get the text of this area
UI16** Text,
// Out (required)
UI32* TextLen)
// Out (required)
typedef enum
= 0, // Create text lines in the original order.
= 1, // Sort text records in x-direction.
= 2, // Sort text records in y-direction.
= tefSortTextX | tefSortTextY,
tefDeleteOverlappingText = 4
// See description
The function extracts the text of the page PageNum. The first page is denoted by 1.
Text lines can be sorted in x- and y-direction. The flag tefDeleteOverlappingText causes that identical
text records which are placed on the same position (with a tolerance of 2 units) will be deleted. The
records must occur one after the other in order to detect them.
The optional parameter Area can be set to restrict the text extraction to that rectangle. The rectangle
must be defined according to the current coordinate system. That means either in bottom up or top
down coordinates, see SetPageCoords() for further information. Note also that the function considers
the orientation of the page. The width and height of the rectangle must be exchanged if the
orientation is 90, -90, 270, or -270 degrees.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.

Previous topic: ExchangeBookmarks

Next topic: FileAttachAnnot