FormRecognitionAttributes Constructor
Syntax
public:
FormRecognitionAttributes();
__init__() # Default constructor
Example
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.");
}