DynaPDF Manual - Page 625

Previous Page 624   Index   Next Page 626

Function Reference
Page 625 of 777
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
= 0, // Link annotations support no background color!
fcBorderColor = 1,
= 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.
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.

Previous topic: SetAnnotBorderWidth

Next topic: SetAnnotFlags