1 <?xml version = '1.0' encoding="utf-8"?>
3 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
4 <xsl:variable name="signature" select="//corporate-header/user/signature"/>
5 <xsl:variable name="title">Open ERP Report</xsl:variable>
6 <xsl:variable name="leftMargin">1cm</xsl:variable>
7 <xsl:variable name="rightMargin">1cm</xsl:variable>
8 <xsl:variable name="topMargin">1cm</xsl:variable>
9 <xsl:variable name="bottomMargin">1cm</xsl:variable>
10 <xsl:variable name="pageSize">21cm,29.7cm</xsl:variable>
12 <xsl:variable name="page_format">a4_letter</xsl:variable>
14 <xsl:template name="first_page_graphics_corporation">
16 <setFont name="Helvetica" size="14"/>
18 <stroke color="black"/>
19 <drawString x="1cm" y="27.6cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
20 <lines>1cm 28.4cm 20cm 28.4cm</lines>
21 <lines>1cm 25.4cm 7cm 25.4cm</lines>
23 <setFont name="Helvetica" size="10"/>
24 <drawRightString x="20cm" y="28.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
25 <drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/street"/></drawString>
26 <drawString x="1cm" y="26.5cm">
27 <xsl:value-of select="//corporate-header/corporation/zip"/>
28 <xsl:text> </xsl:text>
29 <xsl:value-of select="//corporate-header/corporation/city"/>
30 <xsl:text> - </xsl:text>
31 <xsl:value-of select="//corporate-header/corporation/country"/>
33 <drawString x="1cm" y="26cm">Phone:</drawString>
34 <drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/phone"/></drawRightString>
35 <drawString x="1cm" y="25.5cm">Mail:</drawString>
36 <drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/email"/></drawRightString>
41 <lines>1.5cm 2.2cm 19.9cm 2.2cm</lines>
42 <drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer"/></drawCentredString>
43 <drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>
48 <xsl:template name="other_pages_graphics_corporation">
50 <setFont name="Helvetica" size="14"/>
52 <stroke color="black"/>
53 <drawString x="1cm" y="27.6cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
54 <lines>1cm 25.4cm 20cm 25.4cm</lines>
55 <!-- <lines>1cm 25.7cm 7cm 25.7cm</lines>-->
57 <setFont name="Helvetica" size="10"/>
58 <drawRightString x="1cm" y="27.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
59 <drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/street"/></drawString>
60 <drawString x="1cm" y="26.5cm">
61 <xsl:value-of select="//corporate-header/corporation/zip"/>
62 <xsl:text> </xsl:text>
63 <xsl:value-of select="//corporate-header/corporation/city"/>
64 <xsl:text> - </xsl:text>
65 <xsl:value-of select="//corporate-header/corporation/country"/>
67 <drawString x="1cm" y="26cm">Phone:</drawString>
68 <drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/phone"/></drawRightString>
69 <drawString x="1cm" y="25.5cm">Mail:</drawString>
70 <drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/email"/></drawRightString>
74 <lines>1.5cm 1.2cm 19.9cm 1.2cm</lines>
75 <drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer"/></drawCentredString>
76 <!-- <drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>-->
79 <xsl:template name="first_page_frames">
80 <xsl:if test="$page_format='a4_normal'">
81 <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22.0cm"/>
84 <xsl:if test="$page_format='a4_letter'">
85 <frame id="address" x1="11cm" y1="21.5cm" width="6cm" height="4cm"/>
86 <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="17.5cm"/>
90 <xsl:template name="other_pages_frames">
91 <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22cm"/>