Skip to main content

Add HTML Header Footer to PDF in Power Automate

PDF4me Add HTML Header Footer to PDF action enables adding professional headers and footers to PDF documents using HTML content in Power Automate. This powerful feature supports custom HTML/CSS styling, dynamic page numbering, company branding, and flexible positioning with margin control, perfect for creating branded documents and standardized report formatting across Microsoft 365 workflows.

Related Blog Posts(1)

Authenticating Your API Request​

To access the PDF4me Web API through Power Automate, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Power Automate flows and PDF4me's powerful PDF header/footer services.

Add HTML Header Footer Power Automate

Key Features​

  • HTML/CSS Support: Create headers/footers with full HTML and CSS styling
  • Dynamic Content: Include page numbers, dates, and document metadata
  • Flexible Positioning: Add to header, footer, or both with margin control
  • Page Selection: Apply to specific pages or all pages selectively
  • Skip First Page: Option to exclude headers/footers from cover pages

Parameters​

Complete list of parameters for the Add HTML Header Footer to PDF action. Configure these parameters to control header/footer creation.

ParameterRequiredWhat it doesExample
File ContentRequiredContent of the PDF to add the header or footer to. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content.[File Content from Get File]
File NameRequiredName of the PDF to add the header or footer to, including its extension (for example `invoice.pdf`). Map it from the file name returned by a previous action.Report.pdf
HTML ContentRequiredHTML to add to the pages, for example `<p>Company name</p>`.<div style="text-align:center">Page {{page}} of {{total}}</div>
LocationOptionalWhere to add the HTML content: in the header, in the footer, or both. Options: Header, Footer, Both. Defaults to `Header`.Footer
PagesRequiredPages to add the content to, as a comma-separated list of page numbers (for example `1,2`) or `all`. Defaults to `all`.all
Skip First PageOptionalIf Yes, the content is not added to the first page. Defaults to `No`.true
Margin Left (px)OptionalMargin to be added on the left side (px).50
Margin Right (px)OptionalMargin to be added on the right side (px).50
Margin Top (px)OptionalMargin to be added on the top (px).20
Margin Bottom (px)OptionalMargin to be added at the bottom (px).20

Output​

The PDF4me Add HTML Header Footer to PDF action returns comprehensive output data for seamless Power Automate flow integration:

Table View

Response data in a structured table format:

FieldTypeWhat it contains
File ContentFile contentContent of the PDF with the header or footer. Map it into the next action, for example the File Content field of SharePoint or OneDrive Create file.
File NameTextFile name of the PDF with the header or footer, as returned by PDF4me. Use it as the file name when saving the file.
Page CountTextPage count reported by PDF4me for the processed document. Returned as text; wrap it in int() to use it as a number.

Workflow Examples​

The PDF4me Add HTML Header Footer to PDF action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:

Automated Branded Report Generation Workflow

Transform your reporting with automated header/footer branding:

Complete Workflow Steps:

  1. Trigger: Monthly report generation completes - scheduled trigger
  2. Generate Report: Create report PDF from BI tool or Excel
  3. Prepare Header HTML: Build HTML with company logo and report title
  4. Add Header: Insert branded header with company name and logo
  5. Prepare Footer HTML: Create footer with page numbers and date
  6. Add Footer: Insert footer with "Page X of Y" and generation date
  7. Email Distribution: Send branded report to stakeholder list
  8. Archive Report: Store professionally formatted report in SharePoint

Business Benefits:

  • Brands 50+ reports monthly with consistent company identity
  • Eliminates manual header/footer addition saving 15 minutes per report
  • Ensures professional appearance for all external communications
  • Maintains brand consistency across all report distributions

Industry Use Cases & Applications​

Corporate & Business Use Cases

  • Company Reports: Add branded headers with company logo and report title
  • Business Proposals: Insert professional headers/footers with contact info
  • Policy Documents: Add document control footers with version and date
  • Meeting Minutes: Insert headers with meeting details and attendees

Get Help​