Created pdf cannot be oppened using Acrobat #160
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
I am trying to convert the following image to pdf succeed but the created pdf cannot be openned using Acrobat reader.
Regards,
Is it possible that you uploaded a wrong file?
The PDF seems to contain a different image than the input JPG you provided.
And looking at the metadata, your PDF does not show img2pdf as producer.
Might be possible, i made several tests before posting.
Please find below the pdf I just regenerated.
Version of img2pdf = "0.3.6"
Upgrading to the last version of img2pdf ("0.4.4") does not solve the problem.
That looks better, but still img2pdf is not shown as producer in the metadata.
Are you doing any kind of post-processing to the PDF?
Could you try using the vanilla img2pdf CLI, and then check if Adobe Reader opens the result, to rule out an issue with your own code?
img2pdf 10000057.jpg -o out.pdf
No, no post treatment, I just run the two lines of python given in my first post.
Please find attached the result of
img2pdf 10000057.jpg -o out.pdf
I still get the same problem on my side.
If it might help, I succeeded to fix the file out.pdf by using https://www.ilovepdf.com/.
Please find attached the fixed file.
It is no surprise that your new pdf works, because it re-encoded the included JPEG (which results in quality loss).
It is likely that adobe acrobat does not like somthing about the JPEG in your original pdf. Try to convert the jpeg into another jpeg using a tool of your choice and then running img2pdf again on the new file.
If acrobat reads that new file, then something was "wrong" with your old jpeg.
In that case, this is not a bug in img2pdf but a bug in acrobat because all pdf viewers i tried (evince, mupdf, firefox, chromium, libre office, gimp, inkscape) can open the pdf you showed just fine.
Hello,
I found a solution by reworking jpegs before img2pdf transformation.
The ticket is solved.
Thanks for your answers and your help.