vikrambalye / dompdf

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

Font Embedding Increases File Size #330

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate a PDF with Arial Font.

What is the expected output? What do you see instead?
File size is too heavy. It should be around 35 KB whereas it is of 1800 KB

What version of the product are you using? On what operating system?
PHP 5.2.14

Please provide any additional information below.
Dompdf adds font in pdf which makes files size too heavy. How should we disable 
font embedding in pdf? 

Original issue reported on code.google.com by binarys...@gmail.com on 29 Jul 2011 at 9:35

GoogleCodeExporter commented 9 years ago

Original comment by fabien.menager on 31 Jul 2011 at 1:37

GoogleCodeExporter commented 9 years ago
Just to follow up, font embedding actually embeds the font. So however large 
the font is, that's roughly how much larger your rendered PDF will be. Adding 
support for a font into DOMPDF and then specifying it in your document will 
result in it being embedded.

We have in a request to add font sub-setting, and definitely plan to support 
that in a future release. This would significantly decrease the size of most 
documents with embedded fonts. We've also looked at the possibility of using 
fonts without embedding them, though this line of development is currently on 
hold.

In the meantime, to keep the PDF size light you can use one of the core fonts 
(Helvetica, Times Roman, Courier).

Original comment by eclecticgeek on 2 Aug 2011 at 1:57

GoogleCodeExporter commented 9 years ago
Well thats nice but your fonts do not support for example letters č or ľ, not 
even times roman and that's what I dont understand, because normal times roman 
support these!

Original comment by MarekL...@gmail.com on 11 Feb 2013 at 9:33

GoogleCodeExporter commented 9 years ago
@MarekLani that's a different issue to do with encoding. Per the PDF spec the 
encoding supported by default are (essentially) Windows ANSI or Mac Roman. 
Support for font subsetting has been available since 0.6.0 beta 3 and so font 
embedding no longer necessarily results in large file sizes.

We have yet to work out the requirements for using alternate encodings with the 
core fonts.

Also, FYI. The appropriate place to open new issues or respond to current ones 
is on the github project page.
https://github.com/dompdf/dompdf/issues

Original comment by eclecticgeek on 13 Feb 2013 at 5:55

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16