DynaPDF Manual - Page 336

Previous Page 335   Index   Next Page 337

Function Reference
Page 336 of 818
ExchangePages
Syntax:
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 information).
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
ExtractText
Syntax:
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
{
tefDefault
= 0, // Create text lines in the original order.
tefSortTextX
= 1, // Sort text records in x-direction.
tefSortTextY
= 2, // Sort text records in y-direction.
tefSortTextXY
= tefSortTextX | tefSortTextY,
tefDeleteOverlappingText = 4
// See description
}TTextExtractionFlags;
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.
 

Previous topic: ExchangeBookmarks

Next topic: FileAttachAnnot


Start Chat