You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The async overloads accept an optional `CancellationToken` to cancel long-running operations:
153
+
The async overloads accept an optional `CancellationToken` to cancel long-running operations.Initially cancellationToken value in default.Based on our requirement we can optimize the cancellationToken value.
- Always forward cancellation tokens to I/O methods when available.
177
-
178
-
---
179
-
180
-
## Common corrections and best practices shown in the examples
181
-
182
-
- Use `using` (or `await using` for IAsyncDisposable) to ensure streams are disposed.
183
-
- Use `FileAccess.Read` when only reading input files.
184
-
- Do not reuse mismatched variable names (e.g., `smartFormRecognizer` vs `recognizer`) — pick one consistent name.
185
-
- Prefer `async`/`await` in UI event handlers but avoid `async void` except for top-level event handlers; prefer `async Task` where possible for testability.
186
177
187
-
---
188
-
189
-
If you want, I can also:
190
-
- Add a short snippet showing how to handle `FormRecognizeOptions` with these calls.
191
-
- Add a unit test or a small console app sample demonstrating each method.
`DetectRadioButtons` is a boolean property in FormRecognizeOptions that specifies whether the form recognizer should detect radio button elements in the document. When enabled (default: true), the recognizer identifies circular selection controls. Turning this option off can streamline processing, reduce unnecessary output, and improve performance when radio buttons are not relevant to the form you are analyzing.
53
+
`DetectRadioButtons` is a boolean property in FormRecognizeOptions that specifies whether the form recognizer should detect radio button elements in the document. When enabled (default: true), the recognizer identifies circular objects in images or in the Pdf documnets then add radio buttons in that identified locations.
`DetectSignatures` is a boolean property in FormRecognizeOptions that controls whether the form recognizer should identify signature fields within a document. When enabled (default: true), the recognizer scans for handwritten-style areas, signature lines, or regions typically used for signing, and includes these detected signature blocks in the structured output.
71
+
`DetectSignatures` is a boolean property in FormRecognizeOptions that controls whether the form recognizer should identify signature fields within a document. When enabled (default: true), the recognizer scans for handwritten-style areas, signature lines, or regions typically used for signing, and includes these detected signature blocks in the output.
`PageRange` is an optional int[,]? property in FormRecognizeOptions that allows you to control exactly which pages of a document the form recognizer should process. Each row in this 2‑dimensional array represents a 1‑based inclusive range in the form [start, end], the recognizer processes all pages in the document. Defining page ranges helps improve performance, reduce unnecessary processing, and target only the sections of the document relevant to your extraction workflow.
104
+
`PageRange` is an optional int[,]? property in FormRecognizeOptions that allows you to control exactly which pages of a document the form recognizer should process. Each row in this 2‑dimensional array represents a 1‑based inclusive range in the form [start, end], the recognizer processes all pages in the document. Defining page ranges helps improve performance, reduce unnecessary processing, and target only the sections of the document relevant to your extraction workflow.We can also provide values in single page.Also If we provide values in decending order it will consider as ascending order and perform detection.
105
105
106
106
{% tabs %}
107
107
{% highlight c# tabtitle="C#" %}
108
108
109
109
FormRecognizer recognizer = new FormRecognizer();
110
110
111
-
// Set a page range
111
+
// Set a page range single
112
+
recognizer.FormRecognizeOptions.PageRange = new int[,] { { 3 } };
113
+
114
+
// Set a page range 2D
112
115
recognizer.FormRecognizeOptions.PageRange = new int[,] { { 3, 3 } };
0 commit comments