You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello every one!
I'm trying to get one and full page but it is not working as I want
what I got as you can see in pictures if it's single page I'm getting white line in the footer, if I add 1 px it goes away to next page as in picture how ever there is not white line.
// Create a browser instance
const browser = await puppeteer.launch();
// Create a new page
const page = await browser.newPage();
//Get HTML content from HTML file
const html = fs.readFileSync('index.voucher.html', 'utf-8');
await page.setContent(html, {waitUntil: 'domcontentloaded'});
// To reflect CSS used for screens instead of print
await page.emulateMediaType('screen');
// Downlaod the PDF
const pdf = await page.pdf({
path: 'result.pdf',
printBackground: true,
width: '595px',
height: '842px',
});
// Close the browser instance
await browser.close();
})();`
The text was updated successfully, but these errors were encountered:
hello every one!
I'm trying to get one and full page but it is not working as I want
what I got as you can see in pictures if it's single page I'm getting white line in the footer, if I add 1 px it goes away to next page as in picture how ever there is not white line.
how can I get single, full page and with no-white line pdf?
there is my html file : https://github.com/abdullayev13/ett-pdf-gen/blob/main/index.voucher.html
it is my code:
https://github.com/abdullayev13/ett-pdf-gen/blob/main/tmp.js
`const puppeteer = require('puppeteer');
const fs = require('fs');
(async () => {
})();`
The text was updated successfully, but these errors were encountered: