pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1821402 - /pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java
Date Wed, 17 Jan 2018 17:29:36 GMT
Author: tilman
Date: Wed Jan 17 17:29:36 2018
New Revision: 1821402

URL: http://svn.apache.org/viewvc?rev=1821402&view=rev
Log:
PDFBOX-3353: construct appearance streams

Modified:
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java?rev=1821402&r1=1821401&r2=1821402&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java
(original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java
Wed Jan 17 17:29:36 2018
@@ -236,6 +236,13 @@ public final class AddAnnotations
             pageLink.setAction(actionGoto);
             annotations.add(pageLink);      
             
+            // Create the appearance streams.
+            // Adobe Reader will always display annotations without appearance streams nicely,
+            // but other applications may not.
+            for (PDAnnotation ann : annotations)
+            {
+                ann.constructAppearances();
+            }
 
             showPageNo(document, page1, "Page 1");
             showPageNo(document, page2, "Page 2");



Mime
View raw message