hefronmedia / pdfsizeopt

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

AssertionError: ImageRenderer failed (status) #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What command do you run to optimize the PDF?
user@ubuntu804server:~/manypdfs/fail$ ~/pdfsizeopt/pdfsizeopt.py
--usepngout=false --use-multivalent=true bt9.pdf

What does pdfsizeopt display when running the command above?
info: This is pdfsizeopt.py r102.
info: loading PDF from: bt9.pdf
info: loaded PDF of 47970 bytes
info: separated to 77 objs
info: found 2 Type1 fonts loaded
info: writing Type1CConverter (16384 font bytes) to: pso.conv.tmp.ps
info: executing Type1CConverter with Ghostscript: gs -q -dNOPAUSE -dBATCH
-sDEVICE=pdfwrite -dPDFSETTINGS=/printer
-dColorConversionStrategy=/LeaveColorUnchange
d -sOutputFile=pso.conv.tmp.pdf -f pso.conv.tmp.ps
Type1CConverter: using interpreter GPL Ghostscript 861 20071121
Type1CConverter: converting font /RQCGXJ+SFSS0600 to /Obj0000000079
Type1CConverter: converting font /SEFPSY+SFSS1440 to /Obj0000000081
Type1CConverter: all OK
info: loading PDF from: pso.conv.tmp.pdf
info: loaded PDF of 8310 bytes
info: separated to 17 objs
info: found 2 fonts in GS output
info: optimized total Type1 font size 16376 to Type1C font size 4297 (26%)
info: optimized Type1 font XObject 81,80: new size=2230 (32%)
info: optimized Type1 font XObject 79,78: new size=2658 (26%)
info: found 2 Type1C fonts loaded
info: writing Type1CParser (4281 font bytes) to: pso.conv.parse.tmp.ps
info: executing Type1CParser with Ghostscript: gs -q -dNOPAUSE -dBATCH
-sDEVICE=
nullpage -sDataFile=pso.conv.parsedata.tmp.ps -f pso.conv.parse.tmp.ps
Type1CParser: using interpreter GPL Ghostscript 861 20071121
Type1CParser: all OK
info: parsed 2 Type1C fonts
info: will optimize image XObject 13; orig width=128 height=128
colorspace=/Devi
ceRGB bpc=8 filter=/FlateDecode dp=0 size=1944 gs_device=png16m
info: saving PNG to pso.conv-13.parse.png
info: written 2014 bytes to PNG
info: will optimize image XObject 44; orig width=128 height=128
colorspace=/Devi
ceGray bpc=8 filter=/FlateDecode dp=0 size=5485 gs_device=pnggray
info: saving PNG to pso.conv-44.parse.png
info: written 5372 bytes to PNG
info: will optimize image XObject 73; orig width=128 height=128
colorspace=/Devi
ceRGB bpc=8 filter=[/ASCII85Decode/FlateDecode] dp=0 size=2476 gs_device=png16m
info: will optimize image XObject 74; orig width=128 height=128
colorspace=/Devi
ceGray bpc=8 filter=[/ASCII85Decode/FlateDecode] dp=0 size=6907
gs_device=pnggra
y
info: optimizing 4 images of 16812 bytes in total
info: writing ImageRenderer (2501 image bytes) to: pso.conv.png16m.tmp.ps
info: executing ImageRenderer with Ghostscript: gs -q -dNOPAUSE -dBATCH
-sDEVICE
=png16m -sOutputFile='pso.conv-%04d.png16m.tmp.png' -f pso.conv.png16m.tmp.ps
Error: /undefined in R
Operand stack:
   --nostringval--   --nostringval--   Type   XObject   Subtype   Image   Width
  128   Height   128   ColorSpace   DeviceRGB   BitsPerComponent   8  
Interpola
te   true   SMask   74   0
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--
  fa
lse   1   %stopped_push   1905   1   3   %oparray_pop   1904   1   3  
%oparray_
pop   1888   1   3   %oparray_pop   1771   1   3   %oparray_pop  
--nostringval-
-   %errorexec_pop   .runexec2   --nostringval--   --nostringval--  
--nostringv
al--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1150/1684(ro)(G)--   --dict:0/20(G)--   --dict:106/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 7383
GPL Ghostscript 8.61: Unrecoverable error, exit code 1
info: ImageRenderer failed, status=0x100
Traceback (most recent call last):
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 6118, in ?
    main(sys.argv)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 6104, in main
    pdf.OptimizeImages(use_pngout=use_pngout, use_jbig2=use_jbig2)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 4942, in OptimizeImages
    png_tmp_file_pattern='pso.conv-%%04d.%s.tmp.png' % gs_device)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 4722, in RenderImages
    assert 0, 'ImageRenderer failed (status)'
AssertionError: ImageRenderer failed (status)

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

Original issue reported on code.google.com by lev.bishop on 15 Nov 2009 at 12:13

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r131.

Original comment by pts...@gmail.com on 15 Nov 2009 at 8:24

GoogleCodeExporter commented 9 years ago
Fixed in r131.

Thanks for reporting this bug.

Original comment by pts...@gmail.com on 15 Nov 2009 at 8:24