https://github.com/huang-x-h/html2image
convert html to image/pdf by phantomjs
https://github.com/huang-x-h/html2image
html2image phantomjs
Last synced: about 2 months ago
JSON representation
convert html to image/pdf by phantomjs
- Host: GitHub
- URL: https://github.com/huang-x-h/html2image
- Owner: huang-x-h
- License: mit
- Created: 2015-09-21T01:50:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-01-24T10:24:31.000Z (over 3 years ago)
- Last Synced: 2025-03-29T06:33:43.164Z (2 months ago)
- Topics: html2image, phantomjs
- Language: JavaScript
- Size: 33.2 KB
- Stars: 12
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# html2image
> Convert html to image(png/jpg) or pdf by puppeteer
## Install
npm i -g html2image
## Usage
html2image -a https://www.baidu.com
## Options
- `-a, --address [value]` url address
- `-f, --format [value]` output file format (pdf|png|jpeg|gif)
- `-o, --output [value]` output file path## Help
html2image -h
## TODO
If the url address contain **&**, you should use **encodeURIComponent** to encode the url address, then pass to the html2image command