---
schema_version: "1"
id: 9b64741255964381b064a03912b54906424193b446055f2f05791c44f592b236
title: Extract Pages from PDF File
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/rpa-builder/6.6/toolbox-file-operations-extract-pages-from-pdf-file.md
canonical_url: https://docs.mulesoft.com/rpa-builder/6.6/toolbox-file-operations-extract-pages-from-pdf-file
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c155489a6af67eabace2fc8c956c141d9c02631cb0d52c2995ef4f64e285c4dc
description: MuleSoft Documentation Site
release: "6.6"
latest: false
---
---
product: RPA Builder
version: 6.6
---

# Extract Pages from PDF File

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Extract pages from a PDF file, customize the output, and create a new PDF file with the configured
settings. Use this action step to split PDF files, combine multiple PDF files into one, or extract
specific pages to create a new PDF file.

## Properties

- **File Settings**

  - **Create Target PDF if it doesn’t exist**

    Select this option to create the PDF file if the specified output file name doesn’t exist.
    Otherwise, the action step fails if the file doesn’t exist.

  - **Extraction Page Range**

    The pages to extract from the input PDF. Use commas (`,`) to separate multiple ranges and `EOF`
    to specify the end of the file. This action step reads the pages in the specified order. For
    example, the value `1-5, EOF-6` outputs a file that contains pages from one to five in the
    original order and the remaining pages in reverse order, from last to six.

  - **Input File Directory Path**

    Path to the input file directory.

  - **Input File is Password Protected**

    If the input file is password protected, select this option and specify the password in the
    wizard.

  - **Input File Name**

    Name of the input file.

  - **Insert Mode**

    Select where to insert the extracted content in the output file. Available options:
    `StartOfDocument`, `SpecificPage`, or `EndOfDocument`.

  - **Insert Position**

    Select the page after which to insert the extracted content. If the PDF file doesn’t exist, and
    **Create Target PDF if it doesn’t exist** is selected, the action step inserts the pages at the
    beginning of the document.

  - **Output File Directory Path**

    Path to the output file directory.

  - **Output File is Password Protected**

    Select this option if the output file is password protected and specify the password in the
    Wizard.

  - **Output File Name**

    Name of the output file.

## Inbound Variables

- **Input File Directory Path**

- **Input File Name**

- **InputFilePassword**

- **Extraction Page Range**

- **Output File Directory Path**

- **Output File Name**

- **OutputFilePassword**

- **Insert Position**

## Outbound Variables

The _Extract Pages from PDF File_ action step has no outbound variables.

## Wizard

- **Input File Settings**

  Configure the settings for the input file to read: **Directory path**, **File name**, **Page
  Range**, and **Password** (if the file is password protected).

- **Output File Settings**

  Configure the settings for the output file to write: **Directory path**, **File name**, **Page
  Range**, and **Password** (if the file is password protected). Also specify if the action step
  creates the output file if it doesn’t exist and select where to insert the pages in the output
  file.
