THotPDF.SetLoadedAnnotationFlags Method
Sets the Flags integer value of a specific annotation on the specified page of the loaded PDF document to control the annotation's visibility, printability, and interactive behaviour
Declaration
procedure SetLoadedAnnotationFlags(PageIndex, AnnotationIndex, AFlags: Integer);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
AnnotationIndex | The zero-based index of the target annotation in the page annotation array |
AFlags | Annotation flag integer, a bitmask value defined by the PDF specification: Invisible=1, Hidden=2, Print=4, NoZoom=8, NoRotate=16, NoView=32, ReadOnly=64, Locked=128, ToggleNoView=256, LockedContents=512 |
Usage notes
- 设置 Hidden(位 2)会使注释在屏幕和打印时均不可见,而设置 NoView(位 6)仅隐藏屏幕显示但可打印
- ReadOnly (bit 7) only prevents user interaction; it does not affect programmatic modification of the annotation content
- Changes must be saved before they can be written to the output file