protected override void AddCustomMetadataExtensions(XMPMeta xmpMeta) { if (this.IsTagged()) { try { XMPMeta taggedExtensionMeta = XMPMetaFactory.ParseFromString(PdfAXMPUtil.PDF_UA_EXTENSION); XMPUtils.AppendProperties(taggedExtensionMeta, xmpMeta, true, false); } catch (XMPException exc) { ILogger logger = LoggerFactory.GetLogger(typeof(iText.Pdfa.PdfADocument)); logger.Error(LogMessageConstant.EXCEPTION_WHILE_UPDATING_XMPMETADATA, exc); } } }
protected override void UpdateXmpMetadata() { try { XMPMeta xmpMeta = UpdateDefaultXmpMetadata(); xmpMeta.SetProperty(XMPConst.NS_PDFA_ID, XMPConst.PART, checker.GetConformanceLevel().GetPart()); xmpMeta.SetProperty(XMPConst.NS_PDFA_ID, XMPConst.CONFORMANCE, checker.GetConformanceLevel().GetConformance ()); if (this.IsTagged()) { XMPMeta taggedExtensionMeta = XMPMetaFactory.ParseFromString(PdfAXMPUtil.PDF_UA_EXTENSION); XMPUtils.AppendProperties(taggedExtensionMeta, xmpMeta, true, false); } SetXmpMetadata(xmpMeta); } catch (XMPException e) { ILogger logger = LoggerFactory.GetLogger(typeof(iText.Pdfa.PdfADocument)); logger.Error(LogMessageConstant.EXCEPTION_WHILE_UPDATING_XMPMETADATA, e); } }
/// <summary>Adds the ZUGFeRD RDF description.</summary> /// <param name="xmpMeta">the xmp meta</param> /// <param name="zugferdConformanceLevel">the zugferd conformance level</param> /// <exception cref="iText.Kernel.XMP.XMPException">the XMP exception</exception> private void AddZugferdRdfDescription(XMPMeta xmpMeta, ZugferdConformanceLevel zugferdConformanceLevel) { switch (zugferdConformanceLevel) { case ZugferdConformanceLevel.ZUGFeRDBasic: case ZugferdConformanceLevel.ZUGFeRDComfort: case ZugferdConformanceLevel.ZUGFeRDExtended: { // fallthrough // fallthrough XMPMeta taggedExtensionMetaComfort = XMPMetaFactory.ParseFromString(GetZugferdExtension(zugferdConformanceLevel )); XMPUtils.AppendProperties(taggedExtensionMetaComfort, xmpMeta, true, false); break; } default: { break; } } }