Skip to content

Instantly share code, notes, and snippets.

@apexdodge
Created August 21, 2018 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apexdodge/b94f217286a619916ddc193fab8d12f3 to your computer and use it in GitHub Desktop.
Save apexdodge/b94f217286a619916ddc193fab8d12f3 to your computer and use it in GitHub Desktop.
sample api2pdf payload for headless chrome header and footer with page numbers
{
"html": "<p>Hello World</p>",
"inlinePdf": true,
"fileName": "test.pdf",
"options": {
"displayHeaderFooter": true,
"footerTemplate": "<div class=\"page-footer\" style=\"width:100%; text-align:right; font-size:12px;\">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></div>"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment