pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1692164 - /pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreatePDFA.java
Date Tue, 21 Jul 2015 16:28:52 GMT
Author: tilman
Date: Tue Jul 21 16:28:51 2015
New Revision: 1692164

URL: http://svn.apache.org/r1692164
Log:
PDFBOX-2896: add title to example

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

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreatePDFA.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreatePDFA.java?rev=1692164&r1=1692163&r2=1692164&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreatePDFA.java
(original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/CreatePDFA.java
Tue Jul 21 16:28:51 2015
@@ -29,6 +29,7 @@ import org.apache.pdfbox.pdmodel.font.PD
 import org.apache.pdfbox.pdmodel.font.PDType0Font;
 import org.apache.pdfbox.pdmodel.graphics.color.PDOutputIntent;
 import org.apache.xmpbox.XMPMetadata;
+import org.apache.xmpbox.schema.DublinCoreSchema;
 import org.apache.xmpbox.schema.PDFAIdentificationSchema;
 import org.apache.xmpbox.type.BadFieldValueException;
 import org.apache.xmpbox.xml.XmpSerializer;
@@ -74,6 +75,9 @@ public class CreatePDFA
             XMPMetadata xmp = XMPMetadata.createXMPMetadata();
             try
             {
+                DublinCoreSchema dc = xmp.createAndAddDublinCoreSchema();
+                dc.setTitle(file);
+                
                 PDFAIdentificationSchema id = xmp.createAndAddPFAIdentificationSchema();
                 id.setPart(1);
                 id.setConformance("B");



Mime
View raw message