BarcodeOptions.ErrorCorrection Property
- Namespace
TXTextControl.TXSheetControl. Server
- Package
TXTextControl.asTXSheetControl. Server TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Api. dll
- Also in
TXTextControl.asTXSheetControl. Blazor TXTextControl.TXSheetControl. Api. dll
QR correction level. Defaults to M.
Syntax
public string? ErrorCorrection { get; init; }
Remarks
See Barcodes and QR Codes for a complete .NET example, source validation, mail merge and file compatibility.
Examples
Create and save a label workbook with the configured barcode settings.
using TXTextControl.TXSheetControl.Server;
static async Task<byte[]> CreateLabelsAsync(ServerSheetControl control)
{
var sheet = await control.Workbook.Sheets.AtAsync(0);
await sheet.Cell("A1").SetTextAsync("https://example.com/invoice/1042");
var options = new BarcodeOptions {
Symbology = "qrCode", Source = "A1", ShowText = false,
Foreground = "#163b63", Background = "#ffffff", ErrorCorrection = "M", Version = 3
};
await sheet.Cell("B2").SetBarcodeAsync(options);
await sheet.Cell("D2").SetBarcodeAsync(new BarcodeOptions { Symbology = "code128", Value = "001042", ShowText = true });
var snapshot = await sheet.Cell("B2").GetBarcodeAsync();
return await control.SaveAsync(StreamType.SpreadsheetML);
}