removeModificationDate method

void removeModificationDate()

Remove the modification date from existing document.

Implementation

void removeModificationDate() {
  if (_helper._dictionary != null &&
      _helper._dictionary!
          .containsKey(PdfDictionaryProperties.modificationDate)) {
    _helper._dictionary!.remove(PdfDictionaryProperties.modificationDate);
    if (_helper._dictionary!.changed! && !_helper._catalog!.changed!) {
      PdfDocumentInformationHelper.getHelper(
              _helper._catalog!.document!.documentInformation)
          ._dictionary!
          .remove(PdfDictionaryProperties.modificationDate);
      PdfDocumentInformationHelper.getHelper(
              _helper._catalog!.document!.documentInformation)
          .isRemoveModifyDate = true;
      _helper._xmp =
          XmpMetadata(_helper._catalog!.document!.documentInformation);
      _helper._catalog!.setProperty(
          PdfDictionaryProperties.metadata, PdfReferenceHolder(_helper._xmp));
    }
  }
}