// building temporary XMP metadata
DublinCoreSchema dc = new DublinCoreSchema(metadata, "dctest");
metadata.addSchema(dc);
XMPBasicSchema xmp = new XMPBasicSchema(metadata, "xmptest");
metadata.addSchema(xmp);
AdobePDFSchema pdf = new AdobePDFSchema(metadata, "pdftest");
metadata.addSchema(pdf);
// Writing info in XMP and Document Information dictionary
// TITLE
dico.setTitle(title);
dc.setTitle("x-default", title);
// AUTHOR
dico.setAuthor(author);
dc.addCreator(author);
// SUBJECT
dico.setSubject(subject);
dc.addDescription("x-default", subject);
// KEYWORDS
dico.setKeywords(keywords);
pdf.setKeywords(keywords);
// CREATOR
dico.setCreator(creator);
xmp.setCreatorTool(creator);
// PRODUCER
dico.setProducer(producer);
pdf.setProducer(producer);
// CREATION DATE
dico.setCreationDate(creationDate);
xmp.setCreateDate(creationDate);
// MODIFY DATE
dico.setModificationDate(modifyDate);