Qu

pdf.crop_page

Builtin index · File I/O

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.

CodeInputOutputDescription
result = pdf.crop_page(src, page, x0, y0, x1, y1)
src —not documented yet
page —Sets a page's /CropBox to the given rectangle (PDF points).
x0 —not documented yet
y0 —not documented yet
x1 —not documented yet
y1 —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.