pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1821884 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLineAppearanceHandler.java
Date Mon, 22 Jan 2018 16:13:52 GMT
Author: tilman
Date: Mon Jan 22 16:13:52 2018
New Revision: 1821884

URL: http://svn.apache.org/viewvc?rev=1821884&view=rev
Log:
PDFBOX-3353: add resources when needed; remove uneeded rectangle offset

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLineAppearanceHandler.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLineAppearanceHandler.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLineAppearanceHandler.java?rev=1821884&r1=1821883&r2=1821884&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLineAppearanceHandler.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLineAppearanceHandler.java
Mon Jan 22 16:13:52 2018
@@ -103,10 +103,10 @@ public class PDLineAppearanceHandler ext
                 }
                 cs.setLineWidth(ab.width);
 
-                float x1 = pathsArray[0] - rect.getLowerLeftX();
-                float y1 = pathsArray[1] - rect.getLowerLeftY();
-                float x2 = pathsArray[2] - rect.getLowerLeftX();
-                float y2 = pathsArray[3] - rect.getLowerLeftY();
+                float x1 = pathsArray[0];
+                float y1 = pathsArray[1];
+                float x2 = pathsArray[2];
+                float y2 = pathsArray[3];
 
                 String contents = annotation.getContents();
                 if (contents == null)
@@ -158,6 +158,8 @@ public class PDLineAppearanceHandler ext
 
                     if (contentLength > 0)
                     {
+                        prepareResources();
+
                         // don't show if there was trouble before
                         cs.beginText();
                         //TODO reduce font? How to decide the size?



Mime
View raw message