Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 134

Previous Page 133   Index   Next Page 135

Function Reference
Page 134 of 750
Return values:
If the function succeeds the return value is 1. If the function fails the return value is zero.
ApplyAppEvent
Syntax:
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,
aePrint
= 2,
aeView
= 4
}TOCAppEvent;
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
default.
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.
ApplyPattern
Syntax:
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
{
cmFill,
// use the pattern as fill color
cmStroke,
// use the pattern as stroke color
cmFillStroke // use the pattern as fill and stroke color
}TColorMode;
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.
 

Previous topic: Append

Next topic: ApplyShading