User Review
( votes)Overview
- Many manufacturing and warehousing businesses need to print license plates (for tracking raw materials/finished goods inventory) or shipping labels (for outbound product shipments or cross-docking). Zebra printers are widely used by organizations across the world for label printing purposes.
- Manually creating labels for every shipment or order can be a time consuming, error-riddled process.
- By printing labels directly from a D365 F&O or any ERP system, users can improve error proofing of the labels, reduce misprints, and significantly reduce the amount of data entry required to generate labels. This makes labeling an efficient and cost-effective process
- D365 F&O provides features to quickly setup a zebra printer as a network printer and efficiently print labels.
- Below is an example of Zebra printer and label
- Zebra printers operate via a programming language known as ZPL. This programming language is known for being the industry standard for producing label files.
- ZPL is a page description languagefrom Zebra Technologies, used primarily for labeling A print language is a set of commands that can be used to draw elements like text, shapes, barcodes and images, combine these elements, and finally print them.
- Below is a sample of a ZPL command and its Label
- In this blog we will see how to implement or integrate ZPL label printing with D365 F&O.
- For development purpose, if you do not have actual ZPL printer, you can configure a dummy printer and install ZPL Printer chrome extension to see the print output. We will describe this in a later section.
Printer Setup
- On your machine go to Control Panel à View devices and printers.
- Click on Add a printer
- Click The printer that I want isn’t listed
Click Add a local printer or network printer with manual settings. And click Next.
- Select the Create a new port
- Select Type of port = Standard TCP/IP Port.
- Click Next.
- Set Hostname or IP address = 127.0.0.1
- Keep Query the printer and automatically select the driver to use as YES.
- Click Next.
- Wait till the Detecting TCP/IP port operation is completed.
- Select Device type = Custom.
- Click on the Settings…
- Ensure that the settings are as per the below screenshot
- Click OK and then click Next.
- Wait till the Detecting the driver model… operation is completed.
- In the Install the printer driver screen, select Generic / Text only.
- Click Next.
- In the Printer name, type in DummyZebraPrinter or any other name you like.
- Click Next.
- Set Do not share this printer.
- Click Next and then click Finish.
- DummyZebraPrinter will be available under Printers as shown in the below screenshot
Install Zpl Printer Chrome Extension
- Use below link to install the ZPL printer Chrome extension.
https://chrome.google.com/webstore/detail/zpl-printer/phoidlklenidapnijkabnfdgmadlcmjo
Install the Document Routing Agent (DRA)
- In D365, open the Network printers page (Organization administration àSetup à Network printers).
- On the Options tab, in the Application group, click Download document routing agent installer. Refer the below screenshot
- Run the downloaded file to begin the installation process.
- Complete the setup process.
- After the application is installed, you can register local printers as network printers for the applications
Configure the Document Routing Agent (DRA)
- On your desktop, run the Document Routing Agent.
- On the toolbar, click Settings.
- Enter the following details
- Dynamics 365 F&O URL – The base URL of the application.
- Azure AD tenant – The domain name of the Azure AD.
- Click OK.
- Click Sign Into sign into your account.
Register Network Printer
- On the toolbar, click Printers.
- Select the printers to make them available in the applications and click Register
Administer Network Printers
- Open the Network printers page (Organization administration à Setup à Network printers).
- To include a printer as an option in the Print Destinations field, set the Active field to Yes.
ZebraDesigner Setup
- For label designing, you need to install the ZebraDesigner Software
- Install ZebraDesigner software
- After installing ZebraDesigner software, if you face the below error while opening ZebraDesigner, then you need to install Zebra Setup Utilities. This utility will install necessary drivers
Label Development
- After ZebraDesigner setup is completed, you are ready to design a label. Refer the below sample screenshot of label design
- Here elements like $FromName$, $ToName$ etc. (text starting and ending with $ sign) are placeholders. This whole design will be treated as a template and the placeholder will be replaced by actual value while printing.
- After completing label design, click on the Print
- Print to file checkbox should be checked and then click on Print
- On click of Print button, application will ask you to save the file. Save the file on your desired location.
- Open the saved file in notepad. The content of file is the ZPL format of the label that you have designed.
- If you want to see the design of generated ZPL code or you want to design Label using code itself, you can use the labelary site http://labelary.com/viewer.html
- Left-hand side is the code editor and right-hand side is the label preview
Document Routing Layout Setup
- In D365, ZPL formats are setup in the Document routing layouts
- In D365, open Document routing layout page (Warehouse management à Setup à Document routing à Document routing layouts)
- Create New document routing layout and paste the content of print output as created above in label layout.
- Click on Save.
Document Routing Setup
- After document routing layout setup, you need to setup Document routing
- In D365, Open Document routing page (Warehouse management à Setup à Document routing à Document routing)
- Create new document routing and enter the required details
- For Document routing printer section, add Printer and Layout ID as per requirement.
- Click Save.
- Based on the document routing setup, Printer and Layout will be picked up for printing by D365 application
Label Printing
- Label printing is used in the standard functionality, for e.g., when work is created and the respective details are updated in the license plate labels form in D365FO
- If you want to customize label printing, you can refer to printDocument method of WhsDocumentRouting
- Below is the snapshot of the printDocument method. This method fetches document routing and then the translate method replaces the placeholders/variables to actual Dynamics values and then sends the finals ZPL string for printing to the printer.
- If you want to customize the ZPL label printing, you can fetch the layout from routing as shown above and then replace placeholders/variables as per your need.
- After creation of the ZPL string, you need to pass it to the below method
- While printing label, ensure that the Document routing agent and ZPL printer Chrome extension are up and running
- When the label is printed, it will be displayed on the ZPL printer Chrome extension as shown below.
Keywords
ZPL label printing, ZPL label integration, Zebra printer, Dynamics 365 for Finance and Operations, D365 F&O, Document routing layout, Document routing agent (DRA)
The post ZPL Label Design and D365 F&O Integration appeared first on ERP Cloud Blog.