pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1855642 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/filespecification/PDComplexFileSpecification.java
Date Sat, 16 Mar 2019 13:14:20 GMT
Author: tilman
Date: Sat Mar 16 13:14:19 2019
New Revision: 1855642

URL: http://svn.apache.org/viewvc?rev=1855642&view=rev
Log:
PDFBOX-4485: improve javadoc to clarify that setFile() and setFileUnicode() should both be
used and setFileUnicode() 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=1855642&r1=1855641&r2=1855642&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 13:14:19 2019
@@ -131,7 +131,9 @@ public class PDComplexFileSpecification
     }
 
     /**
-     * This will set unicode file name.
+     * This will set the unicode file name. If you call this, then do not forget to also
call
+     * {@link #setFile(java.lang.String) setFile(String)} or the attachment will not be visible
on
+     * some viewers.
      *
      * @param file The name of the file.
      */
@@ -152,7 +154,9 @@ public class PDComplexFileSpecification
     }
 
     /**
-     * This will set the file name.
+     * This will set the file name. You should also call
+     * {@link #setFileUnicode(java.lang.String) setFileUnicode(String)} for cross-platform
and
+     * cross-language compatibility.
      *
      * @param file The name of the file.
      */
@@ -176,7 +180,9 @@ public class PDComplexFileSpecification
      * This will set name representing a dos file.
      *
      * @param file The name of the file.
+     * @deprecated This method is obsolescent and should not be used by conforming writers.
      */
+    @Deprecated
     public void setFileDos( String file )
     {
         fs.setString( COSName.DOS, file );
@@ -196,7 +202,9 @@ public class PDComplexFileSpecification
      * This will set name representing a Mac file.
      *
      * @param file The name of the file.
+     * @deprecated This method is obsolescent and should not be used by conforming writers.
      */
+    @Deprecated
     public void setFileMac( String file )
     {
         fs.setString( COSName.MAC, file );
@@ -216,7 +224,9 @@ public class PDComplexFileSpecification
      * This will set name representing a Unix file.
      *
      * @param file The name of the file.
+     * @deprecated This method is obsolescent and should not be used by conforming writers.
      */
+    @Deprecated
     public void setFileUnix( String file )
     {
         fs.setString( COSName.UNIX, file );



Mime
View raw message