Extract pages from a PDF
Create a new PDF from a selection of pages of an existing one, in a Power Automate flow. No code to write, and no document is stored after the run.
Use this action to extract one or more pages from a PDF document.
Some parameters below are rolling out to the published PDF Blocks connector and may not appear in your environment yet. To use them today, import the connector from GitHub as a custom connector.
Parameters
File ContentFilerequiredThe content of the input PDF document.
PagesStringThe pages to extract, as a comma-separated list of page numbers and ranges (for example 1..3,5). A negative number counts from the end, so -1 is the last page. Leave empty to extract every page. This field is optional. Do not combine it with First Page / Last Page.
First PageInteger NumberThe page number of the first page of the extracted PDF document. This field is optional. The value is 1 or more. This is a legacy field kept for backward compatibility; prefer Pages, and do not combine it with Pages.
Last PageInteger NumberThe page number of the last page of the extracted PDF document. This field is optional. The value is 1 or more. This is a legacy field kept for backward compatibility; prefer Pages, and do not combine it with Pages.
Response
Extracted PDF File ContentFileThe content of the extracted PDF document. You can use it as an input to other actions in your flow.