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.

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.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
File Content***BinarySource 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***StringPDF 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***StringHeader/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>
LocationOptionHeader 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***StringPage 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 PageBooleanExclude 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)NumberLeft 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)NumberRight 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)NumberTop 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)NumberBottom 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 View

Response data in a structured table format:

ParameterTypeDescription
File ContentBinaryPDF document with HTML header/footer added, ready for distribution

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

Step-by-step guides to add HTML headers and footers to PDFs:

Get Help