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 2020/12/17 09:58:28 UTC

svn commit: r1884547 - /pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java

Author: tilman
Date: Thu Dec 17 09:58:27 2020
New Revision: 1884547

URL: http://svn.apache.org/viewvc?rev=1884547&view=rev
Log:
PDFBOX-4892: add comment related to post from Anze Germovsek

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

Modified: pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java?rev=1884547&r1=1884546&r2=1884547&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java (original)
+++ pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/AddAnnotations.java Thu Dec 17 09:58:27 2020
@@ -109,7 +109,10 @@ public final class AddAnnotations
             PDAnnotationTextMarkup txtMark = new PDAnnotationTextMarkup(
                     PDAnnotationTextMarkup.SUB_TYPE_HIGHLIGHT);
             txtMark.setColor(blue);
-            txtMark.setConstantOpacity((float)0.2); // 20% transparent
+            
+            // remove line below if PDF/A-2b (and possibly other PDF-A flavours)
+            // also add txtMark.setPrinted(true)
+            txtMark.setConstantOpacity((float) 0.2); // 20% transparent
 
             // Set the rectangle containing the markup
             float textWidth = font.getStringWidth("PDFBox") / 1000 * 18;