0% found this document useful (0 votes)
12 views

Exporting Printer Code Templates

This technical document outlines the advantages and challenges of using Printer Code Templates (PCTs) with BarTender software for printing in various environments. It details the process of exporting PCTs, the technical challenges associated with their use, and the customization options available for print systems. Key challenges include the need for coding knowledge, complicated maintenance, and limitations in print job monitoring and formatting capabilities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Exporting Printer Code Templates

This technical document outlines the advantages and challenges of using Printer Code Templates (PCTs) with BarTender software for printing in various environments. It details the process of exporting PCTs, the technical challenges associated with their use, and the customization options available for print systems. Key challenges include the need for coding knowledge, complicated maintenance, and limitations in print job monitoring and formatting capabilities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Technical Document

English

Exporting Printer Code


Templates
ADVANTAGES AND CHALLENGES OF USING PRINTER
CODE TEMPLATES WITH BARTENDER®
SUPPORTS: BARTENDER ® 2019 AND LATER VERSIONS
Contents
Overview 3
Print Systems 3
Printer Code Templates 3
Printing with Printer Code Templates 4
Embedded Printer Code 5
SAPscript-ITF Integrations 5
Portable Keypad Devices 5
XML-enabled Printers 6
Non-Windows Environments 6
Technical Challenges of Printer Code Templates 7
Required Coding Knowledge 7
Extensive Design Changes 7
Complicated Printer Maintenance 7
No Print Job Status Monitoring 7
No Support for Multiple Printer Models 8
No Support for Changing Graphics 8
No Paragraph Formatting 8
No Variable Font Sizes 8
Loss of Security and Audit Preparation Features 8
Loss of Advanced Print Management Functions 8
Adding Template Field Names 9
Exporting a Printer Code Template 10
Verification of Printer Code Templates 11
Customizing Print Systems 12
Search and Replace 12
Example of How to Use a Printer Code Template 14
Related Documentation 17
Overview
Print Systems
In some manufacturing situations, portable devices or terminals are used to print items. These
portable devices and terminals typically merge user input information, such as lot number and
expiration date, into the printer code for a template and then send the completed printer code
directly to the printer.

Other systems might use software printing applications that merge user information into the printer
code for an item. These applications might be running on a non-Windows computer.

Taken collectively, these devices and merge applications are called "print systems."

Printer Code Templates


When you use the Automation and Enterprise editions of BarTender, you can create a document to
design your items and then export the document to a printer code template, which is a data file that
contains printer commands and placeholders for data on your template. You can then merge and
print the printer code template by using your print system.

A printer code template contains mostly native printer code, but it also contains delimited fields that
the print system can recognize and use to merge user input information. These delimited fields can
indicate positions (such as the start and end of each line) or data field names, which are used as
placeholders that are replaced at print time by actual data.

Not every print system uses every possible delimiter, but the template might include a header,
footer, start and end line delimiters, start and end print code delimiters, and delimiters at the start
and end of data fields.

For more information, refer to the Working With Printer Code Templates topic in the BarTender help
system.

Exporting Printer Code Templates 3


Printing with Printer Code Templates
Sometimes, it is not useful to send a printer code template (PCT) directly to a printer, because the
delimiters would appear as data on your printed items. Instead, you might want to store a PCT inside
a computer program or hardware device that is programmed to replace the placeholders with actual
data. The printer code that BarTender produces is not usable until the PCT is "merged" with the data
that you want to print.

No matter what environment you eventually use your PCT in, the process for setting it up is the
same, as follows:

1. Use BarTender to design your items, and then export your document to a PCT.
2. Upload the PCT to a hardware device or an external application.
3. Manually insert the data into your hardware device or import it from your external application.
4. Send the merged file to the printer.

Exporting Printer Code Templates 4


PCTs are used in a number of different environments, as described in the following sections.

Embedded Printer Code


As most people know, before personal computers were available, software ran on very large
mainframe computers. In some of the first software programs that were designed for supply chain
management, programmers hand-coded all of the printer code that was required for their jobs and
then compiled it as part of the program. Changes to the design, no matter how small, required
programmers to manually change these sections of embedded printer code.

Some of these legacy applications are still in use today. A more efficient way to manage the use of
embedded printer code is to use BarTender to generate a PCT to a file and then compile that printer
code into the program. To change the design still takes time, because you have to run BarTender,
make your change, export a new PCT, and then recompile it into the external program. However,
working with a good WYSIWYG program such as BarTender results in a much easier and faster way to
design items than hand-coding them.

