-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change /Filter [/FlateDecode /DCTDecode]
to /Filter /DCTDecode
#127
Comments
See #95 |
@maadjordan say> using PSO will strill run it through deflate optimizing You can:
PS: OCR layer will be lost.
|
thanks for the prompt reply. I managed to find a windows compile of "pdfimages" but not img2pdf, jpegquant or jpegscan. jpegquant and jpegscan can be replaced with jpegrecompress and mozijpeg for lossy or lossless optimization. Can you provide a link to latest compiled version of img2pdf ? also some images are CCITT which is not viewable in Xnview. is there a way to view these? these are not recognized by PSO to passthrough Jbig2 encoder? |
@maadjordan say> Can you provide a link to latest compiled version of img2pdf ? Img2pdf is a python script using the PIL library. How the python support works in your OS is unknown to me. There is no such problem in Debian. |
it could be like pso exe files. its python wrapped into exe |
@maadjordan say> it could be like pso exe files. Maybe. Ask the developer: https://gitlab.mister-muffin.de/josch/img2pdf |
I managed to compile img2pdf into windows exe file using https://gitlab.mister-muffin.de/josch/img2pdf/issues/8 |
@maadjordan say> I managed to compile img2pdf Instead of |
FYI pdfsizeopt doesn't have any features right now to do JPEG (re)compression. |
its a GUI to jpegtrans, pnguant and other tools. nothing special. |
I know and I will be waiting for this feature. My main question was to simplify the file processing as jpg files are backed with deflate stream which means that reader need to inflate then read jpg files and both steps requires ram ! simplifying it would reduce ram considerably .. such feature is good to add. Also on same pages i found ccitt streams deflated and PSO missed to pass the stream to Jbig2 |
@maadjordan say> I know and I will be waiting for this feature. See #95 @pts say> It would be possible to add lossy optimizations (which can be enabled with a command-line flag) in general and lossy image optimizations with external tools such as jpeg-recompress in particular, but that would need substantial software development and maintenance work, and that would need either funding or volunteering (i.e. pull requests). |
This shouldn't be happening. maadjordan@, please report this as a separate issue, and attach the offending PDF file to the issue. |
/Filter [/FlateDecode /DCTDecode]
to /Filter /DCTDecode
OK, if I understand you correctly, you want pdfsizeopt to change This is possible to do, but it's unlikely to make the PDF file any smaller, and the overall goal of pdfsizeopt (with its default settings) to make PDF files smaller. To make this happen, pdfsizeopt/lib/pdfsizeopt/main.py Line 8143 in 33ec5e5
/DCTDecode and /JPXDecode , and GetUncompressedStream also need to be extended so that it won't try to decompress those streams. Also pdfsizeopt/lib/pdfsizeopt/main.py Line 8131 in 33ec5e5
I'm keeping this issue open in case anyone wants to pick up this work. |
I've found this https://www.usmodernist.org/AF/AF-1928-01-1.PDF
which seems that all scanned jfif images are stored as deflated dct stream. is possible to strip the deflating code safely or transfer it into dct only stream. uncompress it will still preserve this code and using PSO will strill run it through deflate optimizing
The text was updated successfully, but these errors were encountered: