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:
Document Creation
Document Decryption
Pages added/removed/re-ordered
Pages rotated
Pages marked as disabled/deleted
Page SVG or Image modification
Page Text or Links modification
Page Annotations modification
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.
Loading Using LEADTOOLS Document Library
Creating Documents with LEADTOOLS Document Library
Uploading Using the Document Library
Document Library Coordinate System
Loading Encrypted Files Using the Document Library
Parsing Text with the Document Library
Barcode Processing with the Document Library
Using LEADTOOLS Document Viewer
Using LEADTOOLS Document Converter
Document View and Convert Redaction
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document