SAPscript-ITF Integrations
SAPscript is a reporting engine that is available in SAP that supports the automated combination of
SAP-provided data with an externally-supplied PCT format called an Interchange Text Format (ITF). As
is the case with embedded printer code, you have to export a PCT from BarTender when you use this
engine, but you use the SAPscript-ITF PCT print system that is installed with BarTender. After you
export the PCT, you can “upload” it to the SAP system and then configure the SAP system to run the
appropriate SAPscript report and merge the required data whenever an SAP transaction requires
one or more printed items.

Although the SAPscript-ITF system makes design template changes easier than physically
embedding and compiling new printer code into the SAP application, you still might encounter
technical challenges. For more information, refer to the Technical Challenges of Printer Code
Templates section of this technical document.

Portable Keypad Devices


Portable keypad devices include a portable keyboard, a small screen display, and a printer port.
These devices generally lack the intelligence of portable “data terminals” and typically do not have
connectivity to the main company network. Most commonly, they are connected to a printer that is
wheeled around a warehouse on a cart or forklift.

A portable keypad device that is not running Windows and is not connected to the main network
cannot run software such as BarTender. However, many such devices can download and store PCTs.
They can then prompt a print operator for data, merge it with the PCT, and output the printer code to
the attached printer.

Exporting Printer Code Templates 5


XML-enabled Printers
Most thermal printers provide a full and robust printer language, but some of them also have an
option to accept PCTs. As is the case with the embedded printer code and portable keypad devices,
you first must design an item and then export a PCT in BarTender for subsequent download to the
printer. After you do this, you can choose to send data only (without printer code) to the XML-
enabled printer.

Non-Windows Environments
Even if a controlling software program is not running on Windows, you can use Integration Builder to
integrate your system with BarTender. If your controlling application does not have access to
Windows computers on the network, you can embed PCTs to take advantage of Windows-based
label and barcode design (although not Windows-based printing).

Exporting Printer Code Templates 6


Technical Challenges of Printer Code Templates
To generate PCTs, you must be running the Automation or Enterprise edition of BarTender. However,
BarTender does not serve as the print engine for the print jobs, unlike the more conventional
scenario in which you print items by using BarTender directly. When you use PCTs, BarTender cannot
provide the variety of advanced barcode design and printing features that we have developed over
many years.

The technical and security-related challenges of using PCTs include the following.

Required Coding Knowledge


When you use BarTender as your print engine, you need not worry about the technical details of how
to communicate with your printer. By contrast, to embed code into your other software, you must
know how to code in the language in which that software was written and be able to read,
manipulate and embed large sections of printer code.

Extensive Design Changes


When you use BarTender as your print engine, you can modify your template design and
automatically be ready to print again. By contrast, when you use a PCT, you must do the following, no
matter how small a design change you make:

l Use BarTender to modify your design.


l Export your design to a PCT.
l Re-embed the PCT into your application and then recompile it or re-download it to your
hardware device.

Complicated Printer Maintenance


When you use BarTender as your print engine, if a printer fails and needs to be replaced, you can
print to the new printer right away. Also, if you change printer brands, you need only specify a
different printer driver.

By contrast, when you store PCTs in a printer that later fails, you usually have to call for technical
support to get your production restarted with a replacement printer, even if you continue to use the
same printer model. Typically, only technical support personnel know how to run whatever custom
process your company uses for deploying PCTs. Also, if you change printer brands, custom
programming is usually required.

No Print Job Status Monitoring


When you print by using Drivers by Seagull™, you have access to important printer and print job
status information, such as the following:

l Printer online or offline


l Print job running or stalled
l Printer low on paper
l Printer stopped

Exporting Printer Code Templates 7


All of this information is available by using the Printer Maestro companion application.

By contrast, when you print by using PCTs, you typically are printing without any knowledge of your
printer’s status, unless you coded your own support to provide status monitoring.

No Support for Multiple Printer Models


When you use BarTender as your print engine, you can quickly select a different printer. Also, if a print
job fails due to a stopped or unavailable printer, you can use the Printer Maestro interface to drag
the print job to a different printer brand or model.

By contrast, because PCTs are, by definition, code for a specific printer, you cannot “move” a failed
print job to a different brand of printer. In fact, the different printer models that most manufacturers
produce have enough differences among them that you typically need different PCTs for each model.
(We have even seen cases in which printer models that otherwise were identical had different
firmware versions that required slightly different PCTs.)

No Support for Changing Graphics


PCTs cannot support the reading and printing of different graphics objects for different printed items.
For example, if you wanted to print a different picture from a database next to each barcode on your
inventory labels, you could not use a PCT.

No Paragraph Formatting
BarTender offers a wide variety of paragraph formatting features, including word wrapping,
indentation, justification, bullets, numbering and line spacing. PCTs do not allow for this kind of
paragraph formatting.

No Variable Font Sizes


