Skip to main content

Add Page Numbers to PDF in Power Automate

What this action does

PDF4me, Add Page Number to PDF stamps professional page numbers onto PDF documents directly inside your Power Automate flow. Choose the format (Page X, X of Y, number-only, Page X of Y), control horizontal and vertical position, set font size, bold, and italic, and optionally skip the first page for cover pages, all without opening Acrobat. Works with SharePoint, OneDrive, and any Microsoft 365 file source.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog

Authenticating Your API Request

Every PDF4me action in Power Automate requires a valid connection. Enter your PDF4me API key when you add the action for the first time, it is reused automatically in all subsequent PDF4me actions in the same flow.

Important Facts You Should Not Miss

Page Format controls what the number looks like
The Page Format field lets you choose between Page X (e.g. "Page 3"), X (bare number), X of Y (e.g. "3 of 10"), and Page X of Y. For client-facing reports and legal documents, "Page X of Y" is the most recognizable format. If omitted, the action defaults to "Page X".
Skip First Page removes numbering from cover pages
Set Skip First Page: true and page numbering starts on page 2, the cover or title page receives no number. This is the standard formatting expectation for reports, proposals, and manuals. The sequence still reflects the true page count, so the second page will show "Page 2 of 10" if Page X of Y format is used.
Margins are in millimeters from the alignment edge
Horizontal Margin and Vertical Margin offset the number from the chosen alignment edge in millimeters. For bottom-center positioning (the most common footer), set Vertical Alignment: Bottom, Horizontal Alignment: Center, and Vertical Margin: 10 to place the number 10 mm from the bottom edge. Adjust until it clears any existing footer content.
Power Automate PDF4me Add Page Number to PDF action showing PDF File Content and PDF File Name inputs mapped from a SharePoint Get File Content step, Page Format set to Page X of Y, Horizontal Alignment Center, Vertical Alignment Bottom, Font Size 10, and Skip First Page true

Map PDF File Content and PDF File Name from a SharePoint or OneDrive step. Set Page Format, alignment, font size, and Skip First Page before saving the flow.

Parameters

Required: PDF File Content, PDF File Name, Horizontal Alignment, Vertical Alignment, and Font Size. Page Format defaults to "Page X" if omitted. Margins default to 0 and Bold/Italic default to false.

ParameterRequiredWhat it doesExample
PDF File ContentYesBinary content of the source PDF. Map from SharePoint Get File Content, OneDrive Get File Content, or an email attachment step. Must be a valid PDF binary.File Content from SharePoint
PDF File NameYesFilename of the PDF including .pdf extension. Used for output naming. Map dynamically from the source step or enter a static name.Report.pdf
Page FormatNoStyle of the page number stamp. Options: Page X (default), X, X of Y, Page X of Y. For professional documents use "Page X of Y" : it shows both position and total length.Page X of Y
Horizontal AlignmentYesLeft-right position of the number on the page. Options: Left, Center, Right. Most footers use Center.Center
Vertical AlignmentYesTop-bottom position of the number. Options: Top, Bottom, Middle. Standard footers use Bottom.Bottom
Horizontal MarginNoDistance from the horizontal alignment edge in millimeters. Default 0. For left or right alignment, use 15: 20 mm to keep the number inside the printable area.10
Vertical MarginNoDistance from the vertical alignment edge in millimeters. Default 0. For bottom-center positioning, set to 10 to place the number 10 mm from the page bottom.10
Font SizeYesFont size of the page number text in points. Standard range 8-12 points. Use 9-10 for legal documents and 11-12 for reports distributed in print.10
Set BoldNoApply bold weight to the page number. True = bold, False = regular (default). Bold improves visibility on printed documents.true
Set ItalicNoApply italic style to the page number. True = italic, False = regular (default). Both Bold and Italic can be true at the same time.false
Skip First PageNoWhen true, the first page receives no page number: standard for documents with a cover page. The sequence still reflects the true page count. Default false.true

Output Fields

FieldTypeWhat it contains
File ContentBinaryThe complete PDF with page numbers stamped at the specified position, format, and font style. Map into SharePoint Create File, Send Email attachment, or OneDrive Create File.
File NameStringOutput filename of the numbered PDF. Map into the file name field of your upload or email action.

