Returns a list of
PageAlignment objects that determines the amount of shift and scaling for each page of the Form with its corresponding page in the specified Master Form.
Syntax
Parameters
- masterAttributes
-
The Master Form attributes object.
- formAttributes
-
The Form attributes object.
- callback
-
Provides status on the progress of the alignment calculations.
Set it to null to ignore the progress.
Example
For a complete example on using the forms recognition and processing, refer to the FormRecognitionEngine example.
This example adds a page to the form
Visual Basic | Copy Code |
---|
Public Sub AlignForm(ByVal recognitionEngine As FormRecognitionEngine, ByVal form As MyForm, ByVal calculateAlignment As Boolean)
If calculateAlignment Then
form.Alignment = recognitionEngine.GetFormAlignment(form.Master.Attributes, form.Attributes, Nothing)
Else
form.Alignment = New List(Of PageAlignment)()
Dim i As Integer = 0
Do While i < form.Result.PageResults.Count
form.Alignment.Add(form.Result.PageResults(i).Alignment)
i += 1
Loop
End If
End Sub
|
C# | Copy Code |
---|
///This method calculates the aligmnet for the recognized form. public void AlignForm(FormRecognitionEngine recognitionEngine, MyForm form, bool calculateAlignment) { if(calculateAlignment) { form.Alignment = recognitionEngine.GetFormAlignment(form.Master.Attributes, form.Attributes, null); } else { form.Alignment = new List<PageAlignment>(); for(int i = 0; i < form.Result.PageResults.Count; i++) form.Alignment.Add(form.Result.PageResults[i].Alignment); } } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also