PPTextRecSettings
Settings for PPTextRec. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.
using Nutrient;The SDK creates this class through factory methods or other SDK objects.
Properties
BatchSize
public int BatchSize { get; set; }Batch size for text recognition inference. Higher values improve GPU throughput but require more memory. CPU execution is automatically limited to batches of 16. Set to 1 to disable batching (process one image at a time).
Type: int
ConfigPath
public string ConfigPath { get; set; }Path to the generated, line-delimited PP-OCRv5 recognition dictionary.
Type: string
MaxImageWidth
public int MaxImageWidth { get; set; }Maximum width for text images
Type: int
ModelPath
public string ModelPath { get; set; }Path to the encrypted PP-OCRv5 recognition model.
Type: string
UseCpuOnly
public bool UseCpuOnly { get; set; }Enable CPU mode for ONNX Runtime. When true, forces CPU execution. When false, uses default providers.
Type: bool
Resource management
public void Dispose()PPTextRecSettings implements IDisposable. Call Dispose() or use a C# using declaration to release its native handle right away. If you don’t, the handle is released when the object is garbage collected.