//Important: Acrobat 7's preflight check for PDF/A-1b wants the creation date in the Info
//object and in the XMP metadata to have the same timezone or else it shows a validation
//error even if the times are essentially equal.
//Dublin Core
DublinCoreAdapter dc = DublinCoreSchema.getAdapter(meta);
if (info.getAuthor() != null) {
dc.addCreator(info.getAuthor());
}
if (info.getTitle() != null) {
dc.setTitle(info.getTitle());
}
if (info.getSubject() != null) {
//Subject maps to dc:description["x-default"] as per ISO-19005-1:2005/Cor.1:2007
dc.setDescription(null, info.getSubject());
}
if (root.getLanguage() != null) {
//Note: No check is performed to make sure the value is valid RFC 3066!
dc.addLanguage(root.getLanguage());
}
dc.addDate(info.getCreationDate());
//Somewhat redundant but some PDF/A checkers issue a warning without this.
dc.setFormat("application/pdf");
//PDF/A identification
PDFAMode pdfaMode = pdfDoc.getProfile().getPDFAMode();
if (pdfaMode.isPDFA1LevelB()) {
PDFAAdapter pdfa = PDFAXMPSchema.getAdapter(meta);