A micro-service for generating PDF documents
/api/render_html
{
"htmlBody": <string>,
"dpi": <int>,
"pageWidth": <int>,
"pageHeight": <int>,
"pageSize": <string>,
"orientation": <string>,
"marginTop": <int>,
"marginBottom": <int>,
"marginLeft": <int>,
"marginRight": <int>
}
Options
Value | Default |
---|---|
htmlBody | - |
dpi | 96 |
pageWidth | 0 (mm) |
pageHeight | 0 (mm) |
pageSize | A4 |
orientation | Portrait |
marginTop | - |
marginBottom | 10 (mm) |
marginLeft | 10 (mm) |
marginRight | - |
NOTE: When the page width and page height is specified, the size and orientation is ignored.
{
"data": <byte-array>
}
- Go v1.14+
dep ensure