Peoplevox

Setting Up Print Templates in PVX

About print templates

Print templates are document designs for printing specific types of documents, such as sales orders, location labels, despatch notes or item labels. Everything printed from PVX requires a print template. This ensures that all documents of the same type are printed with the same content and layout as required by your WMS. Print templates must be registered within your PVX account before they can be used.

PVX is supplied with a selection of print templates from which you can print a variety of documents. Alternatively, you can design and upload your own templates using suitable third-party software such as Zebra Designer. Make sure that the software you use generates templates that are suitable for ZPL (Zebra Programming Language) compatible printers if the template is for a label or sales order.

If you want to print despatch notes or despatch package labels on a generic laser jet printer, then you can add the Despatch Documents option to your WMS. This provides a print template designer within PVX that is covered in a separate article.


Tips for creating print templates

  • For templates that will be printed on ZPL-compatible printers, only use fonts that are recognised by ZPL printers, otherwise the text will not print.

  • In the template designer, you normally have to select the type of printer that will be used with the template. Make sure that the selected resolution is correct for your printer, as otherwise the document will not print. (This is particularly important for ZPL-compatible templates.)

  • Although you can add fixed text to a template, which remains unchanged whenever the template is used, we recommend that you insert user variables instead as this allows all templates to be quickly and easily updated if any information changes.

  • Any information in the template about the object of the document (the sales order, item, etc.) should be included as a variable field.

  • Remember that variable fields may change in size from the template design when actual documents are printed. This is particularly true for barcodes, which will often be shorter than the variable field that you see in the template. Test your template in PVX once it is uploaded and registered before using it to print large numbers of documents.

  • Once you have created your template, set up print template rules to control when it is used.

  • Templates used for despatch documents, which can be printed on normal laser jet printers, need to be created as document types in PVX if you want to apply print template rules to them.


Using variable fields

Each type of document has a list of variable fields that can be used in a print template; these will then be populated with the relevant information for the object of the document when the template is used.

You can find a list of all available variable fields for the different documents in the attached spreadsheet.

  • Insert variable fields into your template as needed using the syntax required by your template designer software. For example, in Zebra Designer, you can include the SKU or item code in a label by inserting the field '$ItemCode$' in your template.

  • Remember that variable fields are case-sensitive.

  • Many variable fields contain the '[n]' variable. This allows you to print information on multiple objects in the same document. In the print template, you should replace this variable by an incremental number, starting from 0. For example, in a sales order print template, if you want to print the first item in the sales order, then use the variable field 'Items[0].ItemCode'. To print the second item, use 'Items[1].ItemCode', and so on.


Setting up user variables

When you are designing a print template, it is a good idea to include user variables as this allows templates to be quickly and easily updated if any of the company's standard information (name, contact details, etc.) changes in the future.

  1. Go to the Print Templates tab in the Setup module of the PVX web app.

  2. Click User variables to display the dialog shown.


  3. Enter names for keys for which you want to assign user variables. The key names must not contain any spaces; use underscores to separate words if preferred.

  4. Enter values for each key.

  5. To upload an image file (in *.jpg format), click the appropriate ... button. In the JPG-to_ZPL dialog, click Choose File, select the file on your computer and click Open, and then click Convert to change it to a ZPL-compatible format. Click Done.

  6. Click Save at the bottom of the User variables dialog when you have entered all the desired variables.

When you create your print templates, insert the key names into the template design using the syntax required by your template designer software. Remember that the user variables are case-sensitive. PVX will then automatically populate them with the assigned values when printing. If any information changes in future, you only need to amend the value in the User variables dialog to update all the templates where it appears.


Uploading and registering templates

Once you have created a print template in a separate software package (not if you are using the PVX Despatch Documents designer), follow the steps below to upload and register the template ready to be used in PVX.

  1. Go to the Print Templates tab in the Setup module of the PVX web app.

  2. Click Upload template to display the dialog shown.


  3. Select the ZPL-compatible template you've designed by clicking the top Choose File button, finding the template file and clicking Open. You can upload templates in *.txt or *.prn file formats.

  4. In the same way, select an image file to use in the print templates tab to identify your template in the Print Templates tab. Please note that you only have one chance to select this image for your template, as it cannot be changed later.

  5. Select the type of label or document that will be printed using the template from the drop-down list.

  6. Select the type of printer to be used with this template from the drop-down list. For ZPL templates, make sure that the resolution of the selected printer is compatible with the template as otherwise the document will not print correctly. Templates set up for 200 dpi printers won’t be available to print on 300 dpi printers, and vice versa.

  7. Select the barcode type to match the type used in the template.

  8. Select the label size. Select X x Y mm if your template doesn't fit one of the standard sizes in PVX.

  9. Add a description if desired, and click Continue. The template will be uploaded into the Print Templates window.

  10. Double-click the template in the window to display the Save template dialog.

  11. Enter a name for the template and click Save. This will register the template in your PVX account and make it available for selecting when you want to print the associated document type.

