A simple microservice that converts HTML content to PDF using Puppeteer.
- Node.js (v14 or later)
- npm (v7 or later)
-
Clone the repository:
git clone https://github.com/vikramsamak/html-to-pdf-microservice.git
-
Navigate to the project directory:
cd html-to-pdf-microservice
-
Install dependencies:
npm install
npm run dev
The examples
folder contains illustrative code snippets or projects to demonstrate the usage of the main codebase.
-
Converting HTML Code into pdf: Illustrates how to convert HTML code to a PDF file using the microservice. This example demonstrates the usage of the /convert-from-code endpoint.
-
Converting HTML File into pdf:Demonstrates the process of converting an HTML file to a PDF using the microservice. This example showcases the usage of the /convert-from-file endpoint with file upload.
Feel free to explore these examples to better understand how to use the main functionalities provided by this project.
Express.js: Web server framework
Puppeteer: Headless Chrome Node API for PDF generation
Feel free to contribute by opening issues or pull requests.