fix: stop designed / multi-column resumes silently dropping sections in PDF extraction - #401
Open
Sofa3xpert wants to merge 1 commit into
Open
Conversation
…eep their text Designed resume templates (Canva, Adobe Express, ...) paint sidebar content over decorative vector panels. to_markdown treated those panels as significant images and dropped every text line over them, silently losing whole sections (skills, education, contact) before the LLM saw them. Pass ignore_graphics=True in extract_text_from_pdf. Non-regressing on simple layouts (resume/sample.pdf extracts byte-identically); recovers the dropped sidebar text on designed layouts. Adds tests/pdf_extraction_test.py as a regression guard. Fixes interviewstreet#400
Sofa3xpert
force-pushed
the
fix/designed-layout-extraction
branch
from
August 6, 2026 23:11
9976f28 to
cd7ed9c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #400.
Problem
Designed resume templates (Canva, Adobe Express, ...) paint sidebar content over decorative vector panels.
extract_text_from_pdfcalledto_markdown(doc, pages=pages), which treats those panels as significant images and drops every text line over them. Whole sections (skills, education, contact) vanish before the LLM sees them, silently deflating scores.Before / after
Same persona as
resume/sample.pdf(Barack Obama), rebuilt as a Canva two-column layout:No regression on layouts that already worked:
resume/sample.pdfextracts byte-identically (906 to 906 chars). Verified against main @ 70fd3ea.Fix
One line in
pdf.py, passignore_graphics=Truetoto_markdown:Vector graphics in a resume are decorative; they must not suppress text. (
ignore_graphicsalso skips markdown table formatting, but table text is still extracted, which is what matters for parsing.)Test
Adds
tests/pdf_extraction_test.py, a hermetic PDF to Markdown smoke test (no API key or network): it builds the Canva-style fixture and asserts the sidebar survives extraction. Fails on main, passes with this change. Black-clean; pytest-discovered and runnable standalone.Run
python tests/pdf_extraction_test.py(orpytest tests/).Note: named
*_test.pyrather thantest_*.pybecause the repo's.gitignoreignorestest_*.py.