THPDFViewer Rotation
Rotates the displayed page and Viewer model snapshots in 90-degree steps without changing the PDF page dictionary
Declarations
property ViewRotation: Integer;
procedure RotateClockwise;
procedure RotateCounterClockwise;
procedure ResetViewRotation;
procedure ApplyViewRotation(Bitmap: TBitmap);
Usage notes
ViewRotationis normalized to 0, 90, 180, or 270 degrees- Assigning a new document resets the view rotation to zero
- Fit-page and fit-width calculations use the combined PDF page and view rotations
- Search hit overlays rotate with the rendered page
CreatePageSnapshot,CreateCurrentPageSnapshot, and BMP output include the active view rotationApplyViewRotationtransforms a caller-owned bitmap in place through a 32-bit scan-line path
Example
PDFViewer.RotateClockwise;
Snapshot := PDFViewer.Model.CreateCurrentPageSnapshot(150);
try
Snapshot.SaveToFile('rotated-page.bmp');
finally
Snapshot.Free;
end;
PDFViewer.ResetViewRotation;