Skip to content

vikramsamak/html-to-pdf-microservice

Repository files navigation

HTML to PDF Microservice

A simple microservice that converts HTML content to PDF using Puppeteer.

Getting Started

Prerequisites

  • Node.js (v14 or later)
  • npm (v7 or later)

Installation

  1. Clone the repository:

    git clone https://github.com/vikramsamak/html-to-pdf-microservice.git
    
  2. Navigate to the project directory:

    cd html-to-pdf-microservice
    
  3. Install dependencies:

    npm install
    

Usage

    npm run dev

Examples

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.

Dependencies

Express.js: Web server framework

Puppeteer: Headless Chrome Node API for PDF generation

Contributing

Feel free to contribute by opening issues or pull requests.

About

A simple microservice that converts HTML content to PDF using Puppeteer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published