List of usage examples for com.itextpdf.xmp XMPMetaFactory parse
public static XMPMeta parse(InputStream in) throws XMPException
From source file:io.konik.carriage.itext.ITextInvoiceAppender.java
License:Open Source License
private void appendZfMetadata(PdfAStamper stamper, String conformanceLevel, String zfVersion) throws XMPException { stamper.createXmpMetadata();/* w ww . j a v a 2 s . c o m*/ XmpWriter xmpWriter = stamper.getXmpWriter(); XMPMeta xmpMeta = xmpWriter.getXmpMeta(); InputStream zfExtensionIs = this.getClass().getResourceAsStream("/zf_extension.xmp"); XMPMeta zfExtensionMetadata = XMPMetaFactory.parse(zfExtensionIs); XMPUtils.appendProperties(zfExtensionMetadata, xmpMeta, true, false); xmpWriter.setProperty(ZF_NS, "ConformanceLevel", conformanceLevel); xmpWriter.setProperty(ZF_NS, "Version", zfVersion); }