DynaPDF Manual - Page 679

Previous Page 678   Index   Next Page 680

Function Reference
Page 679 of 839
SetAnnotColor
Syntax:
LBOOL pdfSetAnnotColor(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// Annotation handle
TAnnotColor ColorType, // Color to be change
TPDFColorSpace CS,
// Color space
UI32 Color)
// Color to be set
typedef enum
{
fcBackColor
= 0, // Link annotations support no background color!
fcBorderColor = 1,
fcTextColor
= 2
// Free Text annotation's only
}TFieldColor, TAnnotColor;
The function sets or changes the color of an annotation. The color can be defined in any device color
space. However, at time of publication the function converts the color back to DeviceRGB.
Note that not all annotation types support a background or border color. For example, link
annotations support a border color but no background or text color.
Remarks:
When changing a color of a Free Text annotation DynaPDF must rebuild the appearance stream of
the annotation. This can cause slightly changes in the text position. See also FreeTextAnnot().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetAnnotFlags
Syntax:
LBOOL pdfSetAnnotFlags(
const PPDF* IPDF,
// Instance pointer
TAnnotFlags Flags) // Flags see below
typedef UI32 TAnnotFlags;
#define afNone
0x00000000 // No flags are set
#define afInvisible
0x00000001 // see below
#define afHidden
0x00000002 // see below
#define afPrint
0x00000004 // Annotation is printable
#define afNoZoom
0x00000008 // Do not zoom the annotation
#define afNoRotate
0x00000010 // Do not rotate the annotation
#define afNoView
0x00000020 // See description below
#define afReadOnly
0x00000040 // Changes are not allowed
#define afLocked
0x00000080 // See description below
#define afToggleNoView
0x00000100 // See description below
#define afLockedContents 0x00000200 // See description below
The function sets the default flags used for new annotations. The parameter Flags is a bit mask;
multiple flags can be set with a binary or operator (e.g. afPrint | afReadOnly). It is also possible to
add each flag separately; the previous flags are only deleted if afNone is used.
pdfSetAnnotFlags(pdf, afPrint | afReadOnly);
 

Previous topic: SetAnnotBorderWidth

Next topic: SetAnnotFlagsEx, SetAnnotHighlightMode