Open ZoharGel opened 5 years ago
I'm running into the same error when trying to recrypt certain PDF files in PDF v 1.7. See https://github.com/galkahana/HummusJS/issues/426. In my case im doing a plain recrypt w/o involving a password:
hummus.recrypt(pdfReader, pdfWriter)
The log produces a similar output
PDFDocumentHandler::CopyInDirectObject, object not found. 383
I can't share the PDF files to reproduce since these a client documents containing confidential information.
@galkahana Unfortunately I'm not a C++ guy otherwise I would fix it by myself. But I guess this is the line in question: https://github.com/galkahana/HummusJS/blob/b699d6a01ba027428120cbe5b1c16813bed0521d/src/deps/PDFWriter/PDFDocumentHandler.cpp#L606 Recrypt is such a helpful utility and I would very much appreciate if you could take a look at this issue. It is not a common issue with PDF v1.7 though. I could mail you a sample PDF document to reproduce (can't share it openly here).
I'm using:
hummus.recrypt(pdfReader, pdfWriter, { userPassword: userPassword, ownerPassword: ownerPassword});
To add a password on a PDF file. This works for most files but in some I get this exception:
After adding the 'log' path to the recrypt options object I see the following:
Any Idea what could cause this exception?