Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27139

    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

    #30022

    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.

    #30020

    Hi,
    unfortunately this happens even for JPEGs.

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

    #30021

    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.

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.