hefronmedia / pdfsizeopt

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

Ghostscript 8.7 fails on pso.conv.parse.tmp.ps #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I tried to run pdfsizeopt.py on my machine (Mac with Leopard) and I got the
error message copied below.
Apparently, I seem to have Ghostscript 8.7 which does not seem to like the
input  pso.conv.parse.tmp.ps, which my Windows machine with Ghostscript
8.54 has no problem with. For completeness, I have added this file and also
the input that I wanted to use for testing.

Bests,
  Csaba
---------------------------------------------------------------------
 python pdfsizeopt.py --use-pngout=true --use-jbig2=true
--use-multivalent=true concen.pdf
info: This is pdfsizeopt.py r132.
info: loading PDF from: concen.pdf
info: loaded PDF of 294339 bytes
info: separated to 229 objs
info: found 0 Type1 fonts loaded
info: found 23 Type1C fonts loaded
info: writing Type1CParser (67298 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 870 20090731
Error: /typecheck in --closefile--
Operand stack:
   --nostringval--   --dict:2/2(L)--   --nostringval--   --dict:1/1(ro)(L)--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1862   1   3   %oparray_pop 
 1861   1   3   %oparray_pop   1845   1   3   %oparray_pop   1739   1   3 
 %oparray_pop   --nostringval--   %errorexec_pop   .runexec2  
--nostringval--   --nostringval--   --nostringval--   2   %stopped_push  
--nostringval--   --nostringval--
Dictionary stack:
   --dict:1148/1684(ro)(G)--   --dict:0/20(G)--   --dict:88/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 8895
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
info: Type1CParser failed, status=0x100
Traceback (most recent call last):
  File "pdfsizeopt.py", line 6141, in <module>
    main(sys.argv)
  File "pdfsizeopt.py", line 6124, in main
    do_regenerate_all_fonts=do_regenerate_all_fonts)
  File "pdfsizeopt.py", line 4245, in UnifyType1CFonts
    data_tmp_file_name='pso.conv.parsedata.tmp.ps')
  File "pdfsizeopt.py", line 3982, in ParseType1CFonts
    assert 0, 'Type1CParser failed (status)'
AssertionError: Type1CParser failed (status)

Original issue reported on code.google.com by Csaba.Szepesvari on 17 Nov 2009 at 3:00

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for the detailed bug report. The fix will be delayed until 
Ghostscript 8.7
will become easy to my machines (Ubuntu Jaunty).

Original comment by pts...@gmail.com on 29 Nov 2009 at 11:57

GoogleCodeExporter commented 9 years ago
I had the same error, and the change below helped.
William
williambader@hotmail.com

Original comment by william.bader@gmail.com on 26 Mar 2010 at 3:26

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the bug report, and thanks to William for the patch. Patch 
integrated in r145.

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