You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Emil Wacker (JIRA)" <ji...@apache.org> on 2011/05/21 05:23:47 UTC

[jira] [Commented] (PDFBOX-1001) TextPosition.getHeight() returns erroneous value for some PDFs

    [ https://issues.apache.org/jira/browse/PDFBOX-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037256#comment-13037256 ] 

Emil Wacker commented on PDFBOX-1001:
-------------------------------------

made this fix and now get the same reasonable values seen with 1.2.1 

org.apache.pdfbox.util.PDFStreamEngine (from version 1.5.0)
line 492  (just prior to call to processTextPosition)

old:
            float totalVerticalDisplacementDisp = maxVerticalDisplacementText * fontSizeText * textMatrix.getYScale();

new:
            float totalVerticalDisplacementDisp = maxVerticalDisplacementText * fontSizeText * textXctm.getYScale(); 



> TextPosition.getHeight() returns erroneous value for some PDFs
> --------------------------------------------------------------
>
>                 Key: PDFBOX-1001
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1001
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Text extraction
>    Affects Versions: 1.4.0, 1.5.0
>         Environment: Solaris, WinXP
>            Reporter: Emil Wacker
>
> For a PDF that worked fine under 1.2.1 the height value returned is negative and the wrong value (i.e. using Math.abs()  won't fix it).  Other PDFs work fine.
> PDF Debug shows "Creator:Crystal Reports"  and "Producer:PDF-XChange (XCPRO30.DLL v3.30.0064) (Windows 2k)"
> And when examining the 'Stream' items, the text is not what displays.
> Any suggestions on what to look for so that I can do differential analysis against other PDFs to see what they do/not have in common with this one?
> (It's client data so I can't post the PDF. )
> It's stopping us from moving off 1.2.1  (and later versions fix another issue we have of seeing question marks instead of the actual characters).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira