User:Joekidd/OpenOffice.org/Internship/PDFImport/Tasks/Improving rotated text
From Apache OpenOffice Wiki
The problem was described here. I applied a bit modified way of counting if glyph belongs to current line and now it looks like correctly.