DynaPDF Manual - Page 142

Previous Page 141   Index   Next Page 143

Function Reference
Page 142 of 787
LBOOL pdfApplyAppEvent(
const PPDF* IPDF,
// Instance pointer
TOCAppEvent Event, // Event that should be applied
LBOOL SaveResult)
// If true, the new state will be stored in the file
typedef enum
aeExport = 1,
= 2,
= 4
The visibility state of optional content groups (OCGs) can be dynamically changed in application
events like Export, View, or Print. DynaPDF loads the view state when rendering PDF pages by
The function can be used to apply the visibility state of another event if necessary. The result can
optionally be stored in the PDF file but note that this has only an effect in PDF viewers which
support layers but no application events since the events will not be deleted from the PDF file. It is
also possible to delete the events with DeleteAppEvents().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SI32 pdfApplyPattern(
const PPDF * IPDF,
// Instance pointer
SI32 PattHandle,
// Handle of the pattern
TColorMode ColorMode, // Color mode (fill or stroke color or both)
UI32 Color)
// uncolored patterns only
typefed enum
// use the pattern as fill color
// use the pattern as stroke color
cmFillStroke // use the pattern as fill and stroke color
The function sets a tiling pattern as current fill, stroke or fill and stroke color. Two types of patterns
are supported; colored tiling patterns which contain their own color information and uncolored
tiling patterns which can be used with a user defined color.
The parameter PattHandle must be a valid pattern handle that was returned by BeginPattern() or
CreateStdPattern(). The parameter Color is ignored for colored tiling patterns. Uncolored tiling

Previous topic: Append

Next topic: ApplyShading

Start Chat