Skip to content
 
 

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML to PDF/JPG

Uses Puppeteer and ChromeForTesting to produce PDFs or Images from any website.

Create image on MacOS

softwareupdate --install-rosetta
colima start --profile rosetta --cpu 2 --memory 4 --disk 40 --arch aarch64 --vm-type=vz --vz-rosetta --mount-type virtiofs
docker build

Execute on docker

docker run -i --init --cap-add=SYS_ADMIN --rm puppeteer

Execute on local

npm install
npm start

Sample request:

curl -X POST \
  'http://localhost:3100/convert?url=https://www.yahoo.com/&output=pdf' \
  -H 'Content-Type: application/json' \
  -d '{"options": {"format": "A4", "printBackground": true}}' \
  --output example.pdf

About

Html to PDF project using puppeteer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages