<pdf>

	<version>1.0.0</version>
	<title>PDF Template Demo - Delivery note</title>
	<date>2026-10-05</date>
	<note>Delivery note demo: master / detail sections bound to an XML file (DataProviderXML)</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 Delivery Note Demo</title>
		<subject>Copyright (C) 2026 - Alien Project</subject>
		<keywords>delivery note, packing slip, shipping, xml, pdf, example</keywords>
	</doc_info>

	<section id="dn" y_start="0" rows_count="1">
		<!-- One page for each <delivery> element (XPath /deliveries/delivery) -->
		<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="263540"/>
		<setvar name="COLOR_ACCENT" value="e07a1f"/>
		<setvar name="COLOR_LIGHT" value="f5b77c"/>
		<setvar name="COLOR_SOFT" value="fbf3ea"/>
		<setvar name="COLOR_LINE" value="e6dcd1"/>
		<setvar name="COLOR_TEXT" value="222222"/>
		<setvar name="COLOR_GREY" value="6c757d"/>
		<setvar name="COLOR_WHITE" value="ffffff"/>
		<!-- Number format: 1,234.5 -->
		<setvar name="NUMERICDECIMALSEPARATOR" value="."/>
		<setvar name="NUMERICTHOUSANDSEPARATOR" value=","/>

		<print_content>dn_header</print_content>
		<print_content>dn_details_header</print_content>

		<section id="dn_det" row_height="7.5" rows_count="12">
			<!-- The <line> elements of the current delivery: XPath /deliveries/delivery[@number="{dn.number}"]/line -->
			<print_content>dn_details_row</print_content>
		</section>

		<print_content>dn_footer</print_content>
	</section>

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

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

	<content id="dn_header">
		<!-- Top band with the sender (our company) -->
		<box x="0" y="0" width="210" height="36" border="0" text="">
			<fill type="S" color="{COLOR_DARK}"/>
		</box>
		<fill type="N"/>
		<rectangle x1="0" y1="36" x2="210" y2="37.5" radius="0" border="0000">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_ACCENT}"/>
		</rectangle>

		<!-- Logo drawn with shapes: three stacked boxes -->
		<rectangle x1="18.6" y1="9" x2="25.4" y2="15.8" radius="0.8" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_LIGHT}"/>
		</rectangle>
		<rectangle x1="15" y1="16.6" x2="21.8" y2="23.4" radius="0.8" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_ACCENT}"/>
		</rectangle>
		<rectangle x1="22.2" y1="16.6" x2="29" y2="23.4" radius="0.8" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_ACCENT}"/>
		</rectangle>
		<fill type="N"/>

		<box x="33" y="8" width="95" height="8" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{COMPANY_NAME}</text>
			<font family="Helvetica" style="B" size="14" color="{COLOR_WHITE}"/>
		</box>
		<box x="33" y="17" width="95" height="14" border="{BORDER}" horizalign="Left" vertalign="Top">
			<text>{COMPANY_ADDRESS} - {COMPANY_CITY}
