Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Send ZPL code to Zebra...
Finance forum
Suggested answer

Send ZPL code to Zebra printer

Posted on by 8
Hi all,
 
I am using D365F&O.
I have written a code to send information to UPS API and create a shipment and generate label.
The label generated from UPS is in form of ZPL code.
How can I use this ZPL code to print label using X++, without creating an ssrs design ?
Is there anyway I can send this ZPL code directly to a ZPL printer registered in Network printers in D365F&O ?
 
Thank you for your suggestions and answers in advance
 
  • Suggested answer
    VaHiX Profile Picture
    VaHiX 1,054 on at
    Send ZPL code to Zebra printer
    You could design a new ER solution to print ZPL labels
     
    Or using printZPLLabelToPrinter
    class PrintZPLLabel
    {
        public static void main(Args _args)
        {
            // ZPL code for the label
            str zplCode = '^XA^FO50,50^ADN,36,20^FDHello, World!^FS^XZ';
            // Printer name (as registered in Network printers)
            str printerName = 'YourPrinterName';
            // Call the method to print the ZPL label
            WhsDocumentRouting::printZPLLabelToPrinter(printerName, zplCode);
        }
    }

     
  • Suggested answer
    Send ZPL code to Zebra printer
    Hi!
      

    This one is super easy, F&O has a really great method for this that I have used a couple of times.

    Look at WhsDocumentRouting, and specifically the static method printZPLLabelToPrinter.

     

    Let me know if it works out for you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans