Extract Pages is a PDF4me action for Power Automate that pulls a chosen set of pages out of a PDF into a new document. This walkthrough builds a five step flow that reads a four page contract from /pdf4metest/extract/4page.pdf, takes pages 1,2 with PDF - Extract Pages, shrinks what comes back with PDF - Compress, and writes Pages 1-2 - 4Page.pdf to an output folder. Swap the path for your own and keep the wiring.
1. Manually trigger a flow → 2. Dropbox, Get file content using path with Infer Content Type on Yes → 3. PDF - Extract Pages: File Name 4Page.pdf, Page Numbers 1,2 → 4. PDF - Compress with Optimize Profile Max → 5. Dropbox, Create file named Pages 1-2 - 4Page.pdf.
Asking for page 7 of a four page file is the usual reason Extract Pages hands back an empty or broken PDF. Check the value in Page Numbers against the real page count before you run the flow over a folder.
What you are automating
The request is always some version of the same thing. Legal needs the signature page, the auditor needs pages 4 to 9, somebody needs the summary without the forty pages of appendix behind it. By hand that means opening the contract, finding the pages, exporting a selection, and emailing a file that is somehow still eleven megabytes. Here it is two PDF4me actions, with 1,2 in one field and Max in the other.
At a glance
- Manually trigger a flow
- Get file content using path (Dropbox)
- Extract Pages (PDF4me)
- Compress (PDF4me)
- Create file (Dropbox)

The whole run took about 13 seconds. Compression accounted for 11 of them.
Why this pattern works
Extract Pages needs three things: File Content, File Name and Page Numbers. Compress takes the extracted document and an Optimize Profile.
The field accepts a dynamic expression, so the page can be worked out earlier in the flow instead of being typed in as 1,2: find the page carrying a particular phrase, or take the last page of whatever arrived.
Pull two pages out of a scanned contract and you get two pages of scan, at whatever resolution the scanner used. The page count drops; the file size often does not.
Before you start
- The PDF4me PDF connector in your Power Automate environment.
- A storage connection. This flow uses Dropbox.
- A multi page PDF. Ours is a four page contract at
/pdf4metest/extract/4page.pdf.
Build the flow
Step 1: Manually trigger a flow
The flow starts on Manually trigger a flow.
Step 2: Get file content using path (Dropbox)
Flow so far: trigger.
- Add Dropbox: Get file content using path.
- Point it at the four page contract, ours at
/pdf4metest/extract/4page.pdf. - Infer Content Type:
Yes.

Step 3: Extract Pages (PDF4me)
Flow so far: trigger, Get file content using path.
PDF - Extract Pages needs three things, and it is the simplest action in this whole flow.
| Field | Value here | Why |
|---|---|---|
| File Content | from the Dropbox step | |
| File Name | 4Page.pdf | |
| Page Numbers | 1,2 | a comma separated list, so this is the first two pages |

Ranges work in the same field, which is how you ask for pages 4 through 9 without typing six numbers.
The field also takes a dynamic expression, which is where this gets interesting. A fixed 1,2 only helps when the pages you want are always in the same place. If they are not, work out the page number earlier in the flow and feed it in: find the page carrying a particular phrase, or take the last page of whatever arrived.
Step 4: Compress (PDF4me)
Flow so far: trigger, Get file content, Extract Pages.
- Add PDF - Compress. It takes the extracted document and an Optimize Profile.
- Optimize Profile:
Max.

We used Max, which is the right default for something being emailed. If the pages are going to a printer or into an archive, a gentler profile preserves more. This step took 11 of the flow's 13 seconds, which is worth knowing before you run it across a few hundred contracts.
Step 5: Create file (Dropbox)
Flow so far: trigger, Get file content, Extract Pages, Compress.
- Add Dropbox: Create file.
- Point it at your output folder.
- Name the file
Pages 1-2 - 4Page.pdf. - File Content: from the Compress step.

Name the output so it says what it contains. A name carrying the page range tells the next person what they are looking at without opening it. A folder of extract.pdf, extract (1).pdf and extract (2).pdf helps nobody.
Quick reference
| # | Action | Main mapping |
|---|---|---|
| 1 | Manually trigger a flow | — |
| 2 | Get file content using path | /pdf4metest/extract/4page.pdf, Infer Content Type Yes |
| 3 | Extract Pages | File Name 4Page.pdf, Page Numbers 1,2 |
| 4 | Compress | the extracted document, Optimize Profile Max |
| 5 | Create file | Pages 1-2 - 4Page.pdf, File Content from Compress |
Troubleshooting
Check that Page Numbers sits inside the document's actual page count. Asking for page 7 of a four page file is the usual cause.
Try a stronger Optimize Profile, then check whether the source is a scan. A scanned page compresses far less than a text page.
Check Infer Content Type on the Dropbox Get file content using path step.
What to try next
For when the split points are not fixed page numbers.
A one off, in the browser, with no flow to build.
FAQ
How do I extract pages from a PDF in Power Automate?
Add the PDF4me Extract Pages action, map File Content from your storage step, and put the pages you want in Page Numbers as a comma separated list such as 1,2.
Can I extract a range of pages?
Yes. Page Numbers accepts ranges as well as individual numbers, so you can ask for pages 4 through 9 without listing each one.
Can the page numbers be dynamic?
Yes, and this is where the flow stops being a shortcut and starts being useful. Work the page number out earlier in the flow and pass it in, rather than hard coding it.
Why is my extracted file still large?
Extracted pages keep the resolution of the original. Add a Compress step after the extraction, as this flow does.
Sending somebody forty pages when they asked for two is its own small rudeness. Change the path, put your own pages in Page Numbers, and pick an Optimize Profile that suits where the file is going.
