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 2025/04/08 11:25:45 UTC

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

Author: tilman
Date: Tue Apr  8 11:25:44 2025
New Revision: 1924936

URL: http://svn.apache.org/viewvc?rev=1924936&view=rev
Log:
PDFBOX-5660: clarify javadoc for SO79560213

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=1924936&r1=1924935&r2=1924936&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 Tue Apr  8 11:25:44 2025
@@ -926,6 +926,8 @@ public class PDDocument implements Close
      * <p>
      * If encryption has been activated (with {@link #protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy)
      * protect(ProtectionPolicy)}), do not use the document after saving because the contents are now encrypted.
+     * The same applies if your file was created from parts of another file and that
+     * one is to be used after saving.
      *
      * @param fileName The file to save as.
      *
@@ -943,6 +945,8 @@ public class PDDocument implements Close
      * <p>
      * If encryption has been activated (with {@link #protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy)
      * protect(ProtectionPolicy)}), do not use the document after saving because the contents are now encrypted.
+     * The same applies if your file was created from parts of another file and that
+     * one is to be used after saving.
      * 
      * @param file The file to save as.
      *
@@ -960,6 +964,8 @@ public class PDDocument implements Close
      * <p>
      * If encryption has been activated (with {@link #protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy)
      * protect(ProtectionPolicy)}), do not use the document after saving because the contents are now encrypted.
+     * The same applies if your file was created from parts of another file and that
+     * one is to be used after saving.
      *
      * @param output The stream to write to. It is recommended to wrap it in a {@link java.io.BufferedOutputStream},
      * unless it is already buffered.
@@ -978,6 +984,8 @@ public class PDDocument implements Close
      * <p>
      * If encryption has been activated (with {@link #protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy)
      * protect(ProtectionPolicy)}), do not use the document after saving because the contents are now encrypted.
+     * The same applies if your file was created from parts of another file and that
+     * one is to be used after saving.
      *
      * @param file The file to save as.
      * @param compressParameters The parameters for the document's compression.
@@ -1005,6 +1013,8 @@ public class PDDocument implements Close
      * <p>
      * If encryption has been activated (with {@link #protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy)
      * protect(ProtectionPolicy)}), do not use the document after saving because the contents are now encrypted.
+     * The same applies if your file was created from parts of another file and that
+     * one is to be used after saving.
      * 
      * @param fileName The file to save as.
      * @param compressParameters The parameters for the document's compression.
@@ -1023,6 +1033,8 @@ public class PDDocument implements Close
      * <p>
      * If encryption has been activated (with {@link #protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy)
      * protect(ProtectionPolicy)}), do not use the document after saving because the contents are now encrypted.
+     * The same applies if your file was created from parts of another file and that
+     * one is to be used after saving.
      *
      * @param output The stream to write to. It is recommended to wrap it in a {@link java.io.BufferedOutputStream},
      * unless it is already buffered.
@@ -1299,6 +1311,8 @@ public class PDDocument implements Close
      * previously and logs a warning.
      * <p>
      * Do not use the document after saving, because the structures are encrypted.
+     * The same applies if your file was created from parts of another file and that
+     * one is to be used after saving.
      *
      * @see org.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy
      * @see org.apache.pdfbox.pdmodel.encryption.PublicKeyProtectionPolicy