Document AI

Right-to-Left PDF Text Extraction for Hebrew and Arabic Filings

Recover Hebrew and Arabic reading order in financial PDFs using glyph coordinates and Unicode bidirectional text handling.

Pythonpypdfium2Unicode Bidirectional Algorithm (UAX #9)
Project name
Hebrew/RTL & Non-Latin Filing Support
Company
Strategic Systems International
Role
Principal Software Engineer – Developer
Period
June – September 2026
Illustration of Right-to-Left PDF Text Extraction for Hebrew and Arabic Filings

Project overview

Some financial PDFs store Hebrew or Arabic glyphs in visual order. Sorting characters by their horizontal position can spell a word backwards. I used glyph boxes to reconstruct lines, applied the Unicode Bidirectional Algorithm and compared the result with the source page. The work also addressed truncated Hebrew headings and separate character corruption issues in Japanese and Korean filings.

The engineering problem

The visual order of text in a PDF can differ from reading order. Naive character sorting can reverse words or corrupt headings.

My contribution

  • Worked on Hebrew/Arabic text reconstruction from PDF geometry.
  • Applied bidirectional text handling to reading-order problems.
  • Resolved heading and glyph corruption issues.
  • Investigated Japanese and Korean extraction defects.

How the system works

  1. Inspect text layers and character geometry.
  2. Reconstruct lines and determine their reading direction.
  3. Apply bidirectional ordering and heading fixes.
  4. Compare extraction results with the source document.

Tools & Technologies

Python · pypdfium2 · Unicode Bidirectional Algorithm (UAX #9) · Docling · Node.js · Java

Delivered capabilities

RTL reconstruction

Reading-order fixes

Heading repairs

Non-Latin support

Project illustrations use sample data.

Need a similar system?

Let’s discuss how I can help build a solution around your documents, data, and workflows.

Discuss Your Project