When you use BarTender as your print engine, you can use the Auto Fit property page for a text
object to automatically increase or decrease the font size depending on the amount of text that is
used on each item.

By contrast, PCTs require that each text object uses the same font size for each item.

Loss of Security and Audit Preparation Features


Many BarTender companion applications have features that you can use to restrict printing access,
log errors, or set up a document-sharing environment. History Explorer uses these features for its
auditing functions. PCTs bypass these features.

Loss of Advanced Print Management Functions


Printer Maestro is an advanced tool that can monitor every printer and print job on a Windows
network and display the status information on one screen. PCTs bypass the standard Windows
functions that make these management features possible.

Exporting Printer Code Templates 8


Adding Template Field Names
Barcode and text objects into which the print system inserts data must have a template field name
so that the print system can find them in the PCT file. Objects that are linked to BarTender data entry
controls or database fields are automatically given template field names when you export a
BarTender document to a PCT. For example, when you enable data entry for an object, a template
field name is automatically generated when the BarTender document is exported to a PCT.

You can also manually specify a custom name for a template field. To do this, follow these steps:

1. On the File menu, click Export Printer Code Template. The Export Printer Code Template
dialog opens.
2. Click More Options. The Printer Code Template Options dialog opens to the Template Fields
tab.
3. In the left navigation pane, select the data source that you want.
4. In the Template Field
area, select a source for
the new data field in the
Source list.
5. In the Name field, enter a
name for the new data
field.
6. Optionally, click to select
the Add Field Delimiters
check box.
7. Click OK to close the
Printer Code Template
Options dialog.
8. Click Close to close the Export Printer Code Template dialog.

Exporting Printer Code Templates 9


Exporting a Printer Code Template
BarTender is installed with some predefined print systems. To export a PCT for your BarTender
document to one of these print systems, follow these steps:

1. On the File menu, click Export Printer Code Template. The Export Printer Code Template
dialog opens.
2. In the Print System list, select a print system. Custom print systems are also listed here.
3. Click Export.
4. Resolve any issues that appear in the Export Printer Code Template: Verification Messages
dialog. For more information, refer to the Verification of Printer Code Templates chapter of this
technical document.
5. Click OK to close the confirmation message.
You can export a printer code template as one file, or you can break it up into format and data printer
code. Typically, printers can accept the following types of printer code:

l Format code: Defines initialization commands, fonts, the positions of the objects, and any
data that does not change from item to item.
l Data code: Typically changes from item to item and uses the format printer code commands
as a format template for printing items by using the changing data.

Exporting Printer Code Templates 10


Verification of Printer Code Templates
When you use BarTender as the print engine, it controls the entire print job, so it can easily perform
advanced printing functions and other functions. For example, BarTender can control how text is
centered, set the barcode density, add human readable text, and add check digits where needed.

However, a print system typically does not have this level of control. The print system uses raw
printer code and can only merge user input data into itself. The barcode density, for example, cannot
be adjusted, because the print system does not change the printer code. Because of this limitation,
the design of the template is very important.

When you export a PCT, BarTender reports design issues by using the Export Printer Code
Template: Verification Messages dialog, which helps you improve printing success when you use
the selected print system. You can manually correct or, in some cases, automatically fix the reported
problems.

Click Details to open the Message Details


dialog, which displays more information
about the issue to help you decide how to
resolve the error.

Exporting Printer Code Templates 11


Customizing Print Systems
In addition to the predefined print systems that BarTender provides, you can create your own
custom print system by using the Printer Code Template Setup dialog. You can configure any
number of custom print systems.

To open this dialog, click Printer Code Template Setup on the Administer menu in BarTender.

The following delimiters are available:

l Header: Marks the beginning of the PCT.


l Footer: Marks the end of the PCT.
l Start of Line: Marks the beginning of each line of printer code.
l End of Line: Marks the end of each line of printer code.
l Start Field Delimiter: Marks the beginning of each data field (meaning each template field
name). For more information, refer to the Adding Template Field Names section of this
technical document.
l End Field Delimiter: Marks the end of each data field.
l Start Print Code: Marks the point at which the printer code begins.
l End Print Code: Marks the points at which the printer code ends.
Many print systems do not use all of these delimiters.

Search and Replace


Use the search and replace functionality to resolve potential conflicts between your printer's
language and the template field syntax that you are using. For example, if the character that you
want to use as the start field delimiter, such as the ampersand (&), is used in your printer's language,
you must temporarily replace the character where it appears in the printer's language code.
Otherwise, the print system interprets every instance of this character as the start of a template

Exporting Printer Code Templates 12


field. The print system reverses this temporary substitution as the last step before it produces a
printer file that is written entirely in the printer's language.

