VOOZH about

URL: https://docs.pdf4me.com/integration/power-automate/edit/add-html-header-footer-pdf/

⇱ Add HTML Header Footer to PDF in Power Automate | PDF4me


Skip to main content
PDF4me APIIntegrationsKnowledge BaseExtensionsAPI TesterBlog

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.

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
  • JSON
  • Flow Integration

Table View

Response data in a structured table format:

ParameterTypeDescription
File ContentBinaryPDF 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:

  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

Automated Legal Document Formatting Workflow

Streamline your legal document preparation with automated headers/footers:

Complete Workflow Steps:

  1. Trigger: Contract generated from template in legal system
  2. Get Contract: Retrieve contract PDF from document generation
  3. Create Header: Build header with firm name and matter number
  4. Add Header: Insert header skipping first page (cover page)
  5. Create Footer: Build footer with page numbers and confidentiality notice
  6. Add Footer: Insert footer with "Confidential - Page X of Y"
  7. Add Document ID: Insert document reference in footer
  8. 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:

  1. Trigger: Invoice generated in accounting system
  2. Get Invoice: Retrieve invoice PDF from accounting software
  3. Build Header: Create HTML header with company letterhead
  4. Add Company Header: Insert branded header with logo and address
  5. Build Footer: Create footer with payment terms and contact info
  6. Add Payment Footer: Insert footer with bank details and support contact
  7. Add Page Numbers: Include page numbering in footer
  8. 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:

  1. Trigger: Proposal PDF generated from template
  2. Get Proposal: Retrieve proposal document from SharePoint
  3. Create Cover Header: Build special header for cover page only
  4. Create Main Header: Build header for body pages with client name
  5. Add Headers: Insert headers skipping first page
  6. Create Footer: Build footer with proposal number and date
  7. Add Footer: Insert footer with contact information
  8. 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

Get Help