hefronmedia / pdfsizeopt

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

AssertionError: Type1CConverter failed (status) #16

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 lshort-kr.pdf

What does pdfsizeopt display when running the command above?
info: This is pdfsizeopt.py r102.
info: loading PDF from: lshort-kr.pdf
info: loaded PDF of 1008711 bytes
info: separated to 2673 objs
info: found 56 Type1 fonts loaded
info: writing Type1CConverter (333271 font bytes) to: pso.conv.tmp.ps
info: executing Type1CConverter with Ghostscript: gs -q -dNOPAUSE -dBATCH
-sDEVI
CE=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 /TUGPML+CMBX12 to /Obj0000000014
Type1CConverter: converting font /FEGXNG+CMBX10 to /Obj0000000017
Type1CConverter: converting font /HVKRXG+CMMIB10 to /Obj0000000020
Type1CConverter: converting font /MWMPXB+CMSS12 to /Obj0000000026
Type1CConverter: converting font /HJCQTC+CMSS10 to /Obj0000000033
Type1CConverter: converting font /MOWUFK+CMMI12 to /Obj0000000036
Type1CConverter: converting font /GLROKE+CMR10 to /Obj0000000039
Type1CConverter: converting font /VRCHKB+CMSY10 to /Obj0000000053
Type1CConverter: converting font /PXXBOW+CMR8 to /Obj0000000062
Type1CConverter: converting font /CYGEOB+CMTT10 to /Obj0000000065
Type1CConverter: converting font /IAPGWU+CMTI10 to /Obj0000000069
Type1CConverter: converting font /RCHKRS+CMMI10 to /Obj0000000072
Type1CConverter: converting font /OOLQXY+CMBX8 to /Obj0000000194
Type1CConverter: converting font /RMVRPL+CMSS8 to /Obj0000000291
Type1CConverter: converting font /PSJVYZ+CMR6 to /Obj0000000299
Type1CConverter: converting font /YHBNPY+CMR9 to /Obj0000000303
Type1CConverter: converting font /KGATST+LCIRCLE10 to /Obj0000000312
Type1CConverter: converting font /NJHZBE+LINE10 to /Obj0000000315
Type1CConverter: converting font /XVSUMI+CMTT8 to /Obj0000000318
Type1CConverter: converting font /HDCRBA+CMR5 to /Obj0000000321
Type1CConverter: converting font /QZJSPZ+CMMI6 to /Obj0000000324
Type1CConverter: converting font /SZHSUA+CMCSC10 to /Obj0000000327
Type1CConverter: converting font /OILXJM+CMTI9 to /Obj0000000346
Type1CConverter: converting font /EIHWEV+CMTI8 to /Obj0000000357
Type1CConverter: converting font /ELZICA+CMSY9 to /Obj0000000384
Type1CConverter: converting font /JVZUPO+CMTT9 to /Obj0000000387
Type1CConverter: converting font /VHPFBM+CMSL10 to /Obj0000000396
Type1CConverter: converting font /FPUQNF+CMTI7 to /Obj0000000448
Error: /typecheck in -->>--
Operand stack:
   --nostringval--   --dict:14/23(L)--   --nostringval--   --nostringval--   0
 --nostringval--   1   --nostringval--   2   --nostringval--   3  
--nostringval
--   4   --nostringval--   5   --nostringval--   6   --nostringval--   7  
--nos
tringval--   8   --nostringval--   9   --nostringval--   10   --nostringval--
11   --nostringval--   12   --nostringval--   13   --nostringval--   14  
--nost
ringval--   15   --nostringval--   16   --nostringval--   17   --nostringval--
 18   --nostringval--   19   --nostringval--   20   --nostringval--   21  
--nos
tringval--   22   --nostringval--   23   --nostringval--   24   --nostringval--
  25   --nostringval--   26   --nostringval--   27   --nostringval--   28 
 --no
stringval--   29   --nostringval--   30   --nostringval--   31  
--nostringval--
   32   --nostringval--   33   --nostringval--   34   --nostringval--   35
  --n
ostringval--   36   --nostringval--   37   --nostringval--   38  
--nostringval-
-   39   --nostringval--   40   --nostringval--   41   --nostringval--   42
  --
nostringval--   43   --nostringval--   44   --nostringval--   45  
--nostringval
--   46   --nostringval--   47   --nostringval--   48   --nostringval--  
49   -
-nostringval--   50   --nostringval--   51   --nostringval--   52  
--nostringva
l--   53   --nostringval--   54   --nostringval--   55   --nostringval--   56
--nostringval--   57   --nostringval--   58   --nostringval--   59  
--nostringv
al--   60   --nostringval--   61   --nostringval--   62   --nostringval--   63
 --nostringval--   64   --nostringval--   65   --nostringval--   66  
--nostring
val--   67   --nostringval--   68   --nostringval--   69   --nostringval--   70
  --nostringval--   71   --nostringval--   72   --nostringval--   73  
--nostrin
gval--   74   --nostringval--   75   --nostringval--   76   --nostringval--
  77
   --nostringval--   78   --nostringval--   79   --nostringval--   80  
