List of usage examples for com.itextpdf.xmp XMPUtils appendProperties
public static void appendProperties(XMPMeta source, XMPMeta dest, boolean doAllProperties, boolean replaceOldValues) throws XMPException
deleteEmptyValues
. 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 w w .j a v a2s . 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); }