Number of images in PDF



  • Hello,

    During the migration of our clients from JsReport2 to JsReport4, it was noted that the size of some PDF files generated with JsReport had increased.

    We used PDF XChange Editor to analyze the content of the PDF files, and it appears that the number of images has increased. Curiously, the total number of images is greater than the number of visible images in the file.

    We reproduced the behaviour using the 6. Showcase - Flight ticket.

    When opening the file in PDF XChange report, audit indicates 7 images whereas only 3 are visible in the PDF file.

    0_1773408610170_upload-948627f3-a920-4112-bd00-c4e396672000

    With another template generated by jsreport 2.11(left) and jsreport 4.4.0 (right), we noticed the following results :

    0_1773409161049_upload-590914f5-f558-42f9-89fa-992e5bc05713
    (note: data are the same in both cases)

    With jsreport 4.12.0, size and numbers are not so different, but still it has more images than expected :
    0_1773409323754_upload-8fbe33bf-9d14-4046-9ff9-15f0109d3335

    Is there a reason explaining these differences about number of images ?

    Thanks for your help.



  • The Chromium pdf printing evolves in time. The later versions add accessibility, image masking, and other implementation changes that may increase the final PDF size. We update Chromium every time when releasing jsreport, that's the reason why v2 and v4 pdf outputs differ.

    There are 3 visible images in the flight ticket showcase, but every image also has an alpha mask. That's why you see 6 images in the PDF source.

    You can try to enable the pdf compression feature
    0_1773671413611_upload-fe4c7beb-0d14-4cf9-a458-1f91042f4d9e


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.