To use the search and replace functionality, follow these steps:

1. On the Administer menu in BarTender, click Printer Code Template Setup. The Printer Code
Template Setup dialog opens.
2. Click the General tab.
3. Click Action List. The Search and Replace (Printer Code Modifier) dialog opens.
4. In the Action Options area, enter your search and replace terms in the Search for and
Replace with fields.
5. Optionally, click Test to test the search and replace action.
6. Click OK to close the Printer Code Modifier: Action List dialog.
7. Click OK to close the Printer Code Template Setup dialog.
For more information, refer to the Search and Replace Dialog (Printer
Code Modifier) topic in the BarTender help system.

Exporting Printer Code Templates 13


Example of How to Use a Printer Code Template
Suppose Ajax Swizzle Sticks, Inc., wants its SAP/R3 system to print the following address labels.

The return address remains the same on all labels, but each line of the recipient’s address is
variable. On the warehouse floor, a non-Windows computer that is running a SAP/R3 print system
prompts the print operator to enter the recipient’s name and address. The SAP/R3 print system
inserts this information into a PCT that was created in BarTender, and the resulting printer file is sent
to a printer.

To create a PCT that has variable data fields:

1. In BarTender, start a new BarTender document, or open an existing document that you want
to modify.
2. On the File menu, click Print. The Print dialog opens.
3. In the Name list, select the printer that you want to use to print the labels. Make sure that the
printer driver supports the exporting of PCTs and that that feature is selected in the driver’s
Properties dialog.
4. Click Close to close the Print dialog.
5. For the return address, create a normal wrapped (multi-line) text object, and then place it in
the upper left corner of your template.
6. Click the text object to enter Edit mode, and then enter the return address.
7. Create another text object, and then place it where you want the recipient’s name to appear.
8. Double-click the border of the new object. The Text Properties dialog opens.
9. In the left navigation pane, click Font.
10. In the Typeface list, select a printer-based font.
11. In the left navigation pane, click the data source that you want under Data Sources.
12. On the Data Source tab, enter Recipient's Name in the Embedded Data field.

Exporting Printer Code Templates 14


13. Click Close to close the Text Properties dialog.

You do not have to enable data entry for the object, because
the prompting is done by the SAPscript, not by BarTender.

14. Repeat steps 7 through 13 to create, place, and configure text objects for "Street
Address," "City," "State," and "Zip".
15. On the BarTender File menu, click Export Printer Code Template. The Export Printer Code
Template dialog opens.
16. Next to Print System, click More Options. The Printer Code Template Options dialog opens to
the Template Fields tab.
17. In the left pane, click the “Recipient’s Name" data source.
18. In the Source list in the Template Field area, select Custom.
19. For Name, enter Recipient’s Name.
20. Click to select the Add Field Delimiters check box.
21. Repeat steps 18-21 for the “Street Address,” “City,” “State,” and “Zip” data sources.
22. Click OK to close the Printer Code Template Options dialog.
23. In the Export Printer Code Template dialog, select SAPscript-ITF in the Print System list.
24. In the Output area, click to select All in One File.
25. Click Export. A template file that resembles the following is produced. The contents of the file
vary depending on the printer that you selected in step 3. (In this example, a Datamax printer
was used.) Note that the fields that you created are enclosed in ampersands (&), which is the
SAPscript-ITF field delimiter.

Exporting Printer Code Templates 15


26. Upload a copy of this file to a computer on the warehouse floor.
27. Configure SAP/R3 to perform the following actions:
a. Open the SAPScript-ITF file.
b. Prompt the print operator for address data (the recipient’s name, street address, and
so on).
c. Insert the data in place of the data source fields (&Recipient’s Name&, &Street
Address&, and so on) in the template.
d. Send the resulting file to the printer.

Exporting Printer Code Templates 16


Related Documentation
Technical Documents
l BarTender Integration Methods
l Drivers by Seagull™
l Optimizing Print Performance
l Status Monitoring
To view and download technical documents, visit:

https://www.seagullscientific.com/resources/white-papers/

User Guides
l Getting Started with BarTender
https://support.seagullscientific.com/hc/categories/200267887

BarTender Help System


l Working With Printer Code Templates
l Search and Replace Dialog (Printer Code Modifier)

Other Resources
Please visit the BarTender website at https://www.seagullscientific.com.

© 2020 Seagull Scientific, Inc. BarTender, Intelligent Templates, Drivers by Seagull, the BarTender
logo, and the Drivers by Seagull logo are trademarks or registered trademarks of Seagull Scientific,
Inc. All other trademarks are the property of their respective owners.

Version 2020-10-30 Copyright © 2020 Seagull Scientific, Inc.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy