THotPDF.MoveLoadedAnnotation Method
Moves the specified annotation in the loaded PDF from a source page to a target page, enabling cross-page annotation migration
Declaration
procedure MoveLoadedAnnotation(FromPageIndex, AnnotationIndex, ToPageIndex: Integer);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FromPageIndex | Zero-based index of the page where the annotation is currently located |
AnnotationIndex | Zero-based index of the annotation in the source page's annotation list |
ToPageIndex | The zero-based index of the target page the annotation is moving to |
Usage notes
- 移动后注释在目标页面的位置坐标不变,但页面尺寸不同时注释可能超出目标页面的可视范围
- After the annotation is moved, the source page's annotation index list is reordered; subsequent index references to the annotations on that page need to be updated accordingly
- 若
FromPageIndex与ToPageIndex相同,操作无实际效果但不会报错