Quick Setup

  1. In your Power Automate flow, click + Add an action and search for PDF4me.
  2. Select Add Page Number to PDF.
  3. Enter your PDF4me API key in the connection dialog (or select an existing connection).
  4. Map PDF File Content to the binary from a SharePoint, OneDrive, or email step.
  5. Map PDF File Name to the filename including .pdf extension.
  6. Set Page Format: use Page X of Y for reports, contracts, and proposals.
  7. Set Horizontal Alignment and Vertical Alignment: Center + Bottom is the standard footer position.
  8. Enter Font Size (10: 12 recommended) and optionally enable Set Bold.
  9. Set Skip First Page to true if the document has a cover page.
  10. Set Vertical Margin to 10 for a 10 mm bottom offset. Save and test the flow.

Workflow Examples

Workflow ExamplesCommon Power Automate flow patterns using Add Page Number to PDF.
Monthly report generation → add page numbers → email to stakeholders
  1. A scheduled trigger fires on the first day of each month.
  2. SharePoint retrieves the compiled monthly report PDF from the Reports library.
  3. Add Page Number to PDF stamps "Page X of Y" at bottom center with 10pt bold font and Skip First Page set to true (cover page excluded).
  4. The numbered PDF is saved back to a "Distributed Reports" SharePoint folder.
  5. Send an Email with the numbered PDF attached distributes it to the management mailing group automatically before the 9am standup.
Policy update → merge sections → add page numbers → publish to intranet
  1. A SharePoint item change triggers the flow when a policy document is marked "Final" in the approval column.
  2. Get File Content retrieves all policy section PDFs from the Policy Sections library.
  3. A PDF4me Merge PDFs action combines all sections into a single complete manual.
  4. Add Page Number to PDF adds "Page X of Y" at bottom right with bold 12pt font. Skip First Page excludes the title page.
  5. SharePoint Create File publishes the finished numbered manual to the Employee Portal library, overwriting the previous version.
Contract finalized → add page numbers → email for execution → archive
  1. An approval trigger fires when a contract is approved in the legal review workflow.
  2. SharePoint retrieves the approved contract PDF from the Legal Review library.
  3. Add Page Number to PDF stamps "Page X of Y" at bottom right with 9pt bold font, the standard for executed legal documents. Skip First Page is false since contracts do not have a cover.
  4. Send an Email with the numbered contract attached routes it to the counterparty for execution via DocuSign or manual signature.
  5. SharePoint Create File archives the numbered version in the Executed Contracts library with the contract reference number in the filename.

Frequently Asked Questions

Which Page Format is best for professional documents?+
Page X of Y is the most universally recognized format for business reports, legal documents, and proposals: readers immediately see both their current position and the total length. X of Y works for a compact version without the word Page. Use Page X for simpler internal documents where only the current page number is needed, and bare X for minimalist designs where text labels would look out of place.
How does Skip First Page work: does numbering still start at 1?+
When Skip First Page is set to true, the first physical page of the PDF receives no number at all. Page numbering begins printing on the second physical page. The sequence displayed still reflects the true page count: so if Page Format is Page X of Y, the second page will show Page 2 of 10, not Page 1 of 9. This matches the standard publishing convention where the cover page is counted in the total but not visibly numbered.
What units are the margins in and how do I position the number at the bottom center?+
Horizontal Margin and Vertical Margin are both in millimeters. For the most common bottom-center footer position: set Vertical Alignment to Bottom, Horizontal Alignment to Center, and Vertical Margin to 10. This places the page number 10 mm from the bottom edge of each page, centered horizontally. Increase Vertical Margin if the document already has a footer with content you need to clear: try 15 mm or 20 mm and test with a sample PDF.
Can I apply both bold and italic to the page number text?+
Yes. Set Bold to true and Italic to true independently: both can be active at the same time. For most professional documents, bold alone at 10-12pt is the recommended style because it is clearly visible without being stylistically distracting. Italic-only is common in proposals where a subtle, non-intrusive number style is preferred. Bold-italic together is generally reserved for emphasis in creative or marketing documents.
What does the action return and how do I save the numbered PDF?+
The action returns File Content (binary PDF with page numbers) and File Name (the output filename). Map File Content and File Name into a SharePoint Create File action to save it to a document library, into Send an Email as an attachment to distribute it, or into OneDrive Create File for personal cloud storage. The numbered PDF is a complete, standalone file: no further post-processing is needed before sharing or archiving.

Get Help