Convert HTML
to PDF
with a single endpoint.
Be sure to install wkhtmltopdf before using pdf-api
.
$ PORT=3000 pdf-api
(String) orientation: "[portrait|landscape]"
(String) url: ""
(String) html: ""
url
or html
are required
GET /generate
?orientation=[portrait|landscape] &url=https://google.fr &html=<html>Hello</html>
{
"msg": "error message"
}
Your pdf file
POST /generate
{
"orientation": "[portrait|landscape]",
"url": "https://google.fr",
"html": "<html>Hello</html>"
}
{
"msg": "error message"
}
Your pdf file