procedure InsertClipPath(Left, Bottom, Right, Top: Single);
| Left, Bottom | Single. Lower-left corner of the clip rectangle in PDF page units (points, origin at the bottom-left of the page) |
| Right, Top | Single. Upper-right corner of the clip rectangle in PDF page units |
Adds a rectangular clip path to the page. Content outside the rectangle stops being painted, though it stays in the file - clipping hides content, it does not delete it. Use RemoveObject when the content itself must go
The rectangle is given in PDF user space, where y grows upward from the bottom of the page, so Bottom is numerically smaller than Top
The clip path is created and destroyed inside the call; the page keeps only the resulting clip state. On a PDFium build without clip-path creation the call returns without changing the page
// keep only the top half of an A4 page
Pdf.InsertClipPath(0, 421, 595, 842);
Pdf.UpdatePage;