jsreport / jsreport-wkhtmltopdf

jsreport recipe for rendering pdf using wkhtmltopdf
http://jsreport.net
MIT License
8 stars 9 forks source link

wkhtmltopdf-installer wkhtmltopdf.exe` binary doesn't seem to work correctly issue #11

Open arupbaroi opened 6 years ago

arupbaroi commented 6 years ago

I have this in my package.json file:

{ "name": "pdf", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "jsreport-core": "^1.3.1", "jsreport-phantom-pdf": "^1.4.4", "jsreport-jsrender": "^1.0.2", "jsreport-wkhtmltopdf": "^1.4.0", "jsreport-handlebars": "^1.1.2" }, "devDependencies": {}, "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "", "license": "ISC" }

When I run npm install , I am getting this error

wkhtmltopdf-installer@0.3.1 postinstall C:\app\node_modules\wkhtmltopdf-installer node lib/install.js

‼ Global command wkhtmltopdf doesn't seem to work. Downloading wkhtmltopdf localy to /vendor ... × Error: The C:\app\node_modules\wkhtmltopdf-installer\vendor\wkhtmltopdf.exe binary doesn't seem to work correctly at BinWrapper. (C:\app\node_modules\bin-wrapper\index.js:156:7) at ChildProcess. (C:\app\node_modules\bin-check\index.js:26:4) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) Try running vendor/wkhtmltopdf to get more detailed error output. npm notice created a lockfile as package-lock.json. You should commit this file.

Node version 8.9.0 I am running it with microsoft/aspnetcore:2.0-nanoserver-sac2016 docker image as base with node installed.

pofider commented 6 years ago

Not sure if wkhtmltopdf will run on nano. There could be missing some gdi libs. Perhaps you can try to download wkhtmltopdf on your own and try to run in docker to see if it gives better error?

arupbaroi commented 6 years ago

Could you please change the wkhtmltopdf.exe with 64 bit format. This might fix the issue.