[pdftex] Merging duplicate embedded fonts

Reinhard Kotucha reinhard.kotucha at web.de
Tue Oct 8 01:21:44 CEST 2013


On 2013-10-07 at 10:53:35 +0200, Maarten Bezemer wrote:

 > Hello,
 > 
 > I have a problem with pdflatex asked about at 
 > http://tex.stackexchange.com/questions/136574/merging-duplicate-embedded-fonts
 > 
 > In the end I got suggested to further ask over here.
 > 
 > I have a LaTeX project that contains 2 PDF images. Both have a text with the 
 > same font that is fully embedded (not subset, to keep things simple).
 > The PDF that is created from the LaTeX sources does contain the font twice, 
 > once for each included image. I suppose that pdflatex should keep only one 
 > copy, especially since both fonts are fully embedded so it is easy to 
 > determine they are duplicate.
 > 
 > My LaTeX file is as follows:
 > 
 > \documentclass{article}
 > \usepackage{graphicx}
 > 
 > \begin{document}
 > \includegraphics{image1}
 > \includegraphics{image2}
 > \end{document}
 > 
 > 
 > pdffonts shows:
 > $ pdffonts mydoc.pdf 
 > name                                 type              encoding         emb 
 > sub uni object ID
 > ------------------------------------ ----------------- ---------------- --- 
 > --- --- ---------
 > SDXKYB+CMR10                         Type 1            Builtin          yes 
 > yes no       6  0
 > DejaVuSans                           TrueType          WinAnsi          yes no  
 > yes     11  0
 > DejaVuSans                           TrueType          WinAnsi          yes no  
 > yes     17  0
 > 
 > In my original document I have lots of images containing texts, resulting in 
 > lots of duplicate fonts. Obviously, I normally use subsets reducing the size 
 > of the final document. But I am (also) not able to merge the duplicate 
 > subsets... So I thought to use fully embedded fonts, but those do also not 
 > properly merge...
 > 
 > Am I doing something wrong resulting in the duplicate fonts? Or did I 
 > encounter a bug in pdf(la)tex?
 > 
 > The resulting PDF  file is set online [1], as well all the source files [2]
 > 
 > Best regards,
 >   Maarten
 > 
 > 
 > [1]: https://dl.dropboxusercontent.com/u/9671810/mydoc.pdf
 > [2]: https://dl.dropboxusercontent.com/u/9671810/mydoc.zip

What happens if you push your file through Ghostscript?

  ps2pdf mydoc.pdf mydoc-gs.pdf

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the pdftex mailing list