[pdftex] Merging duplicate embedded fonts

Ross Moore ross.moore at mq.edu.au
Wed Oct 9 22:26:28 CEST 2013


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen shot 2013-10-10 at 7.06.34 AM.png
Type: image/png
Size: 206981 bytes
Desc: not available
URL: <http://tug.org/pipermail/pdftex/attachments/20131010/ceea2962/attachment-0002.png>
-------------- next part --------------



Now presumably you have in mind embedded more than two images,
but maybe hundreds or thousands?

Using Acrobat pro as a post-processor of the pdfTeX-built
original PDF would most likely then lead to a savings in size.
If you have such a larger example, we could test this hypothesis.

Acrobat Pro gives a lot of control over just what things are discarded
when you do a save as "Optimized PDF".
I specified just removal of one instance of the DejaVu font; but in
another test, the combination and subsetting happened anyway just 
accepting all the defaults. 

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



Hope this helps,

	Ross


------------------------------------------------------------------------
Ross Moore                                       ross.moore at mq.edu.au 
Mathematics Department                           office: E7A-206      
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo.png
Type: image/png
Size: 5257 bytes
Desc: not available
URL: <http://tug.org/pipermail/pdftex/attachments/20131010/ceea2962/attachment-0003.png>
-------------- next part --------------



More information about the pdftex mailing list