|
@@ -33,9 +33,9 @@ const fs = require('fs');
|
|
|
|
|
|
const browser = await puppeteer.launch();
|
|
|
const page = await browser.newPage();
|
|
|
- console.log("Rendering data...")
|
|
|
+ console.log("Rendering data...");
|
|
|
await page.goto(url, {waitUntil: 'networkidle0'});
|
|
|
- await page.emulateMediaType('screen'); // To use normal CSS instead of only print styles
|
|
|
+ await page.emulateMediaType('print');
|
|
|
|
|
|
|
|
|
console.log("Creating the PDF document...");
|
|
@@ -53,7 +53,7 @@ const fs = require('fs');
|
|
|
right: "1.27cm",
|
|
|
top: "1.27cm",
|
|
|
bottom: "1.27cm",
|
|
|
- },
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
console.log('Conversion complete. PDF file generated successfully.');
|