DynaPDF Manual - Page 64
Previous Page 63 Index Next Page 65
Content parsing & editing
Page 64 of 860
WriteToPage
Syntax:
LBOOL psrWriteToPage(
const PPDF* IPDF,
// PDF instance pointer
const IPSR* Ctx,
// Parser instance pointer
TOptimizeFlags Flags,
// Flags to control optimization
struct TOptimizeParams* Parms) // Optional optimization parameters
The function writes the C object structure, that was created by ParsePage(), back to the page.
The flags and optional parameters were taken from Optimize() because Optimize() uses the
very same parser to optimize pages. Please have a look at this function to determine which flags
and parameters are available.
Unchanged pages can be left unchanged or written back to the page. This is up to you. If
WriteToPage() is called then the content stream will be optimized. If nothing special should be
achieved set Flags to ofDefault and Parms to NULL.
CreateParserContext() accepts already its own flags and TOptimizeParams structure. The
parameter Parms that was passed to this function is used for all pages unless WritePage()
contains its own version.
If the parameter Parms is set then this structure becomes the new default until it is overriden
again by a WriteToPage() call. The flags are always overriden.
The function makes a copy of the structure if set. This makes sure that no error occurs when the
structure becomes out of scope.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Previous topic: SetAltFont
Next topic: Complex Text Layout, How to enable Complex Text Layout?, Automatic Font Substitution, Alternate font lists