On this page
Print forms define how a document looks on paper or in a PDF. The integrator prepares the configuration and templates, places them in outbox, and the Android application receives them through an exchange.
Form files
| Output | Configuration | Template | Document action |
|---|---|---|---|
| PDF for previewing or sharing | pdf_forms.xml | HTML file. | Preview or Share. |
| Printing on a Bluetooth printer | print_forms.xml | .prn file. | Print. |
PDF and Bluetooth printing use separate form lists. A document can have several forms for each output method.
Both template types use Chunk Templates: it inserts document fields, repeats product lines and shows sections conditionally.
The application includes invoice and delivery note PDF forms for orders. If they meet your needs, you do not need to transfer custom files. See PDF forms to create your own form.
Data available to a form
A form receives the open document's data, its lines and related reference data. For an order, this includes:
- number and date, customer, amount and discount;
- products, quantity, package conversion factor, price and amount for each line;
- your business details from the application settings.
The fields listed in the document upload profile do not determine which data is available in a print form. Document and reference fields are described in Document schemas and References and routes.
Business details
On the device, open Settings → Print → Business details and fill in:
| Setting | Template value |
|---|---|
| Company name | {$we.company} |
| Address | {$we.address} |
| Company registration or tax number | {$we.registration} |
| Bank details | {$we.billing} |
| Note | {$we.comment} |
The template displays only the details it uses. If business details are missing from the PDF, check both the settings on the device and the corresponding template fields.
Transferring forms to a device
- Prepare the configuration file and all templates it references.
- Place them directly in the device's
outboxdirectory. - Add these files to
<get><files>in the appropriateexchange.xmlprofile. - On the device, run Download exchange file, then the profile that downloads the forms.
- Check the exchange log on the device, open a document and choose the appropriate action from its menu.
Keep the default storage location for the configuration and templates on the device: do not set storage="external" or destinationFolder in the profile. File names in the configuration and exchange profile must match.
In the standard exchange.xml, the Download print forms profile (labelled Завантажити форми для друку in this Ukrainian sample) receives print_forms.xml and *.prn files. For PDF, add pdf_forms.xml and the required HTML files. A ready-to-use profile is included in the PDF form example.
To update a template later, run the form download profile again. Download exchange.xml again only if the profile itself has changed.
Checking the result
Open an order with products and check:
- company name and business details;
- document number, date and customer;
- product names, quantities and package conversion factors;
- prices, discounts and totals;
- language-specific characters and wrapping of long names.
For PDF, use Preview first, then Share to check sending the file. For Bluetooth printing, also select a printer in Settings → Print → Printer and check the printed result.
If a form is unavailable
| Symptom | What to check |
|---|---|
| Files did not download | The exchange log, the device's outbox directory and the <file> entries in the profile. |
| No form for the document | The document name in the form configuration and the required <form> entry. |
| The form is listed but does not open | The template's presence on the device and its name matching <file> in the configuration. |
| The form still has its previous appearance | Whether the updated template was downloaded under the same name and the PDF was generated or printing performed again. |
| Business details or fields are empty | Values in the document, reference data and business settings; spelling of template tags. |
Check exchange errors in the device log. If a file could not be received from the server, also see Logs and support.
