Introduction
Developers tend to over-engineer their resumes. A two-column LaTeX template with icons for GitHub and email, small caps headings and a custom font looks great as a PDF. Extract the text from that PDF, though, and you may find lines from the two columns mixed together, or icons that come out as characters with no letters behind them.
A resume parser typically works in two steps. It extracts text from the PDF, then uses headings like “Experience” and “Education” to work out which lines belong in which field. Scrambled lines, broken words and symbols with no letters behind them make the second step harder.
Some jobs also ask for a Word file. Pandoc can convert simple LaTeX to .docx, but the custom commands in resume templates often leave formatting to fix by hand. The guide to a LaTeX resume without Overleaf lists one-column Google Docs alternatives to Jake’s, Deedy, AltaCV and moderncv, and shows what you’ll need to redo, such as small caps and icons. For a PDF submission, run the script below on the file you’ll upload.
What breaks resume parsing
Four things are worth checking first:
Columns. In a narrow column, lines wrap often, and parsers tend to cut wrapped lines short or join them to the wrong neighbour.
Ligatures. A PDF can store “fi” or “fl” as a single glyph. If it extracts as “fi” or “fl”, a search for the two separate letters misses the word, and in some PDFs the words on either side run together.
Icon fonts. The phone and envelope icons in many templates come from symbol fonts. They can extract as private-use Unicode characters, code points with no standard meaning.
Unusual headings. “Where I’ve worked” reads fine to a person. A parser looking for “Experience” won’t find it.
The script
It needs one package:
pip install pypdfimport re
import sys
import unicodedata
from pypdf import PdfReader
LIGATURES = {chr(c) for c in range(0xFB00, 0xFB07)} # ff fi fl ffi ffl ſt st
HEADINGS = ("experience", "education", "skills")
def is_private_use(ch):
return unicodedata.category(ch) == "Co"
def check(path):
reader = PdfReader(path)
text = "\n".join(page.extract_text(extraction_mode="layout") or "" for page in reader.pages[:3])
lines = [line.strip() for line in text.splitlines() if line.strip()]
print(f"{path}: {len(reader.pages)} page(s), {len(lines)} lines of text")
print("first lines:", lines[:3])
ligatures = sorted({ch for ch in text if ch in LIGATURES})
private = sorted({f"U+{ord(ch):04X}" for ch in text if is_private_use(ch)})
print("ligature characters:", ligatures or "none")
print("private-use characters:", private or "none")
email = re.search(r"[\w.+-]+@[\w-]+\.[\w.]+", text)
print("email found:", email.group(0) if email else "NO")
# Headings are short lines. "TECHNICAL SKILLS" should count as a skills
# heading, so look for the word anywhere in a line of four words or fewer.
short_lines = [line.lower() for line in lines if len(line.split()) <= 4]
for heading in HEADINGS:
found = any(heading in line for line in short_lines)
print(f"heading '{heading}':", "found" if found else "MISSING")
if __name__ == "__main__":
for path in sys.argv[1:]:
check(path)
Join the conversation! Your thoughts help the community grow.