Exporting Printer Code Templates
Exporting Printer Code Templates
English
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."
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.
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.
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.
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.
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).
The technical and security-related challenges of using PCTs include the following.
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.
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.
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 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.
By contrast, PCTs require that each text object uses the same font size for each item.
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.
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.
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.
To open this dialog, click Printer Code Template Setup on the Administer menu in BarTender.
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.
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.
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.
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.
https://www.seagullscientific.com/resources/white-papers/
User Guides
l Getting Started with BarTender
https://support.seagullscientific.com/hc/categories/200267887
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.