Applies the operations' logic to the document given the results of document analysis.
public void Run(LEADDocument document,IList<ElementSetResult> results)
Public Sub Run(ByVal document As LEADDocument,ByVal results As IList(Of ElementSetResult))
public:void Run(LEADDocument^ document,IList<ElementSetResult^>^ results)
document
Document to be edited.
results
Results of the document analysis.
This example shows how to define and run a custom action.
using Leadtools;using Leadtools.Document.Analytics;using Leadtools.Document;using Leadtools.Document.Unstructured;public class RedactAction : ActionElement{public RedactAction(){Id = "REDACT_DOCUMENT";}public override void Run(LEADDocument document, IList<ElementSetResult> results){//process(document, results.Items);//save(document);}}public void Sample(){var leadDoc = DocumentFactory.LoadFromFile(@"c:\test.docx", new LoadDocumentOptions());var analyzer = new DocumentAnalyzer();var elem = new UnstructuredElementSet() { Name = "Test", Element = CreateElement() };var actions = new ActionElementSet();actions.ActionElements.Add(new RedactAction());var runOptions = new DocumentAnalyzerRunOptions(){ElementSet = new List<IElementSet>() { elem }Actions = actions};analyzer.Run(leadDoc, runOptions);}private static GroupElement CreateElement(){GroupElement mainGroup = new GroupElement();mainGroup.Id = "ALL";mainGroup.Settings.SetValue(SettingsManager.Name, "all");mainGroup.Settings.SetValue(SettingsManager.ReportInElementResult, "true");mainGroup.Settings.SetValue(SettingsManager.Description, "Rules");mainGroup.Settings.SetValue(SettingsManager.Languages, "en");return mainGroup;}
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
