<pdf>

	<version>1.0.0</version>
	<title>PDF Template Demo - Certificate of completion</title>
	<date>2026-10-05</date>
	<note>Certificate demo: mail merge, one page for each participant read from a CSV file (DataProviderCSV)</note>

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

	<doc_info>
		<creator>Alien Project</creator>
		<author>#MBR</author>
		<title>PDF Certificate Demo</title>
		<subject>Copyright (C) 2026 - Alien Project</subject>
		<keywords>certificate, completion, course, mail merge, csv, pdf, example</keywords>
	</doc_info>

	<section id="cert" rows_count="1">
		<!-- A new landscape page is generated for each participant (data row of the "cert" section) -->
		<page format="A4" orientation="L"/>

		<!-- For debug, set BORDER=1 to check the box sizes -->
		<setvar name="BORDER" value="0"/>
		<setvar name="COLOR_DARK" value="1b2f4b"/>
		<setvar name="COLOR_DARK2" value="0e1a2b"/>
		<setvar name="COLOR_ACCENT" value="2e5c8a"/>
		<setvar name="COLOR_GOLD" value="b8913a"/>
		<setvar name="COLOR_GOLD_DARK" value="8f6c22"/>
		<setvar name="COLOR_GOLD_LIGHT" value="eadcb4"/>
		<setvar name="COLOR_TEXT" value="2b2b2b"/>
		<setvar name="COLOR_GREY" value="6c757d"/>
		<setvar name="COLOR_WHITE" value="ffffff"/>

		<print_content>cert_frame</print_content>
		<print_content>cert_band</print_content>
		<print_content>cert_body</print_content>
		<print_content>cert_signatures</print_content>
	</section>

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

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

	<content id="cert_frame">
		<!-- Double frame: thick dark outer line, thin gold inner line -->
		<rectangle x1="6" y1="6" x2="291" y2="204" radius="0" border="0000">
			<linestyle width="1.2" color="{COLOR_DARK}"/>
			<fill type="N"/>
		</rectangle>
		<rectangle x1="10" y1="10" x2="287" y2="200" radius="0" border="0000">
			<linestyle width="0.35" color="{COLOR_GOLD}"/>
			<fill type="N"/>
		</rectangle>
		<!-- Gold corner ornaments -->
		<circle x="10" y="10" r="1.6"><linestyle width="0"/><fill type="S" color="{COLOR_GOLD}"/></circle>
		<circle x="287" y="10" r="1.6"><linestyle width="0"/><fill type="S" color="{COLOR_GOLD}"/></circle>
		<circle x="10" y="200" r="1.6"><linestyle width="0"/><fill type="S" color="{COLOR_GOLD}"/></circle>
		<circle x="287" y="200" r="1.6"><linestyle width="0"/><fill type="S" color="{COLOR_GOLD}"/></circle>
	</content>

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

	<content id="cert_band">
		<!-- Left band with a vertical gradient -->
		<box x="10" y="10" width="72" height="190" border="0" text="">
			<fill type="L" color="{COLOR_DARK}" color2="{COLOR_DARK2}" orientation="v"/>
		</box>
		<fill type="N"/>
		<line x="80" y="10" width="1" height="190">
			<orientation>VerticallyLeft</orientation>
			<linestyle width="0.8" color="{COLOR_GOLD}"/>
		</line>

		<!-- Academy logo drawn with circles -->
		<circle x="46" y="40" r="14"><linestyle width="0.5" color="{COLOR_GOLD}"/><fill type="N"/></circle>
		<circle x="46" y="40" r="11.5"><linestyle width="0"/><fill type="S" color="{COLOR_GOLD}"/></circle>
		<box x="34.5" y="34" width="23" height="12" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{ACADEMY_INITIALS}</text>
			<font family="Helvetica" style="B" size="20" color="{COLOR_DARK}"/>
		</box>
		<box x="14" y="59" width="64" height="8" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{ACADEMY_NAME}</text>
			<font family="Helvetica" style="B" size="13" color="{COLOR_WHITE}"/>
		</box>
		<box x="14" y="67" width="64" height="6" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{ACADEMY_TAGLINE}</text>
			<font family="Helvetica" style="N" size="8.5" color="{COLOR_GOLD_LIGHT}"/>
		</box>
		<line x="36" y="80" width="20" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.4" color="{COLOR_GOLD}"/>
		</line>

		<!-- Course code -->
		<box x="14" y="88" width="64" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>COURSE CODE</text>
			<font family="Helvetica" style="B" size="7" color="{COLOR_GOLD}"/>
		</box>
		<box x="14" y="94" width="64" height="7" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{cert.courseCode}</text>
			<font family="Helvetica" style="B" size="12" color="{COLOR_WHITE}"/>
		</box>

		<!-- QR code to verify the certificate online -->
		<rectangle x1="27" y1="134" x2="65" y2="172" radius="2" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_WHITE}"/>
		</rectangle>
		<barcode x="29" y="136" width="34" height="34" type="QRCODE,M" value="https://{ACADEMY_WEBSITE}/verify/{cert.certId}" border="0" color="{COLOR_DARK}" backcolor="ffffff"/>
		<box x="14" y="175" width="64" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>SCAN TO VERIFY</text>
			<font family="Helvetica" style="B" size="7.5" color="{COLOR_GOLD}"/>
		</box>
		<box x="14" y="180" width="64" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{ACADEMY_WEBSITE}/verify</text>
			<font family="Helvetica" style="N" size="7" color="{COLOR_GOLD_LIGHT}"/>
		</box>
	</content>

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

	<content id="cert_body">
		<fill type="N"/>
		<!-- Title -->
		<box x="92" y="24" width="186" height="14" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>CERTIFICATE</text>
			<font family="Helvetica" style="B" size="34" color="{COLOR_DARK}"/>
		</box>
		<box x="92" y="39" width="186" height="7" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>O F   C O M P L E T I O N</text>
			<font family="Helvetica" style="B" size="12" color="{COLOR_GOLD}"/>
		</box>
		<!-- Small ornament: two lines and a dot -->
		<line x="160" y="52" width="20" height="1"><orientation>HorizontallyTop</orientation><linestyle width="0.4" color="{COLOR_GOLD}"/></line>
		<line x="190" y="52" width="20" height="1"><orientation>HorizontallyTop</orientation><linestyle width="0.4" color="{COLOR_GOLD}"/></line>
		<circle x="185" y="52" r="1.2"><linestyle width="0"/><fill type="S" color="{COLOR_GOLD}"/></circle>

		<box x="92" y="59" width="186" height="7" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>This is to certify that</text>
			<font family="Helvetica" style="I" size="11" color="{COLOR_GREY}"/>
		</box>
		<!-- Recipient name -->
		<box x="92" y="68" width="186" height="16" border="{BORDER}" horizalign="Center" vertalign="Center" textfit="Resize">
			<text>{cert.recipientName}</text>
			<font family="Helvetica" style="B" size="32" color="{COLOR_DARK}"/>
		</box>
		<line x="125" y="86" width="120" height="1"><orientation>HorizontallyTop</orientation><linestyle width="0.3" color="{COLOR_GOLD}"/></line>

		<box x="92" y="90" width="186" height="7" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>has successfully completed the training course</text>
			<font family="Helvetica" style="I" size="11" color="{COLOR_GREY}"/>
		</box>
		<!-- Course title -->
		<box x="92" y="98" width="186" height="11" border="{BORDER}" horizalign="Center" vertalign="Center" textfit="Resize">
			<text>{cert.courseTitle}</text>
			<font family="Helvetica" style="B" size="18" color="{COLOR_ACCENT}"/>
		</box>

		<!-- Course details: date, duration, final score -->
		<line x="140" y="116" width="1" height="15"><orientation>VerticallyLeft</orientation><linestyle width="0.3" color="{COLOR_GOLD_LIGHT}"/></line>
		<line x="230" y="116" width="1" height="15"><orientation>VerticallyLeft</orientation><linestyle width="0.3" color="{COLOR_GOLD_LIGHT}"/></line>
		<font family="Helvetica" style="B" size="7.5" color="{COLOR_GOLD}"/>
		<box x="95" y="116" width="40" height="5" border="{BORDER}" horizalign="Center" vertalign="Center"><text>COMPLETED ON</text></box>
		<box x="145" y="116" width="80" height="5" border="{BORDER}" horizalign="Center" vertalign="Center"><text>DURATION</text></box>
		<box x="235" y="116" width="40" height="5" border="{BORDER}" horizalign="Center" vertalign="Center"><text>FINAL SCORE</text></box>
		<font family="Helvetica" style="B" size="11" color="{COLOR_TEXT}"/>
		<box x="95" y="122" width="40" height="8" border="{BORDER}" horizalign="Center" vertalign="Center"><text>{cert.completionDate}</text></box>
		<box x="145" y="122" width="80" height="8" border="{BORDER}" horizalign="Center" vertalign="Center"><text>{cert.hours} hours</text></box>
		<box x="235" y="122" width="40" height="8" border="{BORDER}" horizalign="Center" vertalign="Center"><text>{cert.score}</text></box>
	</content>

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

	<content id="cert_signatures">
		<fill type="N"/>
		<!-- Director signature -->
		<box x="95" y="152" width="68" height="12" border="{BORDER}" horizalign="Center" vertalign="Bottom">
			<text>{DIRECTOR_NAME}</text>
			<font family="Helvetica" style="I" size="15" color="{COLOR_ACCENT}"/>
		</box>
		<line x="100" y="167" width="58" height="1"><orientation>HorizontallyTop</orientation><linestyle width="0.3" color="{COLOR_DARK}"/></line>
		<box x="95" y="168" width="68" height="6" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{DIRECTOR_NAME}</text>
			<font family="Helvetica" style="B" size="10" color="{COLOR_TEXT}"/>
		</box>
		<box x="95" y="174" width="68" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{DIRECTOR_ROLE}</text>
			<font family="Helvetica" style="N" size="8.5" color="{COLOR_GREY}"/>
		</box>

		<!-- Instructor signature -->
		<box x="207" y="152" width="68" height="12" border="{BORDER}" horizalign="Center" vertalign="Bottom">
			<text>{cert.instructor}</text>
			<font family="Helvetica" style="I" size="15" color="{COLOR_ACCENT}"/>
		</box>
		<line x="212" y="167" width="58" height="1"><orientation>HorizontallyTop</orientation><linestyle width="0.3" color="{COLOR_DARK}"/></line>
		<box x="207" y="168" width="68" height="6" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{cert.instructor}</text>
			<font family="Helvetica" style="B" size="10" color="{COLOR_TEXT}"/>
		</box>
		<box x="207" y="174" width="68" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>Course Instructor</text>
			<font family="Helvetica" style="N" size="8.5" color="{COLOR_GREY}"/>
		</box>

		<!-- Seal: ribbon tails (rotated boxes) and concentric circles -->
		<box x="178" y="168" width="7" height="20" border="0" text="" rotate="-25">
			<fill type="S" color="{COLOR_GOLD_DARK}"/>
		</box>
		<box x="186" y="171" width="7" height="20" border="0" text="" rotate="25">
			<fill type="S" color="{COLOR_GOLD_DARK}"/>
		</box>
		<fill type="N"/>
		<circle x="185" y="162" r="16"><linestyle width="0"/><fill type="S" color="{COLOR_GOLD}"/></circle>
		<circle x="185" y="162" r="14"><linestyle width="0.4" color="{COLOR_WHITE}"/><fill type="N"/></circle>
		<circle x="185" y="162" r="11"><linestyle width="0"/><fill type="S" color="{COLOR_GOLD_DARK}"/></circle>
		<box x="172" y="154" width="26" height="4" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>CERTIFIED</text>
			<font family="Helvetica" style="B" size="6" color="{COLOR_GOLD_LIGHT}"/>
		</box>
		<box x="172" y="158" width="26" height="8" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>2026</text>
			<font family="Helvetica" style="B" size="15" color="{COLOR_WHITE}"/>
		</box>
		<box x="172" y="166" width="26" height="4" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{ACADEMY_INITIALS}</text>
			<font family="Helvetica" style="B" size="6" color="{COLOR_GOLD_LIGHT}"/>
		</box>

		<!-- Certificate ID -->
		<box x="92" y="188" width="186" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>Certificate ID {cert.certId}   ·   Verify this certificate at {ACADEMY_WEBSITE}/verify/{cert.certId}</text>
			<font family="Helvetica" style="N" size="7.5" color="{COLOR_GREY}"/>
		</box>
	</content>

</pdf>
