Closed silverlining21 closed 8 years ago
This issue occurs from time to time, but was always OS dependent. Here I can not do much more than to recommend you perform a clean installation and read the closed Issues.
See #17
NOTE: the default usage of html-pdf may not work since the NAME CHANGE of phantomjs to >>>phantomjs-prebuilt<<<.
evidence is here:
npm WARN deprecated phantomjs@2.1.7: Package renamed to phantomjs-prebuilt. Please update 'phantomjs' package references to 'phantomjs-prebuilt' npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
The options on the last line below, probably need to be set as follows in your code(doing this did not fix it for me, but at least I got past that error message):
htmlToPdf.create(dom, {
format: absolute ? undefined : atom.config.get('markdown-themeable-pdf.format'),
width: absolute ? width : undefined,
height: absolute ? height : undefined,
orientation: atom.config.get('markdown-themeable-pdf.orientation'),
border: atom.config.get('markdown-themeable-pdf.pageBorder'),
type: jobInfo.exportType,
quality: atom.config.get('markdown-themeable-pdf.imageQuality'),
header: customHeader,
footer: customFooter,
phantomPath: "./node_modules/phantomjs-prebuilt/bin/phantomjs"
[Enter steps to reproduce below:]
Atom Version: 1.10.0 Electron Version: 0.37.8 System: Unknown Windows Version Thrown From: markdown-themeable-pdf package, v1.2.0
Stack Trace
Uncaught AssertionError: html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using 'options.phantomPath'
Commands
Config
Installed Packages