Closed GoogleCodeExporter closed 9 years ago
Thank you for reporting this problem, and thank you for sending a detailed bug
report.
Using the attached file Pages1-7.pdf I could identify and fix (in r194) an xref
object parsing bug.
Based on the information provided I could diagnose and fix (in r195) a
Windows-only bug (GetUncompressedStream was calling Ghostscript incorrenctly).
Please download the newest pdfsizeopt, and run the following command:
pdfsizeopt.py --use-multivalent=no --do-optimize-images=no Pages1-7.pdf
For me it succeeds and prints this on Linux:
info: This is pdfsizeopt.py r195 size=309327.
info: loading PDF from: Pages1-7.pdf
info: loaded PDF of 257118 bytes
info: using Ghostscript gs: GPL Ghostscript 8.71 (2010-02-10)
info: decompressing 36 bytes with Ghostscript /Filter/FlateDecode/DecodeParms
<</Columns 3/Predictor 12>>
info: decompressing 97 bytes with Ghostscript /Filter/FlateDecode/DecodeParms
<</Columns 5/Predictor 12>>
info: found 43 obj offsets and 3 obj streams in xref stream
info: separated to 38 objs + xref + trailer
info: found 0 Type1 fonts loaded
info: found 0 Type1C fonts loaded
info: eliminated 6 duplicate objs
info: eliminated 2 unused objs in 2 classes
info: saving PDF with 30 objs to: Pages1-7.pso.pdf
info: generated object stream of 560 bytes in 21 objects (12%)
info: generated 253953 bytes (99%)
If that command doesn't work for you, please reply (and include the full
output).
If that command works for you, then you can remove the flags
--use-multivalent=no and --do-optimize-images=no one-by-one. If removing the
flags makes it fail, please open another issue about that.
Original comment by pts...@gmail.com
on 25 Jun 2012 at 2:55
Thanks for your help.
I get the same output you do when i don't use multivalent and i don't optimize
images however when multivalent=yes and optimize-images=yes I get this error
string:
"Error in findFileFormatStream: failed to read first 12 bytes of file"
and the program keeps running. I'm assuming this is an error with jbig2.exe
because the PDF file that is created has 7 pages but i get an acrobat error
"Insufficient data for an image" and all pages are blank. I see that error
string in Leptonica but the function looks pretty simple so I'm not sure why
it's failing.
Attached is the log and pdf file.
Original comment by fdnc...@gmail.com
on 25 Jun 2012 at 5:48
Attachments:
One last note. I just finished compiling Adam Langley's jbig2 encoder with
vs2010 on my system. That got rid of the "Error in findFileFormatStream"
problems but the PDF still fails to open with the "Insufficient blah blah"
error. Not quite sure where to go to from here.
Thanks,
Darren
Original comment by fdnc...@gmail.com
on 25 Jun 2012 at 6:31
Please open a new issue, attach the original PDF (again), the PDF generated by
pdfsizeopt+jbig2, and the jbig2.exe you use. Don't forget to include the
console output messages of pdfsizeopt. I'll start by trying to reproduce the
problem on Linux.
Original comment by pts...@gmail.com
on 25 Jun 2012 at 8:36
Original issue reported on code.google.com by
fdnc...@gmail.com
on 21 Jun 2012 at 5:53Attachments: