const puppeteer = require('puppeteer');

(async () => {
    const browser = await puppeteer.launch(
        {
            headless: false,
                defaultViewport: {
                    width: 1920,
                    height: 1080
                },

            }
    );
    const page = await browser.newPage();
    await page.goto('https://pldinternacional.com', { waitUntil: 'networkidle2' });
    await page.pdf({ path: 'example.pdf', format: 'tabloid', orientation: 'landscape', printBackground: true, margin: { top: '0', right: '0', bottom: '0', left: '0' } });
    await browser.close();
})();