pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1822532 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLinkAppearanceHandler.java
Date Mon, 29 Jan 2018 16:45:45 GMT
Author: tilman
Date: Mon Jan 29 16:45:45 2018
New Revision: 1822532

URL: http://svn.apache.org/viewvc?rev=1822532&view=rev
Log:
PDFBOX-3353: support /Border entry

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLinkAppearanceHandler.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLinkAppearanceHandler.java?rev=1822532&r1=1822531&r2=1822532&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLinkAppearanceHandler.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDLinkAppearanceHandler.java
Mon Jan 29 16:45:45 2018
@@ -79,7 +79,17 @@ public class PDLinkAppearanceHandler ext
                 boolean hasStroke = contentStream.setStrokingColorOnDemand(color);
 
                 contentStream.setBorderLine(lineWidth, annotation.getBorderStyle());
-                
+                //TODO find better way to do this. Either pass border array to
+                // setBorderLine(), or use AnnotationBorder class
+                if (annotation.getBorderStyle() == null)
+                {
+                    COSArray border = annotation.getBorder();
+                    if (border.size() > 3 && border.getObject(3) instanceof COSArray)
+                    {
+                        contentStream.setLineDashPattern(((COSArray) border.getObject(3)).toFloatArray(),
0);
+                    }
+                }
+
                 // the differences rectangle
                 // TODO: this only works for border effect solid. Cloudy needs a different
approach.
                 setRectDifference(lineWidth);



Mime
View raw message