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
I am trying to prepare pdf or png label from zpl code. I want to be able to use chinese characters in label. I prepared zpl code to make this. I am able to see characters on labelary. But I cannot see on https://binarykits-zpl-viewer.azurewebsites.net/.
I also cannot see these characters using the BinaryKits.Zpl.Viewer in the code.
I will not use any printer, I just want to get correct pdf or png. This is my code to get this.
var zpl = @$"^XA
^CI28
^FX First section with bar code.
^BY4,2,150
^FO60,140^BCN,150,N^FDUM2408100000^FS
^FX Second section with address
^CF0,40
^FO50,300^FDDelivery Address^FS
^CFJ,30
^FO50,350^FD中国, 山东省, 青岛市^FS
^CFJ,30
^FO50,400^FD香港东路6号, 5号楼, 8号^FS
^XZ";
var drawOptions = new DrawerOptions()
{
PdfOutput = true
};
IPrinterStorage printerStorage = new PrinterStorage();
var drawer = new ZplElementDrawer(printerStorage, drawOptions);
var analyzer = new ZplAnalyzer(printerStorage);
var analyzeInfo = analyzer.Analyze(zpl);
foreach (var labelInfo in analyzeInfo.LabelInfos)
{
var imageData = drawer.DrawPdf(labelInfo.ZplElements, 100, 100, 8);
File.WriteAllBytes("label.pdf", imageData);
}
I am trying to prepare pdf or png label from zpl code. I want to be able to use chinese characters in label. I prepared zpl code to make this. I am able to see characters on labelary. But I cannot see on https://binarykits-zpl-viewer.azurewebsites.net/.
I also cannot see these characters using the BinaryKits.Zpl.Viewer in the code.
I will not use any printer, I just want to get correct pdf or png. This is my code to get this.
Here is the output for this code.
label.pdf
The text was updated successfully, but these errors were encountered: