<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?> 
<!DOCTYPE document SYSTEM "rml_1_0.dtd"> 
<document filename="sample_purchase_order.pdf"> 

<template pageSize="(21cm, 29.7cm)"
        leftMargin="1.5cm"
        rightMargin="1.5cm"
        topMargin="1.5cm"
        bottomMargin="1.5cm"
        title="Sample Purchase Order"
        author="Reportlab Inc"
        showBoundary = "1"
        allowSplitting = "20"
        >
        <!-- showBoundary means that we will be able to see the limits of frames -->
        
	<pageTemplate id="main">
	    <pageGraphics>
        </pageGraphics>

        <frame id="main" x1="1.5cm" y1="1.5cm" width="18cm" height="26.7cm"/>

	</pageTemplate>
</template>

<stylesheet>
	<initialize>
	</initialize>

	<paraStyle name="titleBox"
	fontName="Helvetica-Bold"
	fontSize="18"
	spaceBefore = "0.4 cm"
	alignment = "CENTER"
	/>
	
	<paraStyle name="body"
	fontName="Helvetica"
	fontSize="10"
	leftIndent = "5"
	spaceAfter = "5"
	/>

    <paraStyle name="tableHeader"
	spaceBefore = "-2"
	alignment = "CENTER"
    />

    <blockTableStyle id="Header">
    <blockAlignment value="CENTER"/>
    <blockFont name="Helvetica-Bold" size="24"/>
    <blockTopPadding length="12"/>
    <blockBottomPadding length="12"/>
    <blockTextColor colorName="white"/>
    <blockBackground colorName="black"/>
    </blockTableStyle>  

    <blockTableStyle id="Table">
    <blockAlignment value="CENTER" start="0,0" stop="5,0"/>
    <blockBackground colorName="lightgrey" start="0,2" stop="5,2"/>
    <blockBackground colorName="lightgrey" start="0,4" stop="5,4"/>
    <blockBackground colorName="lightgrey" start="0,6" stop="5,6"/>
    <blockBackground colorName="lightgrey" start="0,8" stop="5,8"/>
    <blockBackground colorName="lightgrey" start="0,10" stop="5,10"/>
    <blockBackground colorName="lightgrey" start="0,12" stop="5,12"/>
    <blockBackground colorName="lightgrey" start="0,14" stop="5,14"/>
    <blockBackground colorName="lightgrey" start="0,16" stop="5,16"/>

    <blockAlignment value="CENTER" start="0,0" stop="-1,0"/>
    <blockAlignment value="RIGHT" start="-1,1" stop="-1,-1"/>
    <blockValign value="TOP" start="0,0" stop="-1,0"/>
    <blockFont name="Courier-Bold" size="10" start="0,1" stop="-1,-1"/>

    <lineStyle kind="GRID" colorName="black"/>
    <lineStyle kind="BOX" colorName="black" start="0,0"
        stop="-1,-1" thickness="2"/>
    <lineStyle kind="LINEBELOW" colorName="black" start="0,0"
        stop="-1,0" thickness="2"/>

    </blockTableStyle>  



</stylesheet>

<story>
<!-- The 'Header' for the Purchase Order is done as a single row, -->
<!-- single column table using a table style                      -->

<blockTable style="Header"
    colWidths="18cm"
    rowHeights="48"
    >
    <tr><td>
    PURCHASE ORDER
    </td></tr>
</blockTable>

<spacer length="18"/>

