[pdftex] Merging duplicate embedded fonts

Maarten Bezemer m.m.bezemer at utwente.nl
Thu Oct 10 10:29:39 CEST 2013


On Wednesday 09 October 2013 22:26:28 Ross Moore wrote:
> On 09/10/2013, at 6:58 AM, Ross Moore wrote:
> > Presumably you want a size-reduction in your final PDF. This can only come
> > as a compromise in the functionality according to the browser used by
> > your audience, and/or at the expense of extra processing when the full
> > document is created.
> > 
> > Ghostscript has been suggested already.
> > Or try using Acrobat Pro to save a "reduced size" PDF, as an extra step
> > after pdfTeX. Whether this latter will work may depend upon the
> > characteristics of the font; in particular whether it is known already to
> > the software installation, and it's licensing conditions.> 
> >> The resulting PDF  file is set online [1],
> > 
> > I'll give APro a try and get back to you with the results.
> 
> When you resave your example file using Acrobat Pro, the two font
> instances are indeed combined and also subsetted.
> Other Metadata is also added, with the perhaps surprising result
> in an overall *gain* in size: 16kb has become 34kb.
> 
> Due to the different way compression is handled within the two files,
> it is hard to identify just where all the size-difference lies.
> 
> The attached image shows a schematic view of the internal structures
> (without MetaData) of both the original and APro-produced file.

Thanks for trying in Acrobat Pro.

When I look at your screenshot, I do not see that the font instances are 
combined. Both sides show the same amount of fonts. It is nicely shown that 
each instance is part of an embedded PDF file (XObject) though.
I assumed the PDF images would have been 'better' merged, I now see why it is 
more complex to merge the duplicate fonts, as they are not really duplicate, 
but part of the embedded PDF files...

Too bad, I hoped to solve this 'problem', but I see now that this is fairly 
complex. I could see whether I can embed the images as LaTeX files, so they are 
properly merged, but I am afraid I do not have enough time to do so before my 
deadline.

Thanks for your help and provided details!
Regards,
  Maarten


More information about the pdftex mailing list