# Remove pages from a PDF

Remove a selection of pages from a PDF, in a Power Automate flow. Uses the certified PDF Blocks connector, with no code and nothing stored.

Use this action to remove one or more pages from a PDF document.

<PowerAutomateAction
  title="Remove pages from a PDF"
  caption="Remove pages from a PDF."
  connection="PDF Blocks Next"
  fields={[
    { label: "File Content", kind: "token", value: "File Content", required: true },
    { label: "Pages", placeholder: "The pages to remove, as a comma-separated list of page numbers" },
    { label: "First Page", placeholder: "First page to remove (legacy)", advanced: true },
    { label: "Last Page", placeholder: "Last page to remove (legacy)", advanced: true },
  ]}
/>

<ConnectorNotice kind="parameter" />

## Parameters

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

<ParamField name="Pages" type="String">
  The pages to remove, as a comma-separated list of page numbers and ranges (for example `2,4..6`). A negative number counts from the end, so `-1` is the last page. At least one page must remain. This field is optional. Do not combine it with First Page / Last Page.
</ParamField>

<ParamField name="First Page" type="Integer Number">
  The page number of the first page to remove in the 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.
</ParamField>

<ParamField name="Last Page" type="Integer Number">
  The page number of the last page to remove in the 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.
</ParamField>

## Response

<ParamField name="Removed Pages PDF File Content" type="File">
  The content of the PDF document with some pages removed. 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 instead of dropping them.
</Card>

<Card title="Reorder pages" href="/docs/power-automate/reorder-pages-of-pdf">
  Rearrange the pages you keep.
</Card>

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

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

</CardGroup>
