pdf.crop_page
result = pdf.crop_page(src, page, x0, y0, x1, y1)
Input: src, page, x0, y0, x1, y1 · Output: result
What it is
Sets a page's /CropBox to the given rectangle (PDF points). Validated against the page's /MediaBox: an inverted/zero-area rectangle, or one reaching outside the media box, is refused by name rather than silently accepted.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = pdf.crop_page(src, page, x0, y0, x1, y1) | src —not documented yetpage —Sets a page's /CropBox to the given rectangle (PDF points).x0 —not documented yety0 —not documented yetx1 —not documented yety1 —not documented yet | result Vec | Returns a Vec of bytes, the new PDF. |
Examples
No documentation example calls this form yet. The File I/O chapter is where one belongs.