<pdf>

	<version>1.0.0</version>
	<title>PDF Template Demo - Conference badges</title>
	<date>2026-10-05</date>
	<note>Name badges demo: 8 badges per page in 2 columns (section columns), attendees read from a CSV file (DataProviderCSV)</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 Conference Badges Demo</title>
		<subject>Copyright (C) 2026 - Alien Project</subject>
		<keywords>badge, name tag, conference, event, columns, qr code, csv, pdf, example</keywords>
	</doc_info>

	<!-- Section without data provider: a new page for every 8 badges, with header and footer -->
	<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_SPEAKER" value="e11d48"/>
		<setvar name="COLOR_STAFF" value="059669"/>
		<setvar name="COLOR_ATTENDEE" value="4338ca"/>
		<setvar name="COLOR_LINE" value="cfd4e0"/>
		<setvar name="COLOR_TEXT" value="1f2333"/>
		<setvar name="COLOR_GREY" value="6b7280"/>
		<setvar name="COLOR_WHITE" value="ffffff"/>

		<print_content>sheet_header</print_content>

		<!-- 2 columns x 4 lines = 8 badges per page: rows fill the page from left to right, then on the next line.
		     column_width / row_height: distance between the badges (badge size 90 x 65 mm) -->
		<section id="badge" row_height="69" rows_count="4" columns="2" column_width="96">
			<print_content>badge</print_content>
		</section>
	</section>

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

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

	<content id="sheet_header">
		<box x="12" y="5" width="120" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{EVENT_NAME} {EVENT_EDITION}  ·  Name badges</text>
			<font family="Helvetica" style="B" size="7.5" color="{COLOR_GREY}"/>
		</box>
		<box x="132" y="5" width="66" height="5" border="{BORDER}" horizalign="Right" vertalign="Center">
			<text>Cut along the outlines  ·  Sheet {PAGEINDEX} of {PAGECOUNT}</text>
			<font family="Helvetica" style="N" size="7.5" color="{COLOR_GREY}"/>
		</box>
	</content>

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

	<content id="badge">
		<!-- Coordinates of the first badge (top left): the others are moved by column_width and row_height -->
		<rectangle x1="12" y1="14" x2="102" y2="79" radius="0" border="0000">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="N"/>
		</rectangle>

		<!-- Header band with the event name -->
		<box x="12" y="14" width="90" height="16" border="0" text="">
			<fill type="L" color="{COLOR_STD1}" color2="{COLOR_STD2}" orientation="h"/>
		</box>
		<fill type="N"/>
		<opacity value="0.18"/>
		<circle x="91" y="22" r="7"><linestyle width="0.7" color="{COLOR_WHITE}"/><fill type="N"/></circle>
		<circle x="91" y="22" r="4"><linestyle width="0.7" color="{COLOR_WHITE}"/><fill type="N"/></circle>
		<opacity value="1"/>
		<box x="17" y="17" width="70" height="6" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{EVENT_NAME} {EVENT_EDITION}</text>
			<font family="Helvetica" style="B" size="10.5" color="{COLOR_WHITE}"/>
		</box>
		<box x="17" y="23" width="70" height="4" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{EVENT_INFO}</text>
			<font family="Helvetica" style="N" size="7" color="{COLOR_WHITE}"/>
		</box>

		<!-- Attendee name, company and role -->
		<box x="17" y="34" width="56" height="10" border="{BORDER}" horizalign="Left" vertalign="Center" textfit="Resize">
			<text>{badge.firstName}</text>
			<font family="Helvetica" style="B" size="22" color="{COLOR_TEXT}"/>
		</box>
		<box x="17" y="44" width="56" height="6" border="{BORDER}" horizalign="Left" vertalign="Center" textfit="Resize">
			<text>{badge.lastName}</text>
			<font family="Helvetica" style="N" size="13" color="{COLOR_TEXT}"/>
		</box>
		<line x="17" y="52" width="12" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.6" color="{COLOR_STD2}"/>
		</line>
		<box x="17" y="54" width="56" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{badge.company}</text>
			<font family="Helvetica" style="B" size="8.5" color="{COLOR_STD1}"/>
		</box>
		<box x="17" y="59" width="56" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{badge.role}</text>
			<font family="Helvetica" style="N" size="8" color="{COLOR_GREY}"/>
		</box>

		<!-- QR code with the contact data (MECARD format): scan to save the contact -->
		<barcode x="75" y="34" width="23" height="23" type="QRCODE,M" value="MECARD:N:{badge.lastName},{badge.firstName};ORG:{badge.company};TITLE:{badge.role};EMAIL:{badge.email};;" border="0" color="{COLOR_DARK}" backcolor="ffffff"/>
		<box x="73" y="58" width="27" height="4" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{badge.badgeId}</text>
			<font family="Helvetica" style="N" size="6.5" color="{COLOR_GREY}"/>
		</box>

		<!-- Ribbon: the color depends on the attendee type (printif) -->
		<rectangle x1="12" y1="67" x2="102" y2="79" radius="0" border="0000" printif="{badge.attendeeType}=Speaker">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_SPEAKER}"/>
		</rectangle>
		<rectangle x1="12" y1="67" x2="102" y2="79" radius="0" border="0000" printif="{badge.attendeeType}=Staff">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_STAFF}"/>
		</rectangle>
		<rectangle x1="12" y1="67" x2="102" y2="79" radius="0" border="0000" printif="{badge.attendeeType}=Attendee">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_ATTENDEE}"/>
		</rectangle>
		<fill type="N"/>
		<box x="17" y="67" width="50" height="12" border="{BORDER}" horizalign="Left" vertalign="Center" printif="{badge.attendeeType}=Speaker">
			<text>S P E A K E R</text>
			<font family="Helvetica" style="B" size="12" color="{COLOR_WHITE}"/>
		</box>
		<box x="17" y="67" width="50" height="12" border="{BORDER}" horizalign="Left" vertalign="Center" printif="{badge.attendeeType}=Staff">
			<text>S T A F F</text>
			<font family="Helvetica" style="B" size="12" color="{COLOR_WHITE}"/>
		</box>
		<box x="17" y="67" width="50" height="12" border="{BORDER}" horizalign="Left" vertalign="Center" printif="{badge.attendeeType}=Attendee">
			<text>A T T E N D E E</text>
			<font family="Helvetica" style="B" size="12" color="{COLOR_WHITE}"/>
		</box>
		<box x="67" y="67" width="31" height="12" border="{BORDER}" horizalign="Right" vertalign="Center">
			<text>{EVENT_HASHTAG}</text>
			<font family="Helvetica" style="N" size="8" color="{COLOR_WHITE}"/>
		</box>
	</content>

</pdf>
