DEV Community

Michael Wilson
Michael Wilson

Posted on Edited on

What a resume parser reads from a cover letter PDF

I ran a sample cover letter through OpenResume, an open-source resume parser. The letter is from Avery Johnson, a made-up biology student applying for a summer internship. OpenResume found her name, email, phone number and LinkedIn URL. It also set her location to Durham, NC. Avery's contact line says Raleigh, NC. Durham is where the lab she's writing to is.

I tested the Plain and Student cover letter templates for LibreOffice Writer. Avery's letter is the Student template's sample, and the Plain one is a marketing coordinator's letter to a credit union. Both are plain paragraphs: a name and contact line at the top, then the date, the recipient's name and address, the letter and a sign-off. I exported the US Letter versions headless with LibreOffice 26.8.1.1 on macOS, read the text with pypdf 7.1.1 and pdfminer.six 20260107, and ran OpenResume's parser in Node (commit 4f8255a, pdf.js 3.7.107), with its browser-only PDF loading step swapped for a local copy that maps the text items the same way.

A resume parser is the wrong tool for a letter, but letters can still end up in front of one. Some application forms have only one upload box, and some job ads ask for everything in one PDF. I didn't test a commercial applicant tracking system, and I don't know what any of them do with a separate cover letter upload.

The text came out in order

pypdf and pdfminer.six both returned the letters line by line in reading order, including the Student letter's centered header:

Avery Johnson
Raleigh, NC | (919) 555-0137 | avery.johnson@example.com | linkedin.com/in/averyjohnson
October 5, 2026
Internship Coordinator
Quill & Flask Labs
Durham, NC
Dear Internship Coordinator,
Enter fullscreen mode Exit fullscreen mode

The PDFs embed subsets of Arial and Georgia, and no glyph stands for more than one character. Both Raleigh and Durham came through in the extracted text. OpenResume picked Durham for the location field.

Where the wrong city came from

OpenResume treats everything above the first section heading as the profile. It found no section heading in Avery's letter, so the whole page became the profile. To fill the location field, OpenResume looks for City, ST in the profile's pdf.js text items and gives each match 4 points. These are the two candidates on Avery's page:

{"str":"Raleigh, NC | (919) 555-0137 |","x":90.75,"y":714.4,"hasEOL":false}
{"str":"Durham, NC","x":43.3,"y":633.1,"hasEOL":false}
Enter fullscreen mode Exit fullscreen mode

Raleigh is cut out of a longer item that also holds the phone number. Durham is a whole item. Both score 4. On a tie the parser keeps the first candidate in its list, and whole items go into that list before the pieces cut out of longer ones, so the recipient's city wins even though it's lower on the page.

I checked it two ways. I deleted the Durham, NC line from the template's content.xml and exported again, and location came back as Raleigh, NC. In the Plain letter, the writer and the credit union she's applying to are both in Columbus, OH, so the problem can't show. When I changed the credit union's city to Dublin, OH, the parser put the writer in Dublin.

Then I ran the parser on 20 sample cover letters exported from Google Docs in October 2026. In nine of them the writer and the recipient are in different cities, and all nine came back with the recipient's city. One had no city in the contact line and got the recipient's city too. The other ten use the same city for both, so they can't show it either way.

The summary field went wrong in a different way. For the summary, OpenResume adds 4 points to an item with at least four words. Bold text, an @, digits in parentheses and a City, ST match cost points. The parser then joins every item tied for the top score. For Avery that was the lab's name, Quill & Flask Labs (the & counts as a word), and most of the letter body. The three-word greeting dropped out, and so did application., the last word of the closing paragraph, which sits alone on its line. The summary ends with Thank you for considering my.

A letter and a resume in one file

Next I joined each letter to the matching resume template with pypdf, once with the letter first and once with the resume first:

from pypdf import PdfWriter

writer = PdfWriter()
for path in ["cover-letter.pdf", "resume.pdf"]:
    writer.append(path)
writer.write("application.pdf")
Enter fullscreen mode Exit fullscreen mode

When I ran the resumes on their own, OpenResume matched all 33 Plain fields and all 35 Student fields against the values in each sample. A field that should be blank counts as matched when it comes back blank. The combined files:

File Fields matched What went wrong
Plain, letter first 33/33 none, though the writer and the employer share a city
Student, letter first 33/35 location is Durham, NC, and the letter became the summary
Plain, resume first 29/33 the letter became skills
Student, resume first 32/35 the letter became skills

The Plain resume has a SUMMARY heading, and a summary section takes priority over whatever the profile scoring finds, so the letter in front of it didn't touch that field. The Student resume has no summary heading. With its letter in front, the letter's body filled the summary and Durham took the location again.

With the resume first, the letter's lines landed in the resume's last section, Skills. OpenResume splits a skills section into up to six featured skills and a list of description lines. Without bullets, the descriptions start at the first line that is a single text item with at least eight words that contain no digits. If no line qualifies, the whole section counts as descriptions. The Plain resume's four skill lines are short, so on their own all four were read as descriptions. With the letter attached, the first line to qualify began I'm writing to apply. The real skills moved to featured skills, and the twelve lines from there down to the signature became skill descriptions. OpenResume also joined the resume's last skill line to Taylor Morgan's name at the top of the letter, so one featured skill came out as:

