Bitbeans.Zpl.Viewer
1.1.0
dotnet add package Bitbeans.Zpl.Viewer --version 1.1.0
NuGet\Install-Package Bitbeans.Zpl.Viewer -Version 1.1.0
<PackageReference Include="Bitbeans.Zpl.Viewer" Version="1.1.0" />
<PackageVersion Include="Bitbeans.Zpl.Viewer" Version="1.1.0" />
<PackageReference Include="Bitbeans.Zpl.Viewer" />
paket add Bitbeans.Zpl.Viewer --version 1.1.0
#r "nuget: Bitbeans.Zpl.Viewer, 1.1.0"
#:package Bitbeans.Zpl.Viewer@1.1.0
#addin nuget:?package=Bitbeans.Zpl.Viewer&version=1.1.0
#tool nuget:?package=Bitbeans.Zpl.Viewer&version=1.1.0
Bitbeans.Zpl.Viewer
Render ZPL II labels to PNG, JPEG or WebP in .NET 10 - an offline alternative to labelary.com, based on SkiaSharp, HarfBuzz and ZXing.Net. No ImageSharp.
using Bitbeans.Zpl.Viewer;
using Bitbeans.Zpl.Viewer.Models;
IPrinterStorage printerStorage = new PrinterStorage();
var analyzer = new ZplAnalyzer(printerStorage);
using var drawer = new ZplElementDrawer(printerStorage);
AnalyzeInfo analyzeInfo = analyzer.Analyze("^XA^FO50,50^A0N,50,50^FDHello^FS^FO50,120^BCN,100^FD12345^FS^XZ");
foreach (LabelInfo label in analyzeInfo.LabelInfos)
{
byte[] png = drawer.Draw(label.ZplElements, labelWidth: 101.6, labelHeight: 152.4, printDensityDpmm: 8);
File.WriteAllBytes("label.png", png);
}
Supports text (outline and bitmap fonts, field blocks, rotation, reverse print), graphics, downloaded
images, stored formats (^DF/^XF) and the common 1D and 2D barcodes (Code 11/39/93/128, EAN, UPC,
2 of 5, Codabar, MSI, LOGMARS, QR, Data Matrix, PDF417, Aztec, MaxiCode).
On Linux, add a SkiaSharp native package to the application: SkiaSharp.NativeAssets.Linux (finds the system
fonts, needs libfontconfig1) or SkiaSharp.NativeAssets.Linux.NoDependencies (minimal container images; register
the fonts with FontManager.RegisterTypeface). Ubuntu/Docker examples:
https://github.com/bitbeans/Bitbeans.Zpl/blob/main/docs/viewer.md#linux
Documentation: https://github.com/bitbeans/Bitbeans.Zpl/blob/main/docs/viewer.md
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Bitbeans.Zpl.SkiaSharp (>= 1.1.0)
- HarfBuzzSharp.NativeAssets.Linux (>= 14.2.1.400)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.14)
- SkiaSharp (>= 4.154.0)
- SkiaSharp.HarfBuzz (>= 4.154.0)
- ZXing.Net (>= 0.16.11)
- ZXing.Net.Bindings.SkiaSharp (>= 0.16.25)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.