php-chrome-html2pdf
php-chrome-html2pdf copied to clipboard
Force puppeteer to use HeadlessChrome instead of Chromium
I'm out over my skis on this one, but I'll take a chance.
I'm using a CMS addon that in turn uses puppeteer. Everything is working, except for header/footer numeric pagination and timestamp. (that is, it's printing blanks)
On my dev server, it vexingly works.
Inspect the raw content of the PDFs, the working PDF file begins with:
<</Creator (Mozilla/5.0 \(X11; Linux x86_64\) AppleWebKit/537.36 \(KHTML, like Gecko\) HeadlessChrome/121.0.0.0 Safari/537.36)
The faulty PDF begins with merely:
<</Creator (Chromium)
I thought I could get lucky and find that there is some configuration value, somewhere, that might be telling puppeteer to use Chromium.
The dev and production server otherwise match in terms of node version.
Thanks!