pdfaid.setConformance("B");
pdfaid.setPart(1);
pdfaid.setAboutAsSimple("PDFBox PDFA sample");
XmpSerializer serializer = new XmpSerializer();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
serializer.serialize(xmp, baos, false);
metadata.importXMPMetadata( baos.toByteArray() );
}
catch(BadFieldValueException badFieldexception)
{
// can't happen here, as the provided value is valid