add_html_header_footer_to_pdf
Add custom HTML as header, footer, or both on PDF pages, with options to target specific pages, set margins, and skip the first page.
Instructions
Add HTML as header, footer, or both on PDF pages using PDF4me AddHtmlHeaderFooter (/api/v2/AddHtmlHeaderFooter). html_content is a plain HTML string (not base64). header_footer_location is Header, Footer, or Both. Optional: pages (empty string = all), skip_first_page, pixel margins, output path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | ||
| margin_top | No | ||
| output_dir | No | ||
| margin_left | No | ||
| html_content | Yes | ||
| margin_right | No | ||
| margin_bottom | No | ||
| pdf_file_path | Yes | ||
| skip_first_page | No | ||
| output_file_name | No | ||
| request_doc_name | No | ||
| header_footer_location | Yes |