I used wkhtmltopdf and everything worked, but then our hosting provider said to try your library, because wkhtmltopdf is heavy, and I got this error:
OSError at /admin/fulfilment-report/
wkhtmltopdf reported an error:
(node:17000) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '-'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at toPDF (/Users/mirzadelic/.nvm/versions/node/v8.15.0/lib/node_modules/crpdf/src/index.js:49:33)
at Object.<anonymous> (/Users/mirzadelic/.nvm/versions/node/v8.15.0/lib/node_modules/crpdf/src/cli.js:47:1)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
(node:17000) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17000) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Thanks.