Languages: English (native), Spanish (conversational)Taylor Morgan
Enter fullscreen mode Exit fullscreen mode

The letter's contact line and date took the last two featured-skill slots. Hiring Manager, Wexbridge Credit Union, Columbus, OH and Dear Hiring Manager, didn't end up in any field.

A recipient line that looks like a heading

Besides bold capitals, OpenResume has a fallback for spotting section headings. It skips the first two lines and any line made of more than one text item. A line counts as a heading if it starts with a capital letter, holds only letters, spaces and ampersands, has at most two words not counting a standalone &, and contains a keyword such as experience, education, project, skill, job, course, award or summary anywhere in its text. Internship Coordinator passes everything except the keyword. I changed it to Project Coordinator and exported again.

The parser read that line as the start of a Projects section, and the rest of the letter became eight projects. The first was Quill & Flask Labs, with Durham, NC as its only description line. Dear Internship Coordinator, was a project with no description, four projects with no name held the paragraphs, and Sincerely, and Avery Johnson were the last two. The summary came back empty, and the location was right this time, because Durham was no longer in the profile.

Letterheads

Both cover letters I tested keep the contact details in the document body, not in a letterhead. The page header and text box results below come from a separate Google Docs resume test, recorded in a Kaggle dataset of OpenResume results for 10 resume layouts and 32 fonts. Each layout row records how many fields the parser read from the PDF, how many sample values were missing from the PDF's text, and where the .docx export keeps the contact details.

The download worked without a Kaggle login:

curl -L -o resume-parser-test.zip https://www.kaggle.com/api/v1/datasets/download/superlede/resume-parser-test-10-layouts-and-32-fonts
unzip resume-parser-test.zip
Enter fullscreen mode Exit fullscreen mode

This prints the three layouts that change the contact block:

import csv

with open("readableresume-ats-layout-test.csv", newline="") as f:
    for row in csv.DictReader(f):
        if "contact" in row["layout"]:
            print(row["layout"], row["pdf_fields_read"] + "/" + row["pdf_fields_total"],
                  "missing from PDF text:", row["pdf_values_missing_from_text"],
                  "| .docx contact in:", row["docx_contact_details_in"],
                  "| lost:", row["pdf_fields_lost_by_group"] or "-")
Enter fullscreen mode Exit fullscreen mode
contact-icons 46/46 missing from PDF text: 0 | .docx contact in: body | lost: -
header-contact 46/46 missing from PDF text: 0 | .docx contact in: header | lost: -
text-box-contact 34/46 missing from PDF text: 5 | .docx contact in: text box | lost: contact 6; education 6
Enter fullscreen mode Exit fullscreen mode

With the contact details in the page header, OpenResume matched every field in the PDF, and the .docx kept those details in the header instead of the document body. With the text box, the PDF has an image in it, five of the sample values were missing from its text layer, and the parser lost all six profile fields along with the education entry.

Running it yourself

The dataset description links to the test scripts and the PDFs they were run on. Clone the repository with --recurse-submodules to fetch OpenResume, then run npm ci in parser/. The merge script needs Python with pypdf installed, and the last command uses jq. The repository also has Avery's letter and resume as exported from Google Docs: fixtures/student/student-cover-letter-letter.pdf and fixtures/student/student-resume-letter.pdf. Copy them into parser/ as cover-letter.pdf and resume.pdf, run the merge script above there, and then run this from the same folder:

npm run --silent parse -- application.pdf | jq -r '.resume.profile | .location, .summary[0:60]'
Enter fullscreen mode Exit fullscreen mode
Durham, NC
Quill & Flask Labs I'm a second-year biology student at Card
Enter fullscreen mode Exit fullscreen mode

The Google Docs export gave the same two values as the Writer export. The other 19 letters follow the same pattern, fixtures/<template>/<template>-cover-letter-letter.pdf, next to the resumes they go with.

If a form has its own cover letter field, I'd use it. In both pairs, the letter-first file matched more resume fields than the resume-first one, and the Plain resume's Summary heading kept that field intact. When I removed the lab's city from Avery's letter and put the letter first again, the Student file went from 33/35 to 34/35: OpenResume returned Raleigh, NC, and still used the letter as the summary.

Top comments (2)

Collapse
 
ayushdhanani369 profile image
Ayush Dhanani •

The Durham tie-break is the part that stuck with me. Both cities score 4, so the parser keeps the first candidate and the employer's city wins. Nine of the twenty Google Docs letters had the same problem, and the applicant would never know.

That is the case I design for. I build Aladdin, a job agent. Its worker reads the actual form fresh each time, and if a field comes back ambiguous it asks the user instead of guessing. A confident wrong answer is worse than an empty one. Your advice to use the form's own cover letter field when it has one is the same instinct.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

The Durham mix-up is a good catch. A parser reading the employer's city as the applicant's location is the kind of bug that ships quietly for years.