docling-project / docling-project/docling-parse

TrueType font partitioning issue between two sanitized cells

Open
#114 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
333
Forks
80
Avg merge
1d 14h
Merged PRs (30d)
10

Description

>> Probably related, but with [this PDF](https://www.mobilize-fs.com/sites/default/files/media/pdf/Prospectus-_2024-10-16.pdf) I also get weirdly spaced out text like:
>>
>> ## OVERVIEW OF THE SECURITISATIO N TRA N SACTIO N
>> Even though it renders correctly in Mac OS Preview and copying the text from there, those spaces aren't present.
>
> Probably not the same bug in this case - those are TrueType fonts in that document, and the text isn't partitioned between two sanitized cells in the same way (I didn't look at the output of parse_v2.exe yet though...)
>
> It's still a bug in docling-parse, though, because there's no reason why it should insert spaces there ([PLAYA](https://github.com/dhdaines/playa) does not, for instance, nor does the old reliable `pdftotext` tool from Poppler). It's a tagged PDF, with explicit spaces in the text objects:
> ```console
> $ playa --page 11 --content-streams ../Prospectus-_2024-10-16.pdf
> # ... snipped ...
> /Span <> BDC q
> 0.000008871 0 595.32 841.92 re
> W* n
> BT
> /F8 11.04 Tf
> 1 0 0 1 56.88 657.58 Tm
> 0 g
> 0 G
> [(O)-4(V)-5(E)4(R)15(V)-5(IEW)13( O)-4(F T)17(H)-4(E)4( SE)16(C)5(U)5(R)5(ITISA)6(T)4(IO)-6(N)5( T)4(R)5(A)5(N)5(SA)6(C)5(T)4(IO)-6(N)] TJ
> ET
> Q
> EMC
> ```

_Originally posted by @dhdaines in [#99](https://github.com/docling-project/docling-parse/issues/99#issuecomment-2754055052)_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.