PuppeteerPdfGeneratorScript
class PuppeteerPdfGeneratorScript(sourcesDirectory: File, out: File, node: NodeJsWrapper, npm: NpmWrapper, noSandbox: Boolean = false)
Script-like generator of a PDF from HTML through Puppeteer via Node.js.
Parameters
sourcesDirectory
directory containing the index.html
file
out
output PDF file to be written
node
Node.js executable wrapper
npm
NPM executable wrapper
noSandbox
whether to disable Chrome sandbox for PDF export
Constructors
Link copied to clipboard
constructor(sourcesDirectory: File, out: File, node: NodeJsWrapper, npm: NpmWrapper, noSandbox: Boolean = false)
Functions
Link copied to clipboard
Launches Puppeteer to convert the webpage from sourcesDirectory into a PDF saved at out. Blocking call.