PDF4me icon

PDF4me

PDF4me for n8n automates document workflows: AI-powered parsing, classification, and data extraction, plus PDF conversion, generation, merge/split, editing, forms, stamps, signatures, OCR, barcodes and Swiss QR, invoices, image processing, security, and Word tools.

Actions92

Edit → Add HTML Header Footer to PDF

AI-generated

Summary

Add HTML content as a header, footer, or both to a PDF supplied as binary data, a base64 string, or a URL. Choose the pages, whether to skip the first page, and the margins; the operation returns the processed PDF as binary output.

Inputs

  • Input Data Type (required) — Choose Binary Data, Base64 String, or URL as the PDF source.
  • Input Binary Field (required) — For Binary Data, the name of the incoming binary property containing the PDF (default: data).
  • Base64 PDF Content (required) — For Base64 String, the PDF content encoded as base64.
  • PDF URL (required) — For URL, the address of the source PDF.
  • HTML Content (required) — Plain HTML to add to the PDF.
  • Location (required) — Apply the HTML as a Header, Footer, or Both.
  • Pages (required) — Page indices or ranges to process; leave empty to select all pages.
  • Skip First Page (required) — Whether to omit the first page when adding the HTML.
  • Margin Left (Px) (required) — Left margin in pixels.
  • Margin Right (Px) (required) — Right margin in pixels.
  • Margin Top (Px) (required) — Top margin in pixels.
  • Margin Bottom (Px) (required) — Bottom margin in pixels.
  • Output File Name — Name for the resulting PDF (default: document_with_html_header_footer.pdf).
  • Document Name — Source PDF name for reference (default: document.pdf).
  • Binary Data Output Name — Name of the binary property in the output (default: data).

Output shape

A single item containing the processed PDF as binary data.

The input fields for binary data, base64, and URL apply according to Input Data Type. Output is provided as binary data using the configured Binary Data Output Name.

Links

Discussion