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 2022/12/22 11:17:28 UTC

svn commit: r1906163 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java

Author: tilman
Date: Thu Dec 22 11:17:28 2022
New Revision: 1906163

URL: http://svn.apache.org/viewvc?rev=1906163&view=rev
Log:
PDFBOX-4892: improve javadoc

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1906163&r1=1906162&r2=1906163&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Thu Dec 22 11:17:28 2022
@@ -1049,6 +1049,12 @@ public class PDDocument implements Close
      * you are required to keep the current revision and append the changes. A typical use case is changing a signed
      * file without invalidating the signature.
      * <p>
+     * If your modification includes annotations, make sure these link back to their page by calling
+     * {@link PDAnnotation#setPage(PDPage)}. Although this is optional,
+     * not doing it
+     * <a href="https://stackoverflow.com/questions/74836898/">can cause trouble when PDFs get
+     * signed</a>. (PDFBox already does this for signature widget annotations)
+     * <p>
      * Don't use the input file as target as this will produce a corrupted file.
      *
      * @param output stream to write to. It will be closed when done. It <i><b>must never</b></i> point to the source
@@ -1078,6 +1084,12 @@ public class PDDocument implements Close
      * PDF specification, and look at the saved file with an editor to verify that you are updating the correct objects.
      * You should also inspect the page and document structures of the file with PDFDebugger.
      * <p>
+     * If your modification includes annotations, make sure these link back to their page by calling
+     * {@link PDAnnotation#setPage(PDPage)}. Although this is optional,
+     * not doing it
+     * <a href="https://stackoverflow.com/questions/74836898/">can cause trouble when PDFs get
+     * signed</a>. (PDFBox already does this for signature widget annotations)
+     * <p>
      * Don't use the input file as target as this will produce a corrupted file.
      *
      * @param output stream to write to. It will be closed when done. It <i><b>must never</b></i> point to the source