<illustration width="18cm" height="194">
    <setFont name="Times-Roman" size="10"/>
    <stroke color="black"/>
    <lineMode width="1"/>

    <drawString x="0" y="174">
    VENDOR #
    </drawString>
    <rect x="2.5cm" y="171" width="0.5cm" height="14"/>    
    <rect x="3cm" y="171" width="0.5cm" height="14"/>    
    <rect x="3.5cm" y="171" width="0.5cm" height="14"/>    
    <rect x="4cm" y="171" width="0.5cm" height="14"/>    

    <drawString x="4.55cm" y="174">
    VENDOR REF#
    </drawString>
    <rect x="7.5cm" y="171" width="3cm" height="14"/>    

    <drawString x="10.5cm" y="174">
    ORDER TYPE: 
    </drawString>
    <rect x="14cm" y="171" width="0.5cm" height="14"/>    
    <rect x="14.5cm" y="171" width="0.5cm" height="14"/>    

    <drawString x="0" y="154">
    VENDOR NAME
    </drawString>
    <rect x="3.5cm" y="151" width="7cm" height="14"/>    

    <drawString x="10.5cm" y="154">
    DATE ORDERED
    </drawString>
    <rect x="14cm" y="151" width="0.5cm" height="14"/>    
    <rect x="14.5cm" y="151" width="0.5cm" height="14"/>    
    <rect x="15.25cm" y="151" width="0.5cm" height="14"/>    
    <rect x="15.75cm" y="151" width="0.5cm" height="14"/>    
    <rect x="16.5cm" y="151" width="0.5cm" height="14"/>    
    <rect x="17cm" y="151" width="0.5cm" height="14"/>    

    <drawString x="0" y="134">
    JOB #
    </drawString>
    <rect x="1.75cm" y="131" width="2.75cm" height="14"/>    

    <drawString x="0" y="104">
    SHIP TO:
    </drawString>
    <drawString x="2cm" y="104">
        NAME
    </drawString>
    <rect x="5.5cm" y="101" width="10cm" height="14"/>    
    <drawString x="2cm" y="84">
        ATTN.
    </drawString>
    <rect x="5.5cm" y="81" width="10cm" height="14"/>    
    <drawString x="2cm" y="64">
        STREET
    </drawString>
    <rect x="5.5cm" y="61" width="10cm" height="14"/>    
    <drawString x="2cm" y="44">
        TOWN
    </drawString>
    <rect x="5.5cm" y="41" width="10cm" height="14"/>    
    <drawString x="2cm" y="24">
        COUNTY
    </drawString>
    <rect x="5.5cm" y="21" width="10cm" height="14"/>    
    <drawString x="2cm" y="4">
        POSTCODE
    </drawString>
    <rect x="5.5cm" y="1" width="5cm" height="14"/>    
</illustration>

<spacer length="18"/>


<!-- The 'main table' for the Purchase Order                           -->

<blockTable style="Table"
    colWidths="1.5cm, 1.5cm, 2cm, 8.5cm, 1.5cm, 2cm"
    rowHeights="30,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18"
    >

<tr>
<td>QTY</td>
<td>PM#</td>
<td>
    <para style="tableHeader">VENDOR</para>
    <para style="tableHeader">PART #</para>
</td>
<td>DESCRIPTION</td>
<td>SO#</td>
<td>
    <para style="tableHeader">UNIT</para>
    <para style="tableHeader">COST</para>
</td>
</tr>

<!-- Uncomment these 2 table rows to see what this table looks like -->
<!-- with something entered in it                                   -->
<!--
<tr>
<td>1</td>
<td>2342</td>
<td>53354</td>
<td>Knurled VeebleFeetzer (Type 2A)</td>
<td>87362A</td>
<td>&pound;19.99</td>
</tr>

<tr>
<td>4</td>
<td>2343</td>
<td>53355</td>
<td>Flanged Doobrie (for 87362A)</td>
<td>87364</td>
<td>&pound;0.99</td>
</tr>
-->

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</blockTable>

<spacer length="18"/>

<illustration width="18cm" height="124">
    <setFont name="Times-Roman" size="10"/>
    <stroke color="black"/>
    <lineMode width="1"/>

    <drawString x="1" y="104">
    PURCHASING AGENT
    </drawString>
    <rect x="4.5cm" y="101" width="0.5cm" height="14"/>    
    <rect x="5.25cm" y="101" width="0.5cm" height="14"/>    
    <rect x="6cm" y="101" width="0.5cm" height="14"/>    
    <drawString x="0" y="84">
    TERMS
    </drawString>
    <rect x="4.5cm" y="81" width="3.5cm" height="14"/>    
    <drawString x="0" y="64">
    F.O.B POINT
    </drawString>
    <rect x="4.5cm" y="61" width="3.5cm" height="14"/>    
    <drawString x="0" y="44">
    SHIP VIA
    </drawString>
    <rect x="4.5cm" y="41" width="3.5cm" height="14"/>    
    <drawString x="0" y="24">
    ORDER TAKEN BY
    </drawString>
    <rect x="4.5cm" y="21" width="3.5cm" height="14"/>    
    <drawString x="0" y="4">
    DATE REQUIRED
    </drawString>
    <rect x="4.5cm" y="1" width="0.5cm" height="14"/>    
    <rect x="5cm" y="1" width="0.5cm" height="14"/>    
    <rect x="5.75cm" y="1" width="0.5cm" height="14"/>    
    <rect x="6.25cm" y="1" width="0.5cm" height="14"/>    
    <rect x="7cm" y="1" width="0.5cm" height="14"/>    
    <rect x="7.5cm" y="1" width="0.5cm" height="14"/>    

    
    <drawString x="10.5cm" y="104">
REFERENCES
    </drawString>
    <lines>
    10.5cm 101 17.5cm 101
    10.5cm 81 17.5cm 81
    10.5cm 61 17.5cm 61
    10.5cm 41 17.5cm 41
    10.5cm 21 17.5cm 21
    10.5cm 1 17.5cm 1
    </lines>

</illustration>

</story>

</document>
