Docear’s PDF Inspector is a JAVA library that extracts titles from a PDF file not from the PDF’s metadata but from its full-text. More precisely, Docear’s PDF Inspector extracts the full-text of the first page of a PDF and looks for the largest text in the upper third of that page. This text is returned as title. Of course, this does not always deliver the correct title (e.g. sometimes the journal name is formatted in a larger font size than an article’s title) but in about 70% you will get the correct one. The main features of Docear’s PDF Inspector are
- Extracts titles from PDF files with good accuracy (~70%) and excellent run-time (few milliseconds per PDF in batch mode)
- Usable as JAVA library (other tools such as reference managers can easily integrate Docear’s PDF Extractor to extract titles from PDFs.
- Usable as stand-alone command-line application (returns a PDFs’ title on the command line)
- Usable in batch mode (stores the extracted titles into a CSV file)
- Reads all PDF versions (other tools such as SciPlore Xtract or ParsCit are using PDFBox for processing the PDFs. However, PDFBox sometimes has problems extracting text from PDFs not being 100% compliant to the PDF standard – Docear’s PDF Inspector is based on jPod, which is more tolerant)
- Written entirely in JAVA 1.6. Hence, Docear’s PDF Inspector runs on any major operating system, including Windows, Linux, and Mac OS, without any other tools required (besides the JAVA run time environment, of course)
- Completely independent of further tools – you only need Docear’s PDF Inspector, that’s it (e.g. SciPlore Xtract requires pdftohtml to be installed)
- Released under the GNU General Public License (GPL) 2 or later, which means it is completely free to use and its source code can be downloaded and modified by anyone.
Please note, as a normal Docear user you don’t have to download Docear’s PDF Inspector – it is already integrated into Docear. We only offer Docear’s PDF Inspector as separate download for third parties who would like to use it in their own applications.
On the command line, enter java -jar docears-pdf-inspector.jar [OPTION]… [FILE]…. Valid options are
-title (extracts the title)
-duration (records the time required for processing the PDF)
-name (includes the file name in the output)
-out <arg> (name of the output file, e.g. alltitles.csv)
-outappend <arg> (appends data to file instead of overwriting file)
-delimiter <arg> (specifies the delimiter used to separate fields)
-hash (creates a unique hash based on the text and robust to smaller changes)
For instance, to extract only the title and return the title on the command line, enter java -jar docears-pdf-inspector.jar -title mypdffile.pdf. You can specify a single file or multiple files separated with a space (wildcards can also be used)
Develop & Download
We sincerely invite you to join the development of Docear’s PDF Inspector. You can find its source code on Github and we are very glad about any improvements you make. If you just want to use Docear’s PDF Inspector download the ZIP archive (9MB).
- Parameter handling is not the best (if unknown parameters are entered, nothing might work)
- Titles over more than two lines are not recognized completely