Welcome Guest Search | Active Topics | Sign In | Register

PDF File size Options
Krithika
Posted: Friday, May 11, 2012 10:19:31 AM
Rank: Newbie
Groups: Member

Joined: 5/11/2012
Posts: 1
I am evaluating EO.PDF to convert html to PDF. It is a great product and very easy to use. Only thing we are concerned about is the file size. The file size is atleast 3 times bigger than the one produced by the tool we are using currently. I have already set the options recommended like below

HtmlToPdfOptions.PreserveHighResImages = False
HtmlToPdfOptions.SaveImageAsJpeg = True
HtmlToPdfOptions.JpegQualityLevel = 35

Is there anything else we can do to reduce the file size? Does EO.pdf has a way to flatten the pdf?

Thanks!
eo_support
Posted: Friday, May 11, 2012 10:30:30 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Another thing you can try is to set PdfDocument.EmbedFont. Note this is a setting on the PdfDocument object, not on the HtmlToPdfOptions object.

By default we embed all the font data the PDF file uses inside the PDF file. That can make a big difference for very simple files because font data can be rather big comparing with the file contents. The benefit of embedding font file is obvious ---- you can take this file to any other system and the file will display fine even that system does not have the font you use. One of the most important reason why PDF is so popular is because of this ---- the file is self contained thus portable.

Note that even if you set PdfDocument.EmbedFont to false, it will only skip most commonly used fonts. fonts that are not always commonly used will always be embeded. Other tools might choose to skip all fonts thus producing a smaller file that looks perfect on the same system they were produced, but they may run into problems if you take that file onto a different system (particular a different type of OS, for example, a file produced on PC but then viewed on iPad). That is the reason why we always embed fonts that are not commonly used.

If you use vector graphics such as SVG in your HTML, then our file maybe bigger because currently we render SVG as bitmap. We are working on render SVG graphics as vector graphics. That should reduce file size significantly for that case.

If none of the above applies/works, you can send us the files and we will take a look to see if we can find out what's causing the file size difference. Please let us know if you wish to do that so that we can provide you the email address for you to send the files.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.