node-html-pdf
node-html-pdf copied to clipboard
Unable to create pdf
I am using Docker base image mhart/alpine-node. PDF creation fails with below exception
Error: spawn ./node_modules/phantomjs-prebuilt/bin/phantomjs ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Seems like you need to install phantonjs
sudo apt-get install phantomjs
@Prasundas99 i found multiple issue whan i install phantomjs manually.
- Text is not rendering
- Table size increased a lot
It is working as expected in my windows 10 OS.
I had used the previous version I worked perfectly fine. Maybe something has broken with the update
@Prasundas99 i found multiple issue whan i install phantomjs manually.
* Text is not rendering * Table size increased a lot
It is working as expected in my windows 10 OS.
That is almost certainly FONT_CONFIG path and the related libraries. Take a look at this post, which hopefully covers the topic for you: https://github.com/marcbachmann/node-html-pdf/issues/547
The pdf generator packages are deprecated and don't work on aws lambdas, just this new package I found.
https://www.npmjs.com/package/html-pdf-lambda