E-ticket
Generate your tickets with Carbone
- Template type document docx expert
- Carbone min. v5.0.0+
- Features loop barcode price date image
- Target ticket access control badge transport custom
Objectives
You want to generate a ticket with the following features:
- Design layout
- Date formatting
- Currency formatting
Solution
Here’s how you can achieve this using Carbone:
Define the paper size and orientation in the page set up
Go to the File menu to access the Page Setup window and set the paper size.
Create a new size using Custom Sizes if needed.Write the title and draw tables to structure your pagination
Pay attention to the alignment of cells for better rendering
Insert a placeholder to manage QRcode
Use the following formula in the Alt Text of the placeholder to insert a QR Code:
{d[i].travel.ticket:barcode(qrcode)}
Number and date manipulation
Use
:formatC
formatter to manage the currency display Use:formatD
formatter to manage the date display. The default pattern follows the ISO 8601 standardYou can add spaces within the Carbone tag to improve formula readability and ensure better text wrapping within the cell.
Iteration
Define [i+1] on the next page to enable the iteration to run
And there you go!