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

DynaPDF.HighlightAnnot

Creates a Highlight annotation.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 5.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.HighlightAnnot"; PDF; SubType; PosX; PosY; Width; Height; HighlightColor; Author; Subject; Comment )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
SubType The subtype of annotation.
Allowed values are Highlight, Squiggly, StrikeOut, or Underline.
"Highlight"
PosX X-coordinate of the annotation 100
PosY Y-coordinate of the annotation 100
Width Width of the annotation 100
Height Height of the annotation 100
HighlightColor Highlight color. 200
Author The author name. Can be empty. "Christian Schmitz"
Subject The subject to use. Can be empty.
Comment The comment. Can be empty.

Result

Returns annotation handle or error.

Description

Creates a Highlight annotation.
Highlight annotations are used to mark text on a PDF page.
If the coordinate system is bottom-up the point PosX, PosY defines the lower left corner of the bounding rectangle. If the coordinate system is top-down it defines the upper left corner.
The parameter Color specifies the highlight color; it must be defined in RGB color space. The line width of a Strikout or Underline annotation is not adjustable. The line width depends on the size of the annotation and is automatically calculated.
The active color space must be set to DeviceRGB before creating the annotation. See DynaPDF.SetColorSpace for further information.

See also HighlightAnnot function in DynaPDF manual.

Examples

Add a highlight annotation to page 3:

Set Variable [ $r ; Value: MBS("DynaPDF.EditPage"; $pdf; 3) ]
Set Variable [ $r ; Value: MBS( "DynaPDF.HighlightAnnot"; $pdf; "Highlight"; 100; 100; 300; 200; MBS( "DynaPDF.RGB"; 200; 100; 100 )) ]
Set Variable [ $r ; Value: MBS("DynaPDF.EndPage"; $pdf) ]

See also

This function checks for a license.

Created 28th November 2014, last changed 21st August 2021


DynaPDF.HavePro - DynaPDF.HighlightPattern