Welcome Guest Search | Active Topics | Sign In | Register

HTML to pdf: Size of converted pdf Options
Developer
Posted: Tuesday, April 10, 2012 12:08:58 PM
Rank: Newbie
Groups: Member

Joined: 4/10/2012
Posts: 1
Hi, I'm evaluating your product and it works great with a simple html file I have (25KB).

The only problem I see is the final size of the converted pdf file (125KB). Is there any way to minimize this size (by enabling compression or other feature)?


Thanks.
eo_support
Posted: Tuesday, April 10, 2012 12:37:13 PM
Rank: Administration
Groups: Administration

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

Compression is always automatically enabled. Two things contribute most to the PDF file size: embedded font and images.

All fonts used are automatically embedded in the PDF file by default. This way the file can be viewed on a system without the original font installed. You can set PdfDocument.EmbedFont to false to turn this off thus reducing the final file size. Note that even if you set this property to false, it will still only skip most commonly used fonts.

If your file contains image, then images will be embedded in the PDF files as well. To reduce file sizes, you can lower HtmlToPdfOptions.JpegQualityLevel to reduce the image quality, thus reducing the file size. The default value is about 80 for that property.

Hope this helps.

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.