pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1538394 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox: cos/COSName.java pdmodel/common/filespecification/PDComplexFileSpecification.java
Date Sun, 03 Nov 2013 15:57:05 GMT
Author: lehmi
Date: Sun Nov  3 15:57:05 2013
New Revision: 1538394

URL: http://svn.apache.org/r1538394
Log:
PDFBOX-1690: added a getter/setter for the file description based on a proposal by vakhtang
koroghlishvili 

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java?rev=1538394&r1=1538393&r2=1538394&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java Sun Nov  3 15:57:05
2013
@@ -382,6 +382,10 @@ public final class COSName extends COSBa
     /**
      * A common COSName value.
      */
+    public static final COSName DESC = new COSName("Desc");
+    /**
+     * A common COSName value.
+     */
     public static final COSName DESCENT = new COSName("Descent");
     /**
      * A common COSName value.

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=1538394&r1=1538393&r2=1538394&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
Sun Nov  3 15:57:05 2013
@@ -25,7 +25,7 @@ import org.apache.pdfbox.cos.COSStream;
  * This represents a file specification.
  *
  * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
- * @version $Revision: 1.4 $
+ * 
  */
 public class PDComplexFileSpecification extends PDFileSpecification
 {
@@ -353,5 +353,26 @@ public class PDComplexFileSpecification 
             ef.setItem( COSName.UNIX, file );
         }
     }
+    
+    /**
+     * Set the file description.
+     * 
+     * @param description The file description
+     */
+    public void setFileDescription( String description )
+    {
+        fs.setString( COSName.DESC, description );
+    }
+
+    /**
+     * This will get the description.
+     *
+     * @return The file description.
+     */
+    public String getFileDescription()
+    {
+        return fs.getString( COSName.DESC );
+    }
+
 }
 



Mime
View raw message