gollowars/site-pdf

Can we delay before generate pdf

Opened this issue · 1 comments

I want to set delay to make sure javascript was ran success

@TatChu
I added dry option.
You can set phantompdf in DEBUG environment variable that you use to enable for debug.

like

let generator = new SitePDF({
  dry: true
})

generator.create('https://www.google.com/','output.pdf')
.then(function(status){
  console.log('status:',status)
  generator.destroy()
})
DEBUG=phantompdf node test.js

phantomjs has been deprecated in favor of headless chrome.
then using this is almost discouraged.