<pdf>

	<version>1.0.0</version>
	<title>PDF Template Demo - Event ticket</title>
	<date>2026-10-05</date>
	<note>Event ticket demo: two e-tickets per page with QR code and tear-off stub, data read from a JSON file (DataProviderJSON)</note>

	<default_page>
		<orientation>P</orientation>
		<unit>mm</unit>
		<format>A4</format>
	</default_page>

	<doc_info>
		<creator>Alien Project</creator>
		<author>#MBR</author>
		<title>PDF Event Ticket Demo</title>
		<subject>Copyright (C) 2026 - Alien Project</subject>
		<keywords>ticket, e-ticket, event, conference, qr code, barcode, json, pdf, example</keywords>
	</doc_info>

	<!-- Section without data provider: a new page for every two tickets, with the cut line -->
	<section id="sheet">
		<page format="A4" orientation="P"/>

		<!-- For debug, set BORDER=1 to check the box sizes -->
		<setvar name="BORDER" value="0"/>
		<setvar name="COLOR_DARK" value="1e1b4b"/>
		<setvar name="COLOR_STD1" value="4338ca"/>
		<setvar name="COLOR_STD2" value="0891b2"/>
		<setvar name="COLOR_VIP1" value="141414"/>
		<setvar name="COLOR_VIP2" value="8a6a1f"/>
		<setvar name="COLOR_GOLD" value="c9a227"/>
		<setvar name="COLOR_SOFT" value="f1f3f9"/>
		<setvar name="COLOR_LINE" value="cfd4e0"/>
		<setvar name="COLOR_TEXT" value="1f2333"/>
		<setvar name="COLOR_GREY" value="6b7280"/>
		<setvar name="COLOR_WHITE" value="ffffff"/>
		<!-- Number format: 1,234.56 USD -->
		<setvar name="NUMERICDECIMALSEPARATOR" value="."/>
		<setvar name="NUMERICTHOUSANDSEPARATOR" value=","/>
		<setvar name="CURRENCYSYMBOL" value=" USD"/>

		<print_content>sheet_cut_line</print_content>

		<section id="tk" row_height="148.5" rows_count="2">
			<!-- One ticket for each row of the JSON file, two tickets per page (the second one is printed 148.5 mm lower) -->
			<print_content>ticket_main</print_content>
			<print_content>ticket_stub</print_content>
		</section>
	</section>

	<section id="finalize">
		<output>
			<dest>I</dest>
			<name>tickets.pdf</name>
			<isUTF8>true</isUTF8>
		</output>
	</section>

	<!-- ********************************** -->

	<content id="sheet_cut_line">
		<line x="0" y="148.5" width="210" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.25" color="{COLOR_LINE}" dash="2,1.5"/>
		</line>
		<box x="10" y="149.5" width="190" height="4" border="0" horizalign="Center" vertalign="Center">
			<text>Cut along the dotted line</text>
			<font family="Helvetica" style="N" size="6.5" color="{COLOR_GREY}"/>
		</box>
	</content>

	<!-- ********************************** -->

	<content id="ticket_main">
		<!-- Coordinates of the first ticket: the second one is printed 148.5 mm lower -->
		<box x="10" y="6" width="190" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>E-TICKET  ·  Print this page or show the QR code on your phone at the entrance</text>
			<font family="Helvetica" style="N" size="7" color="{COLOR_GREY}"/>
		</box>

		<!-- Ticket outline -->
		<rectangle x1="10" y1="13" x2="200" y2="141" radius="0" border="0000">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="N"/>
		</rectangle>

		<!-- Header band: the gradient depends on the ticket type (printif) -->
		<box x="10" y="13" width="138" height="38" border="0" text="" printif="{tk.ticketType}=VIP">
			<fill type="L" color="{COLOR_VIP1}" color2="{COLOR_VIP2}" orientation="h"/>
		</box>
		<box x="10" y="13" width="138" height="38" border="0" text="" printif="{tk.ticketType}!=VIP">
			<fill type="L" color="{COLOR_STD1}" color2="{COLOR_STD2}" orientation="h"/>
		</box>
		<fill type="N"/>
		<!-- Decorative rings on the header -->
		<opacity value="0.15"/>
		<circle x="128" y="20" r="18"><linestyle width="0.8" color="{COLOR_WHITE}"/><fill type="N"/></circle>
		<circle x="128" y="20" r="11"><linestyle width="0.8" color="{COLOR_WHITE}"/><fill type="N"/></circle>
		<opacity value="1"/>

		<box x="17" y="18" width="90" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{EVENT_EDITION} EDITION  ·  {EVENT_DATE_SHORT}</text>
			<font family="Helvetica" style="B" size="8" color="{COLOR_WHITE}"/>
		</box>
		<box x="17" y="24" width="95" height="11" border="{BORDER}" horizalign="Left" vertalign="Center" textfit="Resize">
			<text>{EVENT_NAME}</text>
			<font family="Helvetica" style="B" size="21" color="{COLOR_WHITE}"/>
		</box>
		<box x="17" y="36" width="95" height="6" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{EVENT_TAGLINE}</text>
			<font family="Helvetica" style="N" size="9.5" color="{COLOR_WHITE}"/>
		</box>

		<!-- Ticket type pill -->
		<rectangle x1="112" y1="38" x2="142" y2="45" radius="3.5" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_WHITE}"/>
		</rectangle>
		<box x="112" y="38" width="30" height="7" border="0" horizalign="Center" vertalign="Center" printif="{tk.ticketType}=VIP">
			<text>VIP ACCESS</text>
			<font family="Helvetica" style="B" size="8" color="{COLOR_VIP2}"/>
		</box>
		<box x="112" y="38" width="30" height="7" border="0" horizalign="Center" vertalign="Center" printif="{tk.ticketType}!=VIP">
			<text>STANDARD</text>
			<font family="Helvetica" style="B" size="8" color="{COLOR_STD1}"/>
		</box>

		<!-- Ticket holder -->
		<box x="17" y="56" width="85" height="4" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>TICKET HOLDER</text>
			<font family="Helvetica" style="B" size="7" color="{COLOR_GREY}"/>
		</box>
		<box x="17" y="60" width="85" height="9" border="{BORDER}" horizalign="Left" vertalign="Center" textfit="Resize">
			<text>{tk.holderName}</text>
			<font family="Helvetica" style="B" size="17" color="{COLOR_TEXT}"/>
		</box>
		<box x="17" y="69" width="85" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{tk.company}</text>
			<font family="Helvetica" style="N" size="9" color="{COLOR_GREY}"/>
		</box>
		<line x="17" y="78" width="85" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.2" color="{COLOR_LINE}"/>
		</line>

		<!-- Date, time and venue -->
		<font family="Helvetica" style="B" size="7" color="{COLOR_GREY}"/>
		<box x="17" y="81" width="40" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>DATE</text></box>
		<box x="62" y="81" width="40" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>DOORS OPEN</text></box>
		<box x="17" y="94" width="85" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>VENUE</text></box>
		<font family="Helvetica" style="B" size="10.5" color="{COLOR_TEXT}"/>
		<box x="17" y="85" width="45" height="6" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{EVENT_DATE}</text></box>
		<box x="62" y="85" width="40" height="6" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{EVENT_TIME}</text></box>
		<box x="17" y="98" width="85" height="6" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{VENUE_NAME}</text></box>
		<box x="17" y="104" width="85" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{VENUE_ADDRESS}</text>
			<font family="Helvetica" style="N" size="8.5" color="{COLOR_GREY}"/>
		</box>

		<!-- QR code: value = ticket URL -->
		<barcode x="106" y="55" width="37" height="37" type="QRCODE,M" value="https://{TICKETS_WEBSITE}/t/{tk.ticketNumber}" border="0" color="{COLOR_DARK}" backcolor="ffffff"/>
		<box x="104" y="93" width="41" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{tk.ticketNumber}</text>
			<font family="Courier" style="B" size="9" color="{COLOR_TEXT}"/>
		</box>
		<box x="104" y="98" width="41" height="4" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>Scan at the entrance</text>
			<font family="Helvetica" style="N" size="7" color="{COLOR_GREY}"/>
		</box>

		<!-- Zone, seat, gate and price -->
		<rectangle x1="17" y1="113" x2="142" y2="129" radius="2" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_SOFT}"/>
		</rectangle>
		<line x="48" y="116" width="1" height="10"><orientation>VerticallyLeft</orientation><linestyle width="0.2" color="{COLOR_LINE}"/></line>
		<line x="76" y="116" width="1" height="10"><orientation>VerticallyLeft</orientation><linestyle width="0.2" color="{COLOR_LINE}"/></line>
		<line x="104" y="116" width="1" height="10"><orientation>VerticallyLeft</orientation><linestyle width="0.2" color="{COLOR_LINE}"/></line>
		<font family="Helvetica" style="B" size="7" color="{COLOR_GREY}"/>
		<box x="20" y="115" width="27" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>ZONE</text></box>
		<box x="51" y="115" width="24" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>SEAT</text></box>
		<box x="79" y="115" width="24" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>ENTRANCE</text></box>
		<box x="107" y="115" width="33" height="4" border="{BORDER}" horizalign="Right" vertalign="Center"><text>PRICE</text></box>
		<font family="Helvetica" style="B" size="11.5" color="{COLOR_TEXT}"/>
		<box x="20" y="119" width="27" height="8" border="{BORDER}" horizalign="Left" vertalign="Center" textfit="Resize"><text>{tk.zone}</text></box>
		<box x="51" y="119" width="24" height="8" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{tk.seat}</text></box>
		<box x="79" y="119" width="24" height="8" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{tk.gate}</text></box>
		<box x="107" y="119" width="33" height="8" border="{BORDER}" horizalign="Right" vertalign="Center" format="C2"><text>{tk.price}</text></box>

		<box x="17" y="132" width="126" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>Valid for one entry  ·  Non-transferable  ·  Photo ID may be requested  ·  Organized by {ORGANIZER}</text>
			<font family="Helvetica" style="N" size="6.5" color="{COLOR_GREY}"/>
		</box>
	</content>

	<!-- ********************************** -->

	<content id="ticket_stub">
		<!-- Stub header: gold for VIP tickets, indigo for the others -->
		<box x="148" y="13" width="52" height="18" border="0" text="" printif="{tk.ticketType}=VIP">
			<fill type="L" color="{COLOR_VIP2}" color2="{COLOR_GOLD}" orientation="h"/>
		</box>
		<box x="148" y="13" width="52" height="18" border="0" text="" printif="{tk.ticketType}!=VIP">
			<fill type="L" color="{COLOR_STD2}" color2="{COLOR_STD1}" orientation="h"/>
		</box>
		<fill type="N"/>
		<box x="152" y="16" width="44" height="7" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>ADMIT ONE</text>
			<font family="Helvetica" style="B" size="12" color="{COLOR_WHITE}"/>
		</box>
		<box x="152" y="23" width="44" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{tk.ticketType} ticket</text>
			<font family="Helvetica" style="N" size="8" color="{COLOR_WHITE}"/>
		</box>

		<!-- Stub data -->
		<font family="Helvetica" style="B" size="6.5" color="{COLOR_GREY}"/>
		<box x="154" y="36" width="42" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>EVENT</text></box>
		<box x="154" y="48" width="42" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>DATE</text></box>
		<box x="154" y="60" width="42" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>HOLDER</text></box>
		<box x="154" y="72" width="20" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>SEAT</text></box>
		<box x="176" y="72" width="20" height="4" border="{BORDER}" horizalign="Left" vertalign="Center"><text>ENTRANCE</text></box>
		<font family="Helvetica" style="B" size="9" color="{COLOR_TEXT}"/>
		<box x="154" y="40" width="42" height="5" border="{BORDER}" horizalign="Left" vertalign="Center" textfit="Resize"><text>{EVENT_NAME} {EVENT_EDITION}</text></box>
		<box x="154" y="52" width="42" height="5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{EVENT_DATE_SHORT}</text></box>
		<box x="154" y="64" width="42" height="5" border="{BORDER}" horizalign="Left" vertalign="Center" textfit="Resize"><text>{tk.holderName}</text></box>
		<box x="154" y="76" width="20" height="5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{tk.seat}</text></box>
		<box x="176" y="76" width="20" height="5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{tk.gate}</text></box>
		<box x="154" y="84" width="20" height="4" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>ZONE</text>
			<font family="Helvetica" style="B" size="6.5" color="{COLOR_GREY}"/>
		</box>
		<box x="176" y="84" width="20" height="4" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>PRICE</text>
			<font family="Helvetica" style="B" size="6.5" color="{COLOR_GREY}"/>
		</box>
		<box x="154" y="88" width="22" height="5" border="{BORDER}" horizalign="Left" vertalign="Center" textfit="Resize"><text>{tk.zone}</text></box>
		<box x="176" y="88" width="21" height="5" border="{BORDER}" horizalign="Left" vertalign="Center" format="C0"><text>{tk.price}</text></box>

		<!-- 1D barcode with the ticket number (the value is printed below the bars) -->
		<barcode x="151" y="99" width="46" height="25" type="C128" value="{tk.ticketNumber}" border="0" color="{COLOR_TEXT}" backcolor="ffffff"/>
		<box x="152" y="130" width="44" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>Stub - keep for re-entry</text>
			<font family="Helvetica" style="I" size="6.5" color="{COLOR_GREY}"/>
		</box>

		<!-- Perforation: dotted line and two half-circle notches -->
		<line x="148" y="17" width="1" height="120">
			<orientation>VerticallyLeft</orientation>
			<linestyle width="0.4" color="{COLOR_LINE}" dash="1.2,1.4"/>
		</line>
		<circle x="148" y="13" r="3.5" angstart="180" angend="360">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="S" color="{COLOR_WHITE}"/>
		</circle>
		<circle x="148" y="141" r="3.5" angstart="0" angend="180">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="S" color="{COLOR_WHITE}"/>
		</circle>
	</content>

</pdf>
