Receipt files
It's important to have knowledge about the files that make up a receipt before starting to create a new receipt.
Receipt files
A receipt consists of the following file types:
A data file in XML format
A language file in XML format
A layout file in XSL format
A project file in RCP (.rcp) format. The RCP file bundles the other files together.
Data
The data for a receipt is an XML file generated by Connect on-Device every time a receipt is printed.
You can't edit the content of the data with Receipt Builder. You can only edit how the data is presented. The content of the data (the existing elements and their values) can change from one print of a receipt to the next.
A data element can be simple. For example:
totalvalue=EUR 56.00
A data element can also be a tree of elements. For example:
money - formattedDenomination=EUR 0.01 - numberOfItems=3 - formattedValue=0.03 money - formattedDenomination=EUR 0.02 - numberOfItems=2 - formattedValue=0.04
Language
The language file is an XML file that makes it possible to translate the receipts with the regular translation tools for Connect on-Device. The language file has a flat structure and only contains pairs of labels and phrases for one language.
You can edit the language file from within Receipt Builder. You can add new labels/phrases and you can change existing phrases.
Changing the phrase for a label in the language file from within Receipt Builder doesn't affect printed receipts. You must use the translation tool in Connect on-Device Studio to change a text on the receipts. If you want to add a new label to the language file, use Receipt Builder and then use the translation tool in Connect on-Device Studio to move the new label to the language-specific files. This applies even if you use the English language file. If you choose DEFAULT as Master in the Connect on-Device Studio translation tool, you can see your new label.
For more information, see Adding a phrase to a receipt.
Layout
The layout is the main part you can edit using Receipt Builder. The layout is stored in an XSL file that defines how to present the data in the data file, optionally using translated phrases from the language file.
For more information, see Receipt layout.
Project
The receipt project file is only used by Receipt Builder to bind the other file types together. The project file points to one layout file and one language file, Optionally, it can point to two data files, one data example file, and one last print file.
The data example file is a file delivered with Receipt Builder. This file makes it possible to edit a receipt without having printed any receipt before. The last print file contains the data from the last time a receipt of this type was printed. If there is a last print file, it is better to use that file when editing because the content of the data files can look very different depending on the software settings. A small switch in Receipt Builder allows you to toggle between the data example file and the last print file. You can edit the properties of an existing project or create a new project in Receipt Builder.