You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2016/08/27 13:14:41 UTC

svn commit: r1758027 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java

Author: tilman
Date: Sat Aug 27 13:14:41 2016
New Revision: 1758027

URL: http://svn.apache.org/viewvc?rev=1758027&view=rev
Log:
PDFBOX-2984: avoid negative height and space width

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java?rev=1758027&r1=1758026&r2=1758027&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/LegacyPDFStreamEngine.java Sat Aug 27 13:14:41 2016
@@ -319,8 +319,8 @@ class LegacyPDFStreamEngine extends PDFS
 
         processTextPosition(new TextPosition(pageRotation, pageSize.getWidth(),
                 pageSize.getHeight(), translatedTextRenderingMatrix, nextX, nextY,
-                dyDisplay, dxDisplay,
-                spaceWidthDisplay, unicode, new int[] { code } , font, fontSize,
+                Math.abs(dyDisplay), dxDisplay,
+                Math.abs(spaceWidthDisplay), unicode, new int[] { code } , font, fontSize,
                 (int)(fontSize * textMatrix.getScalingFactorX())));
     }