fathyb / html2svg

Convert HTML and `<canvas>` to SVG, PDF, or images using Chromium
1.19k stars 30 forks source link

PDF support #3

Closed fathyb closed 1 year ago

fathyb commented 1 year ago

Tracking PDF support here

seanghay commented 1 year ago

PNG/JPEG supports as well please.

DeanWard commented 1 year ago

wkhtmltopdf already exists for this purpose - https://wkhtmltopdf.org/

gbtb commented 1 year ago

wkhtmltopdf already exists for this purpose - https://wkhtmltopdf.org/

Core browser engine inside wkhtmltopdf is severely outdated. Flexbox and everything that came after it is not supported. Nevertheless, wkhtmltopdf could be used as a baseline for features to implement. Also compatible CLI could be developed which would ease the transition for end users.

fathyb commented 1 year ago

PDF support has landed! You can try it on the latest Docker image:

docker run fathyb/html2svg https://google.com --format pdf > google.pdf

Tracking the raster support (JPEG, PNG, WebP) on #9.