Phone {COMPANY_PHONE} - {COMPANY_EMAIL}
{COMPANY_WEBSITE} - {COMPANY_VAT}</text>
			<font family="Helvetica" style="N" size="8" color="c3ccd3"/>
		</box>
		<box x="120" y="7" width="75" height="10" border="{BORDER}" horizalign="Right" vertalign="Center">
			<text>DELIVERY NOTE</text>
			<font family="Helvetica" style="B" size="20" color="{COLOR_WHITE}"/>
		</box>
		<box x="120" y="18" width="75" height="6" border="{BORDER}" horizalign="Right" vertalign="Center">
			<text>No. {dn.number}</text>
			<font family="Helvetica" style="B" size="11" color="{COLOR_LIGHT}"/>
		</box>
		<box x="120" y="24" width="75" height="6" border="{BORDER}" horizalign="Right" vertalign="Center">
			<text>Date {dn.date}</text>
			<font family="Helvetica" style="N" size="9" color="c3ccd3"/>
		</box>

		<!-- Consignee (customer) and destination (ship to) -->
		<box x="15" y="44" width="65" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>CONSIGNEE</text>
			<font family="Helvetica" style="B" size="8" color="{COLOR_ACCENT}"/>
		</box>
		<box x="15" y="50" width="65" height="6" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{dn.consigneeName}</text>
			<font family="Helvetica" style="B" size="10" color="{COLOR_TEXT}"/>
		</box>
		<box x="15" y="56" width="65" height="16" border="{BORDER}" horizalign="Left" vertalign="Top">
			<text>{dn.consigneeAddress}
{dn.consigneeCity}
{dn.consigneeVat}</text>
			<font family="Helvetica" style="N" size="8.5" color="{COLOR_TEXT}"/>
		</box>
		<line x="15" y="49.5" width="65" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.3" color="{COLOR_LINE}"/>
		</line>

		<box x="85" y="44" width="65" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>DESTINATION (SHIP TO)</text>
			<font family="Helvetica" style="B" size="8" color="{COLOR_ACCENT}"/>
		</box>
		<box x="85" y="50" width="65" height="6" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{dn.destName}</text>
			<font family="Helvetica" style="B" size="10" color="{COLOR_TEXT}"/>
		</box>
		<box x="85" y="56" width="65" height="16" border="{BORDER}" horizalign="Left" vertalign="Top">
			<text>{dn.destAddress}
{dn.destCity}
{dn.destContact}</text>
			<font family="Helvetica" style="N" size="8.5" color="{COLOR_TEXT}"/>
		</box>
		<line x="85" y="49.5" width="65" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.3" color="{COLOR_LINE}"/>
		</line>

		<!-- Shipment barcode (Code 128) -->
		<rectangle x1="155" y1="43" x2="195" y2="74" radius="1.5" border="1111">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="N"/>
		</rectangle>
		<box x="155" y="44" width="40" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>SHIPMENT</text>
			<font family="Helvetica" style="B" size="7" color="{COLOR_GREY}"/>
		</box>
		<barcode x="157.5" y="50" width="35" height="21" type="C128" value="{dn.shipmentNo}" border="0"/>

		<!-- Transport data -->
		<rectangle x1="15" y1="80" x2="195" y2="107" radius="1.5" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_SOFT}"/>
		</rectangle>
		<fill type="N"/>
		<line x="15" y="89" width="180" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.3" color="{COLOR_WHITE}"/>
		</line>
		<line x="15" y="98" width="180" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.3" color="{COLOR_WHITE}"/>
		</line>
		<line x="60" y="80" width="1" height="27">
			<orientation>VerticallyLeft</orientation>
			<linestyle width="0.3" color="{COLOR_WHITE}"/>
		</line>
		<line x="105" y="80" width="1" height="9">
			<orientation>VerticallyLeft</orientation>
			<linestyle width="0.3" color="{COLOR_WHITE}"/>
		</line>
		<line x="105" y="98" width="1" height="9">
			<orientation>VerticallyLeft</orientation>
			<linestyle width="0.3" color="{COLOR_WHITE}"/>
		</line>
		<line x="150" y="80" width="1" height="27">
			<orientation>VerticallyLeft</orientation>
			<linestyle width="0.3" color="{COLOR_WHITE}"/>
		</line>

		<!-- Labels -->
		<font family="Helvetica" style="N" size="6.5" color="{COLOR_GREY}"/>
		<box x="18" y="80.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>TRANSPORT REASON</text></box>
		<box x="63" y="80.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>ORDER REFERENCE</text></box>
		<box x="108" y="80.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>ORDER DATE</text></box>
		<box x="153" y="80.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>CUSTOMER CODE</text></box>
		<box x="18" y="89.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>TRANSPORT BY</text></box>
		<box x="63" y="89.8" width="85" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>CARRIER</text></box>
		<box x="153" y="89.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>FREIGHT TERMS</text></box>
		<box x="18" y="98.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>START OF TRANSPORT</text></box>
		<box x="63" y="98.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>APPEARANCE OF GOODS</text></box>
		<box x="108" y="98.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>PACKAGES</text></box>
		<box x="153" y="98.8" width="40" height="3.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>GROSS WEIGHT</text></box>

		<!-- Values -->
		<font family="Helvetica" style="B" size="9" color="{COLOR_TEXT}"/>
		<box x="18" y="84.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.reason}</text></box>
		<box x="63" y="84.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.orderRef}</text></box>
		<box x="108" y="84.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.orderDate}</text></box>
		<box x="153" y="84.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.customerCode}</text></box>
		<box x="18" y="93.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.transportBy}</text></box>
		<box x="63" y="93.3" width="85" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.carrier}</text></box>
		<box x="153" y="93.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.freightTerms}</text></box>
		<box x="18" y="102.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.startDate}</text></box>
		<box x="63" y="102.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.appearance}</text></box>
		<box x="108" y="102.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>{dn.packages}</text></box>
		<box x="153" y="102.3" width="40" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center" format="C1 kg"><text>{dn.grossWeight}</text></box>
	</content>

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

	<content id="dn_details_header">
		<rectangle x1="15" y1="112" x2="195" y2="119" radius="1.5" border="1111">
			<linestyle width="0"/>
			<fill type="S" color="{COLOR_DARK}"/>
		</rectangle>
		<fill type="N"/>
		<font family="Helvetica" style="B" size="7.5" color="{COLOR_WHITE}"/>
		<box x="18" y="112" width="22" height="7" border="{BORDER}" horizalign="Left" vertalign="Center"><text>CODE</text></box>
		<box x="40" y="112" width="80" height="7" border="{BORDER}" horizalign="Left" vertalign="Center"><text>DESCRIPTION</text></box>
		<box x="120" y="112" width="43" height="7" border="{BORDER}" horizalign="Left" vertalign="Center"><text>LOT / SERIAL NO.</text></box>
		<box x="163" y="112" width="14" height="7" border="{BORDER}" horizalign="Center" vertalign="Center"><text>UNIT</text></box>
		<box x="177" y="112" width="15" height="7" border="{BORDER}" horizalign="Right" vertalign="Center"><text>QTY</text></box>
	</content>

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

	<content id="dn_details_row">
		<fill type="N"/>
		<box x="18" y="119" width="22" height="7.5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{dn_det.code}</text>
			<font family="Helvetica" style="B" size="8" color="{COLOR_DARK}"/>
		</box>
		<box x="40" y="119" width="80" height="7.5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{dn_det.description}</text>
			<font family="Helvetica" style="N" size="8.5" color="{COLOR_TEXT}"/>
		</box>
		<box x="120" y="119" width="43" height="7.5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>{dn_det.lot}</text>
			<font family="Helvetica" style="N" size="8" color="{COLOR_GREY}"/>
		</box>
		<box x="163" y="119" width="14" height="7.5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>{dn_det.unit}</text>
			<font family="Helvetica" style="N" size="8" color="{COLOR_GREY}"/>
		</box>
		<box x="177" y="119" width="15" height="7.5" border="{BORDER}" horizalign="Right" vertalign="Center">
			<text>{dn_det.qty}</text>
			<font family="Helvetica" style="B" size="9" color="{COLOR_TEXT}"/>
		</box>
		<line x="15" y="126.5" width="180" height="1">
			<orientation>HorizontallyTop</orientation>
			<linestyle width="0.2" color="{COLOR_LINE}"/>
		</line>
	</content>

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

	<content id="dn_footer">
		<fill type="N"/>

		<!-- Notes -->
		<box x="15" y="213" width="105" height="5" border="{BORDER}" horizalign="Left" vertalign="Center">
			<text>NOTES</text>
			<font family="Helvetica" style="B" size="8" color="{COLOR_ACCENT}"/>
		</box>
		<box x="15" y="219" width="105" height="19" border="{BORDER}" horizalign="Left" vertalign="Top">
			<text>{dn.notes}</text>
			<font family="Helvetica" style="N" size="8.5" color="{COLOR_TEXT}"/>
		</box>

		<!-- Shipment summary -->
		<rectangle x1="128" y1="213" x2="195" y2="238" radius="1.5" border="1111">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="N"/>
		</rectangle>
		<font family="Helvetica" style="N" size="8.5" color="{COLOR_GREY}"/>
		<box x="131" y="214" width="35" height="5.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Total quantity</text></box>
		<box x="131" y="220" width="35" height="5.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Packages</text></box>
		<box x="131" y="226" width="35" height="5.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Net weight</text></box>
		<box x="131" y="232" width="35" height="5.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Gross weight</text></box>
		<font family="Helvetica" style="B" size="9" color="{COLOR_TEXT}"/>
		<box x="160" y="214" width="32" height="5.5" border="{BORDER}" horizalign="Right" vertalign="Center"><text>{dn.totalQty}</text></box>
		<box x="160" y="220" width="32" height="5.5" border="{BORDER}" horizalign="Right" vertalign="Center"><text>{dn.packages}</text></box>
		<box x="160" y="226" width="32" height="5.5" border="{BORDER}" horizalign="Right" vertalign="Center" format="C1 kg"><text>{dn.netWeight}</text></box>
		<box x="160" y="232" width="32" height="5.5" border="{BORDER}" horizalign="Right" vertalign="Center" format="C1 kg">
			<text>{dn.grossWeight}</text>
			<font family="Helvetica" style="B" size="9" color="{COLOR_ACCENT}"/>
		</box>

		<!-- Signatures: carrier, recipient, sender -->
		<rectangle x1="15" y1="245" x2="72" y2="274" radius="1.5" border="1111">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="N"/>
		</rectangle>
		<rectangle x1="76.5" y1="245" x2="133.5" y2="274" radius="1.5" border="1111">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="N"/>
		</rectangle>
		<rectangle x1="138" y1="245" x2="195" y2="274" radius="1.5" border="1111">
			<linestyle width="0.3" color="{COLOR_LINE}"/>
			<fill type="N"/>
		</rectangle>
		<font family="Helvetica" style="B" size="7.5" color="{COLOR_DARK}"/>
		<box x="18" y="246" width="52" height="5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Driver / carrier</text></box>
		<box x="79.5" y="246" width="52" height="5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Recipient</text></box>
		<box x="141" y="246" width="52" height="5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Sender</text></box>
		<font family="Helvetica" style="N" size="6.5" color="{COLOR_GREY}"/>
		<box x="18" y="268" width="52" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Name, date and signature</text></box>
		<box x="79.5" y="268" width="52" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>Goods received in good condition</text></box>
		<box x="141" y="268" width="52" height="4.5" border="{BORDER}" horizalign="Left" vertalign="Center"><text>For {COMPANY_NAME}</text></box>

		<box x="15" y="281" width="180" height="5" border="{BORDER}" horizalign="Center" vertalign="Center">
			<text>Delivery note {dn.number} of {dn.date} - Order {dn.orderRef} - {COMPANY_NAME} - {COMPANY_WEBSITE}</text>
			<font family="Helvetica" style="I" size="7" color="{COLOR_GREY}"/>
		</box>
	</content>

</pdf>
