ThermalLabel SDK for .NET Maintenance Update – Version 16.0.26.1111: HTML/RTF styles rendering, Items Caching with Expressions
ThermalLabel SDK for .NET version 16.0.26.1111 ships with the following main fixes:
Fix: Expression-assigned values repeating across data-bound labels
In ThermalLabel SDK v16, data-bound jobs exported to PDF or images could repeat the first record's value on every label. This affected TextItem and BarcodeItem values assigned through an Expression, such as Set [Items!MyText.Text] = [DataFields!Name]. Items bound directly with DataField printed correctly, and printer command output (ZPL, EPL, etc.) was not affected.
The cause was the new render cache in v16, which reused the first label's drawing when the content came from an Expression. This update turns the cache off for labels that contain Expressions, so each record now renders with its own data. Labels without Expressions still use the cache and keep its speed gains.
Workaround: If you can't upgrade yet, set printJob.RenderCacheEnabled = false; before exporting.
Fix: Better RTL rich text and consistent text rendering across Sizing modes
This update improves how TextItem renders rich text:
- Mixed-direction text with mixed formatting. RTF and HTML paragraphs that combine Arabic or Hebrew with numbers or Latin text now render correctly, even when parts of the paragraph use different formatting (for example, a bold number). Bidirectional ordering is now resolved for the whole paragraph, not for each formatting run, so characters keep their correct order, style and spacing, and right-aligned lines stay aligned. Mirrored characters such as parentheses are handled correctly too.
- Rich text with single-line
Sizingmodes. WithStretch,FontSizeScaling,Vertical,ArcandOuterArc, or whenCharSpacingis not zero, RTF, HTML and [b]/[i]/[u] markup is now rendered as plain text instead of the raw markup. These modes draw text with a single font and style, so the formatting itself is not applied. This also prevents the "Too much text to draw on the specified arc" error that appeared because the whole markup had to fit on the arc.
To combine different formats in the same TextItem, use None, AutoSize, ParagraphScaling, ParagraphScalingAndFill or OverflowSplit.
Fix: Barcode text colors and per-side TextItem borders
This update fixes two rendering regressions:
- Barcode text colors.
BarcodeItem.ForeColorHexandTextForeColorHexwork again. The human-readable code and the extraTextnow use the colors you set, so you can print white text on a black background again. Before, these texts always came out black. TextItemborders.TextItem.BorderThicknessnow applies each side separately, the same wayBarcodeItemdoes. You can draw a border on just the top, right or bottom, and the text keeps the correct inset. Before, only the Left value was used, and it was applied to all four sides.
Uniform borders render exactly as before, rounded corners included.
How to update
- Visual Studio: right-click your project → Manage NuGet Packages → Updates, select the SDK package and click Update. Or from the command line:
dotnet add package <PackageId>. Then do a Clean + Rebuild. - VS Code: open the integrated terminal and run
dotnet add package <PackageId>, then rebuild. With the C# Dev Kit extension you can also use the Command Palette → NuGet: Update NuGet Package.
More information
- Full release notes: version history
- Quick Start and API reference: ThermalLabel SDK for .NET
| Tweet |
|