PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Generated pdf with watermark file size is too big
   PostPosted: 11 Apr 2017, 16:10 
Hi,

whenever i generate a pdf with a watermark, the size of the resulting pdf is multiple times larger than just the file without a watermark + watermark image size (sometimes even 10x bigger)

Encountered in an old version, but persistent in 3.10.0 pro demo as well.

Thanks


  Subject: Re: Generated pdf with watermark file size is too big
   PostPosted: 11 Apr 2017, 16:22 
It depends on the image type you use as a watermark.

GIFs or some species of PNG cannot be embedded to PDF "as is" and has to be converted to PDF native image format which is in fact a gzipped sequence of pixel color values. The PDF image format requires significantly more space for storing pictures (comparing to GIF, PNG etc).

Try to use JPEGs (even with high quality settings) as watermarks.


  Subject: Re: Generated pdf with watermark file size is too big
   PostPosted: 10 May 2017, 10:30 
Hi,
unfortunately this happens even for JPEGs.

I could provide examples, but i have no idea how to attach files here.


  Subject: Re: Generated pdf with watermark file size is too big
   PostPosted: 18 May 2017, 17:31 
Sorry for the confusing hint. My fault. Even if you use JPEG, it still adds a transparency info for watermarking and converts the image to a gzipped sequence of pixel colors (which can result the image data become huge if the image dimensions are big).

Would it be a solution for you to define page background image instead of a watermark? There is setPageBackgroundImageUrl() API call for that.



[Reply]     [ 4 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share