HTML to PDF or image (jpeg, png, webp) converter via Chrome/Chromium. This library is NOT meant to accept untrusted user input. Doing so may have serious security risks such as Server-Side Request Forgery (SSRF). If you run into CORS issues, try using the --disable-web-security Chrome flag, either when you start Chrome externally, or in options.chromeFlags. This option should only be used if you fully trust the code you are executing during a print job. It is strongly recommended that you keep Chrome running side-by-side with Node.js. There is significant overhead starting up Chrome for each PDF generation which can be easily avoided. By default, pages are saved as a PDF. To save as a screenshot instead, supply screenshotOptions. You can optionally provide an HTML template for a custom header and/or footer. There are a few CompletionTrigger types that wait for something to occur before triggering PDF printing.

Features

  • Use an External Site
  • Use a Template Engine
  • HTML to PDF or image
  • Supports jpeg, png, and webp
  • A converter via Chrome/Chromium
  • It's suggested to use pm2 to ensure Chrome continues to run

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow html-pdf-chrome

html-pdf-chrome Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of html-pdf-chrome!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

TypeScript

Related Categories

TypeScript Data Formats Software, TypeScript HTML XHTML, TypeScript PDF Generation Libraries

Registered

2023-02-20