hefronmedia / pdfsizeopt

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

"Found 1 duplicate font objs" #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(The bug template asks me to choose a label, but there is no place to
choose one....)

What command do you run to optimize the PDF?
user@ubuntu804server:~/pdfsizeopt$ svnver/pdfsizeopt.py --use-pngout=false
--use-jbig2=false --use-multivalent=false Bishop-thesis.pdf

What does pdfsizeopt display when running the command above?
user@ubuntu804server:~/pdfsizeopt$ svnver/pdfsizeopt.py --use-pngout=false
--use-jbig2=false --use-multivalent=false Bishop-thesis.pdf
info: This is pdfsizeopt.py r90.
info: loading PDF from: Bishop-thesis.pdf
info: loaded PDF of 48084 bytes
info: separated to 15 objs
info: found 1 Type1 fonts loaded
info: writing Type1CConverter (43799 font bytes) to: pso.conv.tmp.ps
info: executing Type1CConverter with Ghostscript: gs -q -dNOPAUSE -dBATCH
-sDEVICE=pdfwrite -dPDFSETTINGS=/printer
-dColorConversionStrategy=/LeaveColorUnchanged
-sOutputFile=pso.conv.tmp.pdf -f pso.conv.tmp.ps
Type1CConverter: converting font /JAZYVR+MinionPro-Regular to /Obj0000000012
Type1CConverter: all OK
info: loading PDF from: pso.conv.tmp.pdf
info: loaded PDF of 14741 bytes
info: separated to 19 objs
error: duplicate font /Obj0000000012 obj old=12 new=14
info: found 2 fonts in GS output
Traceback (most recent call last):
  File "svnver/pdfsizeopt.py", line 5960, in ?
    main(sys.argv)
  File "svnver/pdfsizeopt.py", line 5942, in main
    pdf.ConvertType1FontsToType1C()
  File "svnver/pdfsizeopt.py", line 3873, in ConvertType1FontsToType1C
    type1c_objs = self.GenerateType1CFontsFromType1(
  File "svnver/pdfsizeopt.py", line 3663, in GenerateType1CFontsFromType1
    type1c_objs = pdf.GetFonts(
  File "svnver/pdfsizeopt.py", line 3614, in GetFonts
    assert not duplicate_count, (
AssertionError: found 1 duplicate font objs in GS output

What's wrong with the optimized PDF?
There isn't one!

The attached file is the minimal example I could produce. I made it using
pdflatex with the MinionPro package. 

Versions:
user@ubuntu804server:~/pdfsizeopt$ gs --version
8.61
user@ubuntu804server:~/pdfsizeopt$ svnver/pdfsizeopt.py --version
info: This is pdfsizeopt.py r90.

Lev

Original issue reported on code.google.com by lev.bishop on 19 Oct 2009 at 4:25

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for the detailed bug report. Ghostscript is generating two CFF fonts 
from
one original font for no apparent reason. I'm still debugging the issue.

Original comment by pts...@gmail.com on 22 Oct 2009 at 12:55

GoogleCodeExporter commented 9 years ago
Issue fixed in r91, after asking for clarification on the gs-devel mailing list.

Please verify that everything works with a larger document.

Original comment by pts...@gmail.com on 22 Oct 2009 at 6:48

GoogleCodeExporter commented 9 years ago
I can confirm that there is no longer the duplicate font error, so thanks for 
that.
However, now that there is an output file, I see some other problems with the 
larger
document. I will try to reduce these to a minimal testcase and open separate 
bugs for
them.

Original comment by lev.bishop on 22 Oct 2009 at 9:15

GoogleCodeExporter commented 9 years ago
Cool, thanks. Having a minimal testcase for each bug saves quite a bit
of my time.

Original comment by pts...@gmail.com on 22 Oct 2009 at 11:14