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
Hi, I would like to use the viewer to create the ZPL code image that I take from text files (.txt or .prn) created with Zebra Designer.
I can't convert ^GFA graphics commands.
I attach an example file.
Where am I wrong?
My c#:
`using BinaryKits.Zpl.Viewer;
IPrinterStorage printerStorage = new PrinterStorage();
var drawer = new ZplElementDrawer(printerStorage);
var analyzer = new ZplAnalyzer(printerStorage);
try
{
// Open the text file using a stream reader.
using var sr = new StreamReader(@"C:\Designer\NFS_EtiK005c1.prn");
string zpldata = sr.ReadToEnd();
' Console.WriteLine(zpldata);
var analyzeInfo = analyzer.Analyze(zpldata);
foreach (var labelInfo in analyzeInfo.LabelInfos)
{
var imageData = drawer.Draw(labelInfo.ZplElements);
File.WriteAllBytes(@"C:\Designer\label.png", imageData);
}
}
catch (IOException e)
{
Console.WriteLine("The file could not be read:");
Console.WriteLine(e.Message);
}
` NFS_EtiK005.txt
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I would like to use the viewer to create the ZPL code image that I take from text files (.txt or .prn) created with Zebra Designer.
I can't convert ^GFA graphics commands.
I attach an example file.
Where am I wrong?
My c#:
`using BinaryKits.Zpl.Viewer;
IPrinterStorage printerStorage = new PrinterStorage();
var drawer = new ZplElementDrawer(printerStorage);
var analyzer = new ZplAnalyzer(printerStorage);
try
{
// Open the text file using a stream reader.
using var sr = new StreamReader(@"C:\Designer\NFS_EtiK005c1.prn");
string zpldata = sr.ReadToEnd();
' Console.WriteLine(zpldata);
var analyzeInfo = analyzer.Analyze(zpldata);
}
catch (IOException e)
{
Console.WriteLine("The file could not be read:");
Console.WriteLine(e.Message);
}
`
NFS_EtiK005.txt
Beta Was this translation helpful? Give feedback.
All reactions