Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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">
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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:
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.
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.
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
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more