←Select platform

GetData Method

Summary

Gets the array of bytes containing the encoded attributes.

Syntax

C#
VB
C++
public byte[] GetData() 
  
Public Function GetData() As Byte() 
public: 
array<byte>^ GetData();  

Remarks

Forms attributes that are generated by FormRecognitionEngine.CreateMasterForm for Master Forms or FormRecognitionEngine.CreateForm for Forms will have the form's attributes that are specified in FormRecognitionEngine.ObjectsManagers. To start modifying the form's attributes you have to open it using OpenMasterForm for Master Forms or OpenForm for Forms, or create it using FormRecognitionEngine.CreateMasterForm for Master Forms or FormRecognitionEngine.CreateForm for Forms.

Forms attributes data will be updated with the changes you made to the form attributes such as addition of a page or deletion of a page once the attributes is closed using either FormRecognitionEngine.CloseMasterForm for Master Form attributes or FormRecognitionEngine.CloseForm for Form attributes.

Once you finish modifying the form's attributes close it to reflect your changes.

GetData is useful to save attributes data specially for Master forms on the disk or database.

Example

This example saves form's attributes to a file.

C#
VB
using Leadtools.Forms; 
using Leadtools.Forms.Recognition; 
using Leadtools.Codecs; 
 
/// This method saves master form attributes to the specified file name. 
public void SaveMasterFormAttributes(FormRecognitionAttributes attributes, string attributesFileName) 
{ 
   byte[] formData = attributes.GetData(); 
   File.WriteAllBytes(attributesFileName, formData); 
} 
Imports Leadtools.Forms 
Imports Leadtools.Forms.Recognition 
Imports Leadtools.Codecs 
 
''' This method saves master form attributes to the specified file name. 
Public Sub SaveMasterFormAttributes(attributes As FormRecognitionAttributes, attributesFileName As String) 
   Dim formData As Byte() = attributes.GetData() 
   File.WriteAllBytes(attributesFileName, formData) 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms.Recognition Assembly