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. |
矩形クリップパスをページに追加します。矩形外のコンテンツは描画されなくなりますが、ファイルには残ります。クリッピングはコンテンツを隠すのであって削除はしません。コンテンツ自体を除去するには RemoveObject を使用します
矩形は PDF ユーザー空間で与えられ、y はページの下から上へ増加するため、Bottom は数値的に Top より小さくなります
クリップパスは呼び出し内で作成・破棄され、ページは結果のクリップ状態のみを保持します。クリップパス作成を持たない PDFium ビルドでは、ページを変更せずに呼び出しが戻ります
// keep only the top half of an A4 page
Pdf.InsertClipPath(0, 421, 595, 842);
Pdf.UpdatePage;