Here is a difference between result pdf on windows and linux. When I'm trying to generate from linux images disappears.
That chart images source is dataUrl of canvas
pdf render:
const puppeteer = require('puppeteer')
async function printPDF() {
const browser = await puppeteer.launch({headless: true, args: ['--no- sandbox', '--disable-setuid-sandbox']});
const page = await browser.newPage();
await page.goto('http://localhost:8080/new', {waitUntil: 'networkidle0'});
const pdf = await page.pdf({ format: 'A4', printBackground: true, path: __dirname+'/s.pdf' });
await browser.close();
return pdf
}
printPDF();
There is for sure a minor problem with a whitespace character in --no- sandbox
Should be --no-sandbox