How to Split a Large PDF and Auto-Name Pages by Text Content
Question details
The user needs to split an 83-page PDF into 83 single-page PDF files and automatically name each output file using specific text located on its corresponding page.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Automating document separation and file organization where manual renaming is too time-consuming for large batches.
- Observed behavior
- The user currently has a single large PDF document and requires a method to programmatically extract text from each page to use as the designated file name during the split process.
Ensure the target text you want to use for the file name has a consistent location, font, or format on every page, and back up your original PDF before running any scripts.
Use Custom Acrobat JavaScript to Split and Rename
The most efficient way to achieve this task is by utilizing a custom Document Level JavaScript in Adobe Acrobat Pro to extract page text and automate the saving process.
This approach requires Adobe Acrobat Pro, as standard PDF readers do not support executing advanced batch extraction scripts.
The script works best when the text is positioned in the exact same location (bounding box) on every page or follows a predictable Regular Expression pattern.
Launch Adobe Acrobat Pro, open your large PDF document, go to the 'Tools' tab, and select 'Action Wizard'.
Click 'New Action', choose 'Execute JavaScript' under the 'More Tools' section, and add it to the action steps.
Write a custom JavaScript loop that iterates through the document using 'this.numPages'. Use 'this.getPageNumWords()' and 'this.getPageNthWord()' to extract the specific text string from each page.
Ensure your script includes a regex function to strip out invalid filename characters like slashes, colons, or asterisks from the extracted text string.
Use the 'this.extractPages()' method to isolate the page, apply the sanitized text variable to the 'this.saveAs()' method, and run the action.

Utilize Dedicated PDF Batch Processing Software
If you are not comfortable writing custom JavaScript, specialized third-party batch processing plugins or software can provide a visual interface to handle this automation.
Easily Split Large PDFs into Separate Pages with WPS Office
While automated text-based renaming requires advanced scripting, WPS Office provides a highly intuitive and powerful PDF toolkit that lets you quickly split large documents into individual pages in seconds, making manual renaming highly manageable.
- 1. Open the Document: Launch WPS Office and open your multi-page PDF document in the WPS PDF editor.
- 2. Access the Split Tool: Navigate to the 'Page' tab located on the top navigation ribbon and click on the 'Split PDF' tool.
- 3. Configure Split Settings: In the dialog box, select 'Split by every 1 page' to ensure each page becomes its own separate PDF document.
- 4. Select Destination and Split: Choose your desired output folder at the bottom of the dialog window, then click the 'Split' button to instantly generate the separated files.

Frequently Asked Questions
Can I natively auto-name split PDF pages based on content without scripts?
Standard PDF editors do not natively support auto-naming based on extracted text without using custom JavaScript, OCR integrations, or premium third-party automation plugins.
How does the script know which text to extract?
A custom script relies on specific coordinates (a bounding box) or regular expressions to locate the text. Because of this, the target text must be located in a consistent place or follow a strict pattern on every page.
What happens if the extracted text contains special characters?
Windows and Mac operating systems restrict certain characters in file names (like /, \, :, *, ?, ", <, >, |). Any automation script must include a sanitize function to remove or replace these characters before attempting to save the file.
Can WPS Office split a PDF into single pages?
Yes, WPS PDF allows you to easily split documents. You can choose to split by every single page, a specific page range, or custom intervals simply by navigating to the Page tab and selecting Split PDF.




