Issue 18: AssertionError: found 14 duplicate font objs in GS output
Status:  Accepted
Owner:
Reported by lev.bishop, Nov 14, 2009
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!


symbols-a4.pdf
4.1 MB   Download
Nov 15, 2009
Project Member #1 pts...@gmail.com
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.
Status: Accepted