Skip to content

About pdf_clip_page #4544

Open
Open
@Syntamin

Description

@Syntamin

MuPDF’s C API recently added pdf_clip_page, which appears to filter page contents (e.g., for selective rendering or cropping). However, it’s unclear whether this function performs physical page clipping (modifying the PDF’s content stream to permanently remove clipped regions) or merely a visual clip (temporary for rendering).
need a way to programmatically crop PDF pages permanently (similar to CropBox but applied to content). If pdf_clip_page does this, I’d like to request Python bindings in PyMuPDF.


Clarify pdf_clip_page’s behavior:

Does it alter the PDF’s content stream to discard data outside the clip region?

Or is it a rendering-time optimization (like setMediaBox/setCropBox)?
Python binding timeline:

If pdf_clip_page supports permanent clipping, when might PyMuPDF expose this function?

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions