[reportlab-users] Processor for kugar definitions

Dick Kniep reportlab-users@reportlab.com
Thu, 19 Feb 2004 01:19:11 +0100


--Boundary-00=_/DANA4eyd8/o10/
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Andy,

Again a new version of the XML definition. I think I really messed up the 
proper definition.

Give it a try and see what is happening.

I will test a little further myself, and then will send some patches. The 
routine is embedded in an application which runs pretty well. After 
generating the PDF, it can be displayed by Acrobat, or I print it with 
Kprinter.

Cheers,
Dick

--Boundary-00=_/DANA4eyd8/o10/
Content-Type: text/xml;
  charset="iso-8859-1";
  name="maindoc.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="maindoc.xml"

<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE KugarTemplate SYSTEM "../config/kugartemplate.dtd">
<KugarTemplate BottomMargin="10" TopMargin="10" RightMargin="0" LeftMargin="20" PageOrientation="0" PageSize="0" >
 <PageHeader Height="150" PrintFrequency="1" >
  <Line Width="1" Y1="95" Y2="95" X1="3" X2="873" Style="1" Color="0,0,0" />
  <Label WordWrap="0" Width="255" X="35" Y="25" BorderStyle="0" Height="55" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="DEMO BEDRIJF CVix" FontWeight="50" FontSize="25" BorderWidth="0" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="100" X="435" Y="19" BorderStyle="0" Height="21" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Markgracht 58" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="100" X="435" Y="40" BorderStyle="0" Height="22" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="1354 BE  ALMERE" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="100" X="435" Y="62" BorderStyle="0" Height="21" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Tel:  036-5215580" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
 </PageHeader>
 <Detail Height="290" Level="0" >
  <Field WordWrap="0" Width="400" X="80" Y="15" BorderStyle="0" NegValueColor="0,0,0" Height="15" HAlignment="0" DataType="0" Field="Naam1" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[Naam1]" FontWeight="50" FontSize="11" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="400" X="80" Y="45" BorderStyle="0" NegValueColor="0,0,0" Height="15" HAlignment="0" DataType="0" Field="Naam2" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[Naam2]" FontWeight="50" FontSize="11" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="399" X="80" Y="30" BorderStyle="0" NegValueColor="0,0,0" Height="15" HAlignment="0" DataType="0" Field="Postbus" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[Postbus]" FontWeight="50" FontSize="11" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="402" X="80" Y="60" BorderStyle="0" NegValueColor="0,0,0" Height="15" HAlignment="0" DataType="0" Field="Adres1" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[Adres1]" FontWeight="50" FontSize="11" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="70" X="80" Y="75" BorderStyle="0" NegValueColor="0,0,0" Height="15" HAlignment="0" DataType="0" Field="Postcode" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[Postcode]" FontWeight="50" FontSize="11" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="320" X="151" Y="75" BorderStyle="0" NegValueColor="0,0,0" Height="15" HAlignment="0" DataType="0" Field="Woonplaats" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[Woonplaats]" FontWeight="50" FontSize="11" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="59" X="80" Y="120" BorderStyle="0" Height="15" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Almere, " FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
  <Special WordWrap="0" Width="129" X="140" Y="120" BorderStyle="0" Height="15" HAlignment="0" DateFormat="11" BorderColor="0,0,0" BackgroundColor="255,255,255" Type="0" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="[Date]" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="50" X="80" Y="170" BorderStyle="0" Height="20" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Betreft" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="50" X="80" Y="190" BorderStyle="0" Height="20" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Offertenr" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="8" X="131" Y="170" BorderStyle="0" Height="20" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text=":" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="8" X="131" Y="190" BorderStyle="0" Height="20" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text=":" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="300" X="140" Y="170" BorderStyle="0" NegValueColor="0,0,0" Height="20" HAlignment="0" DataType="0" Field="betreft" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[betreft]" FontWeight="50" FontSize="11" BorderWidth="1" Precision="2" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="300" X="140" Y="190" BorderStyle="0" NegValueColor="0,0,0" Height="20" HAlignment="0" DataType="0" Field="offertenr" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[offertenr]" FontWeight="50" FontSize="11" BorderWidth="1" Precision="2" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="40" X="80" Y="230" BorderStyle="0" Height="20" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Geachte" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="350" X="121" Y="230" BorderStyle="0" NegValueColor="0,0,0" Height="20" HAlignment="0" DataType="0" Field="aanhefnaam" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[aanhefnaam]" FontWeight="50" FontSize="11" BorderWidth="1" Precision="2" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="440" X="80" Y="260" BorderStyle="0" Height="24" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Hierbij offreren wij u de volgende diensten voor bovengenoemde client" FontWeight="50" FontSize="11" BorderWidth="1" FontFamily="Times New Roman" />
 </Detail>
 <Detail Height="30" Level="1" >
  <Field WordWrap="0" Width="450" X="80" Y="8" BorderStyle="0" NegValueColor="0,0,0" Height="22" HAlignment="0" DataType="0" Field="omschrijving" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[omschrijving]" FontWeight="50" FontSize="11" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
 </Detail>
 <Detail Height="18" Level="2" >
  <Field WordWrap="0" Width="250" X="90" Y="5" BorderStyle="0" NegValueColor="0,0,0" Height="18" HAlignment="0" DataType="0" Field="omschrijving" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[omschrijving]" FontWeight="50" FontSize="10" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="60" X="460" Y="5" BorderStyle="0" NegValueColor="0,0,0" Height="18" HAlignment="2" DataType="4" Field="bedrag" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[bedrag]" FontWeight="50" FontSize="10" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
 </Detail>
 <Detail Height="18" Level="3" >
  <Field WordWrap="0" Width="200" X="90" Y="5" BorderStyle="0" NegValueColor="0,0,0" Height="18" HAlignment="0" DataType="0" Field="omschrijving" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[omschrijving]" FontWeight="50" FontSize="10" BorderWidth="1" Precision="2" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="150" X="291" Y="5" BorderStyle="0" NegValueColor="0,0,0" Height="18" HAlignment="0" DataType="0" Field="urencalc" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[urencalc]" FontWeight="50" FontSize="10" BorderWidth="1" Precision="2" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="60" X="460" Y="5" BorderStyle="0" NegValueColor="0,0,0" Height="18" HAlignment="2" DataType="4" Field="bedrag" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[bedrag]" FontWeight="50" FontSize="10" BorderWidth="1" Precision="2" FontFamily="Times New Roman" />
 </Detail>
 <ReportFooter Height="240" PrintFrequency="0" >
  <Label WordWrap="0" Width="250" X="80" Y="25" BorderStyle="0" Height="20" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="*** Totaal bedrag" FontWeight="50" FontSize="11" BorderWidth="0" FontFamily="Times New Roman" />
  <CalculatedField WordWrap="0" CalculationType="1" Width="70" X="450" Y="27" BorderStyle="1" NegValueColor="0,0,0" Height="20" HAlignment="2" DataType="4" Field="bedrag" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[bedrag]" FontWeight="50" FontSize="11" BorderWidth="1" Precision="2" FontFamily="Times New Roman" />
  <Label WordWrap="1" Width="440" X="80" Y="47" BorderStyle="0" Height="60" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Wij verzoeken u bij honorering van de offerte, deze getekend te retourneren. Indien gewenst kunt u over de inhoud telefonisch contact opnemen met de case manager van bovengenoemde client." FontWeight="50" FontSize="11" BorderWidth="0" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="200" X="80" Y="120" BorderStyle="0" Height="40" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Namens Demo bedrijf CVix" FontWeight="50" FontSize="11" BorderWidth="0" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="200" X="80" Y="200" BorderStyle="0" NegValueColor="0,0,0" Height="20" HAlignment="0" DataType="0" Field="namens" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[namens]" FontWeight="50" FontSize="11" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
  <Label WordWrap="0" Width="150" X="400" Y="120" BorderStyle="0" Height="40" HAlignment="0" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" Text="Opdrachtgever" FontWeight="50" FontSize="11" BorderWidth="0" FontFamily="Times New Roman" />
  <Field WordWrap="0" Width="150" X="400" Y="200" BorderStyle="0" NegValueColor="0,0,0" Height="20" HAlignment="0" DataType="0" Field="opdrachtgever" DateFormat="11" Currency="32" BorderColor="0,0,0" BackgroundColor="255,255,255" FontItalic="0" VAlignment="1" ForegroundColor="0,0,0" CommaSeparator="44" Text="[opdrachtgever]" FontWeight="50" FontSize="11" BorderWidth="0" Precision="2" FontFamily="Times New Roman" />
 </ReportFooter>
</KugarTemplate>

--Boundary-00=_/DANA4eyd8/o10/--