Split and Rename PDF Files Using Form Values in Acrobat Pro
Question details
The user needs to split a PDF into separate files and name each file using bookmark names and dynamic form field values.

- Product
- Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- A PDF contains bookmarked sections and form fields whose values should be included in the filenames of the split files.
- Observed behavior
- Acrobat Pro can split PDFs, but its built-in split command does not directly combine bookmark names and form field values in output filenames.
Open the PDF in Acrobat Pro and check the bookmark hierarchy, section boundaries, and form field names. Determine whether the form uses standard Acrobat fields or dynamic XFA fields, since the available scripting methods differ.
Automate PDF Splitting and Naming with Acrobat JavaScript
Use a custom script when each output filename must combine a bookmark label with a form field value.
Acrobat's built-in split command does not directly create filenames from both bookmark names and field values. A custom workflow must associate each section with its page range and the correct field value.
Dynamic XFA forms require XFA-specific scripting and may not work with standard Acrobat form field methods. Page extraction and file-saving operations can also require a trusted context and appropriate permissions.
Open the Bookmarks panel in Acrobat Pro and record each section's bookmark label and page range. If necessary, click each bookmark and note the destination page to build a section-to-page mapping.
Open the form field tools and identify the field names and values needed for each section. Verify whether fields have unique names or whether a value is shared across multiple pages.
Use Acrobat's JavaScript tools to develop a script that reads each section's field value, combines it with the mapped bookmark label, and extracts the corresponding page range. Replace characters that are invalid in filenames and handle duplicate names.
Run the script in an appropriate trusted context on a small test PDF. Open the output folder and check that each file contains the intended pages and has the correct bookmark and field values in its name.

Split and Organize PDFs Alongside Office Files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office files. Use its PDF tools for manual splitting and rename the resulting files as needed; this does not replace Acrobat automation that combines bookmark and form values.

Frequently Asked Questions
Can Acrobat's built-in split command use form values in filenames?
No. Acrobat can split a PDF, including by top-level bookmarks, but its built-in split command does not directly combine bookmark names and form field values in output filenames. That requires custom automation.
How do I find the page range for each bookmark?
Open the Bookmarks panel and click each section bookmark to check its destination page. Record the start and end pages for each section so the automation can extract the correct range.
Will standard Acrobat form field code work with a dynamic XFA form?
Not necessarily. Dynamic XFA forms use a different form model, so code written for standard Acrobat fields may need to be adapted. Check the form type and test how its values are accessed before building the full workflow.
Why might an Acrobat script fail to save the split files?
Page extraction and file-saving operations can be restricted by Acrobat security settings or document permissions. Check the PDF's permissions and whether the script must run in a trusted context.