Templates created in the Despatch Document designer will automatically be registered in PVX and can be used immediately.


Deleting templates

You can delete registered templates from your WMS:

  1. Go to the Print Templates tab in the Setup module of the PVX web app.

  2. Click Registered templates.

  3. In the Registered print templates dialog, click Delete next to the template you want to stop using. The print template will then no longer be available for you to use.


Print template rules

Rules can be assigned to a registered template which determine when PVX prints a document using that template. This avoids the need to manually select which print template to use each time a document is printed, which can save a lot of time.

For example, imagine that you need to print one sales order for UK sales orders and a different one for orders relating to all other countries:

  1. Create templates for UK and foreign country sales orders.

  2. Assign appropriate template rules to the two sales order print templates.

  3. Select [Use rules] under Select template for the printer in the print dialog of the Sales tab. PVX will always automatically apply the print template rules for the sales order templates and print the correct one for your order.

You can set up a print template rule as follows:

  1. Go to the Print Template Rules tab in the Setup module of the PVX web app.

  2. In the left hand Categories window, click '+' next to the relevant document category to expand the list and click the name of the template to which you want to add a rule.

  3. Click Add Rule on the right hand side of the screen. The Template rule dialog is displayed.


  4. Use the search fields to set up the rule you want to apply to the template, and click Add. The search options that are displayed in the drop-down menus will be relevant to the type of template that has been selected. In the example above, the template will only be printed where the destination country of a sales order equals France or Canada.

  5. Add other conditions as needed, using the AND, OR and bracket buttons to configure the logic for the rules. To remove one line from the rule, click the relevant line and then click Remove. Clicking Clear will remove all lines from the rule.

  6. When complete, click Save in the dialog, enter a name for the rule and click Save again. The rule is displayed for the selected template in the Print Template Rules tab.

You can also select an existing rule and either edit or delete it using the buttons in the tab window.


Creating print templates as Document Types

Templates used for printing despatch documents, which can be printed on normal laser jet printers, must be created as Document Types in the web app if you want to apply print template rules to them.

  1. Go to the Document Types tab in the Setup module.

  2. Select the relevant document category for your template from the left hand Categories window.

  3. Click Add New. The Add new document type dialog is displayed.


  4. Enter a name for the document type. We recommend using the same name as the print template to avoid confusion.

  5. Select the category of the document from the drop-down list.

  6. Select the type of printer that will be used to print the document, making sure that it is compatible with the print template.

  7. Set the sequence for the document type (this is the order in which documents are printed if more than one document type is selected).

  8. Set the default number of copies for printing and select the print template as the default template.

  9. Click Save. The document appears within the list of document types in the tab and will be available as an option when printing despatch documents.

You can now create rules for the document type and then select [Use rules] when printing in the same way as for other templates. We recommend that you use the country names and codes in the attached list when setting up rules for despatch documents.


Modifying print templates

Adding special characters

Labels and documents sometimes need to include characters from other languages in the text; for example, addresses in Germany may need an umlaut over a vowel (Ä). In these cases, the print templates used in PVX must be modified to accommodate these special characters. For templates created in Zebra Designer, this involves changing the coding in the *.prn files that you created for use with your WMS.

  1. Locate the original *.prn file for each template to which you want to add special characters.

  2. Open the file you want to modify in a text editing application such as Notepad.

  3. Locate the blocks of text in the template where you want to include special characters (for example, the customer’s address).

  4. Insert the code ^CI28 immediately before the ^FH code in each line of text. Note that the inserted text contains a capital letter I and not a number 1.


  5. Save the modified file and then upload and register it as a template in PVX.


Adding hyphens to barcodes

Hyphens may sometimes need to be added to barcodes to enable PVX to read them. In these cases, any template *.prn files containing the barcode will need to be modified in a similar way to the addition of special characters described above. To add hyphens, insert the code ^FH at the start of each line corresponding to the barcode itself (not the remaining lines in the template), as shown below.

PVX Print Template Variable Fields.xlsx

PVX - Country Name and Code List for use in Print Rules v1.pdf

Back to Top