PNG to PDF: images are stored as JPEG instead of lossless (Flate)

Home › Forums › PDF24 Creator › PNG to PDF: images are stored as JPEG instead of lossless (Flate)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #60543
    robertok
    Participant

    How can I steer the process to export to PDF by forcing it to use PNG files (Flate filter)?

    I have a set of reports using small size PNG files. If the PNG files are converted to JPEG they get considerably bigger (from around 100 KB they grow to 1 MB or more) and the final pdf document as well.

    On the profile settings, I have created a new profile, and on the Format properties for Compression I set the filter to be Flate for all images (color, grayscale, and monochrome).

    When exporting documents using this profile I get inconsistent results, with some documents using the Flate filter and others using the JPEG filter.

    On tests with a report containing only one PNG image, the exported document is using the JPEG filter for any PNG image bigger than 2.2 MB. With the online tool, I get exported documents with the Flate filter for PNG images up to 5 MB.

    Thanks

    #65958
    PDF24 Support
    Moderator

    Hello,

    a note for everyone who finds this topic: if you convert PNG files directly (dropped into PDF24 Creator or with Convert to PDF in the PDF24 Toolbox), PDF24 stores only images with a colour palette (up to 256 colours) losslessly with Flate. All other images, which are most PNG files, are stored as JPEG with the quality from the settings page Images To PDF (JPG Quality, default 100). So the result depends on the colour depth of the PNG, not on the profile. Choosing Flate in the profile cannot make an image lossless again once it is stored as JPEG.

    To keep PNG files lossless, use Images to PDF in the PDF24 Toolbox. It embeds PNG images losslessly (Flate). This also works online: https://tools.pdf24.org/en/png-to-pdf

    If your reports are printed from another program with the PDF24 printer, so that we can reproduce this, please send us a file where it happens with this button:

    #66676
    PDF24 Support
    Moderator

    Hello,

    a short advance note: with the next version of PDF24 Creator, PNG, BMP and TIFF files that you convert directly are embedded losslessly, as long as that is not much bigger than JPEG. Photos stay JPEG. Grayscale images are stored with 8 bit, and transparent PNG images keep their transparency instead of getting a black background.

    We will post here once it is released.

    #66772
    PDF24 Support
    Moderator

    Hello,

    the change announced above is now released in version 11.33.0 of PDF24 Creator, available since today: https://tools.pdf24.org/en/creator

    Screenshots from the clipboard and PNG, BMP and TIFF files are now embedded losslessly as long as that is not much bigger than JPEG (photos stay JPEG), and transparent PNG images keep their transparency.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.