[
https://issues.apache.org/jira/browse/PDFBOX-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15075185#comment-15075185
]
Tilman Hausherr edited comment on PDFBOX-3175 at 12/30/15 4:55 PM:
-------------------------------------------------------------------
None of the official test files are different with the latest commit, but these
files of mine:
- PDFBOX-2996.pdf - two lines now together that were very close
- PDFBOX-3110-003422-p1-beads.pdf - fur subscript / superscript now in same line
- PDFBOX-679-toobig.pdf - several differences in the sorted output only I can't
tell whether better or not (arabic).
- Extraction of 005021.pdf (of PDFBOX-3062) now identical to 1.8.
The commit doesn't have to be done for 1.8 - the earlier 1.8 commit [
https://svn.apache.org/r1711714 ] applies to width and height. It's the 2.0
commit that was incomplete.
was (Author: tilman):
None of the official test files are different with the latest commit, but these
files of mine:
- PDFBOX-2996.pdf - two lines now together that were very close
- PDFBOX-3110-003422-p1-beads.pdf - fur subscript / superscript now in same line
- PDFBOX-679-toobig.pdf - several differences in the sorted output only I can't
tell whether better or not (arabic).
- Extraction of 005021.pdf (of PDFBOX-3062) now identical to 1.8.
The commit doesn't have to be done for 1.8 - [ https://svn.apache.org/r1711714
] applies to width and height.
> PDFTextStreamEngine probably miscalculates text height
> ------------------------------------------------------
>
> Key: PDFBOX-3175
> URL: https://issues.apache.org/jira/browse/PDFBOX-3175
> Project: PDFBox
> Issue Type: Bug
> Components: Text extraction
> Affects Versions: 2.0.0
> Reporter: Leo
> Attachments: MarketT_140815-1-marked-1-18.png,
> MarketT_140815-1-marked-1.png, snapshot.png
>
>
> When parsing a PDF document, TextPosition is created with constant text
> height, about 2 time smaller than character width, regardless of font size.
> The following workaround to calculate dyDisplay fixes the issue:
> float verticalScaling = 1/1000f;
> if (font instanceof PDType3Font) {
> Matrix fontMatrix = font.getFontMatrix();
> verticalScaling = fontMatrix.getValue(1, 1);
> }
> float dyDisplay = bbox.getHeight() * fontSize * verticalScaling;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]