{"repo":"westy92/html-pdf-chrome","free":true,"listed":false,"github":"https://github.com/westy92/html-pdf-chrome","clone":"git clone https://github.com/westy92/html-pdf-chrome.git","description":"HTML to PDF or image (jpeg, png, webp) converter via Chrome/Chromium","language":"TypeScript","stars":804,"topics":["chrome","chromium","html","html-pdf-chrome","pdf","pdf-generation","typescript","javascript","headless-chrome","headless-chromium"],"license":"MIT","category":"media-processing","readme_excerpt":"html-pdf-chrome HTML to PDF or image (jpeg, png, webp) converter via Chrome/Chromium. Prerequisites Latest Chrome/Chromium Windows, macOS, or Linux A currently supported version of Node.js Installation Security This library is NOT meant to accept untrusted user input. Doing so may have serious security risks such as Server-Side Request Forgery (SSRF). CORS 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! Usage Note: 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. It's suggested to use pm2 to ensure Chrome continues to run. If it crashes, it will restart automatically. As of this writing, headless Chrome uses about 65mb of RAM while idle. TypeScript: JavaScript: View the full documentation in the source code. Saving as a Screenshot By default, pages are saved as a PDF. To save as a screenshot instead, supply screenshotOptions . All supported options can be viewed here. Using an External Site Using Markdown Using a Template Engine Pug (formerly known as Jade) HTTP Headers Specify additional headers you wish to send with your request via CreateOptions.extraHTTPHeaders . Custom Headers and Footers Note: Requires Chrome 65 or later. You can optionally p","default_branch":null,"files":null,"tree":[],"storefront":"/r/westy92","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/westy92/html-pdf-chrome/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}