Count the references in the PDF before extracting them. Then compare each recovered entry with the page, fix the boundaries, and check the fields before turning the results into an IEEE reference list.
Count the source bibliography
Find the References heading and mark where the bibliography stops. Count the reference labels on the page before you extract anything. If the list has two columns, follow each column to its bottom and check the next page for a continuation. Keep the original labels in your notes so you can trace a recovered record back to the line it came from.
The teaching PDF below has three fictional books, numbered [1] through [3]. Entry [2] wraps, and [3] starts on the same printed line as the year that ends [2]. We designed that layout to expose a common assumption in a simple splitter. The records are for practice and should never appear in a real bibliography.
- Download the teaching PDF
- Download the raw text and first grouping
- Download the repaired teaching BibTeX
If your task is to cite the PDF itself, identify what the document is first. A journal article and a technical report can both arrive as PDFs and need different reference fields. See the guide to citing a PDF.
Extract the reference section locally
Try selecting a title on a reference page and copying it into a plain text editor. If you get usable text, check the order of two adjacent entries before processing the whole list. A PDF can display two columns correctly while returning text in a different order. An empty result on a scanned page calls for OCR on a working copy. Compare the recognized text with the visible page, paying particular attention to digits and letters in identifiers. The example here has selectable text and required no OCR.
We ran PyMuPDF 1.26.7 locally on the teaching file. The extraction read page one and saved its text before any edits. We then kept the part after the References heading and grouped it at bracketed numbers at the start of a line. Saving the raw text separately made it possible to tell which error came from text extraction and which came from the grouping rule.
For larger lists, the GROBID API documentation describes a processReferences endpoint that accepts a PDF and returns parsed references. Its documented BibTeX response uses the Accept header with application/x-bibtex. The consolidateCitations=0 setting disables citation consolidation. This article did not run GROBID or benchmark it against the teaching file. Use a local instance for documents you cannot share with a public service.
Detect split, missing and merged entries
The first pass yielded two groups for three printed references. The raw text still contained [3], after the year 2025 on the same line. The grouping rule skipped it because the number was not at the beginning of a line. Entry [2] therefore absorbed the title and year of [3]. Search the raw file for [3] and you can see exactly where the boundary was lost.
| Stage | Count | Evidence |
|---|---|---|
| Printed bibliography | 3 | Visible labels [1] through [3] |
| First grouping | 2 | Group [2] contains label [3] |
| After repair and field comparison | 3 | Each book matches its source label |
To repair the fixture, we separated [3] from the end of [2] and joined the wrapped part of [2] back to its own entry. We checked that Network Queues kept 2025 and that Link Testing kept 2026. Splitting at every bracketed number worked on this controlled sample. On a real bibliography, confirm that a number marks a new entry before splitting, since bracketed numbers can also occur within titles and notes.
Use the same label-by-label comparison even when the counts agree. A split entry can add one group while a merged pair removes one. Look for a group without an author or title, a second title in one group, and a skipped label. If a label is absent from the raw text, return to the page image and recover the entry there. If the label is present, fix the boundary before editing the bibliographic fields.
Validate records before IEEE formatting
Review each recovered record with its PDF entry beside it. Start with author order, title and year. Then check the type and its supporting fields. A book needs its publisher, while a journal article may need the journal name, volume and pages or article number. Preserve a DOI as written until you can check that it resolves to the matching title. An OCR correction that produces a working DOI can still point to the wrong paper.
After the repair, compare the recovered labels with the original count again. In a longer list, keep a small audit sheet with the PDF page, printed number, recovered title, and the reason for any correction. A missing venue or uncertain page range can stay open for review while you finish checking the rest of the entries.
Our repaired file contains three @book records. Each title and year matches its teaching source. For real records, also compare uncertain fields against the publisher or a trusted catalog. Keep unresolved records in a separate review list so they cannot quietly enter your final bibliography.
Once the fields are checked, use the BibTeX import workflow to format supported records. Check the generated list against your own manuscript’s first citations. The labels from the source PDF help you audit extraction. Your paper’s citation order supplies its final IEEE numbers.