Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.0.0 PDFBox
-
None
-
None
Description
In the course of answering this stack overflow question I saw that text extraction from the example file pattern3.pdf exposes an error in the diacritic merging code, the wrong base glyph is chosen.
From the bottom of my answer there:
By the way, your test file exposes an error in the PDFBox determination of the base glyph to merge a diacritic with: The "स[1434]ु[1441]न[1418]" is meant to be rendered as "सुन", i.e. the vowel sign u "ु" is combined with the letter sa "स", but PDFBox combines it with the subsequent letter na "न" as "सनु".
The cause is that it determines the letter to combine the diacritic with by its origin which here indeed is in the range of the latter letter na "न", but as the vowel sign glyph is rendered before its origin (it is drawn in an area with a negative x coordinate), PDFBox determines the wrong association: