Skip to content

fix: preserve significant TJ text boundaries - #380

Open
kamran-nizamani wants to merge 1 commit into
docling-project:mainfrom
kamran-nizamani:fix/tj-text-cell-boundaries-4341-v3
Open

kamran-nizamani wants to merge 1 commit into
docling-project:mainfrom
kamran-nizamani:fix/tj-text-cell-boundaries-4341-v3

Conversation

@kamran-nizamani

Copy link
Copy Markdown

Summary

Fixes docling-project/docling#4341.

Some PDFs draw multiple table fields inside one PDF TJ operation. Numeric TJ adjustments are explicit source-level positioning signals, but the parser previously discarded them after moving the text cursor.

Freshly rebuilt on the current upstream main:

  • retain the physical cursor displacement from numeric TJ items as transient PAGE_CELL metadata;
  • treat significant forward TJ jumps as boundaries, normalized by local character advance;
  • preserve the boundary when constructing text-line cells;
  • keep small/backward adjustments available for normal kerning/contraction;
  • add a self-contained regression for the reported -166.487 pattern plus a kerning control.

No serialized PAGE_CELL format change is introduced.

The previous draft of this fix is not the basis of this branch; this PR starts from the current upstream main.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

❌ DCO Check Failed

Hi @kamran-nizamani, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.


🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for Kamran Khan <kamrannizamani35@gmail.com>

I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 08908aa1132ae1ca773d084be1985df39c164ea0"
git push

🔧 Advanced: Sign off each commit directly

For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

@mergify

mergify Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 Merge protection satisfied — ready to merge.

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@PeterStaar-IBM
PeterStaar-IBM self-requested a review October 5, 2026 03:52
@PeterStaar-IBM

Copy link
Copy Markdown
Member

@kamran-nizamani can you please fix the DCO and compilation errors?

This branch has not been deployed

No deployments
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.

A table row drawn as one TJ show operation becomes a single text cell

2 participants