Generated pdf doesn't open in Adobe Reader
Describe the bug
The PDF created from the Playground does not open in Adobe Reader. This issue persists with other PDFs that were similarly generated from code.
To Reproduce
Please visit https://playground.pdfme.com/ to generate the invoice PDF. After creating it, attempt to save it to your local system. Next, try to open this file using Adobe Reader. The same PDF has been attached for your reference.
c10a5726-2bc5-461e-945a-ab39f2c6c6be.pdf
Expected behavior
I expect the generated pdf to be opened from all pdf viewers
Your Environment
- pdfme package(@pdfme/generator or @pdfme/ui):
- pdfme version:
- Operating system: MacOS
- Node.js version or Browser name & version:
Your Error Log
None
Additional context
No response
I was able to get around this by using https://www.ghostscript.com/ to convert the pdf to version 1.4
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=dist/test2.pdf dist/test.pdf
ghostscript does a lot more than convert the version - its does a complete rewrite of the PDF, so it's unlikely to be the version that's causing the issue. There's probably something that it ignores within the PDF when reading and subsequently doesn't write it on output.
duplicate of #480
Indeed, it interprets and rewrite the PDF. The PDF version 1.7 has been in circulation since 2016, definitely not the problem. Just a temporary solution for now. Thanks for pointing out the duplicate.
Another thing that I observed about the PDFs that don't work with Adobe is that on MacOS, these PDFs do not display the number of pages when using the file command, unlike the functional PDFs.
A PR has been opened to resolve this issue: https://github.com/pdfme/pdfme/pull/493
This issue has been resolved in version 4.1.0, so I'm closing it. If you still experience problems with the latest version, please let us know.