procedure TransformPageContent(const Matrix: FS_MATRIX; const Clip: TPdfRectangle);
| Matrix | FS_MATRIX. Transform applied to the page content, in PDF matrix order |
| Clip | TPdfRectangle. Clip rectangle in PDF page units applied together with the transform |
Transforms the page as a whole rather than one object at a time, which is what straightening a scan, scaling artwork to a new page size or mirroring a page needs
Annotations are not content and do not move with it. Apply the same matrix via TransformPageAnnotations when they should follow
The cached text page is discarded and the page is reloaded, so extracted text positions reflect the new geometry immediately
var M: FS_MATRIX;
var Clip: TPdfRectangle;
M.a := 0.5; M.b := 0; M.c := 0; M.d := 0.5; M.e := 0; M.f := 0;
Clip := Pdf.GetPageBox(pbMediaBox);
Pdf.TransformPageContent(M, Clip);
Pdf.TransformPageAnnotations(M);