←Select platform

Pages Property

Summary
Gets the form page fields and properties.

Syntax
C#
C++/CLI
Java
Python
public FormPages Pages { get; } 
public FormPages getPages(); 
public: 
property FormPages^ Pages { 
   FormPages^ get(); 
} 
Pages # get  (FormProcessingEngine) 

Property Value

The form field page and properties.

Example
C#
Java
using Leadtools; 
using Leadtools.Barcode; 
using Leadtools.Codecs; 
using Leadtools.Forms.Common; 
using Leadtools.Ocr; 
using Leadtools.Forms.Processing; 
using Leadtools.Forms.Recognition; 
using Leadtools.Forms.Recognition.Barcode; 
using Leadtools.Forms.Recognition.Ocr; 
using Leadtools.Document; 
 
///This method processes the recognized form. 
private void ProcessForm(FormProcessingEngine processingEngine, MyForm form) 
{ 
   form.ProcessingPages = form.Master.ProcessingPages; 
   processingEngine.Pages.Clear(); 
   processingEngine.Pages.AddRange(form.ProcessingPages); 
   processingEngine.Process(form.Image, form.Alignment); 
} 
 
import static org.junit.Assert.assertTrue; 
 
import java.io.File; 
import java.io.FileNotFoundException; 
import java.io.IOException; 
import java.nio.file.Files; 
import java.nio.file.Path; 
import java.nio.file.Paths; 
import java.util.ArrayList; 
import java.util.Scanner; 
import java.util.UUID; 
 
import org.junit.*; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
 
import leadtools.*; 
import leadtools.ocr.*; 
import leadtools.codecs.*; 
import leadtools.document.*; 
import leadtools.forms.common.*; 
import leadtools.forms.processing.*; 
import leadtools.forms.recognition.*; 
import leadtools.forms.recognition.ocr.OcrObjectsManager; 
 
 
/*class MasterForm { 
   public RasterImage Image; 
   public FormRecognitionAttributes Attributes; 
   public FormRecognitionProperties Properties; 
   public FormPages ProcessingPages; 
   public FormRecognitionEngine recognitionEngine = new FormRecognitionEngine(); 
 
   /// This constructor initializes all MasterForm members to zero/null/Empty. 
   public MasterForm() { 
      Image = null; 
      Attributes = recognitionEngine.createMasterForm("MasterFormExample", UUID.randomUUID(), null); 
      Properties = FormRecognitionProperties.getEmpty(); 
      ProcessingPages = null; 
   } 
} 
 
class MyForm { 
   public String FileName; 
   public RasterImage Image; 
   public FormRecognitionAttributes Attributes; 
   public MasterForm Master; 
   public FormRecognitionResult Result; 
   public ArrayList<PageAlignment> Alignment; 
   public FormPages ProcessingPages; 
 
   /// This constructor initializes all MyForm members to zero/null/Empty. 
   public MyForm() { 
      FileName = null; 
      Image = null; 
      Attributes = new FormRecognitionAttributes(); 
      Master = new MasterForm(); 
      Result = null; 
      Alignment = null; 
   } 
} 
 
// This method processes the recognized form. 
public void FormProcessingEngineProcessFormExample() throws Exception { 
   final String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images"; 
   String attributesFileName = combine(LEAD_VARS_IMAGES_DIR, "\\\\Forms\\\\MasterForm Sets\\\\OCR\\\\FFC-107.bin"); 
   String fieldsFileName = combine(LEAD_VARS_IMAGES_DIR, "\\\\Forms\\\\MasterForm Sets\\\\OCR\\\\FFC-107.xml"); 
   String imageFileName = combine(LEAD_VARS_IMAGES_DIR, "\\Forms\\MasterForm Sets\\OCR\\FFC-107.tif"); 
 
   RasterCodecs codecs = new RasterCodecs(); 
   FormRecognitionEngine recognitionEngine = new FormRecognitionEngine(); 
   FormProcessingEngine processingEngine = new FormProcessingEngine(); 
 
   byte[] formData; 
   MasterForm masterForm = new MasterForm(); 
   formData = Files.readAllBytes(Paths.get(attributesFileName)); 
   masterForm.Attributes = new FormRecognitionAttributes(); 
   masterForm.Attributes.setData(formData); 
   masterForm.Properties = recognitionEngine.getFormProperties(masterForm.Attributes); 
   masterForm.ProcessingPages = new FormPages(); 
   processingEngine.loadFields(fieldsFileName); 
   masterForm.ProcessingPages.addAll(processingEngine.getPages()); 
   masterForm.Image = codecs.load(imageFileName, 1, CodecsLoadByteOrder.BGR, 1, -1); 
 
   MyForm form = new MyForm(); 
 
   form.ProcessingPages = form.Master.ProcessingPages; 
   processingEngine.getPages().clear(); 
   processingEngine.getPages().addAll(form.ProcessingPages); 
   processingEngine.process(form.Image, form.Alignment); 
}*/ 
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.Processing Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.