Describe the bug
The latest versions of the docker images are causing PDFs to be incorrectly generated. Contents of the PDF would shrink to around 2/3rds of the page.
To Reproduce
Steps to reproduce the behavior:
browserless/chrome:latest
or /chrome:1-puppeteer-13.1.3
or /chrome:1-puppeteer-19.2.2
Expected behavior
Rendered PDF content shrinks, expected not to.
Screenshots
Difference between docker image versions
/chrome:1-puppeteer-10.4.0 or /chrome:1-puppeteer-14.4.1 |
/chrome:latest or /chrome:1-puppeteer-13.1.3 or /chrome:1-puppeteer-19.2.2 |
---|---|
![]() |
![]() |
As you can see the latter screenshot content has shrunken and the second page's content disappeared.
Desktop (please complete the following information):
Irrelevant
Smartphone (please complete the following information):
Irrelevant
Additional context
Our code has not changed and we have been using /chrome:latest
for several years but the latest releases starting from Dec 2, 2022 caused this bug.
Sorry for the delay on this. We checked this further, and it looks like from Chromium revision r1056772, the PDF renderer util renders all content slightly shrunk. The last revision compatible with puppeteer that doesn't shrink the contents i r1045629.
Unfortunately, this is a Chromium limitation. Although slightly increasing the PDF scale (to 1.043 in our tests) seems to help.
Owner Name | browserless |
Repo Name | chrome |
Full Name | browserless/chrome |
Language | TypeScript |
Created Date | 2017-11-17 |
Updated Date | 2023-03-22 |
Star Count | 5309 |
Watcher Count | 47 |
Fork Count | 516 |
Issue Count | 29 |
Issue Title | Created Date | Updated Date |
---|