Skip to content

feat: Patch Pdfium for incorrect page count bug - #9

Open
abimaelmartell wants to merge 4 commits into
mainfrom
abi/pdf-repair-fix
Open

abimaelmartell wants to merge 4 commits into
mainfrom
abi/pdf-repair-fix

Conversation

@abimaelmartell

@abimaelmartell abimaelmartell commented Feb 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Patches PDFium to fix the root cause of broken PDF parsing instead of repairing PDFs at runtime
  • The upstream PDFium bug incorrectly trusted /Count in page trees and miscounted pages when /Kids contained null object references
  • Removes the _repair_pdf() workaround and simplifies convert_to_markdown() back to a single pass
  • Adds a reproducible build system (patch/build-pdfium.sh) to compile the patched libpdfium.so for linux/amd64

@abimaelmartell abimaelmartell changed the title feat: Repair broken pdfs for Pdfium feat: Patch Pdfium for incorrect page count bug Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant