DynaPDF Manual - Page 53

Previous Page 52   Index   Next Page 54

Content parsing & editing
Page 53 of 860
ClearSelection
Syntax:
void psrClearSelection(
const IPSR* Ctx) // Parser instance pointer
The function clears the selection. This function is declared for future use. FindText() clears the
text selection automatically before it is executed. There is currently no need to clear the selection
manually.
CreateParserContext
Syntax:
IPSR* psrCreateParserContext(
const PPDF* IPDF,
// Instance pointer
TOptimizeFlags Flags,
// Optimization flags
struct TOptimizeParams* Parms) // Optional parameters
The function creates a parser context that can be used to edit and extract text, or do delete
arbitrary operators of a page.
The content parser is used by Optimize() too. Therefore, the same flags and optimization
parameters are supported. Please have a look at Optimize() for a description of the available
flags and parameters. The parameter Parms can be set to NULL and Flags to ofDefault if nothing
special should be achieved. Parms is considered only if the member StructSize is set to
sizeof(TOptimizeParams).
The function makes a copy of the structure if set. This makes sure that no error occurs when the
structure becomes out of scope.
Remarks:
To determine how the parser can be used, have a look at the example edit_text. The example is
available for C/C++, C#, Delphi, VB .Net, and VB 6.
The parser context must be deleted with DeleteParserContext() when no longer needed.
Return values:
If the function succeeds the return value is a pointer of the parser context. If the function fails
the return value is NULL.
 

Previous topic: Content parsing & editing, Include files, Abort, ChangeAltFont

Next topic: DeleteOperator, DeleteOperatorInObject, DeleteParserContext