Example usage for com.itextpdf.text.xml.xmp XmpWriter getXmpMeta

List of usage examples for com.itextpdf.text.xml.xmp XmpWriter getXmpMeta

Introduction

In this page you can find the example usage for com.itextpdf.text.xml.xmp XmpWriter getXmpMeta.

Prototype

public XMPMeta getXmpMeta() 

Source Link

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  . ja v  a2s. c  om*/
    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);
}