Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.SetAnnotColor

Sets or changes the color of an annotation.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 5.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.SetAnnotColor"; PDF; AnnotationHandle; ColorSelector; ColorSpace; ColorValue )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
AnnotationHandle The annotation index. 5
ColorSelector Which color to change. Can be BackColor, BorderColor or TextColor. "TextColor"
ColorSpace The color space to use. Can be DeviceRGB, DeviceCMYK or DeviceGray. "DeviceRGB"
ColorValue The color value as number. 255

Result

Returns OK or error.

Description

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 DynaPDF.FreeTextAnnot.

See also SetAnnotColor function in DynaPDF manual.

See also

This function checks for a license.

Created 25th November 2014, last changed 25th November 2014


DynaPDF.SetAnnotBorderWidth - DynaPDF.SetAnnotDate