Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to find the first page number of multiple pdf files

New Here ,
Jul 31, 2025 Jul 31, 2025

Hi,

 

I am having huge multiple pdf files and want to rename pdf file according the first page number of the PDF.

Please help me, how to find the first page number of Multiple of PDF files using Adobe DC Pro without opening it manually.

 

Regards,

Nirmal. N

406
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 31, 2025 Jul 31, 2025

in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



<"moved from using the community">
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 31, 2025 Jul 31, 2025

Hi @NirmalKumar6073818,

 

 

Thanks for your question!

 

Using Adobe Acrobat Pro DC, you can definitely batch rename files using the Action Wizard, but automatically detecting the first page number of each PDF (especially across multiple files) gets tricky — especially if:

  • The page numbering is custom (not starting from 1)

  • The PDFs include scanned images (which don’t contain text or actual page metadata Acrobat can read directly)

  • The visible page number differs from the internal logical page number

 

 

There isn’t a built-in Acrobat feature to extract the displayed first page number for use in renaming. JavaScript in Acrobat could potentially help, but it gets complex, and might still not work reliably for scanned documents without OCR.

 

If your PDFs are not scanned and have consistent digital content, a custom script could try pulling the page label (if set) from the first page. 

 

Otherwise, if the PDFs have scanned or image-only pages, you’d first need to run OCR before any automation can extract meaningful page data. And as you can assume, this should cover a great number of scenarios. 

 

 

Hope this helps clarify things. Wait for more inputs from experts.



Best regards,
Tariq | Adobe Community Team

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 31, 2025 Jul 31, 2025

Hi @Tariq Ahmad , Thanks for your reply. My PDF's are not scanned pages or images and all are valid ocr runned text pages with valid various page number. It will be helpful for me if I get an script to find out the first page number of each pdf in bulk batch processing. Please help on this.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 31, 2025 Jul 31, 2025
LATEST

 

If the PDFs have a searchable text layer (even after running OCR using Enhance Scans > Recognize Text in Acrobat), then a JavaScript run via an Action Wizard or folder-level script could be used to:

  1. Open each PDF,
  2. Read the text content of the first page,
  3. Extract a number or label from it,
  4. Use that to rename the file (or save as a new file name).

 

If you’re working with multiple PDF files and want to rename them based on the first page number, this is possible only if the files contain searchable text (i.e., not scanned images without OCR). Adobe Acrobat can’t detect visible page numbers on image-based PDFs unless OCR (Text Recognition) has been applied.

 

I can't provide JavaScript for the use case. 

Here is an example of Acrobat JavaScript (for non-scanned PDFs)

var firstPageText = this.getPageNthWord(0, 0); // Gets the first word on the first page

if (firstPageText !== "") {

    var newName = firstPageText + ".pdf";

    this.saveAs("/C/temp/" + newName); // Save renamed copy to desired folder

}

Note: This code assumes the first word on page 1 is the page number or useful for naming. It can be expanded to look for multiple words or specific patterns.

 

 

How to Use the Script (in Acrobat Pro):

  1. Open Acrobat Pro DC.
  2. Go to Tools > Action Wizard > New Action.
  3. Add the JavaScript command.
  4. Add a Save step.
  5. Choose the input files or folder.
  6. Run the Action.
For scanned files, use Scan & OCR > Recognize Text on each document first to ensure the content is readable by scripts.

 

 

⚠️ Disclaimer: While Acrobat supports JavaScript, Adobe does not provide official support or validation for custom scripts. These are implemented at the user’s discretion.

🧑‍💻 If you’re a developer looking to build or scale automated solutions, Adobe offers a dedicated Developer Support Program with tools, documentation, and SDKs to assist.

 


Best regards,
Tariq | Adobe Community Team

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines