sudharakab / pdfsizeopt

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

AssertionError: Type1CGenerator failed (status) #17

Open GoogleCodeExporter opened 9 years ago

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

What does pdfsizeopt display when running the command above?
info: This is pdfsizeopt.py r102.
info: loading PDF from: icams-report.pdf
info: loaded PDF of 1231405 bytes
info: separated to 301 objs
info: found 0 Type1 fonts loaded
info: found 10 Type1C fonts loaded
info: eliminated 3 duplicate /Type1C font data
info: writing Type1CParser (924507 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 10 Type1C fonts
info: could not merge descs from different /Flags values: target=262178
source=2
62176 to /DIN-Bold: /DIN-Bold
info: could not merge descs from different /Flags values: target=34
source=32 to
 /DIN-Regular: /DIN-Regular
info: merged fonts ['/TimesNewRomanPSMT', '/TimesNewRomanPSMT'], reduced
char co
unt from 2638  to 1319 (50%)
info: writing Type1CGenerator (1404973 font bytes) to: pso.conv.gen.tmp.ps
info: executing Type1CGenerator with Ghostscript: gs -q -dNOPAUSE -dBATCH
-sDEVI
CE=pdfwrite -dPDFSETTINGS=/printer
-dColorConversionStrategy=/LeaveColorUnchange
d -sOutputFile=pso.conv.gen.tmp.pdf -f pso.conv.gen.tmp.ps
Type1CGenerator: using interpreter GPL Ghostscript 861 20071121
Error: /rangecheck in --put--
Operand stack:
   --nostringval--   --dict:11/18(ro)(L)--   abreveacute   (\377)   0   256
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--   --nostringval--   --nostringval--
 --nostringval--   %array_continue   --nostringval--
Dictionary stack:
   --dict:1152/1684(ro)(G)--   --dict:0/20(G)--   --dict:108/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 495540
GPL Ghostscript 8.61: Unrecoverable error, exit code 1
info: Type1CGenerator 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 6101, in main
    do_regenerate_all_fonts=do_regenerate_all_fonts)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 4441, in UnifyType1CFonts
    assert 0, 'Type1CGenerator failed (status)'
AssertionError: Type1CGenerator 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:19

Attachments:

GoogleCodeExporter commented 9 years ago
This seems to be a bug in font unification. It works with 
--do_unify_fonts=false.

Thank you for the bug report.

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