--nostri
ngval--   81   --nostringval--   82   --nostringval--   83  
--nostringval--   8
4   --nostringval--   85   --nostringval--   86   --nostringval--   87  
--nostr
ingval--   88   --nostringval--   89   --nostringval--   90   --nostringval--
91   --nostringval--   92   --nostringval--   93   --nostringval--   94  
--nost
ringval--   95   --nostringval--   96   --nostringval--   97   --nostringval--
 98   --nostringval--   99   --nostringval--   100   --nostringval--   101
  --n
ostringval--   102   --nostringval--   103   --nostringval--   104  
--nostringv
al--   105   --nostringval--   106   --nostringval--   107  
--nostringval--   1
08   --nostringval--   109   --nostringval--   110   --nostringval--   111
  --n
ostringval--   112   --nostringval--   113   --nostringval--   114  
--nostringv
al--   115   --nostringval--   116   --nostringval--   117  
--nostringval--   1
18   --nostringval--   119   --nostringval--   120   --nostringval--   121
  --n
ostringval--   122   --nostringval--   123   --nostringval--   124  
--nostringv
al--   125   --nostringval--   126   --nostringval--   127  
--nostringval--   1
28   --nostringval--   129   --nostringval--   130   --nostringval--   131
  --n
ostringval--   132   --nostringval--   133   --nostringval--   134  
--nostringv
al--   135   --nostringval--   136   --nostringval--   137  
--nostringval--   1
38   --nostringval--   139   --nostringval--   140   --nostringval--   141
  --n
ostringval--   142   --nostringval--   143   --nostringval--   144  
--nostringv
al--   145   --nostringval--   146   --nostringval--   147  
--nostringval--   1
48   --nostringval--   149   --nostringval--   150   --nostringval--   151
  --n
ostringval--   152   --nostringval--   153   --nostringval--   154  
--nostringv
al--   155   --nostringval--   156   --nostringval--   157  
--nostringval--   1
58   --nostringval--   159   --nostringval--   160   ka1   161  
--nostringval--
   162   ka3   163   ka4   164   --nostringval--   165   ka6   166   ka7   167
 ka8   168   --nostringval--   169   kaa   170   --nostringval--   171  
kac   1
72   kad   173   --nostringval--   174   kaf   175   kb0   176   kb1   177
  kb2
   178   kb3   179   kb4   180   kb5   181   --nostringval--   182  
--nostringv
al--   183   kb8   184   kb9   185   kba   186   kbb   187   kbc   188  
kbd   1
89   --nostringval--   190   --nostringval--   191   kc0   192   kc1   193
  --n
ostringval--   194   --nostringval--   195   --nostringval--   196   kc5   197
 kc6   198   kc7   199   kc8   200   kc9   201   --nostringval--   202  
--nostr
ingval--   203   --nostringval--   204   kcd   205   --nostringval--   206
  kcf
   207   --nostringval--   208   kd1   209   --nostringval--   210  
--nostringv
al--   211   kd4   212   --nostringval--   213   kd6   214  
--nostringval--   2
15   --nostringval--   216   --nostringval--   217   --nostringval--   218
  kdb
   219   --nostringval--   220   kdd   221   kde   222   --nostringval--   223
 --nostringval--   224   ke1   225   --nostringval--   226  
--nostringval--   2
27   --nostringval--   228   ke5   229   --nostringval--   230  
--nostringval--
   231   --nostringval--   232   --nostringval--   233   --nostringval--   234
 --nostringval--   235   --nostringval--   236   ked   237   kee   238  
--nostr
ingval--   239   kf0   240   kf1   241   kf2   242   --nostringval--   243
  --n
ostringval--   244   --nostringval--   245   kf6   246   --nostringval--   247
 --nostringval--   248   --nostringval--   249   --nostringval--   250  
--nostr
ingval--   251   --nostringval--   252   --nostringval--   253  
--nostringval--
   254   --nostringval--   255
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--
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 213944
GPL Ghostscript 8.61: Unrecoverable error, exit code 1
info: Type1CConverter 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 6096, in main
    pdf.ConvertType1FontsToType1C()
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 4001, in
ConvertType1FontsToType1C
    type1c_objs = self.GenerateType1CFontsFromType1(
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 3745, in
GenerateType1CFontsFromType1
    assert 0, 'Type1CConverter failed (status)'
AssertionError: Type1CConverter failed (status)
user@ubuntu804server:~/manypdfs/fail$

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:16

Attachments:

GoogleCodeExporter commented 9 years ago
Improved the processing of /Encoding (added conversion of null to /.notdef) in 
r132,
so now Type1CConverter is successful, but the generated PDF is still bad (in
Ghostscript and xpdf, even with --use-multivalent=false), possible because of
CID-keyed fonts. Could you please attach a short example, which contains only 
one
such font?

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

GoogleCodeExporter commented 9 years ago
Unfortunately, I am not able to generate a short example. This file was created 
using
special Korean packages, which I cannot figure out how to install, since the
available documentation seems to be in Korean only, which I do not speak....

Original comment by lev.bishop on 3 Jan 2010 at 5:28