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

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.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| PDF File Content | Yes | Binary 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 Name | Yes | Filename of the PDF including .pdf extension. Used for output naming. Map dynamically from the source step or enter a static name. | Report.pdf |
| Page Format | No | Style 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 Alignment | Yes | Left-right position of the number on the page. Options: Left, Center, Right. Most footers use Center. | Center |
| Vertical Alignment | Yes | Top-bottom position of the number. Options: Top, Bottom, Middle. Standard footers use Bottom. | Bottom |
| Horizontal Margin | No | Distance 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 Margin | No | Distance 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 Size | Yes | Font 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 Bold | No | Apply bold weight to the page number. True = bold, False = regular (default). Bold improves visibility on printed documents. | true |
| Set Italic | No | Apply 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 Page | No | When 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
| Field | Type | What it contains |
|---|---|---|
File Content | Binary | The 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 Name | String | Output filename of the numbered PDF. Map into the file name field of your upload or email action. |
Quick Setup
- In your Power Automate flow, click + Add an action and search for PDF4me.
- Select Add Page Number to PDF.
- Enter your PDF4me API key in the connection dialog (or select an existing connection).
- Map PDF File Content to the binary from a SharePoint, OneDrive, or email step.
- Map PDF File Name to the filename including
.pdfextension. - Set Page Format: use
Page X of Yfor reports, contracts, and proposals. - Set Horizontal Alignment and Vertical Alignment:
Center+Bottomis the standard footer position. - Enter Font Size (10: 12 recommended) and optionally enable Set Bold.
- Set Skip First Page to
trueif the document has a cover page. - Set Vertical Margin to
10for a 10 mm bottom offset. Save and test the flow.
Workflow Examples
Workflow ExamplesCommon Power Automate flow patterns using Add Page Number to PDF.
- A scheduled trigger fires on the first day of each month.
- SharePoint retrieves the compiled monthly report PDF from the Reports library.
- 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).
- The numbered PDF is saved back to a "Distributed Reports" SharePoint folder.
- Send an Email with the numbered PDF attached distributes it to the management mailing group automatically before the 9am standup.
- A SharePoint item change triggers the flow when a policy document is marked "Final" in the approval column.
- Get File Content retrieves all policy section PDFs from the Policy Sections library.
- A PDF4me Merge PDFs action combines all sections into a single complete manual.
- Add Page Number to PDF adds "Page X of Y" at bottom right with bold 12pt font. Skip First Page excludes the title page.
- SharePoint Create File publishes the finished numbered manual to the Employee Portal library, overwriting the previous version.
- An approval trigger fires when a contract is approved in the legal review workflow.
- SharePoint retrieves the approved contract PDF from the Legal Review library.
- 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.
- Send an Email with the numbered contract attached routes it to the counterparty for execution via DocuSign or manual signature.
- SharePoint Create File archives the numbered version in the Executed Contracts library with the contract reference number in the filename.