←Select platform

FormRecognitionAttributes Class

Summary
Describes the properties of a certain form. Attributes are encoded into an array of bytes.

Syntax
C#
C++/CLI
Java
Python
[SerializableAttribute()] 
public class FormRecognitionAttributes 
public class FormRecognitionAttributes 
    implements java.io.Serializable 
[SerializableAttribute()] 
public ref class FormRecognitionAttributes  
class FormRecognitionAttributes: 
Remarks

Attributes are encoded into array of bytes. If it is necessary to modify the attributes for the added or deleted pages of the form, the attributes object should be opened using either FormRecognitionEngine.OpenForm or FormRecognitionEngine.OpenMasterForm. Then close the object by using either FormRecognitionEngine.CloseForm or FormRecognitionEngine.CloseMasterForm.

Example
C#
Java
using Leadtools.Forms.Common; 
using Leadtools.Forms.Recognition; 
using Leadtools.Codecs; 
 
/// This method loads the specified master form attributes. 
public FormRecognitionAttributes LoadMasterFormAttributes(string attributesFileName) 
{ 
   byte[] formData; 
   formData = File.ReadAllBytes(attributesFileName); 
   FormRecognitionAttributes attributes = new FormRecognitionAttributes(); 
   attributes.SetData(formData); 
   return attributes; 
} 
 
import static org.junit.Assert.assertTrue; 
 
import java.io.File; 
import java.io.IOException; 
import java.io.RandomAccessFile; 
import java.nio.file.Files; 
import java.nio.file.Paths; 
 
import org.junit.*; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
 
import leadtools.forms.recognition.FormRecognitionAttributes; 
 
 
public void loadMasterFormAttributesExample() throws IOException { 
   final String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images"; 
   String attributesFileName = combine(LEAD_VARS_IMAGES_DIR, "leadtools.pdf"); 
   byte[] formData; 
 
   formData = Files.readAllBytes(Paths.get(attributesFileName)); 
   FormRecognitionAttributes attributes = new FormRecognitionAttributes(); 
   attributes.setData(formData); 
 
   assertTrue("Attributes loaded incorrectly", formData.length > 0); 
   System.out.println("Command run, attributes loaded."); 
} 
Requirements

Target Platforms

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

Leadtools.Forms.Recognition Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.