@ooBJ3u Thanks! I re-tested with your latest commit, and I no longer see that syntax error.
That could explain it. Do you happen to have the byte strings that should be removed at the end handy? We can check to make sure those are present, and then remove those in that case.
Sure,…
@phmccarty that sounds like a bug in
pdfimages
. I've created and distributed many files with this MR, and they all open properly in PDF readers, and haven't heard any issues from users with…
FWIW, I tested the changes in this MR by converting some TIFF files to JBIG2 (with jbig2 file.tif > file.jb2
) and running img2pdf on them, and the resulting PDF seems to work just fine.
Howeve…
Thanks! Confirmed working now :)
@josch Testing with the latest commit with a PNG that does have a DPI set, img2pdf changes the DPI to 96x96. PIL sets the dpi
field instead of aspect
in that case.
Shouldn't img2pdf keep…
This is all part of a python rewrite of gscan2pdf. I'm using img2pdf to create the PDFs before using OCRmyPDF to add the text layer.
I'm manipulating the images internally with PIL, and…
I'm not sure what the root cause might be, but I found a workaround: Use the -units
flag when creating the images. For example:
convert rose: -density 100x200 -units PixelsPerInch…
- maybe a package in arch linux also ships /usr/share/color/icc/sRGB.icc and you just have it not installed -- can you check?
I discovered that /usr/share/color/icc/sRGB.icc
is provided by…
I also added a bunch of test cases for this in b25429a4c11bd62171066e8b9caf1b80c610ee58 so that this problem doesn't happen again.
Could you try running
pytest
with the latest git HEAD…
One more update: I squashed changes into one commit to minimize the churn between commits.
Updated the MR to reflect the discussion from #155