Skip to content

Document select keeps the pdf with the same size. #880

@caiocesarrm

Description

@caiocesarrm

Hi!
I have a pdf (a book with 373 pages). I select one page using doc.select([75]) and save.

doc = fitz.open(f'{base_path}[Chollet]-Deep_Learning_with_Python.pdf')
doc.select([75])
doc.save(f'{base_path}page.pdf', clean=True, garbage=4, deflate=True)

the page saved: page.pdf

image

After i save the file, the pdf have almost the same size, having only one page.
i believe that this is because the content is still there. Any thoughts on how can i solve this?

image

PyMuPDF 1.18.6.
Built for Python 3.6 on linux (64-bit).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions