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.
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.

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.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| File Content | Required | Content 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 Name | Required | Name 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 Content | Required | HTML to add to the pages, for example `<p>Company name</p>`. | <div style="text-align:center">Page {{page}} of {{total}}</div> |
| Location | Optional | Where to add the HTML content: in the header, in the footer, or both. Options: Header, Footer, Both. Defaults to `Header`. | Footer |
| Pages | Required | Pages 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 Page | Optional | If Yes, the content is not added to the first page. Defaults to `No`. | true |
| Margin Left (px) | Optional | Margin to be added on the left side (px). | 50 |
| Margin Right (px) | Optional | Margin to be added on the right side (px). | 50 |
| Margin Top (px) | Optional | Margin to be added on the top (px). | 20 |
| Margin Bottom (px) | Optional | Margin 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
- JSON
- Flow Integration
Table View
Response data in a structured table format:
| Field | Type | What it contains |
|---|---|---|
| File Content | File content | Content 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 Name | Text | File name of the PDF with the header or footer, as returned by PDF4me. Use it as the file name when saving the file. |
| Page Count | Text | Page count reported by PDF4me for the processed document. Returned as text; wrap it in int() to use it as a number. |
JSON Response Format
{
"File Content": "[Binary Content of PDF with Header/Footer]"
}
Power Automate Flow Usage
Use PDF with headers/footers in subsequent actions:
- Email Distribution: Send branded PDFs with company headers/footers
- SharePoint Publishing: Upload professionally formatted documents
- Client Delivery: Provide branded documents to external stakeholders
- Report Archive: Store standardized reports with consistent formatting
- Print Services: Send print-ready documents with proper headers/footers
- Web Publishing: Upload branded PDFs to websites
Workflow Examples
The PDF4me Add HTML Header Footer to PDF action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:
- Branded Reports
- Legal Documents
- Invoice Branding
- Proposal Formatting
Automated Branded Report Generation Workflow
Transform your reporting with automated header/footer branding:
Complete Workflow Steps:
- Trigger: Monthly report generation completes - scheduled trigger
- Generate Report: Create report PDF from BI tool or Excel
- Prepare Header HTML: Build HTML with company logo and report title
- Add Header: Insert branded header with company name and logo
- Prepare Footer HTML: Create footer with page numbers and date
- Add Footer: Insert footer with "Page X of Y" and generation date
- Email Distribution: Send branded report to stakeholder list
- 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
Automated Legal Document Formatting Workflow
Streamline your legal document preparation with automated headers/footers:
Complete Workflow Steps:
- Trigger: Contract generated from template in legal system
- Get Contract: Retrieve contract PDF from document generation
- Create Header: Build header with firm name and matter number
- Add Header: Insert header skipping first page (cover page)
- Create Footer: Build footer with page numbers and confidentiality notice
- Add Footer: Insert footer with "Confidential - Page X of Y"
- Add Document ID: Insert document reference in footer
- Email Legal Team: Send formatted contract for review
Business Benefits:
- Formats 100+ legal documents monthly automatically
- Ensures compliance with firm document standards
- Adds confidentiality notices to all pages automatically
- Reduces document preparation time by 70%
Automated Invoice Header/Footer Workflow
Optimize your invoicing with automated professional formatting:
Complete Workflow Steps:
- Trigger: Invoice generated in accounting system
- Get Invoice: Retrieve invoice PDF from accounting software
- Build Header: Create HTML header with company letterhead
- Add Company Header: Insert branded header with logo and address
- Build Footer: Create footer with payment terms and contact info
- Add Payment Footer: Insert footer with bank details and support contact
- Add Page Numbers: Include page numbering in footer
- Email Customer: Send professional invoice to customer
Business Benefits:
- Brands 500+ invoices monthly with consistent formatting
- Improves brand recognition with professional invoices
- Reduces invoice queries by including all info in footer
- Accelerates payment processing with clear payment terms
Automated Proposal Document Formatting Workflow
Enhance your proposal presentation with automated headers/footers:
Complete Workflow Steps:
- Trigger: Proposal PDF generated from template
- Get Proposal: Retrieve proposal document from SharePoint
- Create Cover Header: Build special header for cover page only
- Create Main Header: Build header for body pages with client name
- Add Headers: Insert headers skipping first page
- Create Footer: Build footer with proposal number and date
- Add Footer: Insert footer with contact information
- Email Sales Team: Send formatted proposal for client delivery
Business Benefits:
- Formats 75+ proposals quarterly with professional appearance
- Increases win rate by 25% with polished presentation
- Ensures consistent proposal formatting across sales team
- Reduces proposal preparation time from 1 hour to 10 minutes
Industry Use Cases & Applications
- Corporate & Business
- Legal & Professional Services
- Finance & Banking
- Healthcare & Medical
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
Legal & Professional Services Use Cases
- Legal Briefs: Add case numbers and page references in headers/footers
- Contracts: Insert confidentiality notices and page numbers
- Client Documents: Add firm branding and matter references
- Court Filings: Include required case information in headers
Finance & Banking Use Cases
- Financial Reports: Add report period and page numbers in headers/footers
- Invoices: Insert payment terms and bank details in footers
- Statements: Add account information and period in headers
- Audit Documents: Include audit trail information in footers
Healthcare & Medical Use Cases
- Patient Reports: Add facility name and patient ID in headers
- Medical Records: Insert confidentiality notices in footers
- Lab Results: Add lab name and accreditation in headers
- Research Papers: Include study information and page numbers