| English README | 中文说明 |
Are you still renaming downloaded research paper PDFs one by one by hand?
When you download papers in bulk from academic search engines, the resulting files often have uninformative names such as paper.pdf, document(1).pdf, or 2401.08392.pdf. To organize them manually, you usually need to open each PDF, find the title, close the file, and rename it. Even if one paper only takes about ten seconds, organizing hundreds of papers can easily consume an entire afternoon.
PdfAutoRenameTools solves this problem with one automated workflow.
The tool reads layout information from the first page of each PDF, identifies the paper title, and renames the file to that title. It supports batch processing without manual intervention, making literature organization much faster and more convenient.
The core algorithm of this project is based on the original public version shared by Mr. Bingning Wang on his homepage. The original tool has been very useful in daily research work. During long-term use, one known issue was found: for some papers, the extracted title only included the first line, which caused incomplete renamed file names.
To fix this issue, the original JAR was reverse-analyzed with Luyten. After understanding the original source logic, the title extraction algorithm was specifically optimized, and a Swing-based graphical user interface was added to make the tool easier to use.
If Mr. Bingning Wang believes that publishing this code is inappropriate, the repository owner may be contacted to remove it.
A Java runtime environment is required to run the generated JAR files. The project documentation records the following Java environment as the compilation environment:
java version "26.0.1" 2026-04-21
Java(TM) SE Runtime Environment (build 26.0.1+8-34)
Java HotSpot(TM) 64-Bit Server VM (build 26.0.1+8-34, mixed mode, sharing)
Other Java versions may also work, but you should configure a suitable Java environment for your system.
The generated JAR files are located in:
out\artifacts\PdfAutoRenameTools_jar\
This directory contains the GUI and command-line JAR files:
PdfAutoRenameTools_GUI.jar
PdfAutoRenameTools.jar
Run the GUI version with:
java -jar PdfAutoRenameTools_GUI.jar
After the graphical interface opens:
The table uses colors to show status:
Run the command-line version with a target directory path:
java -jar PdfAutoRenameTools.jar <directory-name>
The program recursively scans all PDF files under the specified directory and renames them according to the detected title from the first page.
Example:
java -jar PdfAutoRenameTools.jar D:\Papers
The title detection logic is implemented in TextLocationExtender.java:
PDFTextStripper and captures each text fragment during parsing, including its content, font size, X coordinate, and Y coordinate.src/nlpr/cip/
├── Main.java # Command-line entry point
├── GuiMain.java # Swing graphical user interface
├── TextLocationExtender.java # Core PDF text parsing and title extraction logic
├── Pair.java # Data structure: text, font size, X coordinate, Y coordinate
└── utils.java # Recursive file and directory traversal utilities
| Library | Version | Purpose |
|---|---|---|
| Apache PDFBox | 2.0.23 | PDF parsing and text extraction |
| Apache Commons Logging | 1.2 | Logging framework |
| FontBox | 3.0.0-RC1 | PDF font information handling |
The repository also includes related JAR dependencies such as pdfbox-app-2.0.23.jar, commons-logging-1.2.jar, and fontbox-3.0.0-RC1.jar.