Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to combine PDFs that have optional content? #199

Open
amorimlucas opened this issue Aug 28, 2021 · 1 comment
Open

How to combine PDFs that have optional content? #199

amorimlucas opened this issue Aug 28, 2021 · 1 comment

Comments

@amorimlucas
Copy link

I'm trying to combine multiple PDFs where one or more have optional content. When I try to do so, I get the following error:

Couldn't merge PDF: Optional Content PDF files aren't supported and their pages cannot be safely extracted.

Does anyone know of a way to combine PDFs with optional content? Thank you.

@amorimlucas amorimlucas changed the title How to combine a PDF that has optional content? How to combines PDF that have optional content? Aug 30, 2021
@amorimlucas amorimlucas changed the title How to combines PDF that have optional content? How to combine PDFs that have optional content? Aug 30, 2021
@OlexYakov
Copy link

You could have read the Known Limitations section.

Sometimes the CombinePDF will raise an exception even if the PDF could be parsed (i.e., when PDF optional content exists)... I find it better to err on the side of caution, although for optional content PDFs an exception is avoidable using CombinePDF.load(pdf_file, allow_optional_content: true).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants