htmltopdf-batch-puppeteer
v0.0.1
Published
CLI tool to convert HTML documents to PDFs using puppeteer.
Downloads
1
Readme
htmltopdf-batch-puppeteer
Converts your HTML files to PDFs. In batches. Using puppeteer.
You might use this instead of, for example, wkhtmltopdf if you want the page rendered by Chromium, and if you're comfortable having literally no configurability.
Usage
- Install node and npm.
- In your terminal, run
npm i -g htmltopdf-batch-puppeteer
- Then run
htmltopdf-batch-puppeteer FILE1 FILE2 FILE3
etc.
To convert all the HTML files in a directory you would use htmltopdf-batch-puppeteer /path/to/folder/*.html
.
For each input file, an output file will be created with the same name, except with a .pdf
suffix.
NOTE: if a file with the target name already exists, it will not be overwritten; the input file will be SKIPPED.
Sometimes it gets stuck on very large HTML pages. If you wait long enough, it might finish. Maybe. I don't know.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/brokensandals/htmltopdf-batch-puppeteer.
License
This is available as open source under the terms of the MIT License.