Skip to content

Node.js microservice for convert HTML string into base64 PDF file with Puppeteer & Express. Docker ready.

Notifications You must be signed in to change notification settings

VictorLM/node-html-to-pdf-base64

Repository files navigation

Node HTML to PDF

What is?

Node.js microservice to convert HTML string into base64 PDF file with Puppeteer & Express. Docker ready.

Made with

  • Node.js
  • Express.js
  • Puppeteer

Step-by-step setup

Requires Docker

Clone the repo:

git clone https://github.com/VictorLM/node-html-to-pdf-base64

Get into the project folder:

cd node-html-to-pdf-base64

Build the Docker image:

docker build -t html_to_pdf .

Run the Docker container with the built image:

docker run -d -p 127.0.0.1:3000:3000 --name html_to_pdf html_to_pdf

Send a POST request with the "html" field in the request body filled with the HTML string to be converted to PDF:

POST http://localhost:3000

{
  "html": "<h1>Hello World!</h1>",
}

Autor

Made with ❤️ by Victor Meireles 👋🏽 Get in touch!
Feito com ❤️ por Victor Meireles 👋🏽 Entre em contato!

Github Badge Linkedin Badge Gmail Badge

About

Node.js microservice for convert HTML string into base64 PDF file with Puppeteer & Express. Docker ready.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •