hefronmedia / pdfsizeopt

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

AssertionError: found 14 duplicate font objs in GS output #18

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 symbols-a4.pdf

What does pdfsizeopt display when running the command above?
The output is too long to paste here, but here are the beginning and ending
of the output...

info: This is pdfsizeopt.py r102.
info: loading PDF from: symbols-a4.pdf
info: loaded PDF of 4316865 bytes
info: separated to 3713 objs
info: found 123 Type1 fonts loaded
...
...
info: found 137 fonts in GS output
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 3754, in
GenerateType1CFontsFromType1
    type1c_objs = pdf.GetFonts(
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 3705, in GetFonts
    assert not duplicate_count, (
AssertionError: found 14 duplicate font objs in GS output

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

Attachments:

GoogleCodeExporter commented 9 years ago
There is an important limitation in the current implementation of pdfsizeopt: it
doesn't work reliably with Type1 fonts with >256 glyphs, and the attached PDF
contains such a font. Fixing this limitation would neeed a lot of work, 
including
adding a substantial new feature: CFF font unification.

Original comment by pts...@gmail.com on 15 Nov 2009 at 9:00