Skip to content

Commit

Permalink
set css media type to screen before generating pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhaenisch committed May 28, 2018
1 parent a638f0e commit c5274e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions util/write-pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module.exports = async (mdFilePath, outputPath, html, config) => {
if (config.devtools) {
await new Promise(resolve => page.on('close', resolve));
} else {
await page.emulateMedia('screen');
await page.pdf({ path: pdfFilePath, printBackground: true, ...config.pdf_options });
}

Expand Down

0 comments on commit c5274e3

Please sign in to comment.