private byte[] RemoveAlwaysDifferentEntries(byte[] cmpBytes) { XMPMeta xmpMeta = XMPMetaFactory.ParseFromBuffer(cmpBytes); XMPUtils.RemoveProperties(xmpMeta, XMPConst.NS_XMP, PdfConst.CreateDate, true, true); XMPUtils.RemoveProperties(xmpMeta, XMPConst.NS_XMP, PdfConst.ModifyDate, true, true); XMPUtils.RemoveProperties(xmpMeta, XMPConst.NS_XMP, PdfConst.MetadataDate, true, true); XMPUtils.RemoveProperties(xmpMeta, XMPConst.NS_PDF, PdfConst.Producer, true, true); cmpBytes = XMPMetaFactory.SerializeToBuffer(xmpMeta, new SerializeOptions(SerializeOptions.SORT)); return(cmpBytes); }
/// <exception cref="iText.Kernel.XMP.XMPException"/> /// <exception cref="System.IO.IOException"/> public virtual void SetXmpMetadata(XMPMeta xmpMeta, SerializeOptions serializeOptions) { SetXmpMetadata(XMPMetaFactory.SerializeToBuffer(xmpMeta, serializeOptions)); }