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 2015/07/29 18:35:50 UTC
svn commit: r1693310 -
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Author: tilman
Date: Wed Jul 29 16:35:49 2015
New Revision: 1693310
URL: http://svn.apache.org/r1693310
Log:
PDFBOX-2906: save textLineMatrix and textMatrix before showing a glyph to avoid it being lost in recursion
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1693310&r1=1693309&r2=1693310&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java Wed Jul 29 16:35:49 2015
@@ -679,7 +679,13 @@ public abstract class PDFStreamEngine
// process the decoded glyph
saveGraphicsState();
+ Matrix textMatrixOld = textMatrix;
+ textMatrix = new Matrix();
+ Matrix textLineMatrixOld = textLineMatrix;
+ textLineMatrix = new Matrix();
showGlyph(textRenderingMatrix, font, code, unicode, w);
+ textMatrix = textMatrixOld;
+ textLineMatrix = textLineMatrixOld;
restoreGraphicsState();
// calculate the combined displacements