Index: examples/src/main/java/org/apache/pdfbox/examples/pdfa/CreatePDFA.java
===================================================================
--- examples/src/main/java/org/apache/pdfbox/examples/pdfa/CreatePDFA.java	(revision 0)
+++ examples/src/main/java/org/apache/pdfbox/examples/pdfa/CreatePDFA.java	(working copy)
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pdfbox.examples.pdfa;
+
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+import org.apache.jempbox.xmp.XMPMetadata;
+import org.apache.jempbox.xmp.pdfa.XMPSchemaPDFAId;
+import org.apache.pdfbox.cos.COSArray;
+import org.apache.pdfbox.cos.COSDictionary;
+import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
+import org.apache.pdfbox.pdmodel.PDPage;
+import org.apache.pdfbox.pdmodel.common.PDMetadata;
+import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;
+import org.apache.pdfbox.pdmodel.font.PDFont;
+import org.apache.pdfbox.pdmodel.font.PDTrueTypeFont;
+import org.apache.pdfbox.pdmodel.graphics.color.OutputIntent;
+
+
+/**
+ * This is an example that creates a simple PDF/A document.
+ *
+ */
+public class CreatePDFA
+{
+    /**
+     * Constructor.
+     */
+    public CreatePDFA()
+    {
+        super();
+    }
+
+    /**
+     * Create a simple PDF/A document.
+     * 
+     * This example is based on HelloWorld example.
+     * 
+     * As it is a simple case, to conform the PDF/A norm, are added :
+     * - the font used in the document
+     * - a light xmp block with only PDF identification schema (the only mandatory)
+     *
+     * @param file The file to write the PDF to.
+     * @param message The message to write in the file.
+     * @param fonfile the true type font file to use
+     *
+     * @throws Exception If something bad occurs
+     */
+    public void doIt( String file, String message) throws Exception
+    {
+        // the document
+        PDDocument doc = null;
+        try
+        {
+            doc = new PDDocument();
+
+            PDPage page = new PDPage();
+            doc.addPage( page );
+
+            // load the font from pdfbox.jar
+            InputStream fontStream = CreatePDFA.class.getResourceAsStream("/org/apache/pdfbox/resources/ttf/ArialMT.ttf");
+            PDFont font = PDTrueTypeFont.loadTTF(doc, fontStream);
+            
+            // create a page with the message where needed
+            PDPageContentStream contentStream = new PDPageContentStream(doc, page);
+            contentStream.beginText();
+            contentStream.setFont( font, 12 );
+            contentStream.moveTextPositionByAmount( 100, 700 );
+            contentStream.drawString( message );
+            contentStream.endText();
+            contentStream.saveGraphicsState();
+            contentStream.close();
+            
+            PDDocumentCatalog cat = doc.getDocumentCatalog();
+            PDMetadata metadata = new PDMetadata(doc);
+            cat.setMetadata(metadata);
+
+            // jempbox version
+            XMPMetadata xmp = new XMPMetadata();
+            XMPSchemaPDFAId pdfaid = new XMPSchemaPDFAId(xmp);
+            xmp.addSchema(pdfaid);
+            pdfaid.setConformance("B");
+            pdfaid.setPart(1);
+            pdfaid.setAbout("");
+            metadata.importXMPMetadata(xmp);
+    
+            
+            // retrieve icc
+            InputStream colorProfile = new FileInputStream("sRGB_IEC61966-2-1_black_scaled.icc");
+            // create output intent
+            OutputIntent oi = new OutputIntent(doc, colorProfile); 
+            oi.setInfo("sRGB IEC61966-2.1"); 
+            oi.setOutputCondition("sRGB IEC61966-2.1"); 
+            oi.setOutputConditionIdentifier("sRGB IEC61966-2.1"); 
+            oi.setRegistryName("http://www.color.org"); 
+            // output intent is in an array
+            COSArray outputIntents = new COSArray(); 
+            outputIntents.add(oi); 
+
+            COSDictionary root = (COSDictionary)cat.getCOSObject();
+            root.setItem(COSName.OUTPUT_INTENTS, outputIntents);
+            
+            doc.save( file );
+           
+        }
+        finally
+        {
+            if( doc != null )
+            {
+                doc.close();
+            }
+        }
+    }
+
+    /**
+     * This will create a hello world PDF/A document.
+     * <br />
+     * see usage() for commandline
+     *
+     * @param args Command line arguments.
+     */
+    public static void main(String[] args)
+    {
+        CreatePDFA app = new CreatePDFA();
+        try
+        {
+            if( args.length != 2 )
+            {
+                app.usage();
+            }
+            else
+            {
+                app.doIt( args[0], args[1] );
+            }
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * This will print out a message telling how to use this example.
+     */
+    private void usage()
+    {
+        System.err.println( "usage: " + this.getClass().getName() + " <output-file> <Message>" );
+    }
+}
Index: pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java
===================================================================
--- pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java	(revision 1467330)
+++ pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java	(working copy)
@@ -397,6 +397,11 @@
     public static final COSName DESTS = new COSName( "Dests" );
 
     /**
+     * A common COSName value.
+     */
+    public static final COSName DEST_OUTPUT_PROFILE = new COSName( "DestOutputProfile" ); 
+    
+    /**
     * A common COSName value.
     */
     public static final COSName DEVICECMYK = new COSName( "DeviceCMYK" );
@@ -700,6 +705,9 @@
     /**
      * A common COSName value.
      */
+    
+    public static final COSName GTS_PDFA1 = new COSName ("GTS_PDFA1");
+    
     public static final COSName H = new COSName( "H" );
     /**
     * A common COSName value.
@@ -1014,6 +1022,7 @@
      * A common COSName value.
      */
     public static final COSName OS = new COSName( "OS" );
+
     /**
      * A common COSName value.
      */
@@ -1022,6 +1031,16 @@
     /**
      * A common COSName value.
      */
+    public static final COSName OUTPUT_INTENT = new COSName( "OutputIntent" ); 
+
+    /**
+     * A common COSName value.
+     */
+    public static final COSName OUTPUT_INTENTS = new COSName( "OutputIntents" ); 
+
+    /**
+     * A common COSName value.
+     */
     public static final COSName OPEN_ACTION = new COSName("OpenAction");
 
     /** A common COSName value. */
Index: pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/DestOutputProfile.java
===================================================================
--- pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/DestOutputProfile.java	(revision 0)
+++ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/DestOutputProfile.java	(working copy)
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pdfbox.pdmodel.common;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.cos.COSStream;
+import org.apache.pdfbox.pdmodel.PDDocument;
+
+public class DestOutputProfile extends PDStream { 
+
+    public DestOutputProfile(PDDocument document) { 
+        super(document); 
+    } 
+
+    public DestOutputProfile(COSStream str) { 
+        super(str); 
+    } 
+
+    public DestOutputProfile(PDDocument doc, InputStream str) 
+            throws IOException { 
+        super(doc, str); 
+    } 
+
+    public DestOutputProfile(PDDocument doc, InputStream str, boolean filtered) 
+            throws IOException { 
+        super(doc, str, filtered); 
+    } 
+
+    public void configure(){ 
+        try { 
+            getStream().setFilters(COSName.FLATE_DECODE); 
+            getStream().setInt( COSName.LENGTH, getByteArray().length ); 
+            getStream().setInt(COSName.N, 3); 
+            addCompression(); 
+        } 
+        catch (Exception e) { 
+            e.printStackTrace(); 
+            System.exit(-1); 
+        } 
+    } 
+} 
\ No newline at end of file
Index: pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/OutputIntent.java
===================================================================
--- pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/OutputIntent.java	(revision 0)
+++ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/OutputIntent.java	(working copy)
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pdfbox.pdmodel.graphics.color;
+
+import java.io.InputStream;
+
+import org.apache.pdfbox.cos.COSBase;
+import org.apache.pdfbox.cos.COSDictionary;
+import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdmodel.common.COSObjectable;
+import org.apache.pdfbox.pdmodel.common.DestOutputProfile;
+
+public class OutputIntent implements COSObjectable { 
+    
+    private COSDictionary dictionary; 
+    
+    public OutputIntent(PDDocument doc, InputStream colorProfile) throws Exception{ 
+        dictionary = new COSDictionary(); 
+        dictionary.setItem(COSName.TYPE, COSName.OUTPUT_INTENT); 
+        dictionary.setItem(COSName.S, COSName.GTS_PDFA1); 
+
+        DestOutputProfile dop = new DestOutputProfile(doc,colorProfile, false); 
+
+        dop.configure(); 
+
+        dictionary.setItem(COSName.DEST_OUTPUT_PROFILE, dop); 
+
+    } 
+
+    public COSBase getCOSObject() { 
+        return dictionary; 
+    } 
+    public COSDictionary getDictionary() 
+    { 
+        return dictionary; 
+    } 
+
+    public void setInfo( String value ) 
+    { 
+        dictionary.setString("Info", value); 
+    } 
+
+    public void setOutputCondition( String value ) 
+    { 
+        dictionary.setString("OutputCondition", value); 
+    } 
+
+    public void setOutputConditionIdentifier( String value ) 
+    { 
+        dictionary.setString("OutputConditionIdentifier", value); 
+    } 
+
+    public void setRegistryName( String value ) 
+    { 
+        dictionary.setString("RegistryName", value); 
+    } 
+
+} 
