# Reorder the pages of a PDF

Rearrange the pages of a PDF document into a new order in your Power Automate flow.

Use this action to rearrange the pages of a PDF document into a new order. Pages
left out are dropped, and a page listed more than once is repeated, so this action
doubles as a combined extract-and-reorder.

<PowerAutomateAction
  title="Reorder the pages of a PDF"
  caption="Reorder the pages of a PDF."
  connection="PDF Blocks Next"
  fields={[
    { label: "File Content", kind: "token", value: "File Content", required: true },
    { label: "Page Order", placeholder: "The desired page order, for example 3,1,2", required: true },
  ]}
/>

<ConnectorNotice kind="action" />

## Parameters

<ParamField name="File Content" type="File" required>
  The content of the input PDF document.
</ParamField>

<ParamField name="Page Order" type="String" required>
  The desired page order, as a comma-separated list of page numbers and ranges (for
  example `3,1,2`). A range may run backwards, so `10..5` walks from page 10 down to
  page 5. A negative number counts from the end, so `-1` is the last page. Pages left
  out are dropped; a page listed more than once is repeated.
</ParamField>

## Response

<ParamField name="Reordered PDF File Content" type="File">
  The content of the reordered PDF document. You can use it as an input to other actions in your flow.
</ParamField>

## Related actions

<CardGroup cols={2}>

<Card title="Extract pages" href="/docs/power-automate/extract-pages-from-pdf">
  Keep a subset of pages without reordering.
</Card>

<Card title="Remove pages" href="/docs/power-automate/remove-pages-from-pdf">
  Drop specific pages.
</Card>

<Card title="Reverse pages" href="/docs/power-automate/reverse-pages-of-pdf">
  Reverse the whole document.
</Card>

<Card title="Rotate pages" href="/docs/power-automate/rotate-pages-in-pdf">
  Turn selected pages.
</Card>

</CardGroup>
