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.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| File Content*** | Binary | Source PDF File Content • Map PDF file from previous action output • Supports PDFs from SharePoint, OneDrive, email • Can be dynamically retrieved from flow variables • Must be valid PDF document | [File Content from Get File] |
| File Name*** | String | PDF Document Name • Specify PDF file name with .pdf extension • Used for processing and output naming • Must include proper file extension • Supports dynamic naming from flows | Report.pdf |
| HTML Content*** | String | Header/Footer HTML • HTML content for header or footer • Supports full HTML/CSS styling • Can include dynamic variables like page numbers • Use {{page}} for current page, {{total}} for total pages | <div style="text-align:center">Page {{page}} of {{total}}</div> |
| Location | Option | Header or Footer Placement • Header - Add content to top of pages • Footer - Add content to bottom of pages • Both - Add to both header and footer • Default is Footer if not specified | Footer |
| Pages*** | String | Page Selection • Specify pages for header/footer application • Use numbers: 1,2,3 for specific pages• Use all for all pages• Use ranges: 1-5 for page ranges | all |
| Skip First Page | Boolean | Exclude Cover Page • True - Skip header/footer on first page • False - Apply to all pages including first • Useful for reports with cover pages • Default is False | true |
| Margin Left (px) | Number | Left Margin • Left margin for header/footer in pixels • Controls distance from left edge • Affects content positioning • Default is 0 if not specified | 50 |
| Margin Right (px) | Number | Right Margin • Right margin for header/footer in pixels • Controls distance from right edge • Affects content width • Default is 0 if not specified | 50 |
| Margin Top (px) | Number | Top Margin • Top margin for header in pixels • Controls distance from page top • Only applies to headers • Default is 0 if not specified | 20 |
| Margin Bottom (px) | Number | Bottom Margin • Bottom margin for footer in pixels • Controls distance from page bottom • Only applies to footers • Default is 0 if not specified | 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:
| Parameter | Type | Description |
|---|---|---|
| File Content | Binary | PDF document with HTML header/footer added, ready for distribution |
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
Related Blogs
Step-by-step guides to add HTML headers and footers to PDFs: