PDF Editing Issues

How to Extract PDF Pages and Name Them by Drawing Numbers

Camila MilosovichCamila Milosovich Nov 3, 2026 869 views

Question details

The user needs to extract hundreds of pages from a single PDF into separate files, automatically naming each extracted file using a specific drawing number located in the same position on each page.

How to Extract PDF Pages and Name Them by Drawing Numbers
Product
PDF Editor
Device & OS
not provided
Scenario
Managing a large multi-page PDF document containing numerous architectural or engineering drawings that need to be separated into individually named files.
Observed behavior
The user wants to automate the extraction and renaming process based on text found consistently in the lower-right corner of each page.
Before you start

Before attempting automated extraction, verify whether the drawing numbers on your PDF pages are selectable text or flat scanned images. If they are images, you will need to perform Optical Character Recognition (OCR) first so that the extraction script can read the numbers.

Solution 1Recommended

Automate Extraction and Naming with a Custom Script

Use a custom JavaScript in Adobe Acrobat or specialized external automation tools to read text at a specific coordinate, extract the page, and save it using that text as the filename.

Since standard PDF editors split files by page numbers or top-level bookmarks by default, extracting and naming files based on specific on-page text (like a drawing number) requires custom scripting.

This automated method works best if the target text is actual text rather than a scanned image, and if it appears in the exact same coordinates on every page of the document.

1
Verify Text Selectability

Open your PDF and attempt to highlight the drawing number with your cursor. If you can select it as text, you can proceed. If it is flat, locate and click the 'Recognize Text' or 'OCR' button in your PDF editor to convert the images to text.

2
Prepare the Extraction JavaScript

Write or obtain a custom Acrobat JavaScript that loops through the document. The script must use the 'getPageNthWord' or bounding box coordinate methods to extract the drawing number text string from the lower-right corner and assign it to a variable.

3
Execute the Page Extraction

Incorporate the 'extractPages' method within your script's loop to target and pull the current page into a new temporary document object.

4
Save with the Custom Filename

Use the 'saveAs' method in your script, passing the variable containing the extracted drawing number to automatically generate and apply the new file name when saving.

Automate Extraction and Naming with a Custom Script
Scripting Assistance Required: Writing a script to target specific page coordinates requires advanced knowledge of Acrobat JavaScript API. If you are not familiar with coding, you may need to consult a developer to create the script tailored to your specific PDF's layout.
Efficient PDF Management with WPS Office

Easily Split and Manage Large PDFs with WPS Office

While automated coordinate-based naming requires complex scripting, WPS Office provides an intuitive PDF editor with powerful built-in Split PDF and OCR tools, making it incredibly easy to divide large architectural drawing sets and manually extract text for accurate file renaming.

  1. 1. Open the Large PDF: Launch WPS Office and open your multi-page PDF drawing set.
  2. 2. Navigate to Split Tools: Click on the 'Page' tab in the top ribbon and select the 'Split PDF' tool.
  3. 3. Extract the Pages: Choose the option to split the document by every 1 page, choose your output directory, and click 'Split' to export all drawings individually.
  4. 4. Use OCR for Renaming: For scanned pages, open an extracted file, click 'OCR' on the Home tab to convert the drawing number to selectable text, copy it, and paste it to rename the file.
Fast and accurate Split PDF tool to instantly extract individual pages into separate filesBuilt-in OCR technology to effortlessly copy drawing numbers from scanned imagesFully compatible with standard PDF files and Microsoft Office formats (Word, Excel, PowerPoint)Lightweight, user-friendly interface designed for seamless document management
QA img-9

Frequently Asked Questions

Why is the automated script not picking up the drawing numbers?

This usually happens if the PDF consists of flat scanned images rather than actual selectable text. You must perform OCR (Optical Character Recognition) on the document using your PDF editor's tools to convert the scanned pixels into machine-readable text before running the extraction script.

Is there a way to batch rename PDF files after splitting them normally?

Yes. If you split the PDF normally (resulting in files named Document_1, Document_2, etc.), you can use specialized batch renaming software or OS-level scripts (like PowerShell for Windows or AppleScript for Mac) to rename the files in bulk, provided you have an exported Excel or CSV list of the drawing numbers.

Can I split a PDF automatically using text strings without writing a custom script?

Standard PDF editors do not typically offer built-in features to split and name files based on specific on-page text coordinates. You either need a custom JavaScript plugin, external third-party PDF splitting automation software specifically designed for data extraction, or you must rely on splitting by bookmarks.