The html2pdf.js script is a small node.js webserver that uses Playwright to converts HTML to PDF.
346
The html2pdf.js script is a small node.js webserver that uses Playwright to converts HTML to PDF.
If you run the script, a sample POST request should look like
POST / HTTP/1.1
User-Agent: Mojolicious (Perl)
Host: localhost:8080
Content-Type: application/json
Content-Length: 73
Accept-Encoding: gzip
{"data":"PGh0bWw+Cjxib2R5Pgo8aDE+VGVzdDwvaDE+CjwvYm9keT4KPC9odG1sPgo=\n"}
And it returns the PDF.
To use a docker container to do the conversion, you can use
$ docker pull rotheross/html2pdf_playwright:latest
$ docker run -p 8080:8080 rotheross/html2pdf_playwright:latest
Content type
Image
Digest
sha256:46ac8d39e…
Size
685.2 MB
Last updated
over 2 years ago
docker pull rotheross/html2pdf_playwright