PDF/A
PDF/A (Archiving) is a subset of the standard PDF specification specifically targeting PDF documents that must be preserved long-term. The goal of the PDF/A specification was to create a specification that defined a PDF document to be self-contained and device-independent. The result of a document adhering to the PDF/A specification will remain readable, renderable, and accessible for an indefinite amount of time in the future, even as technologies like media and data formats could change over time.
DynamicPDF can produce and preserve PDF documents with the following conformance levels.
- PDF/A-1a
- PDF/A-1b
- PDF/A-2a
- PDF/A-2b
- PDF/A-2u
- PDF/A-3a
- PDF/A-3b
- PDF/A-3u
Conformance Level B (PDF/A-1b) is the minimum requirement for PDF/A compliance and guarantees that the text will be displayed appropriately. Conformance Level A (PDF/A-1a) builds off Level B compliance, warrants that the text will display correctly, and uses PDF tagging to preserve the document's logical structure.
Rules to Follow for PDF/A-1a & PDF/A-1b
Follow the following rules to make a Document PDF/A compliant.
- Embed all fonts (core fonts cannot be used).
- Only device-independent colors.
- Include XMP metadata in all documents.
- Do not encrypt documents.
- Do not use form fields using OpenType font with postscript outlines.
- Do not use buttons, checkboxes, or radio buttons form fields.
- Do not use LZW compression (GIF Images).
- Do not embed any files.
- Never reference external content.
- Images cannot be transparent (Transparency Group or Transparent Images).
- Do not add any multimedia content.
- Do not use JavaScript.
- Tag all PDFs (required only for PDF/A-1a compliance).
Text, combo box, list box, and signature form fields can be used.
PDF/A compatibility requires adhering to all the above restrictions, including verifying that all images added or merged in PDF pages (if DynamicPDF Merger is used) do not contain any RGB colors.
- Be careful not to inadvertently use any RGB colors in the document (Core Suite does not automatically check for this).
- Verify that all used fonts are embedded in the PDF even if the font is one of the 14 core fonts.
The PdfASchema class encapsulates the PDF/A schema(s). When creating a PdfASchema instance you must specify the compliance level desired. The PdfAStandard enumeration has the following values.
Enumeration VALUE | sTANDARD |
---|---|
PdfAStandard.PdfA2a |
Pdf/A standard 2a. |
PdfAStandard.PdfA2b |
Pdf/A standard 2b. |
PdfAStandard.PdfA2u |
Pdf/A standard 2u. |
PdfAStandard.PdfA3a |
Pdf/A standard 3a. |
PdfAStandard.PdfA3b |
Pdf/A standard 3b. |
PdfAStandard.PdfA3u |
Pdf/A standard 3u. |
PdfAStandard.PDF_A_1a_2005 |
Pdf/A standard 1a. |
PdfAStandard.PDF_A_1b_2005 |
Pdf/A standard 1b. |
The DynamicPDF Evaluation Watermark causes the PDF to fail PDF/A validation. For options on removing the watermark during evaluation, please contact DynamicPDF Support.
DublinCoreSchema
The DublinCoreSchema class encapsulates the Dublin Core schema. A PDF/A compliant PDF document must specify a title, author, and language.
The document's title must match the Dublin Core's title or it fails validation.
IccProfile
The IccProfile class attaches a color profile to your PDF document. You must attach a color profile to an output intent using the OutputIntent class. The example, below illustrates attaching an IccProfile to an OutputIntent that is then added to a Document instance's OutputIntents collection.
You can access ICC profiles from numerous sources, including Adobe or color.org.
PDF/A-1a Example
The following example illustrates the elements needed to specify a document as PDF/A (PDF/A-1a) compatible.
Document document = new Document();
document.Title = "PDF/A1 Document";
document.Subject = "Document's Subject";
document.Tag = new TagOptions();
document.Author = "John Doe";
XmpMetadata xmp = new XmpMetadata();
PdfASchema pdfaschema = new PdfASchema(PdfAStandard.PDF_A_1a_2005);
xmp.AddSchema(pdfaschema);
DublinCoreSchema dc = xmp.DublinCore;
dc.Title.DefaultText = document.Title;
dc.Description.DefaultText = document.Subject;
dc.Creators.Add(document.Author);
dc.Title.AddLang("en-us", "PDF/A1 Document");
document.XmpMetadata = xmp;
IccProfile iccProfile = new IccProfile("sRGB_IEC61966-2-1_noBPC.icc");
OutputIntent outputIntents = new OutputIntent("", "IEC 61966-2.1 Default RGB colour space - sRGB 1 ", "http://www.color.org", "sRGB IEC61966-2.1 1", iccProfile);
outputIntents.Version = OutputIntentVersion.PDF_A;
document.OutputIntents.Add(outputIntents);
string text = "PDF/A (Archiving) specifically targets PDF documents that need to be preserved long term.";
Label label = new Label(text, 0, 0, 504, 100, Font.Courier, 18, TextAlign.Center, RgbColor.BlueViolet);
Page page = new Page(PageSize.Letter, PageOrientation.Portrait, 54.0f);
page.Elements.Add(label);
document.Pages.Add(page);
document.Draw(outputPath);
Dim document As New Document()
document.Title = "PDF/A1 Document"
document.Subject = "Document's Subject"
document.Tag = New TagOptions()
document.Author = "John Doe"
Dim xmp As New XmpMetadata()
Dim pdfaschema As New PdfASchema(PdfAStandard.PDF_A_1a_2005)
xmp.AddSchema(pdfaschema)
Dim dc As DublinCoreSchema = xmp.DublinCore
dc.Title.DefaultText = document.Title
dc.Description.DefaultText = document.Subject
dc.Creators.Add(document.Author)
dc.Title.AddLang("en-us", "PDF/A1 Document")
document.XmpMetadata = xmp
Dim iccProfile As New IccProfile("sRGB_IEC61966-2-1_noBPC.icc")
Dim outputIntents As New OutputIntent("", "IEC 61966-2.1 Default RGB colour space - sRGB 1", "http://www.color.org", "sRGB IEC61966-2.1 1", iccProfile)
outputIntents.Version = OutputIntentVersion.PDF_A
document.OutputIntents.Add(outputIntents)
Dim text As String = "PDF/A (Archiving) specifically targets PDF documents that need to be preserved long term."
Dim label As New Label(text, 0, 0, 504, 100, Font.Courier, 18, TextAlign.Center, RgbColor.BlueViolet)
Dim page As New Page(PageSize.Letter, PageOrientation.Portrait, 54.0F)
page.Elements.Add(label)
document.Pages.Add(page)
document.Draw(outputPath)
PDF/A-3a Example
The PDF/A-3a specification adds to allow attachment to a PDF. document. The following code sample demonstrates how to create PDF/A-3a document with file attachments ( Embedded Files).
You must specify a file's MIME-type (MimeType) and source (Relation) to be PDF/A-3a compliant.
Document document = new Document();
document.Title = "PDF/A-3A Document";
document.Title = "PDF/A-3A Document";
document.Subject = "Document's Subject";
document.Tag = new TagOptions();
document.Author = "John Doe";
XmpMetadata xmp = new XmpMetadata();
PdfASchema pdfaschema = new PdfASchema(PdfAStandard.PdfA3a);
xmp.AddSchema(pdfaschema);
DublinCoreSchema dc = xmp.DublinCore;
dc.Title.DefaultText = document.Title;
dc.Description.DefaultText = document.Subject;
dc.Creators.Add(document.Author);
dc.Title.AddLang("en-us", "PDF/A-3A Document");
document.XmpMetadata = xmp;
IccProfile iccProfile = new IccProfile("USWebCoatedSWOP.icc");
OutputIntent outputIntent = new OutputIntent("CGATS TR 001-1995 (SWOP)", "CGATS TR 001", "http://www.color.org", "U.S. Web Coated (SWOP) v2", iccProfile);
outputIntent.Version = OutputIntentVersion.PDF_A;
document.OutputIntents.Add(outputIntent);
EmbeddedFile embeddedFile1 = new EmbeddedFile("HelloWorldExcel.xls");
embeddedFile1.Relation = EmbeddedFileRelation.Data;
embeddedFile1.MimeType = "application/excel";
document.EmbeddedFiles.Add(embeddedFile1);
EmbeddedFile embeddedFile2 = new EmbeddedFile("simple.xml");
embeddedFile2.Relation = EmbeddedFileRelation.Source;
embeddedFile2.MimeType = "application/xml";
document.EmbeddedFiles.Add(embeddedFile2);
string text = "PDF/A-3A (Archiving) specifically targets PDF documents that need to be preserved long term.";
Label label = new Label(text, 0, 0, 504, 100, Font.Courier, 18, TextAlign.Center, RgbColor.BlueViolet);
Page page = new Page(PageSize.Letter, PageOrientation.Portrait, 54.0f);
page.Elements.Add(label);
document.Pages.Add(page);
document.Draw(outputPath);
Dim document As New Document()
document.Title = "PDF/A-3A Document"
document.Subject = "Document's Subject"
document.Tag = New TagOptions()
document.Author = "John Doe"
Dim xmp As New XmpMetadata()
Dim pdfaschema As New PdfASchema(PdfAStandard.PdfA3a)
xmp.AddSchema(pdfaschema)
Dim dc As DublinCoreSchema = xmp.DublinCore
dc.Title.DefaultText = document.Title
dc.Description.DefaultText = document.Subject
dc.Creators.Add(document.Author)
dc.Title.AddLang("en-us", "PDF/A-3A Document")
document.XmpMetadata = xmp
Dim iccProfile As New IccProfile("USWebCoatedSWOP.icc")
Dim outputIntent As New OutputIntent("CGATS TR 001-1995 (SWOP)", "CGATS TR 001", "http://www.color.org", "U.S. Web Coated (SWOP) v2", iccProfile)
outputIntent.Version = OutputIntentVersion.PDF_A
document.OutputIntents.Add(outputIntent)
Dim embeddedFile1 As New EmbeddedFile("HelloWorldExcel.xls")
embeddedFile1.Relation = EmbeddedFileRelation.Data
embeddedFile1.MimeType = "application/excel"
document.EmbeddedFiles.Add(embeddedFile1)
Dim embeddedFile2 As New EmbeddedFile("simple.xml")
embeddedFile2.Relation = EmbeddedFileRelation.Source
embeddedFile2.MimeType = "application/xml"
document.EmbeddedFiles.Add(embeddedFile2)
Dim text As String = "PDF/A-3A (Archiving) specifically targets PDF documents that need to be preserved long term."
Dim label As New Label(text, 0, 0, 504, 100, Font.Courier, 18, TextAlign.Center, RgbColor.BlueViolet)
Dim page As New Page(PageSize.Letter, PageOrientation.Portrait, 54.0F)
page.Elements.Add(label)
document.Pages.Add(page)
document.Draw(outputPath)