Getting a shipping label from XML
Some software creates XML files that include Base64-encoded shipping labels. You can easily extract and decode these shipping labels by completing the following steps:
- Create an eFORMz project that contains a 4″x6″ or 4″x8″ form, depending on your label size. The project needs only the form, no variables, rules, or document template objects. This will be your secondary project that that shipping label is rendered on.
- Create your main project file with a form to hold the shipping label. Open an XML data file that includes the Base64-encoded shipping label as the data file.
- Add the variable that contains the shipping label to the shipping label form. Usually you can right click the XML variable > Add Variable. Verify that the variables value shows up in the Variable window.
- In the form’s list of variables, right click the ship label variable that you just added > Add Advanced Function > Base64 Decode. The variable value is decoded to ZPL, like this:
- Right click the form > Add Rule > Output from Project. In the Use variable form, select the variable that has the decoded shipping label. Click OK.
- In the Project field, type the path and project name of the project you created in Step 1.
- Click Input is the value of the rule variable. For Input format, select XML. For Character set, select UTF-8.
- The top of the window includes a Rotation field. If your shipping label prints upside down, return here and change the value to 180.
- Click OK and save the project.
- Your shipping label form shows the shipping label.