Whether you need invoices for your e-commerce or advanced reports for your moonshot startup, don't get distracted! Leave the PDF generation to us and keep focus on your core business.
Generate a PDF from a URL or HTML string.
required | SourceOptions (object) or SourceOptions (object) (SourceOptions) |
object (PdfOptions) | |
Array of objects (AddStyleTagOptions) | |
Array of objects (AddScriptTagOptions) | |
Array of objects (SetCookieOptions) | |
object (SetHeaderOptions) WARNING: these headers are set on every request, so avoid adding secrets or tokens if you are unsure about the security implications See also: https://pptr.dev/api/puppeteer.page.setextrahttpheaders/ | |
any (WaitOptions) |
{- "source": {
- "html": "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"></head><body><h1>Hello World!</h1></body></html>"
}, - "pdf": {
- "format": "A4",
- "scale": 1,
- "printBackground": true
}, - "wait": {
- "for": "navigation",
- "waitUntil": "load",
- "timeout": 2500
}
}
{ }