pdfcpu / pdfcpu

A PDF processor written in Go.

Home Page:http://pdfcpu.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Expected a dict object" - blank pages appearing in PDF

meerkat-mary opened this issue · comments

commented

Hi @hhrutter,

I'm facing a peculiar issue and I'm not entirely sure if it's due to pdfcpu or something else, but I thought I'd mention it just incase. I have a PDF that displays blank pages sporadically throughout the document when viewed specifically in Adobe Acrobat Reader. When viewing the document in other PDF viewers such as Foxit Reader or Apple Preview, it displays just fine.

When opening the offending pdf in Acrobat Reader, it displays the following error Expected a dict object. Looking through various forums etc, it looks like it may be due to some internal structure that throws Acrobat Reader off. Unfortunately I'm unable to share the PDF file due to its sensitive nature which I appreciate isn't helpful in terms of debugging, however the PDF is made up of a concatenation of multiple smaller PDFs, the blank pages in the final document all correspond to a particular source file which contains an image based signature - so I suspect that original file is introducing the issue that makes its way into the final file that is stitched together by pdfcpu.

I'll try to recreate the issue using a non-sensitive file in the interim, but it'd be great to confirm if this is something that pdfcpu can protect against e.g. failing a validation check on the file, or automatically cleaning up this problematic structure as part of the optimising step?

Thank you very much,
Mary

Hello!
Any of your input files for merging may be the culprit.
Should be possible to narrow this down by recreating that particular merge repeatedly omitting one input file step by step.
I am happy to look into this - there is always a reason and a way to fix, you can get in touch with me via email.