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

Other Useful Business Software
Ship AI Apps Faster with Vertex AI Icon
Ship AI Apps Faster with Vertex AI

Go from idea to deployed AI app without managing infrastructure. Vertex AI offers one platform for the entire AI development lifecycle.

Ship AI apps and features faster with Vertex AI—your end-to-end AI platform. Access Gemini 3 and 200+ foundation models, fine-tune for your needs, and deploy with enterprise-grade MLOps. Build chatbots, agents, or custom models. New customers get $300 in free credit.
Try Vertex AI 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