Good Afternoon,
I am currently working on a project that dynamically generates a ZPL string. Below you can see an example and you can use http://labelary.com/viewer.html to view the label. Is there any software out there that can translate the ZPL string into a JPG image or a PDF file?
"^XA^FX Top section with company logo, name and address.^CF0,60^FO50,50^GB100,100,100^FS^FO75,75^FR^GB100,100,100^FS^FO88,88^GB50,50,50^FS^FO220,50^FDInternational Shipping, Inc.^FS^CF0,40^FO220,100^FD1000 Shipping Lane^FS^FO220,135^FDShelbyville TN 38102^FS^FO220,170^FDUnited States (USA)^FS^FO50,250^GB700,1,3^FS^FX Second section with recipient address and permit information.^CFA,30^FO50,300^FDJohn Doe^FS^FO50,340^FD100 Main Street^FS^FO50,380^FDSpringfield TN 39021^FS^FO50,420^FDUnited States (USA)^FS^CFA,15^FO600,300^GB150,150,3^FS^FO638,340^FDPermit^FS^FO638,390^FD123456^FS^FO50,500^GB700,1,3^FS^FX Third section with barcode.^BY5,2,270^FO175,550^BC^FD1234567890^FS^FX Fourth section (the two boxes on the bottom).^FO50,900^GB700,250,3^FS^FO400,900^GB1,250,3^FS^CF0,40^FO100,960^FDShipping Ctr. X34B-1^FS^FO100,1010^FDREF1 F00B47^FS^FO100,1060^FDREF2 BL4H8^FS^CF0,190^FO485,965^FDCA^FS^XZ"
I am looking for the most efficient way of doing this. I can use the http://labelary.com api to transform the ZPL into JPG but the API goes down often, so any suggestions for libraries are welcomed. However we are not looking for Libraries but suggestions into transforming a ZPL string into PDF/JPG
Please keep in my mind that we are using .NET Core
You can try this project BinaryKits.Zpl. It is still an early implementation of a zpl viewer that converts zpl code into an image.
IPrinterStorage printerStorage = new PrinterStorage();
var analyzer = new ZplAnalyzer(printerStorage);
var elements = analyzer.Analyze("^XA^FO100,100^BY3^B3N,N,100,Y,N^FD123ABC^FS^XZ");
var drawer = new ZplElementDrawer(printerStorage);
var imageData = drawer.Draw(elements);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With