You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use pdfWriter = muhammara.createWriterToModify(localPdfPath,{modifiedFilePath:destPdfPath}); to create my pdfWriter so I can read and add an annotations. It worked perfectly until now, when I encountered protected pdf file with not allowed page extraction.
PDF File is then locked and I need to restart my node.js api service.
pdfWriter is not initialized so can't use .end().
(Maybe it's some small bug in createWriterToModify routine.)
Please, is there any way how to make it work, is there any quick way?
Or is it possible to read all pages and recreated the pdf file without protection?
Any hint or example is very much welcome.
I can send the pdf file as well, but I do not want to upload it publicly, as it is an invoice of my client's supplier.
Thanks
Ludvik
EDIT:
I tried pdf online validator tool pdf-online.com and got following output for problem PDF file.
Details: Validating file "20240708114004_cma-cgm_com_1cb81728ba320cf8e0630a00ba4f89e0.pdf" for conformance level pdf1.4
The 'xref' keyword was not found or the xref table is malformed.
The file trailer dictionary is missing or invalid.
The "Length" key of the stream object is wrong.
The "Length" key of the stream object is wrong.
The document does not conform to the requested standard.
The file format (header, trailer, objects, xref, streams) is corrupted.
The document does not conform to the PDF 1.4 standard.Done.
It looks like this will be the cause of the issues. Will be glad for confirmation anyway. :)
The text was updated successfully, but these errors were encountered:
Hi,
I use
pdfWriter = muhammara.createWriterToModify(localPdfPath,{modifiedFilePath:destPdfPath});
to create my pdfWriter so I can read and add an annotations. It worked perfectly until now, when I encountered protected pdf file with not allowed page extraction.PDF File is then locked and I need to restart my node.js api service.
pdfWriter is not initialized so can't use .end().
(Maybe it's some small bug in createWriterToModify routine.)
Please, is there any way how to make it work, is there any quick way?
Or is it possible to read all pages and recreated the pdf file without protection?
Any hint or example is very much welcome.
I can send the pdf file as well, but I do not want to upload it publicly, as it is an invoice of my client's supplier.
Thanks
Ludvik
EDIT:
I tried pdf online validator tool pdf-online.com and got following output for problem PDF file.
File: 20240708114004_cma-cgm_com_1cb81728ba320cf8e0630a00ba4f89e0.pdf
Compliance: pdf1.4
Result: Document does not conform to PDF/A.
Details: Validating file "20240708114004_cma-cgm_com_1cb81728ba320cf8e0630a00ba4f89e0.pdf" for conformance level pdf1.4
The 'xref' keyword was not found or the xref table is malformed.
The file trailer dictionary is missing or invalid.
The "Length" key of the stream object is wrong.
The "Length" key of the stream object is wrong.
The document does not conform to the requested standard.
The file format (header, trailer, objects, xref, streams) is corrupted.
The document does not conform to the PDF 1.4 standard.Done.
It looks like this will be the cause of the issues. Will be glad for confirmation anyway. :)
The text was updated successfully, but these errors were encountered: