Document Toolkit History Tracking

LEADTOOLS now supports retrieving the history of a document to determine if the document needs to be updated in other storage mediums.

Types of changes that are tracked include:

History tracking of a LEADDocument object is performed using the History property, which is a DocumentHistory type. The DocumentHistory class contains the following members:

Member Description
AutoUpdate Enables history tracking. The default value is false. Modifications to the document are not tracked until the value is set to true.
GetItems Retrieves the document's modification history.
SetItems Manually updates the document's modification history.
Clear Resets the document's modification history.

GetItems returns a list of DocumentHistoryItems. Each item describes the type of change and page numbers affected for logging purposes.

Each DocumentHistoryItem item contains the following members:

Member Description
UserId The ID of the user at the time of the modification. This is set to the value of LEADDocument.UserId.
Timestamp The timestamp of the modification. This value is in UTC and created in the "yyyy-MM-ddTHH:mm:ss" format.
Comment User-defined comment.
ModifyType The type of change (modification).
PageNumber The page number associated with this change.

When the value of LEADDocument.History.AutoUpdate is true, the document will record each change described below by automatically adding a new entry to the items in DocumentHistory. If the document uses caching, then the history is stored into and retrieved from the cache.

The following table describes when history items are added when the value of AutoUpdate is true:

Operation Description
DocumentFactory.Create DocumentHistoryModifyType.Created entry is added.
LEADDocument.Decrypt DocumentHistoryModifyType.Decrypted entry is added.
LEADDocument.Pages DocumentHistoryModifyType.Pages entries are added when pages are added, removed or re-arranged in the document.
DocumentPage.Rotate, DocumentPage.Flip, DocumentPage.Reverse documenthistorymodifytype.pageviewperspective entry is added.
DocumentPage.IsDeleted DocumentHistoryModifyType.PageMarkDeleted entry is added.
DocumentAnnotations.SetAnnotations and DocumentPage.SetAnnotations DocumentHistoryModifyType.PageAnnotations entry is added.
DocumentPage.SetLinks DocumentHistoryModifyType.PageLinks entry is added.
DocumentPage.SetImage DocumentHistoryModifyType.PageImage entry is added.
DocumentPage.SetSvg DocumentHistoryModifyType.PageSvg entry is added.
DocumentPage.SetSvgBackImage DocumentHistoryModifyType.PageSvgBackImage entry is added.

When DocumentAnnotations.SetAnnotations or DocumentPage.SetAnnotations is called, a single entry with DocumentHistoryModifyType.PageAnnotations is added. However, the user can retrieve more information about the type of changes to the annotations by calling DocumentAnnotations.GetHistory.

Refer to DocumentHistory for an example.

See Also

Document Library Features

Loading Using LEADTOOLS Document Library

Creating Documents with LEADTOOLS Document Library

Uploading Using the Document Library

Document Toolkit and Caching

Document Library Coordinate System

Loading Encrypted Files Using the Document Library

Parsing Text with the Document Library

Barcode Processing with the Document Library

Document Page Transformation

Using LEADTOOLS Document Viewer

Using LEADTOOLS Document Converter

Document View and Convert Redaction

Help Version 21.0.2021.11.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Imaging, Medical, and Document

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.