THotPDF.SetLoadedPageRotation Method
Sets the rotation angle of a specified page in the loaded PDF document, rendering the page in the reader at the specified orientation
Declaration
procedure SetLoadedPageRotation(PageIndex, ADegrees: Integer);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page; 0 indicates the first page |
ADegrees | Rotation angle, must be one of 0, 90, 180, or 270, representing clockwise degrees |
Usage notes
- PDF 规范仅允许 0、90、180、270 四个旋转值,传入其他值可能导致文件不合规
- The rotation attribute is a view attribute and does not affect the coordinate system of the page content stream; coordinates must be converted accordingly when extracting text
- The save method must be called after modification, otherwise the changes will not be persisted