Example usage for com.itextpdf.xmp XMPUtils appendProperties

List of usage examples for com.itextpdf.xmp XMPUtils appendProperties

Introduction

In this page you can find the example usage for com.itextpdf.xmp XMPUtils appendProperties.

Prototype

public static void appendProperties(XMPMeta source, XMPMeta dest, boolean doAllProperties,
        boolean replaceOldValues) throws XMPException 

Source Link

Document

Alias without the new option deleteEmptyValues.

Usage

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);
}