File: ex10.rml

package info (click to toggle)
python-trml2pdf 1.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 452 kB
  • ctags: 61
  • sloc: python: 549; makefile: 9
file content (51 lines) | stat: -rw-r--r-- 2,806 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE document SYSTEM "../rml_1_0.dtd">
<document filename="example_10.pdf">
<template>
    <pageTemplate id="main">
    <pageGraphics>
    </pageGraphics>
    <frame id="first" x1="72" y1="72" width="451" height="698"/>
    </pageTemplate>
</template>
<stylesheet>
    <blockTableStyle id="myBlockTableStyle">
         <!-- This sets a font for every cell from the start of the -->
         <!-- second row down to the bottom right hand corner                   -->
         <blockFont name="Courier-Bold" start="0,1" stop="-1,-1"/>
         <!-- This sets a font for the first row           -->
         <blockFont name="Helvetica-BoldOblique" size="24" start="0,0" stop="3,0"/>
         <!-- This sets a textColor for all the text in the table -->
         <blockTextColor colorName="black"/>
         <!-- This sets a textColor for the first row             -->
         <!-- (Since it comes after the above setting, -->
         <!-- it overides it for this row) -->
         <blockTextColor colorName="white" start="0,0" stop="3,0"/>
         <!-- This sets a textColor a column - also overiding              -->
         <!-- the first textColor setting for this row                     -->
         <blockTextColor colorName="blue" start="1,1" stop="1,6"/>
         <!-- This sets a background color for the first row              -->
         <blockBackground colorName="red" start="0,0" stop="3,0"/>
         <!-- This sets a background color for the rest of the table -->
         <blockBackground colorName="cornsilk" start="0,1" stop="-1,-1"/>
         <!-- This sets a background color for an individual cell                 -->
         <!-- This has to go AFTER the above blockBackground,                     -->
         <!-- otherwise it would be overpainted by the cornsilk color -->
         <blockBackground colorName="lightcoral" start="3,3" stop="3,3"/>
    </blockTableStyle>
</stylesheet>
<story>
    <title>Example 10 - colors and fonts in tables</title>
    <spacer length="1cm"/>
    <blockTable style="myBlockTableStyle" rowHeights="3.5cm,2cm,2cm,2cm,2cm,2cm,2cm" colWidths="4cm,4cm,4cm,4cm">
    <tr><td>Cell 0,0</td><td>Cell 1,0</td><td>Cell 2,0</td><td>Cell 3,0</td></tr>
    <tr><td>Cell 0,1</td><td>Cell 1,1</td><td>Cell 2,1</td><td>Cell 3,1</td></tr>
    <tr><td>Cell 0,2</td><td>Cell 1,2</td><td>Cell 2,2</td><td>Cell 3,2</td></tr>
     <tr><td>Cell 0,3</td><td>Cell 1,3</td><td>Cell 2,3</td><td>Cell 3,3</td></tr>
     <tr><td>Cell 0,4</td><td>Cell 1,4</td><td>Cell 2,4</td><td>Cell 3,4</td></tr>
     <tr><td>Cell 0,5</td><td>Cell 1,5</td><td>Cell 2,5</td><td>Cell 3,5</td></tr>
     <tr><td>Cell 0,6</td><td>Cell 1,6</td><td>Cell 2,6</td><td>Cell 3,6</td></tr>
     </blockTable>
</story>
</document>