Skip to content

Commit

Permalink
fix: add background to pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
renato.santos committed Nov 9, 2020
1 parent 5e631cb commit e6eaf3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const dir = './dist/download';
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto(`file:${path.join(__dirname, 'dist/resume/index.html')}`, { waitUntil: 'networkidle2' })
await page.pdf({ path: `${dir}/renato-vicente-cv-pt.pdf`, format: 'A4' })
await page.pdf({ path: `${dir}/renato-vicente-cv-pt.pdf`, format: 'A4', printBackground: true })
await page.goto(`file:${path.join(__dirname, 'dist/en/resume/index.html')}`, { waitUntil: 'networkidle2' })
await page.pdf({ path: `${dir}/renato-vicente-cv-en.pdf`, format: 'A4' })
await page.pdf({ path: `${dir}/renato-vicente-cv-en.pdf`, format: 'A4', printBackground: true })
await browser.close()
})()

0 comments on commit e6eaf3e

Please sign in to comment.