Sicos1977 / ChromiumHtmlToPdf

Convert HTML to PDF with a Chromium based browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Large size of images after conversion

Kxenys opened this issue · comments

Hello,
I came across this problem. When generating a PDF, the generated file weighs a lot.
HTML contains more than 8 images in jpeg format. Size 100 Kbit each.
But after converting the PDF file weighs 18 MB.
I parsed the resulting PDF in the editor and saw that all the pictures were in PNG format. And each picture weighs more than 2 MB.
The file itself should weigh about this much.
I noticed that if you stretch an image to the size of the container, this leads to a significant increase in file size.
Can you tell me, can this be fixed somehow?

commented

I looked inside the Chrome dev protocol but there is no setting to control the size of images so nothing I can do about this.