Example usage for com.itextpdf.xmp XMPMetaFactory parse

List of usage examples for com.itextpdf.xmp XMPMetaFactory parse

Introduction

In this page you can find the example usage for com.itextpdf.xmp XMPMetaFactory parse.

Prototype

public static XMPMeta parse(InputStream in) throws XMPException 

Source Link

Document

Parsing with default options.

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