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
Get Avast Free Antivirus, our award-winning protection for all Icon
Get Avast Free Antivirus, our award-winning protection for all

Get advanced privacy protection beyond antivirus software

Avast Free Antivirus protects your computer against viruses and malware, and it helps you protect your home network against intruders.
Free Download
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