pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1855657 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/filespecification/PDComplexFileSpecification.java
Date Sat, 16 Mar 2019 15:00:09 GMT
Author: tilman
Date: Sat Mar 16 15:00:09 2019
New Revision: 1855657

URL: http://svn.apache.org/viewvc?rev=1855657&view=rev
Log:
PDFBOX-4485: improve javadoc to clarify that setEmbeddedFile() and setEmbeddedFileUnicode()
should both be used and setEmbeddedFileUnicode() should not be used alone; deprecate methods
that "should not be used by conforming writers" as per PDF 32000 specification

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/filespecification/PDComplexFileSpecification.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/filespecification/PDComplexFileSpecification.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/filespecification/PDComplexFileSpecification.java?rev=1855657&r1=1855656&r2=1855657&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/filespecification/PDComplexFileSpecification.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/filespecification/PDComplexFileSpecification.java
Sat Mar 16 15:00:09 2019
@@ -270,7 +270,9 @@ public class PDComplexFileSpecification
     }
 
     /**
-     * Set the embedded file for this spec.
+     * Set the embedded file for this spec. You should also call
+     * {@link #setEmbeddedFileUnicode(org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile)
setEmbeddedFileUnicode(PDEmbeddedFile)}
+     * for cross-platform and cross-language compatibility.
      *
      * @param file The file to be embedded.
      */
@@ -308,7 +310,9 @@ public class PDComplexFileSpecification
      * Set the embedded dos file for this spec.
      *
      * @param file The dos file to be embedded.
+     * @deprecated This method is obsolescent and should not be used by conforming writers.
      */
+    @Deprecated
     public void setEmbeddedFileDos( PDEmbeddedFile file )
     {
         COSDictionary ef = getEFDictionary();
@@ -343,7 +347,9 @@ public class PDComplexFileSpecification
      * Set the embedded Mac file for this spec.
      *
      * @param file The Mac file to be embedded.
+     * @deprecated This method is obsolescent and should not be used by conforming writers.
      */
+    @Deprecated
     public void setEmbeddedFileMac( PDEmbeddedFile file )
     {
         COSDictionary ef = getEFDictionary();
@@ -378,7 +384,9 @@ public class PDComplexFileSpecification
      * Set the embedded Unix file for this spec.
      *
      * @param file The Unix file to be embedded.
+     * @deprecated This method is obsolescent and should not be used by conforming writers.
      */
+    @Deprecated
     public void setEmbeddedFileUnix( PDEmbeddedFile file )
     {
         COSDictionary ef = getEFDictionary();
@@ -410,7 +418,10 @@ public class PDComplexFileSpecification
     }
 
     /**
-     * Set the embedded Unicode file for this spec.
+     * Set the embedded Unicode file for this spec. If you call this, then do not forget
to also
+     * call
+     * {@link #setEmbeddedFile(org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile)
setEmbeddedFile(PDEmbeddedFile)}
+     * or the attachment will not be visible on some viewers.
      *
      * @param file The Unicode file to be embedded.
      */



Mime
View raw message