dwings / pdfsizeopt

Automatically exported from code.google.com/p/pdfsizeopt
0 stars 0 forks source link

java.io.IOException: incorrect header check @ 0 while reading object #137 #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What command do you run to optimize the PDF?
user@ubuntu804server:~/manypdfs/fail2$ ~/pdfsizeopt/pdfsizeopt.py
--use-pngout=false Myriad\ Pro\ ReadMe.pdf

What does pdfsizeopt display when running the command above?
info: This is pdfsizeopt.py r134.
info: loading PDF from: Myriad Pro ReadMe.pdf
info: loaded PDF of 99354 bytes
info: separated to 314 objs
info: found 0 Type1 fonts loaded
info: found 6 Type1C fonts loaded
info: eliminated 112 duplicate objs
info: eliminated 24 unused objs in 22 classes
info: writing Multivalent input PDF: pso.conv.mi.tmp.pdf
info: saving PDF with 179 objs to: pso.conv.mi.tmp.pdf
info: generated 85037 bytes (86%)
info: executing Multivalent to optimize PDF: java -cp
/home/user/pdfsizeopt/Mult
ivalent.jar tool.pdf.Compress pso.conv.mi.tmp.pdf
file:/home/user/manypdfs/fail2/pso.conv.mi.tmp.pdf, 85037 bytes, encrypted
PDF 1.3, producer=0·ìZöû}n±)ŸÓb►â"ü›ƒ#, 
creator=0·ìZöûdD³l Óg£a«Ž
java.io.IOException: incorrect header check @ 0 while reading object #137:
{Filt
er=FlateDecode, DATA=9606, Length=7009}
pso.conv.mi.tmp.pdf: java.io.IOException: incorrect header check @ 0
info: Multivalent generated pso.conv.mi.tmp-o.pdf of 0 bytes (0%)
Traceback (most recent call last):
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 6157, in ?
    main(sys.argv)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 6150, in main
    pdf.SaveWithMultivalent(output_file_name)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 5982, in SaveWithMultivalent
    assert out_data_size, (
AssertionError: Multivalent generated empty output (see its error above)

What's wrong with the optimized PDF?
There isn't one!

It works with --use-multivalent=false, though

Original issue reported on code.google.com by lev.bishop on 25 Jan 2010 at 4:38

Attachments:

GoogleCodeExporter commented 9 years ago
The file you have attached is an encrypted PDF. pdfsizeopt (and Multivalent) 
don't support reading encrypted PDFs. I'll add a more helpful error message to 
indicate this.

Original comment by pts...@gmail.com on 10 Feb 2011 at 10:30

GoogleCodeExporter commented 9 years ago
Merged to issue 51.

Original comment by pts...@gmail.com on 15 Apr 2012 at 7:50