galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.14k stars 169 forks source link

Cannot create CopyingContext on a pdf generated from hummus #424

Open berniexie opened 4 years ago

berniexie commented 4 years ago

My project involves feeding in PDFs generated from hummus back into hummus for further manipulation.

However, when i parse a pdf generated from hummus by using hummus.PDFRStreamForBuffer and pdfWriter.createPDFCopyingContext it throws the following error:

TypeError: unable to create copying context. verify that the target is an existing PDF file

However, I can open it just fine with any sort of standard PDF viewer. Does anyone have any insight into what is going on here. I attached a sample PDF that i generated through hummus and am feeding back into it.

random_test.pdf