mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-04-19 08:31:48 +00:00
Added printing requirements
This commit is contained in:
BIN
z3c/rml/tests/input/400x200.gif
Normal file
BIN
z3c/rml/tests/input/400x200.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
z3c/rml/tests/input/VeraMono.ttf
Normal file
BIN
z3c/rml/tests/input/VeraMono.ttf
Normal file
Binary file not shown.
BIN
z3c/rml/tests/input/data/fw2.pdf
Normal file
BIN
z3c/rml/tests/input/data/fw2.pdf
Normal file
Binary file not shown.
BIN
z3c/rml/tests/input/data/include-bookmarks1.pdf
Normal file
BIN
z3c/rml/tests/input/data/include-bookmarks1.pdf
Normal file
Binary file not shown.
BIN
z3c/rml/tests/input/data/include-bookmarks2.pdf
Normal file
BIN
z3c/rml/tests/input/data/include-bookmarks2.pdf
Normal file
Binary file not shown.
BIN
z3c/rml/tests/input/data/include1.pdf
Normal file
BIN
z3c/rml/tests/input/data/include1.pdf
Normal file
Binary file not shown.
BIN
z3c/rml/tests/input/data/include2.pdf
Normal file
BIN
z3c/rml/tests/input/data/include2.pdf
Normal file
Binary file not shown.
26
z3c/rml/tests/input/encoding-test-latin1.rml
Normal file
26
z3c/rml/tests/input/encoding-test-latin1.rml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="encoding-test-latin1.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title>Test of Encoding: Latin 1</title>
|
||||
<para>
|
||||
This following paragraph contains multiple European symbols.
|
||||
</para>
|
||||
<spacer length="1in" />
|
||||
<para>
|
||||
Das ist ein „Deutscher Text”: Er hat eine L<>nge von <20>ber einer
|
||||
Zeile. Das ist aber n<>tig um alle Funktionen zu zeigen. Ach <20>brigens,
|
||||
unsere Stra<72>e ist nicht f<>r €200.000,00 erh<72>ltlich.
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
23
z3c/rml/tests/input/encoding-test-utf8.rml
Normal file
23
z3c/rml/tests/input/encoding-test-utf8.rml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="encoding-test-utf8.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
<title>Test of Encoding: UTF-8</title>
|
||||
<para>
|
||||
This following paragraph contains multiple European symbols.
|
||||
</para>
|
||||
<spacer length="1in" />
|
||||
<para>
|
||||
Das ist ein „Deutscher Text”: Er hat eine Länge von über einer
|
||||
Zeile. Das ist aber nötig um alle Funktionen zu zeigen. Ach übrigens,
|
||||
unsere Straße ist nicht für €200.000,00 erhältlich.
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
187
z3c/rml/tests/input/images/cylinder.eps
Normal file
187
z3c/rml/tests/input/images/cylinder.eps
Normal file
@@ -0,0 +1,187 @@
|
||||
%!PS-Adobe-3.0 EPSF-3.0
|
||||
%%BoundingBox: 0 0 223 178
|
||||
%%Pages: 0
|
||||
%%Creator: Sun Microsystems, Inc.
|
||||
%%Title: none
|
||||
%%CreationDate: none
|
||||
%%LanguageLevel: 2
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%BeginResource: procset SDRes-Prolog 1.0 0
|
||||
/b4_inc_state save def
|
||||
/dict_count countdictstack def
|
||||
/op_count count 1 sub def
|
||||
userdict begin
|
||||
0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit[] 0 setdash newpath
|
||||
/languagelevel where {pop languagelevel 1 ne {false setstrokeadjust false setoverprint} if} if
|
||||
/bdef {bind def} bind def
|
||||
/c {setgray} bdef
|
||||
/l {neg lineto} bdef
|
||||
/rl {neg rlineto} bdef
|
||||
/lc {setlinecap} bdef
|
||||
/lj {setlinejoin} bdef
|
||||
/lw {setlinewidth} bdef
|
||||
/ml {setmiterlimit} bdef
|
||||
/ld {setdash} bdef
|
||||
/m {neg moveto} bdef
|
||||
/ct {6 2 roll neg 6 2 roll neg 6 2 roll neg curveto} bdef
|
||||
/r {rotate} bdef
|
||||
/t {neg translate} bdef
|
||||
/s {scale} bdef
|
||||
/sw {show} bdef
|
||||
/gs {gsave} bdef
|
||||
/gr {grestore} bdef
|
||||
/f {findfont dup length dict begin
|
||||
{1 index /FID ne {def} {pop pop} ifelse} forall /Encoding ISOLatin1Encoding def
|
||||
currentdict end /NFont exch definefont pop /NFont findfont} bdef
|
||||
/p {closepath} bdef
|
||||
/sf {scalefont setfont} bdef
|
||||
/ef {eofill}bdef
|
||||
/pc {closepath stroke}bdef
|
||||
/ps {stroke}bdef
|
||||
/pum {matrix currentmatrix}bdef
|
||||
/pom {setmatrix}bdef
|
||||
/bs {/aString exch def /nXOfs exch def /nWidth exch def currentpoint nXOfs 0 rmoveto pum nWidth aString stringwidth pop div 1 scale aString show pom moveto} bdef
|
||||
%%EndResource
|
||||
%%EndProlog
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
%%EndPageSetup
|
||||
pum
|
||||
0.02837 0.0283 s
|
||||
0 -6288 t
|
||||
/tm matrix currentmatrix def
|
||||
gs
|
||||
tm setmatrix
|
||||
-421 -635 t
|
||||
1 1 s
|
||||
421 635 m 8279 635 l 8279 6922 l 421 6922 l 421 635 l eoclip newpath
|
||||
gs
|
||||
421 635 m 8279 635 l 8279 6922 l 421 6922 l 421 635 l eoclip newpath
|
||||
421 635 m 8280 635 l 8280 6923 l 421 6923 l 421 635 l eoclip newpath
|
||||
0.000 c 7937 3937 m 7670 4026 l 7670 3848 l 7937 3937 l p ef
|
||||
635 3937 m 7723 3937 l ps
|
||||
6540 2095 m 6374 2323 l 6271 2178 l 6540 2095 l p ef
|
||||
1651 5588 m 6366 2219 l ps
|
||||
3948 1079 m 4037 1346 l 3859 1346 l 3948 1079 l p ef
|
||||
3948 6032 m 3948 5981 l ps
|
||||
3948 5930 m 3948 5879 l ps
|
||||
3948 5828 m 3948 5777 l ps
|
||||
3948 5726 m 3948 5675 l ps
|
||||
3948 5624 m 3948 5573 l ps
|
||||
3948 5522 m 3948 5471 l ps
|
||||
3948 5420 m 3948 5369 l ps
|
||||
3948 5318 m 3948 5267 l ps
|
||||
3948 5216 m 3948 5165 l ps
|
||||
3948 5114 m 3948 5063 l ps
|
||||
3948 5012 m 3948 4961 l ps
|
||||
3948 4910 m 3948 4859 l ps
|
||||
3948 4808 m 3948 4757 l ps
|
||||
3948 4706 m 3948 4655 l ps
|
||||
3948 4604 m 3948 4553 l ps
|
||||
3948 4502 m 3948 4451 l ps
|
||||
3948 4400 m 3948 4349 l ps
|
||||
3948 4298 m 3948 4247 l ps
|
||||
3948 4196 m 3948 4145 l ps
|
||||
3948 4094 m 3948 4043 l ps
|
||||
3948 3992 m 3948 3941 l ps
|
||||
3948 3890 m 3948 3839 l ps
|
||||
3948 3788 m 3948 3737 l ps
|
||||
3948 3686 m 3948 3635 l ps
|
||||
3948 3584 m 3948 3533 l ps
|
||||
3948 3482 m 3948 3431 l ps
|
||||
3948 3380 m 3948 3329 l ps
|
||||
3948 3278 m 3948 3227 l ps
|
||||
3948 3176 m 3948 3125 l ps
|
||||
3948 3074 m 3948 3023 l ps
|
||||
3948 2972 m 3948 2921 l ps
|
||||
3948 2870 m 3948 2819 l ps
|
||||
3948 2768 m 3948 2717 l ps
|
||||
3948 2666 m 3948 2615 l ps
|
||||
3948 2564 m 3948 2513 l ps
|
||||
3948 2462 m 3948 2411 l ps
|
||||
3948 2360 m 3948 2309 l ps
|
||||
3948 2258 m 3948 2207 l ps
|
||||
3948 2156 m 3948 2105 l ps
|
||||
3948 2054 m 3948 2003 l ps
|
||||
3948 1952 m 3948 1901 l ps
|
||||
3948 1850 m 3948 1799 l ps
|
||||
3948 1748 m 3948 1697 l ps
|
||||
3948 1646 m 3948 1595 l ps
|
||||
3948 1544 m 3948 1493 l ps
|
||||
3948 1442 m 3948 1391 l ps
|
||||
3948 1340 m 3948 1293 l ps
|
||||
gs
|
||||
gs
|
||||
pum
|
||||
7843 4359 t
|
||||
5 -157 m 5 -157 5 -157 5 -151 ct 18 -151 24 -148 41 -123 ct 41 -123 41 -123 71 -80 ct
|
||||
71 -80 71 -80 38 -36 ct 20 -12 15 -7 6 -6 ct 6 -6 6 -6 6 0 ct 6 0 6 0 56 0 ct 56 0 56 0 56 -6 ct
|
||||
46 -6 41 -12 41 -17 ct 41 -19 45 -25 53 -36 ct 53 -36 53 -36 77 -70 ct 77 -70 77 -70 100 -36 ct
|
||||
107 -25 111 -19 111 -16 ct 111 -10 105 -6 96 -6 ct 96 -6 96 -6 96 0 ct 96 0 96 0 169 0 ct
|
||||
169 0 169 0 169 -7 ct 156 -7 152 -8 133 -36 ct 133 -36 133 -36 94 -92 ct 94 -92 94 -92 115 -122 ct
|
||||
133 -145 140 -151 152 -151 ct 152 -151 152 -151 152 -157 ct 152 -157 152 -157 100 -157 ct
|
||||
100 -157 100 -157 100 -151 ct 109 -151 112 -147 112 -143 ct 112 -140 108 -133 100 -121 ct
|
||||
100 -121 100 -121 87 -103 ct 87 -103 87 -103 76 -121 ct 66 -137 65 -139 65 -142 ct
|
||||
65 -148 68 -151 77 -151 ct 77 -151 77 -151 77 -157 ct 77 -157 77 -157 5 -157 ct
|
||||
p ef
|
||||
pom
|
||||
gr
|
||||
gr
|
||||
gs
|
||||
gs
|
||||
pum
|
||||
6545 2355 t
|
||||
2 -158 m 2 -158 2 -158 2 -152 ct 15 -149 21 -143 29 -126 ct 29 -126 29 -126 85 -7 ct
|
||||
85 -7 85 -7 74 21 ct 66 41 58 47 51 47 ct 30 40 30 40 27 40 ct 17 40 10 47 10 56 ct
|
||||
10 66 19 76 33 76 ct 51 76 73 60 85 29 ct 85 29 85 29 148 -128 ct 155 -146 159 -150 171 -152 ct
|
||||
171 -152 171 -152 171 -158 ct 171 -158 171 -158 121 -158 ct 121 -158 121 -158 121 -152 ct
|
||||
132 -152 136 -150 136 -143 ct 136 -138 135 -134 133 -129 ct 133 -129 133 -129 99 -42 ct
|
||||
99 -42 99 -42 61 -121 ct 57 -129 55 -135 55 -140 ct 55 -150 64 -152 74 -152 ct
|
||||
74 -152 74 -152 74 -158 ct 74 -158 74 -158 2 -158 ct p ef
|
||||
pom
|
||||
gr
|
||||
gr
|
||||
gs
|
||||
gs
|
||||
pum
|
||||
3638 1254 t
|
||||
145 -48 m 145 -48 145 -48 139 -48 ct 136 -17 131 -12 101 -12 ct 101 -12 101 -12 44 -12 ct
|
||||
44 -12 44 -12 148 -151 ct 148 -151 148 -151 148 -157 ct 148 -157 148 -157 18 -157 ct
|
||||
18 -157 18 -157 17 -113 ct 17 -113 17 -113 24 -113 ct 26 -144 37 -145 59 -145 ct
|
||||
59 -145 59 -145 110 -145 ct 110 -145 110 -145 7 -6 ct 7 -6 7 -6 7 0 ct 7 0 7 0 144 0 ct
|
||||
144 0 144 0 145 -48 ct p ef
|
||||
pom
|
||||
gr
|
||||
gr
|
||||
25 lw 1 lj 3962 2032 m 3314 2032 2787 1960 2787 1873 ct 2787 1786 3314 1714 3962 1714 ct
|
||||
4610 1714 5137 1786 5137 1873 ct 5137 1960 4610 2032 3962 2032 ct pc
|
||||
5137 2139 m 5087 2221 4581 2285 3966 2286 ct 3318 2286 2791 2214 2791 2127 ct
|
||||
2791 2126 2791 2126 2791 2126 ct ps
|
||||
3949 1905 m 3949 1270 l ps
|
||||
3949 6506 m 3949 5871 l ps
|
||||
2788 1841 m 2788 2159 l ps
|
||||
5116 1841 m 5116 2159 l ps
|
||||
5137 5839 m 5087 5921 4581 5985 3966 5986 ct 3318 5986 2791 5914 2791 5827 ct
|
||||
2791 5826 2791 5826 2791 5826 ct ps
|
||||
2788 5541 m 2788 5859 l ps
|
||||
5116 5541 m 5116 5859 l ps
|
||||
3659 2286 m 3659 5524 l ps
|
||||
4259 2286 m 4259 5524 l ps
|
||||
4291 5531 m 4272 5563 4137 5588 3976 5588 ct 3813 5588 3678 5562 3660 5531 ct
|
||||
ps
|
||||
4268 5399 m 4759 5418 5120 5480 5120 5552 ct 5120 5639 4593 5711 3945 5711 ct
|
||||
3297 5711 2770 5639 2770 5552 ct 2770 5477 3151 5414 3664 5397 ct ps
|
||||
gr
|
||||
gs
|
||||
421 635 m 8279 635 l 8279 6922 l 421 6922 l 421 635 l eoclip newpath
|
||||
gr
|
||||
gr
|
||||
0 6288 t
|
||||
pom
|
||||
count op_count sub {pop} repeat countdictstack dict_count sub {end} repeat b4_inc_state restore
|
||||
%%PageTrailer
|
||||
%%Trailer
|
||||
%%EOF
|
||||
2
z3c/rml/tests/input/images/cylinder.svg
Normal file
2
z3c/rml/tests/input/images/cylinder.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 16 KiB |
BIN
z3c/rml/tests/input/images/cylinder.svgz
Normal file
BIN
z3c/rml/tests/input/images/cylinder.svgz
Normal file
Binary file not shown.
BIN
z3c/rml/tests/input/images/replogo.gif
Normal file
BIN
z3c/rml/tests/input/images/replogo.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
z3c/rml/tests/input/logo_no_bar.png
Normal file
BIN
z3c/rml/tests/input/logo_no_bar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
19
z3c/rml/tests/input/printScaling.rml
Normal file
19
z3c/rml/tests/input/printScaling.rml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "../rml.dtd">
|
||||
<document filename="printScaling.pdf">
|
||||
|
||||
<docinit printScaling="None">
|
||||
</docinit>
|
||||
|
||||
<template pagesize="210mm,297mm" showBoundary="0">
|
||||
|
||||
<pageTemplate id="main">
|
||||
<frame id="main" x1="15mm" y1="180mm" width="200mm" height="50mm" />
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
<para>This document should print at actual size by default</para>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
16
z3c/rml/tests/input/rml-examples-000-simple.rml
Normal file
16
z3c/rml/tests/input/rml-examples-000-simple.rml
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_000_simple.pdf" invariant="1">
|
||||
<stylesheet/>
|
||||
|
||||
<pageDrawing>
|
||||
<drawCentredString x="4.1in" y="5.8in">
|
||||
Hello World. First Page Drawing
|
||||
</drawCentredString>
|
||||
</pageDrawing>
|
||||
<pageDrawing>
|
||||
<drawCentredString x="3.1in" y="4.8in">
|
||||
Hello World. Second Page Drawing
|
||||
</drawCentredString>
|
||||
</pageDrawing>
|
||||
|
||||
</document>
|
||||
55
z3c/rml/tests/input/rml-examples-001-cmbox.rml
Normal file
55
z3c/rml/tests/input/rml-examples-001-cmbox.rml
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_001_cmbox.pdf" invariant="1">
|
||||
<docinit useCropMarks="1">
|
||||
<cropMarks borderWidth="10" markWidth="1" markColor="black" markLength="5" markLast="0" bleedWidth="0"/>
|
||||
</docinit>
|
||||
|
||||
<template pagesize="596,842" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main" pagesize="596,842">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 2: Cmbox</drawString>
|
||||
<setFont name="Helvetica-Oblique" size="12" />
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<saveState/>
|
||||
<stroke width="1" color="red"/>
|
||||
<rect x="0" y="0" width="596" height="842" stroke="1" fill="0"/>
|
||||
<restoreState/>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
<paraStyle name="h1" fontName="Helvetica-BoldOblique" fontSize="32" leading="36"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12"/>
|
||||
<paraStyle name="spaced" fontName="Helvetica" fontSize="10" leading="12"
|
||||
spaceBefore="12" spaceAfter="12"/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
<para style="normal">Hello World. This is a normal paragraph. Blah <font color="red">IPO</font> blah blah blah blah growth forecast blah
|
||||
blah blah forecast blah.Blah blah blah blah blah blah blah blah blah blah blah profit blah blah blah blah blah
|
||||
blah blah blah blah blah IPO.Blah blah blah blah blah blah blah reengineering blah growth blah blah blah
|
||||
proactive direction strategic blah blah blah forward-thinking blah.Blah blah doubletalk blah blah blah blah
|
||||
blah profit blah blah growth blah blah blah blah blah profit.Blah blah blah blah venture capital blah blah blah
|
||||
blah blah forward-thinking blah.
|
||||
</para>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
57
z3c/rml/tests/input/rml-examples-001-hello.rml
Normal file
57
z3c/rml/tests/input/rml-examples-001-hello.rml
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_001_hello.pdf" invariant="1">
|
||||
|
||||
<template pagesize="letter" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main" pagesize="letter portrait">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite</drawRightString>
|
||||
<textAnnotation><param name="Rect">0,0,1,1</param><param name="F">3</param><param name="escape">6</param>X::PDF
|
||||
PX(S)
|
||||
MT(PINK)
|
||||
</textAnnotation>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
<paraStyle name="h1" fontName="Helvetica-BoldOblique" fontSize="32" leading="36"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12"/>
|
||||
<paraStyle name="spaced" fontName="Helvetica" fontSize="10" leading="12"
|
||||
spaceBefore="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<para style="normal">Hello World. This is a normal paragraph. Blah <font color="red">IPO</font> blah blah blah blah growth forecast blah
|
||||
blah blah forecast blah.Blah blah blah blah blah blah blah blah blah blah blah profit blah blah blah blah blah
|
||||
blah blah blah blah blah IPO.Blah blah blah blah blah blah blah reengineering blah growth blah blah blah
|
||||
proactive direction strategic blah blah blah forward-thinking blah.Blah blah doubletalk blah blah blah blah
|
||||
blah profit blah blah growth blah blah blah blah blah profit.Blah blah blah blah venture capital blah blah blah
|
||||
blah blah forward-thinking blah. Here are some common characters &#x92; = ’
|
||||
</para>
|
||||
<para style="normal">This is another normal paragraph. Blah IPO blah blah blah blah growth forecast blah
|
||||
blah blah forecast blah.Blah blah blah blah blah blah blah blah blah blah blah profit blah blah blah blah blah
|
||||
blah blah blah blah blah IPO.Blah blah blah blah blah blah blah reengineering blah growth blah blah blah
|
||||
proactive direction strategic blah blah blah forward-thinking blah.Blah blah doubletalk blah blah blah blah
|
||||
blah profit blah blah growth blah blah blah blah blah profit.Blah blah blah blah venture capital blah blah blah
|
||||
blah blah forward-thinking blah.
|
||||
</para>
|
||||
<para style="normal">
|
||||
I should NOT have a tiny leading space in front of me!
|
||||
</para>
|
||||
<para style="spaced">This is spaced. There should be 12 points before and after.</para>
|
||||
<para style="normal">Hello World. This is a normal paragraph. Blah IPO blah blah blah blah growth forecast blah
|
||||
blah blah forecast blah.Blah blah blah blah blah blah blah blah blah blah blah profit blah blah blah blah blah
|
||||
blah blah blah blah blah IPO.Blah blah blah blah blah blah blah reengineering blah growth blah blah blah
|
||||
proactive direction strategic blah blah blah forward-thinking blah.Blah blah doubletalk blah blah blah blah
|
||||
blah profit blah blah growth blah blah blah blah blah profit.Blah blah blah blah venture capital blah blah blah
|
||||
blah blah forward-thinking blah.
|
||||
</para>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
395
z3c/rml/tests/input/rml-examples-002-paras.rml
Normal file
395
z3c/rml/tests/input/rml-examples-002-paras.rml
Normal file
@@ -0,0 +1,395 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd" [
|
||||
<!ENTITY pound "£">
|
||||
]>
|
||||
<document filename="test_002_paras.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #2</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
|
||||
<paraStyle name="h1"
|
||||
fontName="Courier-Bold"
|
||||
fontSize="12"
|
||||
spaceBefore = "0.5 cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style1"
|
||||
fontName="Courier"
|
||||
fontSize="10"
|
||||
/>
|
||||
|
||||
<paraStyle name="style2"
|
||||
parent="style1"
|
||||
leftIndent = "1in"
|
||||
/>
|
||||
|
||||
<paraStyle name="style3"
|
||||
parent="style1"
|
||||
rightIndent = "1in"
|
||||
/>
|
||||
|
||||
<paraStyle name="style4"
|
||||
parent="style1"
|
||||
spaceBefore = "2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style5"
|
||||
parent="style1"
|
||||
spaceAfter = "2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style6"
|
||||
parent="style1"
|
||||
firstLineIndent = "2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style7"
|
||||
parent="style1"
|
||||
leading = "15"
|
||||
/>
|
||||
<!-- NB Leading isn't just the space between lines - it is
|
||||
expressed as the height of the line PLUS the space between
|
||||
lines. This leading of 15 is equal to a space of 5 pts between
|
||||
lines.-->
|
||||
|
||||
<paraStyle name="style8"
|
||||
parent="style1"
|
||||
bulletFontName = "ZapfDingbats"
|
||||
bulletFontSize = "5"
|
||||
/>
|
||||
|
||||
<paraStyle name="style9"
|
||||
parent="style8"
|
||||
bulletFontSize = "10"
|
||||
bulletIndent = "20"
|
||||
/>
|
||||
|
||||
<paraStyle name="style10"
|
||||
parent="style9"
|
||||
bulletIndent = "20"
|
||||
leftIndent = "35"
|
||||
/>
|
||||
|
||||
<paraStyle name="style11"
|
||||
parent="style1"
|
||||
alignment = "left"
|
||||
/>
|
||||
|
||||
<paraStyle name="style12"
|
||||
parent="style1"
|
||||
alignment = "right"
|
||||
/>
|
||||
|
||||
<paraStyle name="style13"
|
||||
parent="style1"
|
||||
alignment = "center"
|
||||
/>
|
||||
|
||||
<paraStyle name="style14"
|
||||
parent="style1"
|
||||
alignment = "justify"
|
||||
/>
|
||||
|
||||
<paraStyle name="style15"
|
||||
parent="style10"
|
||||
bulletFontSize = "5"
|
||||
alignment = "left"
|
||||
/>
|
||||
|
||||
<paraStyle name="style16"
|
||||
parent="style10"
|
||||
bulletFontSize = "5"
|
||||
alignment = "right"
|
||||
/>
|
||||
|
||||
<paraStyle name="style17"
|
||||
parent="style10"
|
||||
bulletFontSize = "5"
|
||||
alignment = "center"
|
||||
/>
|
||||
|
||||
<paraStyle name="style18"
|
||||
parent="style10"
|
||||
bulletFontSize = "5"
|
||||
alignment = "justify"
|
||||
/>
|
||||
|
||||
<paraStyle name="style20"
|
||||
parent="style1"
|
||||
textColor = "red"
|
||||
spaceBefore="1cm"
|
||||
spaceAfter="2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style21"
|
||||
parent="style1"
|
||||
textColor = "green"
|
||||
spaceBefore="1cm"
|
||||
spaceAfter="2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style22"
|
||||
parent="style1"
|
||||
textColor = "blue"
|
||||
spaceBefore="1cm"
|
||||
spaceAfter="2cm"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Colours by Hex value -->
|
||||
<!-- NB THIS CURRENTLY DOESN'T WORK! -->
|
||||
<!--
|
||||
<paraStyle name="style23"
|
||||
parent="style1"
|
||||
textColor = "#FF0000"
|
||||
/>
|
||||
|
||||
<paraStyle name="style24"
|
||||
parent="style1"
|
||||
textColor = "#00FF00"
|
||||
/>
|
||||
|
||||
<paraStyle name="style25"
|
||||
parent="style1"
|
||||
textColor = "#0000FF"
|
||||
/>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Colours by RGB value -->
|
||||
<!-- NB THIS CURRENTLY DOESN'T WORK! -->
|
||||
<!--
|
||||
<paraStyle name="style26"
|
||||
parent="style1"
|
||||
textColor = "1,0,0"
|
||||
/>
|
||||
|
||||
<paraStyle name="style27"
|
||||
parent="style1"
|
||||
textColor = "0,1,0"
|
||||
/>
|
||||
|
||||
<paraStyle name="style28"
|
||||
parent="style1"
|
||||
textColor = "0,0,1"
|
||||
/>
|
||||
-->
|
||||
|
||||
<paraStyle name="bugReport"
|
||||
parent="h1"
|
||||
spaceBefore = "0"
|
||||
textColor = "red"
|
||||
/>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story>
|
||||
<nextPage suppressFirst="1"/>
|
||||
|
||||
|
||||
<para style="style1">
|
||||
This checks for all the possible quotes: &amp; = &,
|
||||
&lt; = <, &gt; = >, &apos; = ', &quot; = ",
|
||||
&pound; = £.
|
||||
</para>
|
||||
|
||||
|
||||
<para style="h1">Paragraph 1: About this page</para>
|
||||
<para style="style1">This page tests out a number of attributes of the <b>paraStyle</b> tag.
|
||||
This paragraph is in a style we have called "style1". It should be a normal paragraph, set in Courier 12 pt.
|
||||
It should be a normal paragraph, set in Courier (not bold).
|
||||
It should be a normal paragraph, set in Courier 12 pt.</para>
|
||||
|
||||
<para style="h1">Paragraph 2: Indent Left</para>
|
||||
<para style="style2">This paragraph is in a style we have called "style2". It should be indented on the left.
|
||||
It should be indented on the left by 1 inch.
|
||||
It should be indented on the left. </para>
|
||||
|
||||
<para style="h1">Paragraph 3: Indent Right</para>
|
||||
<para style="style3">This paragraph is in a style we have called "style3". It should be indented on the right. It should be indented on the right by 1 inch. It should be indented on the right. </para>
|
||||
|
||||
<para style="h1">Paragraph 4: Space Before</para>
|
||||
<para style="style4">This paragraph is in a style we have called "style4". It should be have a space before it. It should be have a space before it of 2 centimeters. It should be have a space before it.</para>
|
||||
|
||||
<para style="h1">Paragraph 5: Space After</para>
|
||||
<para style="style5">This paragraph is in a style we have called "style5". It should be have a space after it. It should be have a space after it of 2 centimeters. It should be have a space after it.</para>
|
||||
|
||||
<para style="h1">Paragraph 6: First Line Indent</para>
|
||||
<para style="style6">This paragraph is in a style we have called "style6".It should be have an indented first line. It should be have an first line indented by 2 centimeters. It should be have an indented first line.</para>
|
||||
<para style="h1">Paragraph 7: Leading</para>
|
||||
<para style="style7">This paragraph is in a style we have called "style7". It should be using leading. It should have a gap of 5 points between each line. It should be using leading. It should have a gap of 5 pt between each line. It should be using leading. The gap between lines should be half of the height of a line. This paragraph should look like it has a line spacing of "1.5 lines" </para>
|
||||
|
||||
<para style="h1">Paragraphs 8-12: Simple Bullet Points</para>
|
||||
<para style="style8" bulletText="l"><b>Parastyle name="style8" parent="style1" bulletFontName = "ZapfDingbats" bulletFontSize = "5"</b></para>
|
||||
<para style="style8" bulletText="l">These paragraphs are in a style we have called "style8"</para>
|
||||
<para style="style8" bulletText="l">These five lines should have bullet points.</para>
|
||||
<para style="style8" bulletText="l">The bullet font is ZapfDingbats.</para>
|
||||
<para style="style8" bulletText="l">The bullet size is 5 points</para>
|
||||
<para style="style8" bulletText="l">This is a long line to see how multi-line bullets look: These paragraphs are in a style we have called "style8". These four lines should have bullet points. The bullet font is ZapfDingbats. The bullet size is 5 points</para>
|
||||
|
||||
<para style="h1">Paragraph 13-18: Indented Bullet Points</para>
|
||||
<para style="style9" bulletText="*"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "10" bulletIndent = "20"</b></para>
|
||||
<para style="style9" bulletText="*">These paragraphs are in a style we have called "style9"</para>
|
||||
<para style="style9" bulletText="*">These five lines should have <i>indented</i> bullet points.</para>
|
||||
<para style="style9" bulletText="*">Bullet points should look like a pointing hand.</para>
|
||||
<para style="style9" bulletText="*">Bullet font is still ZapfDingbats, and bullet size is 10 points.</para>
|
||||
<para style="style9" bulletText="*">The bullet indent is 20 points</para>
|
||||
<para style="style9" bulletText="*">This is a long line to see how multi-line bullets look: These paragraphs are in a style we have called "style9". These four lines should have <i>indented</i> bullet points. Bullet points should look like a pointing hand. Bullet font is still ZapfDingbats, and bullet size is 10 points. The bullet indent is 20 points</para>
|
||||
|
||||
<para style="h1">Paragraph 19-24: Indented Bullet Points with a Left Indent for the Text</para>
|
||||
<para style="style10" bulletText="*"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "10" bulletIndent = "20" leftIndent = "35"</b></para>
|
||||
<para style="style10" bulletText="*">These paragraphs are in a style we have called "style10"</para>
|
||||
<para style="style10" bulletText="*">These four lines should have <i>indented</i> bullet points, with the text indented as well.</para>
|
||||
<para style="style10" bulletText="*">Bullet points should look like a pointing hand.</para>
|
||||
<para style="style10" bulletText="*">Bullet font is still ZapfDingbats, and bullet size is 10 points.</para>
|
||||
<para style="style10" bulletText="*">The bullet indent is 20 points, and the text indent is 35 points</para>
|
||||
<para style="style10" bulletText="*">This is a long line to see how multi-line bullets look: These paragraphs are in a style we have called "style10". These four lines should have <i>indented</i> bullet points, with the text indented as well. Bullet points should look like a pointing hand. Bullet font is still ZapfDingbats, and bullet size is 10 points.</para>
|
||||
|
||||
<para style="h1">Paragraph 25: Left Justified Paragraphs</para>
|
||||
<para style="style11">This paragraph is in a style we have called "style11". It should be left justified. It has an argument which states 'alignment = "left"'. It should be left justified. It should be aligned to the left. </para>
|
||||
|
||||
<para style="h1">Paragraph 26: Right Justified Paragraphs</para>
|
||||
<para style="style12">This paragraph is in a style we have called "style12". It should be right justified. It has an argument which states 'alignment = "right"'. It should be right justified. It should be aligned to the right.</para>
|
||||
|
||||
<para style="h1">Paragraph 27: Centered Paragraphs</para>
|
||||
<para style="style13">This paragraph is in a style we have called "style13".It should be center justified. It has an argument which states 'alignment = "center"'. It should be centered. It should be aligned to the center.</para>
|
||||
|
||||
<para style="h1">Paragraph 28: Justified Paragraphs</para>
|
||||
<para style="style14">This paragraph is in a style we have called "style14". It should be justified. It has an argument which states 'alignment = "justify"'. It should be justified. This paragraph doesn't contain any bold text though.</para>
|
||||
<para style="h1">Paragraph 28.1: Justified Paragraphs With Bold Text</para>
|
||||
<para style="style14">This paragraph is in a style we have called "style14". It should be <b>justified</b>. It has an argument which states <b>'alignment = "justify"'</b>. It should be justified. This paragraph doesn't contain any bold text though.</para>
|
||||
|
||||
<para style="h1">Paragraphs 29-32: Bullets using left align, right align, centered and justify.</para>
|
||||
<para style="style15" bulletText="l"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "5" bulletIndent = "20" leftIndent = "35" alignment = "left"</b></para>
|
||||
<para style="style15" bulletText="l">This is "style15", bullets with a left alignment. (The bullets in this style are based on "style10")</para>
|
||||
<para style="style16" bulletText="l"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "5" bulletIndent = "20" leftIndent = "35" alignment = "right"</b></para>
|
||||
<para style="style16" bulletText="l">This is "style16", bullets with a right alignment.(The bullets in this style are based on "style10")</para>
|
||||
<para style="style17" bulletText="l"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "5" bulletIndent = "20" leftIndent = "35" alignment = "center"</b></para>
|
||||
<para style="style17" bulletText="l">This is "style17", bullets with a center alignment.(The bullets in this style are based on "style10")</para>
|
||||
<para style="style18" bulletText="l"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "5" bulletIndent = "20" leftIndent = "35" alignment = "justify"</b></para>
|
||||
<para style="style18" bulletText="l">This is "style18", bullets with a justified paragraph.(The bullets in this style are based on "style10")</para>
|
||||
<para style="style1">These all look wierd, but most people do not actually use these styles because they look so wrong.</para>
|
||||
|
||||
<para style="h1">Paragraph 33-35: Using Colours by Colour Name</para>
|
||||
<para style="style20">This text should be <b>RED</b></para>
|
||||
<para style="style21">This text should be <b>GREEN</b></para>
|
||||
<para style="style22">This text should be <b>BLUE</b></para>
|
||||
|
||||
<!-- THESE CURRENTLY DON'T WORK - SEE THE STYLES SECTION -->
|
||||
<!--
|
||||
<para style="h1">Paragraph 36-38: Using Colours by Hex Value</para>
|
||||
<para style="style23">This text should be <b>RED</b></para>
|
||||
<para style="style24">This text should be <b>GREEN</b></para>
|
||||
<para style="style25">This text should be <b>BLUE</b></para>
|
||||
|
||||
<para style="h1">Paragraph 39-41: Using Colours by RGB Value</para>
|
||||
<para style="style26">This text should be <b>RED</b></para>
|
||||
<para style="style27">This text should be <b>GREEN</b></para>
|
||||
<para style="style28">This text should be <b>BLUE</b></para>
|
||||
-->
|
||||
|
||||
<para style="bugReport">You <b>SHOULD</b> be able to specify colours
|
||||
by all the means available to reportlab.lib.colours. Currently, you
|
||||
<b>cannot</b> use RGB or HEX values...</para>
|
||||
|
||||
<para style="h1">Last Paragraph: Para Tags and Paragraph Content</para>
|
||||
<para style="style1">
|
||||
This should <i>not</i> have any extra spaces at the start of <b>this</b>
|
||||
line (though there should be at the start of the heading). RML should ignore
|
||||
additional whitespace, and you should be able to format the actual paragraphs
|
||||
as you like. <u>This should be underlined</u>. There should be line break after the colon:<br/>The text in this paragraph starts on a different line to the
|
||||
actual "para" tag.
|
||||
</para>
|
||||
|
||||
|
||||
<para style="h1">Quoting and escaping</para>
|
||||
<para style="style1">
|
||||
This checks for all the possible quotes: &amp; = &,
|
||||
&lt; = <, &gt; = >, &apos; = ', &quot; = ",
|
||||
&pound; = £.
|
||||
</para>
|
||||
<para style="style1">
|
||||
<i>If this is not italic</i>, <b>and this is not bold</b>, even normal angle brackets are broken.
|
||||
</para>
|
||||
<nextPage/>
|
||||
<imageAndFlowables imageName="images/replogo.gif" imageWidth="141" imageHeight="90">
|
||||
<para style="h1">Test imageAndFlowables tag with paras</para>
|
||||
<para style="style1">We should have an image on the <b>right</b> side of the paragraphs here. The imageAndFlowables
|
||||
tag can take an arbitrarary number of flowables and try to flow them round an image sepcified by attributes
|
||||
<i>imageName</i>
|
||||
<i>imageWidth</i>
|
||||
<i>imageHeight</i>
|
||||
<i>imageMask</i>; other attributes allow for padding and which side the image goes eg
|
||||
<i>imageTopPadding</i>
|
||||
<i>imageBottomPadding</i>
|
||||
<i>imageLeftPadding</i>
|
||||
<i>imageRightPadding</i>
|
||||
<i>imageSide</i>. Of course we hope that a single paragraph will flow properly round the image and that the <b>leading</b> should not appear to change during the process.
|
||||
On our assumptions, this selectionally introduced contextual feature is
|
||||
unspecified with respect to irrelevant intervening contexts in
|
||||
selectional rules. To characterize a linguistic level L, a
|
||||
descriptively adequate grammar appears to correlate rather closely with
|
||||
a descriptive fact. A consequence of the approach just outlined is that
|
||||
a case of semigrammaticalness of a different sort suffices to account
|
||||
for the system of base rules exclusive of the lexicon. A majority of
|
||||
informed linguistic specialists agree that the speaker-hearer's
|
||||
linguistic intuition raises serious doubts about the traditional
|
||||
practice of grammarians. For one thing, the descriptive power of the
|
||||
base component does not readily tolerate problems of phonemic and
|
||||
morphological analysis.
|
||||
</para>
|
||||
</imageAndFlowables>
|
||||
<imageAndFlowables imageName="images/replogo.gif" imageWidth="141" imageHeight="90" imageSide="left">
|
||||
<para style="h1">Test imageAndFlowables tag with paras</para>
|
||||
<para style="style1">We should have an image on the <b>right</b> side of the paragraphs here.
|
||||
</para>
|
||||
<para style="style1">
|
||||
Summarizing, then, we assume that the fundamental error of regarding
|
||||
functional notions as categorial may remedy and, at the same time,
|
||||
eliminate the levels of acceptability from fairly high (e.g. (99a)) to
|
||||
virtual gibberish (e.g. (98d)). This suggests that the theory of
|
||||
syntactic features developed earlier delimits a descriptive fact. We
|
||||
have already seen that any associated supporting element is not quite
|
||||
equivalent to the traditional practice of grammarians. From C1, it
|
||||
follows that the theory of syntactic features developed earlier can be
|
||||
defined in such a way as to impose irrelevant intervening contexts in
|
||||
selectional rules. So far, a descriptively adequate grammar is rather
|
||||
different from a general convention regarding the forms of the grammar.
|
||||
</para>
|
||||
</imageAndFlowables>
|
||||
|
||||
|
||||
<para style="h1">Intra-paragraph <br/></para>
|
||||
<para style="style1">
|
||||
And now for a break...<br/>
|
||||
here we should be one line two. <br/>
|
||||
Summarizing, then, we assume that the fundamental error of regarding
|
||||
functional notions as categorial may remedy and, at the same time,
|
||||
eliminate the levels of acceptability from fairly high (e.g. (99a)) to
|
||||
virtual gibberish (e.g. (98d)). Now let's fake a bullet list:
|
||||
<br/>- bullet 1
|
||||
<br/>- bullet 2
|
||||
<br/>- bullet 3
|
||||
<br/>- bullet 4
|
||||
<br/>- bullet 15
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
111
z3c/rml/tests/input/rml-examples-003-frames.rml
Normal file
111
z3c/rml/tests/input/rml-examples-003-frames.rml
Normal file
@@ -0,0 +1,111 @@
|
||||
<document filename="test_003_frames.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #3</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="5.845in" width="3in" height="4.645in"/>
|
||||
<frame id="second" x1="4.27in" y1="5.845in" width="3in" height="4.645in"/>
|
||||
<frame id="third" x1="1in" y1="1in" width="3in" height="4.645in"/>
|
||||
<frame id="fourth" x1="4.27in" y1="1in" width="3in" height="4.645in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
|
||||
<paraStyle
|
||||
name="h1"
|
||||
fontName="Helvetica-BoldOblique"
|
||||
fontSize="20"
|
||||
leading="36"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="normal"
|
||||
fontName="Helvetica"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="space below"
|
||||
fontName="Helvetica"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
spaceAfter="10"
|
||||
/>
|
||||
|
||||
<paraStyle name="bugReport"
|
||||
parent="h1"
|
||||
spaceBefore = "0"
|
||||
textColor = "red"
|
||||
/>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story>
|
||||
<para style="h1">This is frame 1</para>
|
||||
<para style="space below"><b>This page tests to see that multiple frames display on one page. It also checks to see that the "nextFrame" tag works correctly to split the text in the story correctly between those frames.</b></para>
|
||||
<para style="normal">This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.
|
||||
</para>
|
||||
<nextFrame/>
|
||||
|
||||
<para style="h1">This is frame 2</para>
|
||||
<para style="space below"><b>This page tests to see that multiple frames display on one page. It also checks to see that the "nextFrame" tag works correctly to split the text in the story correctly between those frames.</b></para>
|
||||
<para style="normal">This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two. This is the text for frame two. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two. This is the text for frame two. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two.
|
||||
</para>
|
||||
<nextFrame/>
|
||||
|
||||
<para style="h1">This is frame 3</para>
|
||||
<para style="space below"><b>This page tests to see that multiple frames display on one page. It also checks to see that the "nextFrame" tag works correctly to split the text in the story correctly between those frames.</b></para>
|
||||
<para style="normal">This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three. This is the text for frame three. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three. This is the text for frame three. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three.
|
||||
</para>
|
||||
<nextFrame/>
|
||||
|
||||
<para style="h1">This is frame 4</para>
|
||||
<para style="space below"><b>This page tests to see that multiple frames display on one page. It also checks to see that the "nextFrame" tag works correctly to split the text in the story correctly between those frames.</b></para>
|
||||
<para style="normal">This is the text for frame 4. This is the text for frame four.
|
||||
This is the text for frame 4. This is the text for frame four.
|
||||
This is the text for frame 4. This is the text for frame four. This is the text for frame four.
|
||||
This is the text for frame 4. This is the text for frame four. This is the text for frame four. This is the text for frame four. This is the text for frame four.
|
||||
This is the text for frame 4. This is the text for frame four.
|
||||
This is the text for frame 4. This is the text for frame four. This is the text for frame four.
|
||||
This is the text for frame 4. This is the text for frame four. This is the text for frame four. This is the text for frame four. This is the text for frame four.
|
||||
This is the text for frame 4. This is the text for frame four.
|
||||
This is the text for frame 4. This is the text for frame four. This is the text for frame four.
|
||||
</para>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
114
z3c/rml/tests/input/rml-examples-004-fpt-templates.rml
Normal file
114
z3c/rml/tests/input/rml-examples-004-fpt-templates.rml
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_004_fpt_templates.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1" >
|
||||
<pageTemplate id="secondary">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #4</drawRightString>
|
||||
<setFont name="Helvetica-BoldOblique" size="36"/>
|
||||
<drawCentredString x="297.5" y="755">Test #4: PAGE TWO</drawCentredString>
|
||||
<setFont name="Helvetica-Bold" size="144"/>
|
||||
<fill color="deepskyblue"/>
|
||||
<drawCentredString x="297.5" y="539">2</drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="p2-first" x1="1in" y1="1in" width="3in" height="4.645in"/>
|
||||
<frame id="p2-second" x1="4.27in" y1="1in" width="3in" height="4.645in"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #4</drawRightString>
|
||||
<setFont name="Helvetica-BoldOblique" size="36"/>
|
||||
<drawCentredString x="297.5" y="755">Test #4: PAGE ONE</drawCentredString>
|
||||
<setFont name="Helvetica-Bold" size="144"/>
|
||||
<fill color="teal"/>
|
||||
<drawCentredString x="297.5" y="539">1</drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="4.645in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
|
||||
<paraStyle
|
||||
name="h1"
|
||||
fontName="Helvetica-BoldOblique"
|
||||
fontSize="20"
|
||||
leading="36"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="normal"
|
||||
fontName="Helvetica"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="space below"
|
||||
fontName="Helvetica"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
spaceAfter="10"
|
||||
/>
|
||||
|
||||
<paraStyle name="bugReport"
|
||||
parent="h1"
|
||||
spaceBefore = "0"
|
||||
textColor = "red"
|
||||
/>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story firstPageTemplate="main">
|
||||
<para style="h1">This is page 1 - frame 1</para>
|
||||
<para style="space below"><b>This test spans two pages (this should be on page 1). It checks to see that using two separate templates works OK. It also tests to see that the "setNextTemplate" tag correctly splits the pages and displays them with the correct template.</b></para>
|
||||
<para style="space below"><b>Description of page:</b> This page should have a single frame at the bottom of the page displaying this text, a big teal-coloured number "1" above it, and some header information above that.</para>
|
||||
<para style="normal">This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.
|
||||
</para>
|
||||
<setNextTemplate name="secondary"/>
|
||||
<nextFrame/>
|
||||
|
||||
|
||||
<para style="h1">This is page2 - frame1</para>
|
||||
<para style="space below"><b>This test spans two pages (this should be on page 2). It checks to see that using two separate templates works OK. It also tests to see that the "setNextTemplate" tag correctly splits the pages and displays them with the correct template.</b></para>
|
||||
<para style="space below"><b>Description of page:</b> This page should have two different frames at the bottom of the page displaying text, a big deepskyblue-coloured number "2" above it, and some header information above that.</para>
|
||||
<para style="normal">This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two. This is the text for frame two. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two.
|
||||
</para>
|
||||
<nextFrame/>
|
||||
|
||||
<para style="h1">This is page2 - frame2</para>
|
||||
<para style="space below"><b>This test spans two pages (this should be on page 2). It checks to see that using two separate templates works OK. It also tests to see that the "setNextTemplate" tag correctly splits the pages and displays them with the correct template.</b></para>
|
||||
<para style="space below"><b>Description of page:</b> This page should have two different frames at the bottom of the page displaying text, a big deepskyblue-coloured number "2" above it, and some header information above that.</para>
|
||||
<para style="normal">This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three. This is the text for frame three. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three.
|
||||
</para>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
116
z3c/rml/tests/input/rml-examples-004-templates.rml
Normal file
116
z3c/rml/tests/input/rml-examples-004-templates.rml
Normal file
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_004_templates.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #4</drawRightString>
|
||||
<setFont name="Helvetica-BoldOblique" size="36"/>
|
||||
<drawCentredString x="297.5" y="755">Test #4: PAGE ONE</drawCentredString>
|
||||
<setFont name="Helvetica-Bold" size="144"/>
|
||||
<fill color="teal"/>
|
||||
<drawCentredString x="297.5" y="539">1</drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="4.645in"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="secondary">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #4</drawRightString>
|
||||
<setFont name="Helvetica-BoldOblique" size="36"/>
|
||||
<drawCentredString x="297.5" y="755">Test #4: PAGE TWO</drawCentredString>
|
||||
<setFont name="Helvetica-Bold" size="144"/>
|
||||
<fill color="deepskyblue"/>
|
||||
<drawCentredString x="297.5" y="539">2</drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="p2-first" x1="1in" y1="1in" width="3in" height="4.645in"/>
|
||||
<frame id="p2-second" x1="4.27in" y1="1in" width="3in" height="4.645in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
|
||||
<paraStyle
|
||||
name="h1"
|
||||
fontName="Helvetica-BoldOblique"
|
||||
fontSize="20"
|
||||
leading="36"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="normal"
|
||||
fontName="Helvetica"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="space below"
|
||||
fontName="Helvetica"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
spaceAfter="10"
|
||||
/>
|
||||
|
||||
<paraStyle name="bugReport"
|
||||
parent="h1"
|
||||
spaceBefore = "0"
|
||||
textColor = "red"
|
||||
/>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story>
|
||||
<para style="h1">This is page 1 - frame 1</para>
|
||||
<para style="space below"><b>This test spans two pages (this should be on page 1). It checks to see that using two separate templates works OK. It also tests to see that the "setNextTemplate" tag correctly splits the pages and displays them with the correct template.</b></para>
|
||||
<para style="space below"><b>Description of page:</b> This page should have a single frame at the bottom of the page displaying this text, a big teal-coloured number "1" above it, and some header information above that.</para>
|
||||
<para style="normal">This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one. This is the text for frame one. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one.
|
||||
This is the text for frame 1. This is the text for frame one. This is the text for frame one.
|
||||
</para>
|
||||
<setNextTemplate name="secondary"/>
|
||||
<nextFrame/>
|
||||
|
||||
|
||||
|
||||
<para style="h1">This is page2 - frame1</para>
|
||||
<para style="space below"><b>This test spans two pages (this should be on page 2). It checks to see that using two separate templates works OK. It also tests to see that the "setNextTemplate" tag correctly splits the pages and displays them with the correct template.</b></para>
|
||||
<para style="space below"><b>Description of page:</b> This page should have two different frames at the bottom of the page displaying text, a big deepskyblue-coloured number "2" above it, and some header information above that.</para>
|
||||
<para style="normal">This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two. This is the text for frame two. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two.
|
||||
This is the text for frame 2. This is the text for frame two. This is the text for frame two.
|
||||
</para>
|
||||
<nextFrame/>
|
||||
|
||||
<para style="h1">This is page2 - frame2</para>
|
||||
<para style="space below"><b>This test spans two pages (this should be on page 2). It checks to see that using two separate templates works OK. It also tests to see that the "setNextTemplate" tag correctly splits the pages and displays them with the correct template.</b></para>
|
||||
<para style="space below"><b>Description of page:</b> This page should have two different frames at the bottom of the page displaying text, a big deepskyblue-coloured number "2" above it, and some header information above that.</para>
|
||||
<para style="normal">This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three. This is the text for frame three. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three.
|
||||
This is the text for frame 3. This is the text for frame three. This is the text for frame three.
|
||||
</para>
|
||||
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
58
z3c/rml/tests/input/rml-examples-005-fonts.rml
Normal file
58
z3c/rml/tests/input/rml-examples-005-fonts.rml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by Andy Robinson (ReportLab Inc.) -->
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_005_fonts.pdf">
|
||||
<docinit>
|
||||
<registerType1Face afmFile="DarkGardenMK.afm" pfbFile="DarkGardenMK.pfb"/>
|
||||
<registerFont name="DarkGardenMK" faceName="DarkGardenMK" encName="WinAnsiEncoding"/>
|
||||
<registerTTFont faceName="Vera" fileName="Vera.ttf"/>
|
||||
</docinit>
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<paraStyle name="robot" fontName="DarkGardenMK" fontSize="12" spaceBefore="0.5 cm"/>
|
||||
<paraStyle name="Vera" fontName="Vera" fontSize="12" spaceBefore="0.5 cm"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para>
|
||||
This paragraph is an ordinary font style, but switches font.
|
||||
<font face="DarkGardenMK">This is in a custom font</font>
|
||||
and <font face="Vera">this is in a custom TTF font</font>.
|
||||
<!-- doesn't work <font face="DarkGardenMK"> -->
|
||||
<!-- Yahoo! Rooms
|
||||
Asian Markets - Discuss the latest market activity.
|
||||
Biotechnology - Discuss the latest research and advances in this field.
|
||||
Bond Market - Come here to chat live about the bond market!
|
||||
Career Corner - Find career tips and advice at http://careers.yahoo.com/
|
||||
Small Business - Where professionals meet. Visit http://smallbusiness.yahoo.com/
|
||||
StockWatch - Discuss the latest on Wall St. Visit http://finance.yahoo.com/ -->
|
||||
<!-- </font> -->
|
||||
</para>
|
||||
<para style="robot">This is a whole paragraph in the 'robot' style.</para>
|
||||
<para style="Vera">This is a whole paragraph in the 'Vera' style.</para>
|
||||
<illustration height="100" width="1">
|
||||
<setFont name="DarkGardenMK" size="25"/>
|
||||
<drawString x="25" y="25">"DarkGardenMK"</drawString>
|
||||
<setFont name="Vera" size="25"/>
|
||||
<drawString x="25" y="50">"Vera"</drawString>
|
||||
<setFont name="Helvetica" size="16"/>
|
||||
<drawString x="25" y="75">This is drawn directly in an illustration</drawString>
|
||||
</illustration>
|
||||
<para>
|
||||
|
||||
<font face="Helvetica" size="9">This is Helvetica (plain).</font>
|
||||
<font face="Helvetica" size="9"><i>This is Helvetica + italics.</i></font>
|
||||
<font face="Helvetica-Oblique" size="9">This is Helvetica-Oblique.</font>
|
||||
<font face="Helvetica-Oblique" size="9"><b>This is Helvetica-Oblique + BOLD.</b></font>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<i>This is plain text (no font face given) + italic.</i>
|
||||
</para>
|
||||
|
||||
|
||||
</story>
|
||||
</document>
|
||||
55
z3c/rml/tests/input/rml-examples-006-barcodes.rml
Normal file
55
z3c/rml/tests/input/rml-examples-006-barcodes.rml
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_006_barcodes.pdf">
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" spaceAfter="10"/>
|
||||
<blockTableStyle id="temp001">
|
||||
<blockAlignment value="left"/>
|
||||
<blockFont name="Helvetica-Oblique"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<para style="normal">
|
||||
Various Barcodes as drawing ops. Original code contributed by Ty Sarnas.
|
||||
</para>
|
||||
|
||||
<para style="normal">
|
||||
Code11
|
||||
</para>
|
||||
|
||||
<illustration width="10cm" height="1cm">
|
||||
<barCode x="1cm" y="0" code="Code11">01234545634563</barCode>
|
||||
</illustration>
|
||||
|
||||
<spacer length="1cm"/>
|
||||
<para style="normal">Code128</para>
|
||||
<illustration width="10cm" height="1cm">
|
||||
<barCode x="1cm" y="0" code="Code128">AB-12345678</barCode>
|
||||
</illustration>
|
||||
|
||||
<spacer length="1cm"/>
|
||||
<para style="normal">Code128 With settings</para>
|
||||
<illustration width="10cm" height="1cm">
|
||||
<barCode x="1cm" y="0" code="Code128" barHeight="0.5in" barWidth="0.009in">AB-12345678</barCode>
|
||||
</illustration>
|
||||
<blockTable style="temp001">
|
||||
<tr><td>barChartFlowable</td>
|
||||
<td><barCodeFlowable code="Standard39" value="PFWZF" barWidth="0.01in" quiet="no"/></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
994
z3c/rml/tests/input/rml-examples-008-tables.rml
Normal file
994
z3c/rml/tests/input/rml-examples-008-tables.rml
Normal file
@@ -0,0 +1,994 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_008_tables.pdf">
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="temp001">
|
||||
<blockAlignment value="left"/>
|
||||
<blockFont name="Helvetica-Oblique"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
|
||||
<blockBackground colorName="pink" start="0,0" stop="-1,0"/>
|
||||
<blockBackground colorName="yellow" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="span001">
|
||||
<blockAlignment value="center"/>
|
||||
<blockValign value="middle" start="-1,0" stop="-1,-1"/>
|
||||
<blockSpan start="0,0" stop="2,0"/>
|
||||
<blockSpan start="-1,0" stop="-1,-1"/>
|
||||
<lineStyle kind="GRID" colorName="black" start="0,1" stop="-2,-1"/>
|
||||
<lineStyle kind="GRID" colorName="black" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="numeric">
|
||||
<!--top row - centre and bold, easy-->
|
||||
<blockFont name="Times-Bold" start="0,0" stop="-1,0"/>
|
||||
<blockAlignment value="center" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="purple" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="purple" start="0,0" stop="-1,0"/>
|
||||
<!--numeric region - decimal align and set right padding-->
|
||||
<blockAlignment value="right" start="1,1" stop="-1,-1"/>
|
||||
<!--bottom row - double underline-->
|
||||
<blockFont name="Times-Bold" start="0,-1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="purple" start="0,-1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="purple" start="0,-1" stop="-1,-1" count="2"/>
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para>The email address should be a clickable mailto link built by creating a plugin within the cell. And Robin's job title
|
||||
should be on a separate line to his name. In the third row, we use the newer and easier table cell properties "href" and "destination".</para>
|
||||
<spacer length="24"/>
|
||||
<blockTable colWidths="5cm,5cm" style="temp001">
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>Email</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Robin Becker
|
||||
(chief propellerhead)</td>
|
||||
<td>
|
||||
<plugInFlowable module="mymodule" function="linkURL">("mailto:robin@reportlab.com",)</plugInFlowable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td destination="BACK_PAGE">Internal link to back page</td>
|
||||
<td href="http://www.reportlab.com/">Hyperlink to www.reportlab.com</td>
|
||||
|
||||
</tr>
|
||||
</blockTable>
|
||||
<spacer length="24"/>
|
||||
<para>This should be a 5x5 table where some ranges span. Note that the grid and background
|
||||
commands still work on the "underlying" grid; if you grid the whole table, it will show through
|
||||
your 'spanned cells' </para>
|
||||
<spacer length="12"/>
|
||||
<blockTable colWidths="3cm,3cm,3cm,3cm,3cm" rowHeights="1cm,1cm,1cm,1cm,1cm" style="span001">
|
||||
<tr>
|
||||
<td>
|
||||
<para>This should span the first 3 cells in the top row. It's ordinary left aligned
|
||||
text but could be centred if you want.</para>
|
||||
</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>D</td>
|
||||
<td>
|
||||
<para>This should span all five cells in the right column. We vertically centred the
|
||||
text to make it look sensible using a separate stylesheet command.</para>
|
||||
<hr spaceBefore="5"/>
|
||||
<para>some more text</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>DB</td>
|
||||
<td>E</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>DB</td>
|
||||
<td>E</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>DB</td>
|
||||
<td>E</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>DB</td>
|
||||
<td>E</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<spacer length="24"/>
|
||||
<para>This should be a 5x5 table where some ranges span. The column widths have been set as
|
||||
3cm,10%,10%,10%,30%. The percentage refers to unallocated width only.
|
||||
</para>
|
||||
<spacer length="12"/>
|
||||
<blockTable colWidths="3cm,10%,10%,10%,30%" rowHeights="2cm,1cm,1cm,1cm,None" style="span001">
|
||||
<tr>
|
||||
<td vAlign="middle">
|
||||
<para>This should span the first 3 cells in the top row. It's ordinary left aligned
|
||||
text but could be centred if you want.</para>
|
||||
</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>D</td>
|
||||
<td leftPadding="0" rightPadding="0">
|
||||
<para>This should span all five cells in the right column. We vertically centred the
|
||||
text to make it look sensible using a separate stylesheet command.</para>
|
||||
<hr spaceBefore="1" width="100%" thickness="1.5" color="pink"/>
|
||||
<hr spaceBefore="1" width="100%" thickness="1.5" color="pink" lineCap="butt"/>
|
||||
<hr spaceBefore="1" width="100%" thickness="1.5" color="pink" lineCap="square"/>
|
||||
<hr spaceBefore="1" width="50%" thickness="1.5" color="pink" lineCap="square" align="right"/>
|
||||
<hr spaceBefore="1" width="50%" thickness="1.5" color="pink" lineCap="square" align="left"/>
|
||||
<hr spaceBefore="1" width="50%" thickness="1.5" color="pink" lineCap="square" align="centre"/>
|
||||
<para>some more text</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>DB</td>
|
||||
<td>E</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>DB</td>
|
||||
<td>E</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>DB</td>
|
||||
<td>E</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
<td>C</td>
|
||||
<td>DB</td>
|
||||
<td>E</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<spacer length="24"/>
|
||||
<nextPage/>
|
||||
<bookmark name="PAGE_TWO"/>
|
||||
<para>This shows some pointers on doing financial tables. It demonstrates the decimal alignment and
|
||||
multiple lines. We also used a local <td color="red"> attribute for the negative cell; ideally one wants to make the data drive the colour,
|
||||
so that generator apps don't need to make para tags in every cell if they want red negatives.
|
||||
If we move to dynamic RML, then a number-and-cell-formatting function is possible, but static RML
|
||||
sees everything as text.
|
||||
|
||||
Note that when the value does not contain the decimal character but there are non-digit characters at the
|
||||
end, it tries to align the rightmost digits with other rows.
|
||||
</para>
|
||||
<spacer length="12"/>
|
||||
<blockTable colWidths="8cm,4cm">
|
||||
<blockTableStyle id="temp003">
|
||||
<!--top row - centre and bold, easy-->
|
||||
<blockFont name="Times-Bold" start="0,0" stop="-1,0"/>
|
||||
<blockAlignment value="center" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="purple" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="purple" start="0,0" stop="-1,0"/>
|
||||
<!--numeric region - decimal align and set right padding-->
|
||||
<blockAlignment value="decimal" start="1,1" stop="-1,-1"/>
|
||||
<blockRightPadding length="1.5cm" start="1,1" stop="-1,-1"/>
|
||||
<blockTextColor colorName="red" start="1,-2" stop="1,-2"/>
|
||||
<!--bottom row - double underline-->
|
||||
<blockFont name="Times-Bold" start="0,-1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="purple" start="0,-1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="purple" start="0,-1" stop="-1,-1" count="2"/>
|
||||
</blockTableStyle>
|
||||
<tr>
|
||||
<td>Corporate Assets</td>
|
||||
<td>Amount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fixed Assets</td>
|
||||
<td>1,234,567.89</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Legal Offense Fund</td>
|
||||
<td>86,000,000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Company Vehicle</td>
|
||||
<td>1,234.8901</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Petty Cash</td>
|
||||
<td>42</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Intellectual Property</td>
|
||||
<td>Questionable</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bank Overdraft</td>
|
||||
<td fontColor="red">(13,029)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Goodwill</td>
|
||||
<td fontColor="red">(742,078,231.56)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Flat Screen TV</td>
|
||||
<td fontColor="red">27 inches</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Net Position</td>
|
||||
<td>Doomed. Really!</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<nextFrame/>
|
||||
<para>Individual <td> tags that contain pure strings can override the following attributes:
|
||||
<font face="Courier-Bold" size="9">fontName, fontSize, fontColor, leading, leftPadding, rightPadding,
|
||||
topPadding, bottomPadding, background, align, vAlign,
|
||||
lineBelowThickness, lineBelowColor, lineBelowCap, lineBelowCount, lineBelowSpace,
|
||||
lineAboveThickness, lineAboveColor, lineAboveCap, lineAboveCount, lineAboveSpace,
|
||||
lineLeftThickness, lineLeftColor, lineLeftCap, lineLeftCount, lineLeftSpace,
|
||||
lineRightThickness, lineRightColor, lineRightCap, lineRightCount, lineRightSpace
|
||||
</font>.</para>
|
||||
<spacer length="24"/>
|
||||
<blockTable colWidths="5cm,5cm" style="temp001">
|
||||
<tr>
|
||||
<td>fontName</td>
|
||||
<td fontName="Courier">Courier</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontName</td>
|
||||
<td fontName="Helvetica">Helvetica</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontSize</td>
|
||||
<td fontSize="8">8</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontSize</td>
|
||||
<td fontSize="14">14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontColor</td>
|
||||
<td fontColor="red">red</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontColor</td>
|
||||
<td fontColor="blue">blue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>leading</td>
|
||||
<td leading="16">leading
|
||||
is
|
||||
16</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>leading</td>
|
||||
<td leading="12">leading
|
||||
is
|
||||
12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>leftPadding</td>
|
||||
<td leftPadding="10">10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>leftPadding</td>
|
||||
<td leftPadding="16">16</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rightPadding</td>
|
||||
<td rightPadding="10" align="right">10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rightPadding</td>
|
||||
<td rightPadding="24" align="right">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>topPadding</td>
|
||||
<td topPadding="10">10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>topPadding</td>
|
||||
<td topPadding="24">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bottomPadding</td>
|
||||
<td bottomPadding="10">10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bottomPadding</td>
|
||||
<td bottomPadding="24">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>background</td>
|
||||
<td background="pink">pink</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>background</td>
|
||||
<td background="lightblue">lightblue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>align</td>
|
||||
<td align="left">left</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>align</td>
|
||||
<td align="center">center</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>align</td>
|
||||
<td align="right">right</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-
|
||||
vAlign
|
||||
-</td>
|
||||
<td vAlign="top">top</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-
|
||||
vAlign
|
||||
-</td>
|
||||
<td vAlign="middle">middle</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-
|
||||
vAlign
|
||||
-</td>
|
||||
<td vAlign="bottom">bottom</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>lineBelow</td>
|
||||
<td lineBelowThickness="1" lineBelowColor="red">right</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<nextFrame/>
|
||||
<para>This table is using <b><xpre></b> tags around the contents of the right hand column.</para>
|
||||
<spacer length="24"/>
|
||||
<blockTable colWidths="5cm,5cm" style="temp001">
|
||||
<tr>
|
||||
<td>fontName</td>
|
||||
<td fontName="Courier">
|
||||
<xpre>Courier</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontName</td>
|
||||
<td fontName="Helvetica">
|
||||
<xpre>Helvetica</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontSize</td>
|
||||
<td fontSize="8">
|
||||
<xpre>8</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontSize</td>
|
||||
<td fontSize="14">
|
||||
<xpre>14</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontColor</td>
|
||||
<td fontColor="red">
|
||||
<xpre>red</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fontColor</td>
|
||||
<td fontColor="blue">
|
||||
<xpre>blue</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>leading</td>
|
||||
<td leading="16">
|
||||
<xpre>leading
|
||||
is
|
||||
16</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>leading</td>
|
||||
<td leading="12">
|
||||
<xpre>leading
|
||||
is
|
||||
12</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>leftPadding</td>
|
||||
<td leftPadding="10">
|
||||
<xpre>10</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>leftPadding</td>
|
||||
<td leftPadding="16">
|
||||
<xpre>16</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rightPadding</td>
|
||||
<td rightPadding="10" align="right">
|
||||
<xpre>10</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rightPadding</td>
|
||||
<td rightPadding="24" align="right">
|
||||
<xpre>24</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>topPadding</td>
|
||||
<td topPadding="10">
|
||||
<xpre>10</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>topPadding</td>
|
||||
<td topPadding="24">
|
||||
<xpre>24</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bottomPadding</td>
|
||||
<td bottomPadding="10">
|
||||
<xpre>10</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bottomPadding</td>
|
||||
<td bottomPadding="24">
|
||||
<xpre>24</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>background</td>
|
||||
<td background="pink">
|
||||
<xpre>pink</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>background</td>
|
||||
<td background="lightblue">
|
||||
<xpre>lightblue</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>align</td>
|
||||
<td align="left">
|
||||
<xpre>left</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>align</td>
|
||||
<td align="center">
|
||||
<xpre>center</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>align</td>
|
||||
<td align="right">
|
||||
<xpre>right</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-
|
||||
vAlign
|
||||
-</td>
|
||||
<td vAlign="top">
|
||||
<xpre>top</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-
|
||||
vAlign
|
||||
-</td>
|
||||
<td vAlign="middle">
|
||||
<xpre>middle</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-
|
||||
vAlign
|
||||
-</td>
|
||||
<td vAlign="bottom">
|
||||
<xpre>bottom</xpre>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<nextFrame/>
|
||||
<h2>Bulk Data Support</h2>
|
||||
<para>Very often one wants to get quite a lot of text or numeric data into a table - for
|
||||
example from a database query or imported data file. Quoting all of this correctly as
|
||||
XML and wrapping in in td and tr tags is time and memory consumuing, unquoting and parsing it
|
||||
all back even more so. Therefore, instead of explicitly creating row and cell tags, you
|
||||
can now use a new <b>bulkData</b> tag. This lets you specify a delimiter for fields (default
|
||||
is comma) and for records (default is newline), and rml2pdf will break this up.</para>
|
||||
<para>If you want to avoid having to quote ampersands, wrap this in a CDATA escape sequence.</para>
|
||||
<para>Of course if you want per-cell formatting or to put arbitrary flowables in a cell, you
|
||||
must use the other tags.</para>
|
||||
<spacer length="24"/>
|
||||
<blockTable style="numeric">
|
||||
<bulkData><![CDATA[
|
||||
Product,Profit
|
||||
Sprockets,26
|
||||
Widgets,34
|
||||
Thingummies,217
|
||||
Bits & Bobs,23
|
||||
Total,277
|
||||
]]></bulkData>
|
||||
</blockTable>
|
||||
<spacer length="24"/>
|
||||
<para>You can specify a tab with <b>fieldDelim="\t"</b>, but we generally advise against using any
|
||||
whitespace character as a delimiter if you have a choice. You can also specify fine-grained
|
||||
"stripping" control; the default behaviour
|
||||
is to strip whitespace off the top and bottom of the overall data block, so blank lines are
|
||||
excluded, and off the ends of each row so line endings and indentation don't matter, but not off each
|
||||
cell. Note that the strings in the cells may contain spaces
|
||||
and these spaces will be respected in formatting. You are also advised to use a CDATA
|
||||
escape sequence around your data so that "&","<" and ">", characters don't
|
||||
need special handling.</para>
|
||||
<h2>Excel Bulk Data Support</h2>
|
||||
<para>The <b>excelData</b> tag is very similar to the bulk data support, but reads the bulk
|
||||
data from an Excel file instead of from delimited textual data. The <b>range</b> attribute is
|
||||
optional.</para>
|
||||
<spacer length="24"/>
|
||||
<h3><font color="red">
|
||||
Sorry Ecel Bulk Support is not yet here
|
||||
</font></h3>
|
||||
<!--
|
||||
<blockTable style="numeric">
|
||||
<excelData fileName="exceldata.xls" sheetName="Sheet1" range="A1:B7" />
|
||||
</blockTable>
|
||||
-->
|
||||
<spacer length="24"/>
|
||||
<h2>Colour cycles by rows and columns</h2>
|
||||
<para>It's sometimes nice to alternate colours by row (e.g. a pale color then
|
||||
white) to visually break up a long table. The style lets you specify <b>cycles</b> as
|
||||
well as single colours. Here we have created a style command which cycles through
|
||||
pale green and white, like old stacks of fanfold paper...</para>
|
||||
<blockTable align="LEFT">
|
||||
<blockTableStyle id="repeater" spaceBefore="12">
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="0.5"/>
|
||||
<blockFont name="Times-Bold" size="6" leading="7" start="0,0" stop="-1,0"/>
|
||||
<blockBottomPadding length="1"/>
|
||||
<blockBackground colorName="0xD0D0D0" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0" thickness="0.5"/>
|
||||
<!--body section-->
|
||||
<blockFont name="Times-Roman" size="6" leading="7" start="0,1" stop="-1,-1"/>
|
||||
<blockTopPadding length="1" start="0,1" stop="-1,-1"/>
|
||||
<blockBackground colorsByRow="0xD0FFD0;None" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>Item</td>
|
||||
<td>Debit</td>
|
||||
<td>Credit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Bottom row should be greem</td>
|
||||
<td>110</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<nextFrame/>
|
||||
<para>Try again by column, with three colors this time. Also ensure some row heights
|
||||
vary to check accuracy of drawing.</para>
|
||||
<blockTable align="RIGHT">
|
||||
<blockTableStyle id="repeater2" spaceBefore="12">
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="0.5"/>
|
||||
<lineStyle kind="GRID" colorName="gray" thickness="0.25"/>
|
||||
<blockFont name="Times-Bold" size="6" leading="7" start="0,0" stop="-1,0"/>
|
||||
<blockBottomPadding length="1"/>
|
||||
<blockBackground colorName="0xD0D0D0" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0" thickness="0.5"/>
|
||||
<!--body section-->
|
||||
<blockFont name="Times-Roman" size="6" leading="7" start="0,1" stop="-1,-1"/>
|
||||
<blockTopPadding length="1" start="0,1" stop="-1,-1"/>
|
||||
<blockBackground colorsByRow="0xD0FFD0;0xFFD0FF;None" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>Item</td>
|
||||
<td>Debit</td>
|
||||
<td>Credit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients
|
||||
plus magnum of champagne</td>
|
||||
<td>400</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>28-09-2004</td>
|
||||
<td>Expensive lunch with clients</td>
|
||||
<td>100</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para>And now by column (although this may be used less...)</para>
|
||||
<blockTable>
|
||||
<blockTableStyle id="repeater3" spaceBefore="12">
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="0.5"/>
|
||||
<lineStyle kind="GRID" colorName="gray" thickness="0.25"/>
|
||||
<blockFont name="Times-Bold" size="6" leading="7" start="0,0" stop="-1,0"/>
|
||||
<blockBottomPadding length="1"/>
|
||||
<blockBackground colorName="0xD0D0D0" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0" thickness="0.5"/>
|
||||
<!--body section-->
|
||||
<blockFont name="Times-Roman" size="6" leading="7" start="0,1" stop="-1,-1"/>
|
||||
<blockTopPadding length="1" start="0,1" stop="-1,-1"/>
|
||||
<blockBackground colorsByCol="0xD0FFD0;None" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>Item</td>
|
||||
<td>Jan</td>
|
||||
<td>Feb</td>
|
||||
<td>Mar</td>
|
||||
<td>Apr</td>
|
||||
<td>May</td>
|
||||
<td>Jun</td>
|
||||
<td>Jul</td>
|
||||
<td>Aug</td>
|
||||
<td>Sep</td>
|
||||
<td>Oct</td>
|
||||
<td>Nov</td>
|
||||
<td>Dec</td>
|
||||
<td>Total</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expenses</td>
|
||||
<td>Entertainment</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>1200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expenses</td>
|
||||
<td>Entertainment</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>1200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expenses</td>
|
||||
<td>Entertainment</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>1200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expenses</td>
|
||||
<td>Entertainment</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>1200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expenses</td>
|
||||
<td>Entertainment</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>100</td>
|
||||
<td>1200</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
|
||||
<h2>Splitting over pages - top and bottom rows</h2>
|
||||
<para>Sometimes a table splits over a page and you don't have a grid, so the bottom part (and top of the
|
||||
new page) have no line boxing them in. The splitfirst and splilast magic coordinates can be used to insert
|
||||
a line drawing routine into the style for this. I used an ugly thick purple line!</para>
|
||||
<blockTable repeatRows="1">
|
||||
<blockTableStyle id="repeater" spaceBefore="12">
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="0.5"/>
|
||||
<blockFont name="Times-Bold" size="6" leading="7" start="0,0" stop="-1,0"/>
|
||||
<blockBottomPadding length="1"/>
|
||||
<blockBackground colorName="0xD0D0D0" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0" thickness="0.5"/>
|
||||
<!--body section-->
|
||||
<blockFont name="Times-Roman" size="6" leading="7" start="0,1" stop="-1,-1"/>
|
||||
<blockTopPadding length="1" start="0,1" stop="-1,-1"/>
|
||||
<blockBackground colorsByRow="0xD0FFD0;None" start="0,1" stop="-1,-1"/>
|
||||
<blockAlignment value="right" start="1,1" stop="-1,-1"/>
|
||||
|
||||
<!-- ensure the bottom of the table is 'closed off' during the split. I've used an ugly red dashed line -->
|
||||
<lineStyle kind="LINEBELOW" colorName="purple" start="0,splitlast" stop="-1,splitlast" thickness="3"/>
|
||||
|
||||
|
||||
</blockTableStyle>
|
||||
<tr> <td>Date</td><td>Item</td><td>Debit</td><td>Credit</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
|
||||
<tr> <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100 </td><td>-</td></tr>
|
||||
|
||||
</blockTable>
|
||||
|
||||
<bookmark name="BACK_PAGE"/>
|
||||
</story>
|
||||
</document>
|
||||
117
z3c/rml/tests/input/rml-examples-009-splitting.rml
Normal file
117
z3c/rml/tests/input/rml-examples-009-splitting.rml
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_009_splitting.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #9</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="5.845in" width="6.27in" height="4in"/>
|
||||
<frame id="second" x1="1in" y1="1in" width="6.27in" height="4in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize></initialize>
|
||||
|
||||
<paraStyle name="h1"
|
||||
fontName="Courier-Bold"
|
||||
fontSize="12"
|
||||
spaceBefore = "0.5 cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style1"
|
||||
fontName="Courier"
|
||||
fontSize="10"
|
||||
/>
|
||||
|
||||
|
||||
<paraStyle name="heading"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="24"
|
||||
leading="28"
|
||||
spaceBefore = "24"
|
||||
/>
|
||||
|
||||
<paraStyle name="head_keep"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="24"
|
||||
leading="28"
|
||||
spaceBefore = "24"
|
||||
keepWithNext="1"
|
||||
/>
|
||||
|
||||
<paraStyle name="head_nokeep"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="24"
|
||||
leading="28"
|
||||
spaceBefore = "24"
|
||||
keepWithNext="0"
|
||||
/>
|
||||
|
||||
<paraStyle name="body"
|
||||
fontName="Helvetica"
|
||||
fontSize="12"
|
||||
leading="14"
|
||||
spaceBefore = "3"
|
||||
/>
|
||||
|
||||
|
||||
<blockTableStyle id="myStyle">
|
||||
<blockAlignment value="center"/>
|
||||
<blockFont name="Helvetica-Oblique"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story>
|
||||
<spacer length="3.65in"/>
|
||||
<para style="style1">This page tests splitting - this PARAGRAPH in style 'style1' should
|
||||
split between the two frames on this page. This page tests splitting -
|
||||
this paragraph should split between the two frames on this page. This
|
||||
page tests splitting - this paragraph should split between the two
|
||||
frames on this page. This page tests splitting - this paragraph should
|
||||
split between the two frames on this page. This page tests splitting -
|
||||
this paragraph should split between the two frames on this page.
|
||||
</para>
|
||||
|
||||
<nextFrame/>
|
||||
|
||||
<spacer length="3.65in"/>
|
||||
<pre style="style1">This page tests splitting - this PRE in style
|
||||
'style1' should split between the two frames on this page. These
|
||||
frames should be ON PAGE TWO, otherwise this test has FAILED. This
|
||||
page tests splitting - this preformatted paragraph should split between the
|
||||
two -- (proves this is a pre)
|
||||
frames on this page. This page tests splitting - this pre should
|
||||
split between the two frames on this page. This page tests splitting -
|
||||
this pre should split between the two frames on this page. This
|
||||
page tests splitting - this pre should split between the two
|
||||
frames on this page. </pre>
|
||||
|
||||
<nextFrame/>
|
||||
|
||||
<spacer length="3.65in"/>
|
||||
|
||||
<blockTable colWidths="3cm, 3cm,3cm" style="myStyle">
|
||||
<tr> <td>This tests </td> <td>how a </td><td>simple table</td></tr>
|
||||
<tr> <td>splits</td> <td>across</td><td>frames</td></tr>
|
||||
<tr> <td>blah</td> <td>blah</td><td>blah</td></tr>
|
||||
</blockTable>
|
||||
|
||||
<nextFrame/>
|
||||
|
||||
<spacer length="3.65in"/>
|
||||
|
||||
<plugInFlowable module="module" function="myPreformatted"/>
|
||||
|
||||
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
29
z3c/rml/tests/input/rml-examples-010-linkURL.rml
Normal file
29
z3c/rml/tests/input/rml-examples-010-linkURL.rml
Normal file
@@ -0,0 +1,29 @@
|
||||
<!-- edited with XML Spy v4.0 U (http://www.xmlspy.com) by Andy Robinson (Reportlab Inc.) -->
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_010_linkURL.pdf">
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para>These should have links.</para>
|
||||
<blockTable colWidths="5cm,5cm">
|
||||
<blockTableStyle id="temp001">
|
||||
<blockAlignment value="left"/>
|
||||
<blockFont name="Helvetica-Oblique"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
|
||||
<blockBackground colorName="pink" start="0,0" stop="-1,0"/>
|
||||
<blockBackground colorName="yellow" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<tr><td>Name</td><td>Email</td></tr>
|
||||
<tr>
|
||||
<td>Robin</td>
|
||||
<td><plugInFlowable module="mymodule" function="linkURL">("mailto:robin@reportlab.com",)</plugInFlowable></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
190
z3c/rml/tests/input/rml-examples-011-keepwithnext.rml
Normal file
190
z3c/rml/tests/input/rml-examples-011-keepwithnext.rml
Normal file
@@ -0,0 +1,190 @@
|
||||
<!-- edited with XML Spy v4.0 U (http://www.xmlspy.com) by Andy Robinson (Reportlab Inc.) -->
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_011_keepwithnext.pdf">
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in"/>
|
||||
</pageTemplate>
|
||||
|
||||
<pageTemplate id="twoparts">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #9</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="5.845in" width="6.27in" height="4in"/>
|
||||
<frame id="second" x1="1in" y1="1in" width="6.27in" height="4in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
|
||||
|
||||
<paraStyle name="heading"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="24"
|
||||
leading="28"
|
||||
spaceBefore = "24"
|
||||
/>
|
||||
|
||||
<paraStyle name="head_keep"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="24"
|
||||
leading="28"
|
||||
spaceBefore = "24"
|
||||
keepWithNext="1"
|
||||
/>
|
||||
|
||||
<paraStyle name="head_nokeep"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="24"
|
||||
leading="28"
|
||||
spaceBefore = "24"
|
||||
keepWithNext="0"
|
||||
/>
|
||||
|
||||
<paraStyle name="body"
|
||||
fontName="Helvetica"
|
||||
fontSize="12"
|
||||
leading="14"
|
||||
spaceBefore = "3"
|
||||
/>
|
||||
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para>There should be a table on this page</para>
|
||||
<blockTable colWidths="5cm">
|
||||
<blockTableStyle id="temp000" keepWithNext="1"/>
|
||||
<tr><td><para>These should have links.</para></td></tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="5cm,5cm">
|
||||
<blockTableStyle id="temp001">
|
||||
<blockAlignment value="left"/>
|
||||
<blockFont name="Helvetica-Oblique"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
|
||||
<blockBackground colorName="pink" start="0,0" stop="-1,0"/>
|
||||
<blockBackground colorName="yellow" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<tr><td>Name</td><td>Email</td></tr>
|
||||
<tr>
|
||||
<td>Robin</td>
|
||||
<td><plugInFlowable module="mymodule" function="linkURL">("mailto:robin@reportlab.com",)</plugInFlowable></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spacer length="4in"/><para>xxx</para></td><td></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<nextFrame/>
|
||||
<para>There should be a table on the next page</para>
|
||||
<spacer length="5in"/>
|
||||
<blockTable colWidths="5cm">
|
||||
<blockTableStyle id="temp000" keepWithNext="1"/>
|
||||
<tr><td><para>These should have links.</para></td></tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="5cm,5cm">
|
||||
<blockTableStyle id="temp001">
|
||||
<blockAlignment value="left"/>
|
||||
<blockFont name="Helvetica-Oblique"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
|
||||
<blockBackground colorName="pink" start="0,0" stop="-1,0"/>
|
||||
<blockBackground colorName="yellow" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<tr><td>Name</td><td>Email</td></tr>
|
||||
<tr>
|
||||
<td>Robin</td>
|
||||
<td><plugInFlowable module="mymodule" function="linkURL">("mailto:robin@reportlab.com",)</plugInFlowable></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spacer length="4in"/><para>xxx</para></td><td></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<setNextTemplate name="twoparts"/>
|
||||
<nextPage/>
|
||||
<nextPage/>
|
||||
<para style="heading">
|
||||
keepWithNext and paragraph splitting = #1.
|
||||
</para>
|
||||
<para style="body">
|
||||
This tests the ability to make headings 'stick to' the paragraphs after them. The heading style
|
||||
used is supposed to be kept with the next paragraph, even if this involves flopping onto the
|
||||
next page. We have sized this text so that there is enough space for the heading below to
|
||||
fit into the top frame. However, its style has a <i>keepWithNext</i> attribute set to 1, so it
|
||||
should flop down into the bottom half. Cross your fingers....
|
||||
</para>
|
||||
|
||||
<para style="head_keep">This should be on the bottom half</para>
|
||||
<para style="body">
|
||||
|
||||
To characterize a linguistic level L,
|
||||
this selectionally introduced contextual
|
||||
feature delimits the requirement that
|
||||
branching is not tolerated within the
|
||||
dominance scope of a complex
|
||||
symbol. Notice, incidentally, that the
|
||||
notion of level of grammaticalness
|
||||
does not affect the structure of the
|
||||
levels of acceptability from fairly high
|
||||
(e.g. (99a)) to virtual gibberish (e.g.
|
||||
(98d)). Suppose, for instance, that a
|
||||
subset of English sentences interesting
|
||||
on quite independent grounds appears
|
||||
to correlate rather closely with an
|
||||
important distinction in language use.
|
||||
Presumably, this analysis of a
|
||||
formative as a pair of sets of features is
|
||||
not quite equivalent to the system of
|
||||
base rules exclusive of the lexicon. We
|
||||
have already seen that the appearance
|
||||
of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction
|
||||
does not readily tolerate the strong
|
||||
generative capacity of the theory.
|
||||
|
||||
</para>
|
||||
|
||||
<nextPage/>
|
||||
<para style="heading">
|
||||
keepWithNext and paragraph splitting - #2.
|
||||
</para>
|
||||
<para style="body">
|
||||
This time the style has keepWithNext turned OFF. The paragraph below should
|
||||
be in the top half.
|
||||
</para>
|
||||
|
||||
<para style="head_nokeep">This should be on the top half</para>
|
||||
<para style="body">
|
||||
|
||||
To characterize a linguistic level L,
|
||||
this selectionally introduced contextual
|
||||
feature delimits the requirement that
|
||||
branching is not tolerated within the
|
||||
dominance scope of a complex
|
||||
symbol. Notice, incidentally, that the
|
||||
notion of level of grammaticalness
|
||||
does not affect the structure of the
|
||||
levels of acceptability from fairly high
|
||||
(e.g. (99a)) to virtual gibberish (e.g.
|
||||
(98d)). Suppose, for instance, that a
|
||||
subset of English sentences interesting
|
||||
on quite independent grounds appears
|
||||
to correlate rather closely with an
|
||||
important distinction in language use.
|
||||
Presumably, this analysis of a
|
||||
formative as a pair of sets of features is
|
||||
not quite equivalent to the system of
|
||||
base rules exclusive of the lexicon. We
|
||||
have already seen that the appearance
|
||||
of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction
|
||||
does not readily tolerate the strong
|
||||
generative capacity of the theory.
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<nextPage/>
|
||||
|
||||
|
||||
|
||||
</story>
|
||||
</document>
|
||||
46
z3c/rml/tests/input/rml-examples-017-outlines.rml
Normal file
46
z3c/rml/tests/input/rml-examples-017-outlines.rml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_017_outlines.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="0">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="h1" value="style.Heading1" />
|
||||
</initialize>
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story>
|
||||
<setNextTemplate name="main"/>
|
||||
<outlineAdd>TOP Level</outlineAdd>
|
||||
<para style="h1">Top Level Outline</para>
|
||||
<nextFrame/>
|
||||
|
||||
<setNextTemplate name="main"/>
|
||||
<outlineAdd level="1">Level 1</outlineAdd>
|
||||
<para style="h1">Level 1 Outline</para>
|
||||
<nextFrame/>
|
||||
|
||||
<setNextTemplate name="main"/>
|
||||
<outlineAdd level="2">Level 2</outlineAdd>
|
||||
<para style="h1">Level 2 Outline</para>
|
||||
<nextFrame/>
|
||||
|
||||
<setNextTemplate name="main"/>
|
||||
<outlineAdd level="1">Level 1 Again</outlineAdd>
|
||||
<para style="h1">Level 1 Again</para>
|
||||
<outlineAdd level="1">Ampersand (&) and Japanese (またはご希望のホテルを1つ選択してください) Test</outlineAdd>
|
||||
<para>Check that the ampersand (&) appears correctly in the outline/bookmark list.</para>
|
||||
<nextFrame/>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
316
z3c/rml/tests/input/rml-examples-022-paras-oas.rml
Normal file
316
z3c/rml/tests/input/rml-examples-022-paras-oas.rml
Normal file
@@ -0,0 +1,316 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd" [
|
||||
<!ENTITY pound "£">
|
||||
]>
|
||||
<document filename="test_022_paras_oas.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #22</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in" overlapAttachedSpace="1"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
|
||||
<paraStyle name="h1"
|
||||
fontName="Courier-Bold"
|
||||
fontSize="12"
|
||||
spaceBefore = "0.5 cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style1"
|
||||
fontName="Courier"
|
||||
fontSize="10"
|
||||
/>
|
||||
|
||||
<paraStyle name="style2"
|
||||
parent="style1"
|
||||
leftIndent = "1in"
|
||||
/>
|
||||
|
||||
<paraStyle name="style3"
|
||||
parent="style1"
|
||||
rightIndent = "1in"
|
||||
/>
|
||||
|
||||
<paraStyle name="style4"
|
||||
parent="style1"
|
||||
spaceBefore = "2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style5"
|
||||
parent="style1"
|
||||
spaceAfter = "2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style6"
|
||||
parent="style1"
|
||||
firstLineIndent = "2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style7"
|
||||
parent="style1"
|
||||
leading = "15"
|
||||
/>
|
||||
<!-- NB Leading isn't just the space between lines - it is
|
||||
expressed as the height of the line PLUS the space between
|
||||
lines. This leading of 15 is equal to a space of 5 pts between
|
||||
lines.-->
|
||||
|
||||
<paraStyle name="style8"
|
||||
parent="style1"
|
||||
bulletFontName = "ZapfDingbats"
|
||||
bulletFontSize = "5"
|
||||
/>
|
||||
|
||||
<paraStyle name="style9"
|
||||
parent="style8"
|
||||
bulletFontSize = "10"
|
||||
bulletIndent = "20"
|
||||
/>
|
||||
|
||||
<paraStyle name="style10"
|
||||
parent="style9"
|
||||
bulletIndent = "20"
|
||||
leftIndent = "35"
|
||||
/>
|
||||
|
||||
<paraStyle name="style11"
|
||||
parent="style1"
|
||||
alignment = "left"
|
||||
/>
|
||||
|
||||
<paraStyle name="style12"
|
||||
parent="style1"
|
||||
alignment = "right"
|
||||
/>
|
||||
|
||||
<paraStyle name="style13"
|
||||
parent="style1"
|
||||
alignment = "center"
|
||||
/>
|
||||
|
||||
<paraStyle name="style14"
|
||||
parent="style1"
|
||||
alignment = "justify"
|
||||
/>
|
||||
|
||||
<paraStyle name="style15"
|
||||
parent="style10"
|
||||
bulletFontSize = "5"
|
||||
alignment = "left"
|
||||
/>
|
||||
|
||||
<paraStyle name="style16"
|
||||
parent="style10"
|
||||
bulletFontSize = "5"
|
||||
alignment = "right"
|
||||
/>
|
||||
|
||||
<paraStyle name="style17"
|
||||
parent="style10"
|
||||
bulletFontSize = "5"
|
||||
alignment = "center"
|
||||
/>
|
||||
|
||||
<paraStyle name="style18"
|
||||
parent="style10"
|
||||
bulletFontSize = "5"
|
||||
alignment = "justify"
|
||||
/>
|
||||
|
||||
<paraStyle name="style20"
|
||||
parent="style1"
|
||||
textColor = "red"
|
||||
spaceBefore="1cm"
|
||||
spaceAfter="2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style21"
|
||||
parent="style1"
|
||||
textColor = "green"
|
||||
spaceBefore="1cm"
|
||||
spaceAfter="2cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style22"
|
||||
parent="style1"
|
||||
textColor = "blue"
|
||||
spaceBefore="1cm"
|
||||
spaceAfter="2cm"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Colours by Hex value -->
|
||||
<!-- NB THIS CURRENTLY DOESN'T WORK! -->
|
||||
<paraStyle name="style23"
|
||||
parent="style1"
|
||||
textColor = "#FF0000"
|
||||
/>
|
||||
|
||||
<paraStyle name="style24"
|
||||
parent="style1"
|
||||
textColor = "#00FF00"
|
||||
/>
|
||||
|
||||
<paraStyle name="style25"
|
||||
parent="style1"
|
||||
textColor = "#0000FF"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Colours by RGB value -->
|
||||
<!-- NB THIS CURRENTLY DOESN'T WORK! -->
|
||||
<paraStyle name="style26"
|
||||
parent="style1"
|
||||
textColor = "1,0,0"
|
||||
/>
|
||||
|
||||
<paraStyle name="style27"
|
||||
parent="style1"
|
||||
textColor = "0,1,0"
|
||||
/>
|
||||
|
||||
<paraStyle name="style28"
|
||||
parent="style1"
|
||||
textColor = "0,0,1"
|
||||
/>
|
||||
|
||||
<paraStyle name="bugReport"
|
||||
parent="h1"
|
||||
spaceBefore = "0"
|
||||
textColor = "red"
|
||||
/>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story>
|
||||
<para style="h1">Overlap Attached Space tests (define please!)</para>
|
||||
<para style="style1">This page tests out a number of attributes of the <b>paraStyle</b> tag.
|
||||
This paragraph is in a style we have called "style1". It should be a normal paragraph, set in Courier 12 pt.
|
||||
It should be a normal paragraph, set in Courier (not bold).
|
||||
It should be a normal paragraph, set in Courier 12 pt.</para>
|
||||
|
||||
<para style="h1">Paragraph 2: Indent Left</para>
|
||||
<para style="style2">This paragraph is in a style we have called "style2". It should be indented on the left.
|
||||
It should be indented on the left by 1 inch.
|
||||
It should be indented on the left. </para>
|
||||
|
||||
<para style="h1">Paragraph 3: Indent Right</para>
|
||||
<para style="style3">This paragraph is in a style we have called "style3". It should be indented on the right. It should be indented on the right by 1 inch. It should be indented on the right. </para>
|
||||
|
||||
<para style="h1">Paragraph 4: Space Before</para>
|
||||
<para style="style4">This paragraph is in a style we have called "style4". It should be have a space before it. It should be have a space before it of 2 centimeters. It should be have a space before it.</para>
|
||||
|
||||
<para style="h1">Paragraph 5: Space After</para>
|
||||
<para style="style5">This paragraph is in a style we have called "style5". It should be have a space after it. It should be have a space after it of 2 centimeters. It should be have a space after it.</para>
|
||||
|
||||
<para style="h1">Paragraph 6: First Line Indent</para>
|
||||
<para style="style6">This paragraph is in a style we have called "style6".It should be have an indented first line. It should be have an first line indented by 2 centimeters. It should be have an indented first line.</para>
|
||||
<para style="h1">Paragraph 7: Leading</para>
|
||||
<para style="style7">This paragraph is in a style we have called "style7". It should be using leading. It should have a gap of 5 points between each line. It should be using leading. It should have a gap of 5 pt between each line. It should be using leading. The gap between lines should be half of the height of a line. This paragraph should look like it has a line spacing of "1.5 lines" </para>
|
||||
|
||||
<para style="h1">Paragraphs 8-12: Simple Bullet Points</para>
|
||||
<para style="style8" bulletText="l"><b>Parastyle name="style8" parent="style1" bulletFontName = "ZapfDingbats" bulletFontSize = "5"</b></para>
|
||||
<para style="style8" bulletText="l">These paragraphs are in a style we have called "style8"</para>
|
||||
<para style="style8" bulletText="l">These five lines should have bullet points.</para>
|
||||
<para style="style8" bulletText="l">The bullet font is ZapfDingbats.</para>
|
||||
<para style="style8" bulletText="l">The bullet size is 5 points</para>
|
||||
<para style="style8" bulletText="l">This is a long line to see how multi-line bullets look: These paragraphs are in a style we have called "style8". These four lines should have bullet points. The bullet font is ZapfDingbats. The bullet size is 5 points</para>
|
||||
|
||||
<para style="h1">Paragraph 13-18: Indented Bullet Points</para>
|
||||
<para style="style9" bulletText="*"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "10" bulletIndent = "20"</b></para>
|
||||
<para style="style9" bulletText="*">These paragraphs are in a style we have called "style9"</para>
|
||||
<para style="style9" bulletText="*">These five lines should have <i>indented</i> bullet points.</para>
|
||||
<para style="style9" bulletText="*">Bullet points should look like a pointing hand.</para>
|
||||
<para style="style9" bulletText="*">Bullet font is still ZapfDingbats, and bullet size is 10 points.</para>
|
||||
<para style="style9" bulletText="*">The bullet indent is 20 points</para>
|
||||
<para style="style9" bulletText="*">This is a long line to see how multi-line bullets look: These paragraphs are in a style we have called "style9". These four lines should have <i>indented</i> bullet points. Bullet points should look like a pointing hand. Bullet font is still ZapfDingbats, and bullet size is 10 points. The bullet indent is 20 points</para>
|
||||
|
||||
<para style="h1">Paragraph 19-24: Indented Bullet Points with a Left Indent for the Text</para>
|
||||
<para style="style10" bulletText="*"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "10" bulletIndent = "20" leftIndent = "35"</b></para>
|
||||
<para style="style10" bulletText="*">These paragraphs are in a style we have called "style10"</para>
|
||||
<para style="style10" bulletText="*">These four lines should have <i>indented</i> bullet points, with the text indented as well.</para>
|
||||
<para style="style10" bulletText="*">Bullet points should look like a pointing hand.</para>
|
||||
<para style="style10" bulletText="*">Bullet font is still ZapfDingbats, and bullet size is 10 points.</para>
|
||||
<para style="style10" bulletText="*">The bullet indent is 20 points, and the text indent is 35 points</para>
|
||||
<para style="style10" bulletText="*">This is a long line to see how multi-line bullets look: These paragraphs are in a style we have called "style10". These four lines should have <i>indented</i> bullet points, with the text indented as well. Bullet points should look like a pointing hand. Bullet font is still ZapfDingbats, and bullet size is 10 points.</para>
|
||||
|
||||
<para style="h1">Paragraph 25: Left Justified Paragraphs</para>
|
||||
<para style="style11">This paragraph is in a style we have called "style11". It should be left justified. It has an argument which states 'alignment = "left"'. It should be left justified. It should be aligned to the left. </para>
|
||||
|
||||
<para style="h1">Paragraph 26: Right Justified Paragraphs</para>
|
||||
<para style="style12">This paragraph is in a style we have called "style12". It should be right justified. It has an argument which states 'alignment = "right"'. It should be right justified. It should be aligned to the right.</para>
|
||||
|
||||
<para style="h1">Paragraph 27: Centered Paragraphs</para>
|
||||
<para style="style13">This paragraph is in a style we have called "style13".It should be center justified. It has an argument which states 'alignment = "center"'. It should be centered. It should be aligned to the center.</para>
|
||||
|
||||
<para style="h1">Paragraph 28: Justified Paragraphs</para>
|
||||
<para style="style14">This paragraph is in a style we have called "style14". It should be justified. It has an argument which states 'alignment = "justify"'. It should be justified.</para>
|
||||
|
||||
<para style="h1">Paragraphs 29-32: Bullets using left align, right align, centered and justify.</para>
|
||||
<para style="style15" bulletText="l"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "5" bulletIndent = "20" leftIndent = "35" alignment = "left"</b></para>
|
||||
<para style="style15" bulletText="l">This is "style15", bullets with a left alignment. (The bullets in this style are based on "style10")</para>
|
||||
<para style="style16" bulletText="l"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "5" bulletIndent = "20" leftIndent = "35" alignment = "right"</b></para>
|
||||
<para style="style16" bulletText="l">This is "style16", bullets with a right alignment.(The bullets in this style are based on "style10")</para>
|
||||
<para style="style17" bulletText="l"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "5" bulletIndent = "20" leftIndent = "35" alignment = "center"</b></para>
|
||||
<para style="style17" bulletText="l">This is "style17", bullets with a center alignment.(The bullets in this style are based on "style10")</para>
|
||||
<para style="style18" bulletText="l"><b>bulletFontName = "ZapfDingbats" bulletFontSize = "5" bulletIndent = "20" leftIndent = "35" alignment = "justify"</b></para>
|
||||
<para style="style18" bulletText="l">This is "style18", bullets with a justified paragraph.(The bullets in this style are based on "style10")</para>
|
||||
<para style="style1">These all look wierd, but most people do not actually use these styles because they look so wrong.</para>
|
||||
|
||||
<para style="h1">Paragraph 33-35: Using Colours by Colour Name</para>
|
||||
<para style="style20">This text should be <b>RED</b></para>
|
||||
<para style="style21">This text should be <b>GREEN</b></para>
|
||||
<para style="style22">This text should be <b>BLUE</b></para>
|
||||
|
||||
<!-- THESE CURRENTLY DON'T WORK - SEE THE STYLES SECTION -->
|
||||
|
||||
<para style="h1">Paragraph 36-38: Using Colours by Hex Value</para>
|
||||
<para style="style23">This text should be <b>RED</b></para>
|
||||
<para style="style24">This text should be <b>GREEN</b></para>
|
||||
<para style="style25">This text should be <b>BLUE</b></para>
|
||||
|
||||
<para style="h1">Paragraph 39-41: Using Colours by RGB Value</para>
|
||||
<para style="style26">This text should be <b>RED</b></para>
|
||||
<para style="style27">This text should be <b>GREEN</b></para>
|
||||
<para style="style28">This text should be <b>BLUE</b></para>
|
||||
|
||||
|
||||
<para style="bugReport">You <b>SHOULD</b> be able to specify colours
|
||||
by all the means available to reportlab.lib.colors. Currently, you
|
||||
<b>cannot</b> use RGB or HEX values...</para>
|
||||
|
||||
<para style="h1">Last Paragraph: Para Tags and Paragraph Content</para>
|
||||
<para style="style1">
|
||||
This should <i>not</i> have any extra spaces at the start of <b>this</b>
|
||||
line (though there should be at the start of the heading). RML should ignore
|
||||
additional whitespace, and you should be able to format the actual paragraphs
|
||||
as you like. The text in this paragraph starts on a different line to the
|
||||
actual "para" tag.
|
||||
</para>
|
||||
|
||||
|
||||
<para style="h1">Quoting and escaping</para>
|
||||
<para style="style1">
|
||||
This checks for all the possible quotes: &amp; = &,
|
||||
&lt; = <, &gt; = >, &apos; = ', &quot; = ",
|
||||
&pound; = £.
|
||||
</para>
|
||||
<para style="style1">
|
||||
<i>If this is not italic</i>, <b>and this is not bold</b>, even normal angle brackets are broken.
|
||||
</para>
|
||||
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
577
z3c/rml/tests/input/rml-examples-029-keepinframe.rml
Normal file
577
z3c/rml/tests/input/rml-examples-029-keepinframe.rml
Normal file
@@ -0,0 +1,577 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_029_keepinframe.pdf" debug="0" invariant="0" compression="1">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #029 keepInFrame</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="F1" x1="2.5cm" y1="15.5cm" width="170" height="284"/>
|
||||
<frame id="F2" x1="11.5cm" y1="15.5cm" width="170" height="284"/>
|
||||
<frame id="F3" x1="2.5cm" y1="2.5cm" width="170" height="284"/>
|
||||
<frame id="F4" x1="11.5cm" y1="2.5cm" width="170" height="284"/>
|
||||
</pageTemplate>
|
||||
|
||||
<pageTemplate id="newsletter">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite - Test #029 keepInFrame</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="top" x1="10%" y1="80%" width="80%" height="10%"/>
|
||||
<frame id="upper" x1="10%" y1="60%" width="55%" height="15%"/>
|
||||
<frame id="middle" x1="10%" y1="35%" width="55%" height="20%"/>
|
||||
<frame id="lowerleft" x1="10%" y1="10%" width="25%" height="20%"/>
|
||||
<frame id="lowerright" x1="40%" y1="10%" width="25%" height="20%"/>
|
||||
<frame id="sidebar" x1="70%" y1="10%" width="20%" height="65%"/>
|
||||
</pageTemplate>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="bt" value="style.BodyText"/>
|
||||
</initialize>
|
||||
<paraStyle
|
||||
name="h1"
|
||||
parent="style.Normal"
|
||||
fontName="Times-Bold"
|
||||
fontSize="18"
|
||||
leading="22"
|
||||
spaceAfter="6"
|
||||
pageBreakBefore="0"
|
||||
keepWithNext="0"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="h2"
|
||||
parent="style.Normal"
|
||||
fontName="Times-Bold"
|
||||
fontSize="16"
|
||||
leading="18"
|
||||
spaceAfter="3"
|
||||
pageBreakBefore="0"
|
||||
keepWithNext="0"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="keepInFrame"
|
||||
parent="bt"
|
||||
fontSize="9"
|
||||
alignment="right"
|
||||
/>
|
||||
|
||||
<!--this style used for a tablerow example later on in document-->
|
||||
<blockTableStyle id="simple">
|
||||
<blockValign start="0,0" stop="-1,-1" value="TOP"/>
|
||||
<blockFont name="Helvetica" size="6" leading="7"/>
|
||||
<blockBottomPadding length="1"/>
|
||||
<blockTopPadding length="1"/>
|
||||
<lineStyle kind="INNERGRID" colorName="gray" start="0,0" stop="-1,-1" thickness="0.25"/>
|
||||
<lineStyle kind="BOX" colorName="black" start="0,0" stop="-1,-1" thickness="0.25"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="summary" parent="simple">
|
||||
<blockBackground colorName="cyan"/>
|
||||
<blockFont name="Helvetica-Bold" size="6" leading="7"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="continuation" parent="simple">
|
||||
<blockBackground colorName="silver"/>
|
||||
<blockFont name="Helvetica-Oblique" size="6" leading="7"/>
|
||||
</blockTableStyle>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story>
|
||||
<keepInFrame onOverflow = "shrink" id="ff1">
|
||||
<para style="h1">First Try at a keepInFrame</para>
|
||||
<para style="bt">
|
||||
This will behave just like part of a story, as long as it all
|
||||
fits.
|
||||
</para>
|
||||
<para style="bt">
|
||||
To characterize a linguistic level L,
|
||||
this selectionally introduced contextual
|
||||
feature delimits the requirement that
|
||||
branching is not tolerated within the
|
||||
dominance scope of a complex
|
||||
symbol. <font color="red">Notice</font>, incidentally, that the
|
||||
notion of level of grammaticalness
|
||||
does not affect the structure of the
|
||||
levels of acceptability from fairly high
|
||||
(e.g. (99a)) to virtual gibberish (e.g.
|
||||
(98d)). Suppose, for instance, that a
|
||||
subset of English sentences interesting
|
||||
on quite independent grounds appears
|
||||
to correlate rather closely with an
|
||||
important distinction in language use.
|
||||
Presumably, this analysis of a
|
||||
formative as a pair of sets of features is
|
||||
not quite equivalent to the system of
|
||||
base rules exclusive of the lexicon. We
|
||||
have already seen that the appearance
|
||||
of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction
|
||||
does not readily tolerate the strong
|
||||
generative capacity of the theory.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
<nextFrame/>
|
||||
<keepInFrame onOverflow = "shrink" id="ff2">
|
||||
<para style="h1">keepInFrame with a table inside</para>
|
||||
<blockTable>
|
||||
<blockTableStyle id="tablestyle_000">
|
||||
<blockValign start="0,0" stop="-1,-1" value="TOP"/>
|
||||
<lineStyle kind="INNERGRID" colorName="black" start="0,0" stop="-1,-1" thickness="0.25"/>
|
||||
<lineStyle kind="BOX" colorName="black" start="0,0" stop="-1,-1" thickness="0.25"/>
|
||||
</blockTableStyle>
|
||||
<tr><td>alignment</td><td>align
|
||||
alignment</td></tr>
|
||||
<tr><td>bulletColor</td><td>bulletcolor
|
||||
bcolor</td></tr>
|
||||
<tr><td>bulletFontName</td><td>bfont
|
||||
bulletfontname</td></tr>
|
||||
<tr><td>bulletFontSize</td><td>bfontsize
|
||||
bulletfontsize</td></tr>
|
||||
<tr><td>bulletIndent</td><td>bindent
|
||||
bulletindent</td></tr>
|
||||
<tr><td>firstLineIndent</td><td>findent
|
||||
firstlineindent</td></tr>
|
||||
<tr><td>fontName</td><td>face
|
||||
fontname
|
||||
font</td></tr>
|
||||
<tr><td>fontSize</td><td>size
|
||||
fontsize</td></tr>
|
||||
<tr><td>leading</td><td>leading</td></tr>
|
||||
<tr><td>leftIndent</td><td>leftindent
|
||||
lindent</td></tr>
|
||||
<tr><td>rightIndent</td><td>rightindent
|
||||
rindent</td></tr>
|
||||
<tr><td>spaceAfter</td><td>spaceafter
|
||||
spacea</td></tr>
|
||||
<tr><td>spaceBefore</td><td>spacebefore
|
||||
spaceb</td></tr>
|
||||
<tr><td>textColor</td><td>fg
|
||||
textcolor
|
||||
color</td></tr>
|
||||
</blockTable>
|
||||
</keepInFrame>
|
||||
<nextFrame/>
|
||||
<keepInFrame onOverflow = "shrink" id="ff3">
|
||||
<para style="h1">A long keepInFrame, shrinks</para>
|
||||
<para style="bt">
|
||||
To characterize a linguistic level L,
|
||||
this selectionally introduced contextual
|
||||
feature delimits the requirement that
|
||||
branching is not tolerated within the
|
||||
dominance scope of a complex
|
||||
symbol. Notice, incidentally, that the
|
||||
notion of level of grammaticalness
|
||||
does not affect the structure of the
|
||||
levels of acceptability from fairly high
|
||||
(e.g. (99a)) to virtual gibberish (e.g.
|
||||
(98d)). Suppose, for instance, that a
|
||||
subset of English sentences interesting
|
||||
on quite independent grounds appears
|
||||
to correlate rather closely with an
|
||||
important distinction in language use.
|
||||
Presumably, this analysis of a
|
||||
formative as a pair of sets of features is
|
||||
not quite equivalent to the system of
|
||||
base rules exclusive of the lexicon. We
|
||||
have already seen that the appearance
|
||||
of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction
|
||||
does not readily tolerate the strong
|
||||
generative capacity of the theory.
|
||||
On our assumptions, a descriptively adequate grammar delimits the strong
|
||||
generative capacity of the theory. For one thing, the fundamental error
|
||||
of regarding functional notions as categorial is to be regarded as a
|
||||
corpus of utterance tokens upon which conformity has been defined by the
|
||||
paired utterance test. A majority of informed linguistic specialists
|
||||
agree that the appearance of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction is necessary to impose an
|
||||
interpretation on the requirement that branching is not tolerated within
|
||||
the dominance scope of a complex symbol. It may be, then, that the
|
||||
speaker-hearer's linguistic intuition appears to correlate rather
|
||||
closely with the ultimate standard that determines the accuracy of any
|
||||
proposed grammar. Analogously, the notion of level of grammaticalness
|
||||
may remedy and, at the same time, eliminate a general convention
|
||||
regarding the forms of the grammar.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
<nextFrame/>
|
||||
<keepInFrame onOverflow = "shrink" id="ff4">
|
||||
<para style="h1">2 keepInFrame (inner split)</para>
|
||||
<para style="bt" textColor="pink">
|
||||
To characterize a linguistic level L,
|
||||
this selectionally introduced contextual
|
||||
feature delimits the requirement that
|
||||
branching is not tolerated within the
|
||||
dominance scope of a complex
|
||||
symbol. Notice, incidentally, that the
|
||||
notion of level of grammaticalness
|
||||
does not affect the structure of the
|
||||
levels of acceptability from fairly high
|
||||
(e.g. (99a)) to virtual gibberish (e.g.
|
||||
(98d)). Suppose, for instance, that a
|
||||
subset of English sentences interesting
|
||||
on quite independent grounds appears
|
||||
to correlate rather closely with an
|
||||
important distinction in language use.
|
||||
Presumably, this analysis of a
|
||||
formative as a pair of sets of features is
|
||||
not quite equivalent to the system of
|
||||
base rules exclusive of the lexicon. We
|
||||
have already seen that the appearance
|
||||
of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction
|
||||
does not readily tolerate the strong
|
||||
generative capacity of the theory.
|
||||
</para>
|
||||
<keepInFrame maxHeight="100" onOverflow = "shrink" id="ff5">
|
||||
<para style="h1">Inner Starts</para>
|
||||
<para style="bt" textColor="yellow">
|
||||
On our assumptions, a descriptively adequate grammar delimits the strong
|
||||
generative capacity of the theory. For one thing, the fundamental error
|
||||
of regarding functional notions as categorial is to be regarded as a
|
||||
corpus of utterance tokens upon which conformity has been defined by the
|
||||
paired utterance test. A majority of informed linguistic specialists
|
||||
agree that the appearance of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction is necessary to impose an
|
||||
interpretation on the requirement that branching is not tolerated within
|
||||
the dominance scope of a complex symbol. It may be, then, that the
|
||||
speaker-hearer's linguistic intuition appears to correlate rather
|
||||
closely with the ultimate standard that determines the accuracy of any
|
||||
proposed grammar. Analogously, the notion of level of grammaticalness
|
||||
may remedy and, at the same time, eliminate a general convention
|
||||
regarding the forms of the grammar.
|
||||
</para>
|
||||
<para style="h1">Inner Ends</para>
|
||||
</keepInFrame>
|
||||
<para style="bt" textColor="magenta">
|
||||
We have already seen that the natural general principle that will
|
||||
subsume this case cannot be arbitrary in the requirement that branching
|
||||
is not tolerated within the dominance scope of a complex symbol.
|
||||
Notice, incidentally, that the speaker-hearer's linguistic intuition is
|
||||
to be regarded as the strong generative capacity of the theory. A
|
||||
consequence of the approach just outlined is that the descriptive power
|
||||
of the base component does not affect the structure of the levels of
|
||||
acceptability from fairly high (e.g. (99a)) to virtual gibberish (e.g.
|
||||
(98d)). By combining adjunctions and certain deformations, a
|
||||
descriptively adequate grammar cannot be arbitrary in the strong
|
||||
generative capacity of the theory.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
<nextPage/>
|
||||
<nextFrame name="F4"/>
|
||||
<keepInFrame onOverflow = "overflow" id="ff6">
|
||||
<para style="h1">onOverflow = "overflow" in Frame F4</para>
|
||||
<para style="bt">
|
||||
This will behave just like part of a story, as long as it all
|
||||
fits.
|
||||
</para>
|
||||
<para style="bt">
|
||||
To characterize a linguistic level L,
|
||||
this selectionally introduced contextual
|
||||
feature delimits the requirement that
|
||||
branching is not tolerated within the
|
||||
dominance scope of a complex
|
||||
symbol. <font color="red">Notice</font>, incidentally, that the
|
||||
notion of level of grammaticalness
|
||||
does not affect the structure of the
|
||||
levels of acceptability from fairly high
|
||||
(e.g. (99a)) to virtual gibberish (e.g.
|
||||
(98d)). Suppose, for instance, that a
|
||||
subset of English sentences interesting
|
||||
on quite independent grounds appears
|
||||
to correlate rather closely with an
|
||||
important distinction in language use.
|
||||
Presumably, this analysis of a
|
||||
formative as a pair of sets of features is
|
||||
not quite equivalent to the system of
|
||||
base rules exclusive of the lexicon. We
|
||||
have already seen that the appearance
|
||||
of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction
|
||||
does not readily tolerate the strong
|
||||
generative capacity of the theory.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
<keepInFrame onOverflow = "truncate" id="ff7" frame="F1">
|
||||
<para style="h1">onOverflow = "truncate" in frame F1</para>
|
||||
<para style="bt">
|
||||
This will behave just like part of a story, as long as it all
|
||||
fits.
|
||||
</para>
|
||||
<para style="bt">
|
||||
To characterize a linguistic level L,
|
||||
this selectionally introduced contextual
|
||||
feature delimits the requirement that
|
||||
branching is not tolerated within the
|
||||
dominance scope of a complex
|
||||
symbol. <font color="red">Notice</font>, incidentally, that the
|
||||
notion of level of grammaticalness
|
||||
does not affect the structure of the
|
||||
levels of acceptability from fairly high
|
||||
(e.g. (99a)) to virtual gibberish (e.g.
|
||||
(98d)). Suppose, for instance, that a
|
||||
subset of English sentences interesting
|
||||
on quite independent grounds appears
|
||||
to correlate rather closely with an
|
||||
important distinction in language use.
|
||||
Presumably, this analysis of a
|
||||
formative as a pair of sets of features is
|
||||
not quite equivalent to the system of
|
||||
base rules exclusive of the lexicon. We
|
||||
have already seen that the appearance
|
||||
of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction
|
||||
does not readily tolerate the strong
|
||||
generative capacity of the theory.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<setNextTemplate name="newsletter"/>
|
||||
<nextPage/>
|
||||
|
||||
<!-- from now on we can explore a totally different style of coding -
|
||||
story says explicitly what goes where-->
|
||||
<para style="h2">
|
||||
A new way to lay things out....
|
||||
</para>
|
||||
<para>
|
||||
This tag lets us handle layouts like newsletters and factsheets in a much more
|
||||
natural style. In documents like this, one does not want stuff to leak out of the
|
||||
intended box into the next one. You wrap your content in <keepInFrame> tags
|
||||
and explicitly tell it where to go. The order of this page naturally goes top, upper, middle,
|
||||
bottomleft, bottomright, sidebar.
|
||||
</para>
|
||||
|
||||
<keepInFrame frame="sidebar" onOverflow="error">
|
||||
<para>
|
||||
I drew this stuff second, out of the natural order, putting it within a tag saying
|
||||
<keepInFrame frame="sidebar" overflow="error">.
|
||||
</para>
|
||||
<para>
|
||||
Havng done this, if I had too much content, there would an error warning me. I can put
|
||||
an ID in to identify it if I want. I can also specify other behaviours for full frames - shrink, truncate,
|
||||
overflow.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<keepInFrame frame="upper" onOverflow="error">
|
||||
<para>
|
||||
I drew this stuff third, out of the natural order. This should be in the upper frame, below the top.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<keepInFrame frame="middle" onOverflow="error">
|
||||
<para>
|
||||
this goes in the middle frame.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<keepInFrame frame="lowerright" onOverflow="error">
|
||||
<para>
|
||||
this goes in the bottom right, and was drawn before the stuff on the left..
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<keepInFrame frame="lowerleft" onOverflow="error">
|
||||
<para>
|
||||
and finally the bottom left.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<nextPage/>
|
||||
<para style="h2">
|
||||
The Nonsense Journal
|
||||
</para>
|
||||
<para>
|
||||
We now overfill with rubbish etc etc and use onOverflow="shrink"
|
||||
</para>
|
||||
|
||||
<keepInFrame frame="sidebar" onOverflow="shrink">
|
||||
<para>
|
||||
I drew this stuff second, out of the natural order, putting it within a tag saying
|
||||
<keepInFrame frame="sidebar" overflow="shrink">.
|
||||
</para>
|
||||
<para>
|
||||
Of course, this analysis of a formative as a pair of sets of features
|
||||
can be defined in such a way as to impose an important distinction in
|
||||
language use. Nevertheless, the speaker-hearer's linguistic intuition
|
||||
may remedy and, at the same time, eliminate the levels of acceptability
|
||||
from fairly high (e.g. (99a)) to virtual gibberish (e.g. (98d)). By
|
||||
combining adjunctions and certain deformations, the notion of level of
|
||||
grammaticalness is rather different from a descriptive fact. I
|
||||
suggested that these results would follow from the assumption that the
|
||||
speaker-hearer's linguistic intuition is to be regarded as the levels of
|
||||
acceptability from fairly high (e.g. (99a)) to virtual gibberish (e.g.
|
||||
(98d)). A consequence of the approach just outlined is that this
|
||||
selectionally introduced contextual feature is not to be considered in
|
||||
determining irrelevant intervening contexts in selectional rules.
|
||||
</para>
|
||||
<spacer length="10"/>
|
||||
<para>
|
||||
So far, the systematic use of complex symbols is necessary to impose an
|
||||
interpretation on nondistinctness in the sense of distinctive feature
|
||||
theory. It must be emphasized, once again, that most of the
|
||||
methodological work in modern linguistics is rather different from the
|
||||
requirement that branching is not tolerated within the dominance scope
|
||||
of a complex symbol. Conversely, a descriptively adequate grammar can
|
||||
be defined in such a way as to impose a stipulation to place the
|
||||
constructions into these various categories. If the position of the
|
||||
trace in (99c) were only relatively inaccessible to movement, relational
|
||||
information does not affect the structure of the traditional practice of
|
||||
grammarians. Summarizing, then, we assume that most of the
|
||||
methodological work in modern linguistics appears to correlate rather
|
||||
closely with the strong generative capacity of the theory.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<keepInFrame frame="upper" onOverflow="shrink">
|
||||
<para>
|
||||
Suppose, for instance, that the natural general principle that will
|
||||
subsume this case is to be regarded as the ultimate standard that
|
||||
determines the accuracy of any proposed grammar. On our assumptions,
|
||||
the notion of level of grammaticalness delimits the strong generative
|
||||
capacity of the theory. Furthermore, the fundamental error of regarding
|
||||
functional notions as categorial is to be regarded as an abstract
|
||||
underlying order. I suggested that these results would follow from the
|
||||
assumption that most of the methodological work in modern linguistics
|
||||
raises serious doubts about the requirement that branching is not
|
||||
tolerated within the dominance scope of a complex symbol. Let us
|
||||
continue to suppose that the speaker-hearer's linguistic intuition does
|
||||
not affect the structure of a corpus of utterance tokens upon which
|
||||
conformity has been defined by the paired utterance test.
|
||||
</para>
|
||||
<spacer length="10"/>
|
||||
<para>
|
||||
It must be emphasized, once again, that the earlier discussion of
|
||||
deviance raises serious doubts about a corpus of utterance tokens upon
|
||||
which conformity has been defined by the paired utterance test. I
|
||||
suggested that these results would follow from the assumption that the
|
||||
systematic use of complex symbols does not affect the structure of the
|
||||
strong generative capacity of the theory. To provide a constituent
|
||||
structure for T(Z,K), most of the methodological work in modern
|
||||
linguistics is not quite equivalent to the requirement that branching is
|
||||
not tolerated within the dominance scope of a complex symbol. On our
|
||||
assumptions, the fundamental error of regarding functional notions as
|
||||
categorial is to be regarded as nondistinctness in the sense of
|
||||
distinctive feature theory. A consequence of the approach just outlined
|
||||
is that this analysis of a formative as a pair of sets of features
|
||||
raises serious doubts about the system of base rules exclusive of the
|
||||
lexicon.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<keepInFrame frame="middle" onOverflow="shrink">
|
||||
<para>
|
||||
If the position of the trace in (99c) were only relatively inaccessible
|
||||
to movement, the theory of syntactic features developed earlier delimits
|
||||
a corpus of utterance tokens upon which conformity has been defined by
|
||||
the paired utterance test. By combining adjunctions and certain
|
||||
deformations, a case of semigrammaticalness of a different sort is not
|
||||
subject to an important distinction in language use. Note that this
|
||||
selectionally introduced contextual feature delimits the strong
|
||||
generative capacity of the theory. Analogously, a subset of English
|
||||
sentences interesting on quite independent grounds is not quite
|
||||
equivalent to an important distinction in language use. To characterize
|
||||
a linguistic level L, a case of semigrammaticalness of a different sort
|
||||
is, apparently, determined by a descriptive fact.
|
||||
</para>
|
||||
<spacer length="10"/>
|
||||
|
||||
<para>
|
||||
Clearly, the descriptive power of the base component is necessary to
|
||||
impose an interpretation on the levels of acceptability from fairly high
|
||||
(e.g. (99a)) to virtual gibberish (e.g. (98d)). Thus most of the
|
||||
methodological work in modern linguistics cannot be arbitrary in the
|
||||
requirement that branching is not tolerated within the dominance scope
|
||||
of a complex symbol. We will bring evidence in favor of the following
|
||||
thesis: this analysis of a formative as a pair of sets of features is
|
||||
unspecified with respect to nondistinctness in the sense of distinctive
|
||||
feature theory. Nevertheless, this selectionally introduced contextual
|
||||
feature can be defined in such a way as to impose the ultimate standard
|
||||
that determines the accuracy of any proposed grammar. To provide a
|
||||
constituent structure for T(Z,K), a case of semigrammaticalness of a
|
||||
different sort is not quite equivalent to the system of base rules
|
||||
exclusive of the lexicon.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<keepInFrame frame="lowerright" onOverflow="shrink">
|
||||
<para>
|
||||
Clearly, the descriptive power of the base component is not subject to
|
||||
the system of base rules exclusive of the lexicon. It appears that the
|
||||
appearance of parasitic gaps in domains relatively inaccessible to
|
||||
ordinary extraction does not readily tolerate the traditional practice
|
||||
of grammarians. To provide a constituent structure for T(Z,K), a subset
|
||||
of English sentences interesting on quite independent grounds is
|
||||
necessary to impose an interpretation on an abstract underlying order.
|
||||
Presumably, the notion of level of grammaticalness delimits a corpus of
|
||||
utterance tokens upon which conformity has been defined by the paired
|
||||
utterance test. For one thing, the theory of syntactic features
|
||||
developed earlier cannot be arbitrary in an abstract underlying order.
|
||||
</para>
|
||||
<spacer length="10"/>
|
||||
<para>
|
||||
To provide a constituent structure for T(Z,K), the systematic use of
|
||||
complex symbols does not readily tolerate nondistinctness in the sense
|
||||
of distinctive feature theory. This suggests that the natural general
|
||||
principle that will subsume this case is not quite equivalent to the
|
||||
levels of acceptability from fairly high (e.g. (99a)) to virtual
|
||||
gibberish (e.g. (98d)). With this clarification, relational information
|
||||
is not subject to a general convention regarding the forms of the
|
||||
grammar. In the discussion of resumptive pronouns following (81), the
|
||||
speaker-hearer's linguistic intuition can be defined in such a way as to
|
||||
impose nondistinctness in the sense of distinctive feature theory. On
|
||||
the other hand, the appearance of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction is not quite equivalent to a
|
||||
stipulation to place the constructions into these various categories.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
|
||||
<keepInFrame frame="lowerleft" onOverflow="shrink">
|
||||
<para>
|
||||
Note that this selectionally introduced contextual feature can be
|
||||
defined in such a way as to impose the ultimate standard that determines
|
||||
the accuracy of any proposed grammar. To provide a constituent
|
||||
structure for T(Z,K), the theory of syntactic features developed earlier
|
||||
is rather different from an important distinction in language use. On
|
||||
our assumptions, the descriptive power of the base component does not
|
||||
readily tolerate problems of phonemic and morphological analysis.
|
||||
Summarizing, then, we assume that most of the methodological work in
|
||||
modern linguistics does not affect the structure of the ultimate
|
||||
standard that determines the accuracy of any proposed grammar. It must
|
||||
be emphasized, once again, that the systematic use of complex symbols
|
||||
is, apparently, determined by the system of base rules exclusive of the
|
||||
lexicon.
|
||||
</para>
|
||||
<spacer length="10"/>
|
||||
<para>
|
||||
A consequence of the approach just outlined is that the notion of level
|
||||
of grammaticalness is not to be considered in determining the system of
|
||||
base rules exclusive of the lexicon. If the position of the trace in
|
||||
(99c) were only relatively inaccessible to movement, the systematic use
|
||||
of complex symbols appears to correlate rather closely with
|
||||
nondistinctness in the sense of distinctive feature theory. With this
|
||||
clarification, the appearance of parasitic gaps in domains relatively
|
||||
inaccessible to ordinary extraction is not subject to a parasitic gap
|
||||
construction. Conversely, the systematic use of complex symbols is
|
||||
unspecified with respect to a corpus of utterance tokens upon which
|
||||
conformity has been defined by the paired utterance test. In the
|
||||
discussion of resumptive pronouns following (81), the earlier discussion
|
||||
of deviance does not affect the structure of problems of phonemic and
|
||||
morphological analysis.
|
||||
</para>
|
||||
</keepInFrame>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
130
z3c/rml/tests/input/rml-examples-031-japanese.rml
Normal file
130
z3c/rml/tests/input/rml-examples-031-japanese.rml
Normal file
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_031_japanese.pdf" invariant="1">
|
||||
<docinit>
|
||||
<registerCidFont faceName="HeiseiMin-W3" />
|
||||
</docinit>
|
||||
|
||||
<template pagesize="letter" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main" pagesize="(595,842)">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="504" y="800">RML2PDF Test Suite #31 - Japanese Output</drawRightString>
|
||||
<setFont name="HeiseiMin-W3" size="18"/>
|
||||
<drawRightString x="504" y="750">日本語は難しいですね!</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="1in" width="6in" height="9in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle name="h1" fontName="Helvetica-Bold" fontSize="32" leading="36"/>
|
||||
<paraStyle name="h2" fontName="Helvetica-Bold" fontSize="16" leading="20" spaceBefore="12"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" spaceBefore="6"/>
|
||||
<paraStyle name="jbody" fontName="HeiseiMin-W3" fontSize="10" leading="12" spaceBefore="6" wordWrap="CJK"/>
|
||||
<paraStyle name="jbackright" fontName="HeiseiMin-W3" fontSize="10" leading="12" spaceBefore="6" alignment="RIGHT" backColor="yellow"/>
|
||||
|
||||
<blockTableStyle id="jnumeric">
|
||||
<!--top row - centre and bold, easy-->
|
||||
<blockFont name="HeiseiMin-W3"/>
|
||||
<blockAlignment value="center" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="purple" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="purple" start="0,0" stop="-1,0"/>
|
||||
<!--numeric region - decimal align and set right padding-->
|
||||
<blockAlignment value="right" start="1,1" stop="-1,-1"/>
|
||||
<!--bottom row - double underline-->
|
||||
<blockFont name="Times-Bold" start="0,-1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="purple" start="0,-1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="purple" start="0,-1" stop="-1,-1" count="2"/>
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<para style="h1">Japanese Language Tests</para>
|
||||
<para style="normal">This test tries to display Japanese characters in several realistic situations. We'll start with a paragraph:</para>
|
||||
|
||||
<para style="h2">Basic output and text alignment</para>
|
||||
|
||||
<para style="jbody">says "Hilton Tokyo:" ヒルトン東京</para>
|
||||
|
||||
<para style="jbody">Gatwick Name: ヒルトン・ロンドン・ガトウィック・エアポート</para>
|
||||
|
||||
|
||||
|
||||
|
||||
<para style="normal">
|
||||
The words below the title at the top should be right-aligned with the frame border.
|
||||
If not, we've got our string widths wrong. If too far into the page, likelihood is
|
||||
we are counting bytes not characters. Similar things apply to the paragraph below
|
||||
whose Japanese portion should be underlined and right-aligned; if the underline is different in length
|
||||
and text does not run to edge, we goofed.
|
||||
</para>
|
||||
|
||||
<para style="jbackright">begin <u>日本語は難しいですね</u> end</para>
|
||||
|
||||
|
||||
<para style="h2">Text wrapping</para>
|
||||
|
||||
<para style="jbody">
|
||||
Gatwick Description: ガトウィック空港と連絡通路で直結されている唯一のホテルである当ホテルは、街の中心部から30分の場所にございます。全客室に高速インターネット環境を完備しております。ファミリールームは5名様までお泊りいただけます。また、エグゼクティブルームのお客様は、エグゼクティブラウンジをご利用いただけます。事前にご予約いただけるタイムトゥフライ・パッケージには、空港の駐車料金が含まれております。
|
||||
</para>
|
||||
|
||||
<para style="h2">Other contexts</para>
|
||||
|
||||
<para style="normal">There are some other non-paragraph contexts for text display -
|
||||
drawing strings directly, and placing strings (not paragraphs) in table cells. The title
|
||||
at the top should have a ® symbol at the right, and all three should appear in
|
||||
the table below:</para>
|
||||
<spacer length="24"/>
|
||||
|
||||
<blockTable>
|
||||
<blockTableStyle id="0001">
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<blockFont name="HeiseiMin-W3"/>
|
||||
</blockTableStyle>
|
||||
<tr><td>Symbol Name</td><td>Displays</td></tr>
|
||||
<tr><td>Copyright</td><td>©</td></tr>
|
||||
<tr><td>Registered</td><td>®</td></tr>
|
||||
<tr><td>Trademark</td><td>™</td></tr>
|
||||
<tr><td>Tokyo (as entities)</td><td>東京</td></tr>
|
||||
<tr><td>Tokyo (au naturelle)</td><td>東京</td></tr>
|
||||
</blockTable>
|
||||
|
||||
|
||||
<para style="h2">Charts</para>
|
||||
<para style="normal">Drawing source should be Nikkei</para>
|
||||
|
||||
<drawing module="test_014_slidebox" function="SlideBoxDrawing">
|
||||
<param name="SlideBox.sourceLabelFontName">HeiseiMin-W3</param>
|
||||
<param name="SlideBox.sourceLabelText">source: 日本経済新聞</param>
|
||||
</drawing>
|
||||
|
||||
|
||||
<para style="normal">This should split over the page break onto page two</para>
|
||||
|
||||
<para style="jbody">
|
||||
ガトウィック空港と連絡通路で直結されている唯一のホテルである当ホテルは、街の中心部から30分の場所にございます。全客室に高速インターネット環境を完備しております。ファミリールームは5名様までお泊りいただけます。また、エグゼクティブルームのお客様は、エグゼクティブラウンジをご利用いただけます。事前にご予約いただけるタイムトゥフライ・パッケージには、空港の駐車料金が含まれております。
|
||||
</para>
|
||||
<para style="normal">Text After</para>
|
||||
|
||||
|
||||
<para style="h2">Table</para>
|
||||
<blockTable style="jnumeric">
|
||||
<bulkData><![CDATA[
|
||||
日本語は難しいですね!,Profit
|
||||
Sprockets,26
|
||||
場所,34
|
||||
Thingummies,217
|
||||
何でも,23
|
||||
Total,277
|
||||
]]></bulkData>
|
||||
</blockTable>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</story>
|
||||
</document>
|
||||
106
z3c/rml/tests/input/rml-examples-032-images.rml
Normal file
106
z3c/rml/tests/input/rml-examples-032-images.rml
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_032_images.pdf" invariant="1">
|
||||
|
||||
<template pagesize="letter" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main" pagesize="(595,842)">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="504" y="800">RML2PDF Test Suite #32 - Image Functionality</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="1in" width="6in" height="9in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle name="h1" fontName="Helvetica-Bold" fontSize="32" leading="36"/>
|
||||
<paraStyle name="h2" fontName="Helvetica-Bold" fontSize="16" leading="20" spaceBefore="12"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" spaceBefore="6"/>
|
||||
<blockTableStyle id="simple">
|
||||
<blockAlignment value="center"/>
|
||||
<blockValign value="middle"/>
|
||||
<blockFont name="Helvetica"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="spartan">
|
||||
<blockAlignment value="center"/>
|
||||
<blockValign value="middle"/>
|
||||
<blockFont name="Helvetica"/>
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<para style="h1">Image Functionality</para>
|
||||
<para style="normal">This tries out some new features of images.</para>
|
||||
|
||||
<para style="h2">PDF files as images</para>
|
||||
|
||||
|
||||
<para style="normal">PDF files (or their pagecatcherised pals, .data files) can be used just like images. Below
|
||||
you should see a few little internet access icons; zoom in and you'll see they are vector. The original
|
||||
PDF is 1296x1296, so the rubbish at top right of the page is the unscaled one being drawn in the illustration below at (0,0).</para>
|
||||
|
||||
<spacer length="12"/>
|
||||
|
||||
<illustration height="100" width="432">
|
||||
<rect x="0" y="0" width="432" height="100" fill="0" stroke="1"/>
|
||||
<image file="[z3c.rml.tests]/input/images/cylinder.eps" x="0" y="0"/>
|
||||
<image file="[z3c.rml.tests]/input/images/cylinder.eps" x="0" y="0" width="50" height="50" showBoundary="yes"/>
|
||||
<image file="[z3c.rml.tests]/input/images/cylinder.eps" x="100" y="0" width="100" height="50" showBoundary="yes"/>
|
||||
<image file="[z3c.rml.tests]/input/images/cylinder.eps" x="220" y="0" width="50" height="100" showBoundary="yes"/>
|
||||
<image file="[z3c.rml.tests]/input/images/cylinder.eps" x="300" y="25" width="100" height="60" showBoundary="yes" preserveAspectRatio="yes"/>
|
||||
<image file="[z3c.rml.tests]/input/images/cylinder.eps" x="55" y="25" width="40" height="60" showBoundary="yes" preserveAspectRatio="yes"/>
|
||||
</illustration>
|
||||
|
||||
<para style="normal">The <b>preserveAspectRatio</b> flag lets you place your image in a box and it will be centered intelligently,
|
||||
touching either the sides or the top depending on its own aspect ratio.</para>
|
||||
<nextPage/>
|
||||
<para style="normal">The anchor attribute lets you determine which part of the image corresponds to the given x and y.
|
||||
You can choose an anchor from the standard compass points.</para>
|
||||
<blockTable style="simple">
|
||||
<tr>
|
||||
<td><blockTable style="spartan"><tr><td>nw</td></tr><tr><td><illustration height="90" width="90"><stroke color="red" width="2"/><lines>43 43 47 47 43 47 47 43</lines><image file="[z3c.rml.tests]/input/images/cylinder.eps" x="45" y="45" width="30" height="40" showBoundary="yes" preserveAspectRatio="yes" anchor="nw"/></illustration></td></tr></blockTable></td>
|
||||
<td><blockTable style="spartan"><tr><td>n</td></tr><tr><td><illustration height="90" width="90"><stroke color="red" width="2"/><lines>43 43 47 47 43 47 47 43</lines><image file="[z3c.rml.tests]/input/images/cylinder.eps" x="45" y="45" width="30" height="40" showBoundary="yes" preserveAspectRatio="yes" anchor="n"/></illustration></td></tr></blockTable></td>
|
||||
<td><blockTable style="spartan"><tr><td>ne</td></tr><tr><td><illustration height="90" width="90"><stroke color="red" width="2"/><lines>43 43 47 47 43 47 47 43</lines><image file="[z3c.rml.tests]/input/images/cylinder.eps" x="45" y="45" width="30" height="40" showBoundary="yes" preserveAspectRatio="yes" anchor="ne"/></illustration></td></tr></blockTable></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><blockTable style="spartan"><tr><td>w</td></tr><tr><td><illustration height="90" width="90"><stroke color="red" width="2"/><lines>43 43 47 47 43 47 47 43</lines><image file="[z3c.rml.tests]/input/images/cylinder.eps" x="45" y="45" width="30" height="40" showBoundary="yes" preserveAspectRatio="yes" anchor="w"/></illustration></td></tr></blockTable></td>
|
||||
<td><blockTable style="spartan"><tr><td>c</td></tr><tr><td><illustration height="90" width="90"><stroke color="red" width="2"/><lines>43 43 47 47 43 47 47 43</lines><image file="[z3c.rml.tests]/input/images/cylinder.eps" x="45" y="45" width="30" height="40" showBoundary="yes" preserveAspectRatio="yes" anchor="c"/></illustration></td></tr></blockTable></td>
|
||||
<td><blockTable style="spartan"><tr><td>e</td></tr><tr><td><illustration height="90" width="90"><stroke color="red" width="2"/><lines>43 43 47 47 43 47 47 43</lines><image file="[z3c.rml.tests]/input/images/cylinder.eps" x="45" y="45" width="30" height="40" showBoundary="yes" preserveAspectRatio="yes" anchor="e"/></illustration></td></tr></blockTable></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><blockTable style="spartan"><tr><td>sw</td></tr><tr><td><illustration height="90" width="90"><stroke color="red" width="2"/><lines>43 43 47 47 43 47 47 43</lines><image file="[z3c.rml.tests]/input/images/cylinder.eps" x="45" y="45" width="30" height="40" showBoundary="yes" preserveAspectRatio="yes" anchor="sw"/></illustration></td></tr></blockTable></td>
|
||||
<td><blockTable style="spartan"><tr><td>s</td></tr><tr><td><illustration height="90" width="90"><stroke color="red" width="2"/><lines>43 43 47 47 43 47 47 43</lines><image file="[z3c.rml.tests]/input/images/cylinder.eps" x="45" y="45" width="30" height="40" showBoundary="yes" preserveAspectRatio="yes" anchor="s"/></illustration></td></tr></blockTable></td>
|
||||
<td><blockTable style="spartan"><tr><td>se</td></tr><tr><td><illustration height="90" width="90"><stroke color="red" width="2"/><lines>43 43 47 47 43 47 47 43</lines><image file="[z3c.rml.tests]/input/images/cylinder.eps" x="45" y="45" width="30" height="40" showBoundary="yes" preserveAspectRatio="yes" anchor="se"/></illustration></td></tr></blockTable></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
|
||||
<nextPage/>
|
||||
<para style="normal">First attempt to place an image which has an artbox. We have created a PDF with MediaBox (the usual size measure) approx 300x400 points,
|
||||
and a 100x100 circle in top right corner, and instructed RML to draw it in a box of half size. This seems to work.</para>
|
||||
<!--
|
||||
<illustration height="200" width="150">
|
||||
<image file="art_box_test.eps" x="0" y="0" width="150" height="200" showBoundary="yes" preserveAspectRatio="yes" pdfBoxType="MediaBox"/>
|
||||
</illustration>
|
||||
-->
|
||||
<para style="normal">Now we try to place it with the art box. The blue should leak out horribly to left and below, but the red circle should
|
||||
end up elliptical within the box. (In real life, the art box defines the 'area of interest' and there would be no stuff outside it). This isn't working yet. Also,
|
||||
we get an extraneous boundary box from drawPdfImage appearing at top right - shifted the wrong way.</para>
|
||||
<!--
|
||||
<illustration height="200" width="150">
|
||||
<image file="art_box_test.eps" x="0" y="0" width="150" height="200" showBoundary="yes" preserveAspectRatio="yes" pdfBoxType="ArtBox"/>
|
||||
</illustration>
|
||||
-->
|
||||
<!--imageFigure imageName="art_box_test.eps" imageWidth="150" imageHeight="200" showBoundary="yes" preserveAspectRatio="yes" pdfBoxType="ArtBox"/>
|
||||
<imageFigure imageName="art_box_test.eps" imageWidth="150" imageHeight="200" showBoundary="yes" preserveAspectRatio="yes" pdfBoxType="MediaBox"/-->
|
||||
<imageFigure imageName="art_box_test.eps" imageWidth="150" imageHeight="200" showBoundary="yes" caption="Align Left" preserveAspectRatio="yes" pdfBoxType="MediaBox" align="LEFT"/>
|
||||
<imageFigure imageName="art_box_test.eps" imageWidth="150" imageHeight="200" showBoundary="yes" caption="Align Right" preserveAspectRatio="yes" pdfBoxType="MediaBox" align="RIGHT"/>
|
||||
<imageFigure imageName="art_box_test.eps" imageWidth="150" imageHeight="200" showBoundary="yes" caption="Align Center" captionSize="11" captionColor="red" preserveAspectRatio="yes" pdfBoxType="MediaBox" align="CENTER"/>
|
||||
<imageFigure imageName="replogo.gif" imageWidth="150" imageHeight="200" showBoundary="yes" caption="Align Left" preserveAspectRatio="yes" pdfBoxType="MediaBox" align="LEFT"/>
|
||||
<imageFigure imageName="replogo.gif" imageWidth="150" imageHeight="200" showBoundary="yes" caption="Align Right" preserveAspectRatio="yes" pdfBoxType="MediaBox" align="RIGHT"/>
|
||||
<imageFigure imageName="replogo.gif" imageWidth="150" imageHeight="200" showBoundary="yes" caption="Align Center" captionSize="11" captionColor="red" preserveAspectRatio="yes" pdfBoxType="MediaBox" align="CENTER"/>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
80
z3c/rml/tests/input/rml-examples-034-cmyk.rml
Normal file
80
z3c/rml/tests/input/rml-examples-034-cmyk.rml
Normal file
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_034_cmyk.pdf" invariant="1">
|
||||
<docinit>
|
||||
<color id="CMYK_WHITE" RGB="PCMYKColor(100, 100, 100, 0)"/>
|
||||
<color id="CMYK_BLACK" RGB="PCMYKColor(0, 0, 0, 100)"/>
|
||||
</docinit>
|
||||
|
||||
<template pagesize="letter" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main" pagesize="A4">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite</drawRightString>
|
||||
<fill color="[1,0,0,0]"/>
|
||||
<rect x="100" y="600" width="50" height="50" fill="1"/>
|
||||
<fill color="[0,1,0,0]"/>
|
||||
<rect x="200" y="600" width="50" height="50" fill="1"/>
|
||||
<fill color="[0,0,1,0]"/>
|
||||
<rect x="300" y="600" width="50" height="50" fill="1"/>
|
||||
<fill color="PCMYKColor(0,50,85,20,spotName='PANTONE 288 CV')"/>
|
||||
<rect x="400" y="600" width="50" height="50" fill="1"/>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="3in" width="6.27in" height="3in"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" textColor="[0,0,0,1]"/>
|
||||
<paraStyle name="h1" parent="normal" fontName="Helvetica-BoldOblique" fontSize="32" leading="36"/>
|
||||
<paraStyle name="spaced" parent="normal" spaceBefore="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<para style="normal">This is a test of CMYK support.
|
||||
</para>
|
||||
<para style="normal">The four swatches above should be in the CMYK primaries, and the paragraph carefully
|
||||
declares the text color to be process black (k=1).
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para style="normal">This is cmyk white text on cmyk black rectangle</para>
|
||||
<spacer length="6"/>
|
||||
<illustration height="15" width="144">
|
||||
<setFont name="Helvetica-Bold" size="12"/>
|
||||
<fill color="CMYK_BLACK"/>
|
||||
<rect x="0" y="0" width="144" height="15" fill="yes" stroke="no"/>
|
||||
<fill color="CMYK_WHITE"/>
|
||||
<drawString x="1" y="4">Hello World</drawString>
|
||||
</illustration>
|
||||
<spacer length="6"/>
|
||||
<para style="normal">This is rgb white text on rgb black rectangle</para>
|
||||
<spacer length="6"/>
|
||||
<illustration height="15" width="144">
|
||||
<setFont name="Helvetica-Bold" size="12"/>
|
||||
<fill color="black"/>
|
||||
<rect x="0" y="0" width="144" height="15" fill="yes" stroke="no"/>
|
||||
<fill color="white"/>
|
||||
<drawString x="1" y="4">Hello World</drawString>
|
||||
</illustration>
|
||||
<spacer length="6"/>
|
||||
<para style="normal">This is rgb white text on cmyk black rectangle</para>
|
||||
<spacer length="6"/>
|
||||
<illustration height="15" width="144">
|
||||
<setFont name="Helvetica-Bold" size="12"/>
|
||||
<fill color="CMYK_BLACK"/>
|
||||
<rect x="0" y="0" width="144" height="15" fill="yes" stroke="no"/>
|
||||
<fill color="white"/>
|
||||
<drawString x="1" y="4">Hello World</drawString>
|
||||
</illustration>
|
||||
<spacer length="6"/>
|
||||
<para style="normal">This is cmyk white text on rgb black rectangle</para>
|
||||
<spacer length="6"/>
|
||||
<illustration height="15" width="144">
|
||||
<setFont name="Helvetica-Bold" size="12"/>
|
||||
<fill color="black"/>
|
||||
<rect x="0" y="0" width="144" height="15" fill="yes" stroke="no"/>
|
||||
<fill color="CMYK_WHITE"/>
|
||||
<drawString x="1" y="4">Hello World</drawString>
|
||||
</illustration>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
103
z3c/rml/tests/input/rml-examples-035-numbering.rml
Normal file
103
z3c/rml/tests/input/rml-examples-035-numbering.rml
Normal file
@@ -0,0 +1,103 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_035_numbering.pdf" invariant="1">
|
||||
|
||||
<template showBoundary="1">
|
||||
|
||||
<pageTemplate id="Itemization">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 36: Numbering</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
</pageGraphics>
|
||||
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
<paraStyle name="h1" fontName="Helvetica-BoldOblique" fontSize="32" leading="36"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12"/>
|
||||
<paraStyle name="normal_indent" parent="normal" leftIndent="36"/>
|
||||
<paraStyle name="normal_indent_lv_2" parent="normal" leftIndent="72"/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
|
||||
|
||||
|
||||
<para style="h1">Demo of sequencing tag for multi-level numbering</para>
|
||||
|
||||
<para style="normal"> This initial paragraph doesn't have any numbers, but I've hidden in it a command to
|
||||
"chain" together three level identifiers, so that whenever the level_1 number is ncremented,
|
||||
the ones below it reset to 1. This needs to be done early and should really be allowed in
|
||||
the docinit tag, but isn't yet. The tag looks like <b><seqChain order= "level1 level2 level_3"/></b>
|
||||
<seqChain order= "level_1 level_2 level_3"/>
|
||||
|
||||
</para>
|
||||
|
||||
<para style="normal_indent">
|
||||
<b><seq id="level_1"/></b> <b><u>Heading</u></b>. Lorem ipsum dolor sit amet.... This contains a tag to "get" the current
|
||||
value of the <b>level_1</b> counter, and increments it after display. The tag looks like <b><seq id="level_1"></b>.
|
||||
</para>
|
||||
|
||||
|
||||
<para style="normal_indent">
|
||||
<b><seq id="level_1"/>.</b> <b><u>Heading</u></b>. Lorem ipsum dolor sit amet...
|
||||
</para>
|
||||
|
||||
<para style="normal_indent">
|
||||
<b><seq id="level_1"/>.</b> <b><u>Another heading</u></b>. Duis bibendum
|
||||
urna ac.... In the paragraphs below we use two <b>seq</b> tags; the level 2 one is as you would expect and increments, bt the level 1 tag has
|
||||
<b><seq id="level_1" inc="no"></b>, meaning "do not increment". You can also pass in an integer, to increment by 0, 1 or something else entirely; you could count
|
||||
down if you wanted to.
|
||||
</para>
|
||||
|
||||
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2"/></b> <b><u>Yet another
|
||||
heading</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2"/></b> <b><u>Yet another
|
||||
heading</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2"/></b> <b><u>Yet another
|
||||
heading</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
|
||||
|
||||
<para style="normal_indent">
|
||||
<b><seq id="level_1"/>.</b> <b><u>Back to outer level</u></b>. Duis bibendum
|
||||
urna ac...
|
||||
</para>
|
||||
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2" inc="5"/></b> <b><u>Just for the hell of it,
|
||||
jump ahead 5 at the inner level using inc="5"...</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2"/></b> <b><u>Yet another
|
||||
heading</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
95
z3c/rml/tests/input/rml-examples-036-numbering-contd.rml
Normal file
95
z3c/rml/tests/input/rml-examples-036-numbering-contd.rml
Normal file
@@ -0,0 +1,95 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_036_numbering_contd.pdf" invariant="1">
|
||||
|
||||
<template showBoundary="1">
|
||||
|
||||
<pageTemplate id="Itemization">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 37: Numbering_contd</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
<paraStyle name="h1" fontName="Helvetica-BoldOblique" fontSize="32" leading="36"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12"/>
|
||||
<paraStyle name="normal_indent" parent="normal" leftIndent="36"/>
|
||||
<paraStyle name="normal_indent_lv_2" parent="normal" leftIndent="72"/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
<para style="h1">Demo of sequencing tag for multi-level numbering</para>
|
||||
|
||||
<para style="normal">This is to check we re-initialise the sequence at the start of each document.
|
||||
If the numbers start 5,6,7... we're in trouble.
|
||||
</para>
|
||||
|
||||
<para style="normal_indent">
|
||||
<b><seq id="level_1"/></b> <b><u>Heading</u></b>. Lorem ipsum dolor sit amet.... This contains a tag to "get" the current
|
||||
value of the <b>level_1</b> counter, and increments it after display. The tag looks like <b><seq id="level_1"></b>.
|
||||
</para>
|
||||
|
||||
|
||||
<para style="normal_indent">
|
||||
<b><seq id="level_1"/>.</b> <b><u>Heading</u></b>. Lorem ipsum dolor sit amet...
|
||||
</para>
|
||||
|
||||
<para style="normal_indent">
|
||||
<b><seq id="level_1"/>.</b> <b><u>Another heading</u></b>. Duis bibendum
|
||||
urna ac.... In the paragraphs below we use two <b>seq</b> tags; the level 2 one is as you would expect and increments, bt the level 1 tag has
|
||||
<b><seq id="level_1" inc="no"></b>, meaning "do not increment". You can also pass in an integer, to increment by 0, 1 or something else entirely; you could count
|
||||
down if you wanted to.
|
||||
</para>
|
||||
|
||||
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2"/></b> <b><u>Yet another
|
||||
heading</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2"/></b> <b><u>Yet another
|
||||
heading</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2" /></b> <b><u>Yet another
|
||||
heading</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
|
||||
|
||||
<para style="normal_indent">
|
||||
<b><seq id="level_1"/>.</b> <b><u>Back to outer level</u></b>. Duis bibendum
|
||||
urna ac...
|
||||
</para>
|
||||
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2" inc="5"/></b> <b><u>Just for the hell of it,
|
||||
jump ahead 5 at the inner level using inc="5"...</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
<para style="normal_indent_lv_2">
|
||||
<b><seq id="level_1" inc="no"/>.<seq id="level_2"/></b> <b><u>Yet another
|
||||
heading</u></b>. Morbi laoreet magna sit amet...
|
||||
</para>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
16
z3c/rml/tests/input/rml-examples-037-plugingraphic.rml
Normal file
16
z3c/rml/tests/input/rml-examples-037-plugingraphic.rml
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_037_plugingraphic.pdf" invariant="1">
|
||||
|
||||
<stylesheet/>
|
||||
|
||||
<pageDrawing>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 38: Plugingraphic</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
|
||||
<plugInGraphic module="z3c.rml.tests.module" function="symbols">n=4,x="1in",y="7in",name="StarFive",dx="15pt",dy="0",size="10pt",fillColor="red",strokeColor="blue",strokeWidth="1.5pt"</plugInGraphic>
|
||||
<plugInGraphic module="z3c.rml.tests.module" function="symbols">n=5,x="2in",y="8in",name="StarFive",dx="20pt",dy="0",size="25pt",fillColor="blue",strokeColor="red",strokeWidth="0.5pt"</plugInGraphic>
|
||||
<plugInGraphic module="z3c.rml.tests.module" function="symbols">n=7,x="3in",y="9in",name="StarFive",dx="17",dy="0",size="12",fillColor="purple",strokeColor="none"</plugInGraphic>
|
||||
</pageDrawing>
|
||||
</document>
|
||||
99
z3c/rml/tests/input/rml-examples-038-rect-href.rml
Normal file
99
z3c/rml/tests/input/rml-examples-038-rect-href.rml
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_038_rect_href.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 39: Rect_href</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<fill color="blue"/>
|
||||
<rect href="http://www.google.com" x="0" y="800" width="50" height="42" fill="1"/>
|
||||
<fill color="cyan"/>
|
||||
<rect destination="BACK_PAGE" x="50" y="800" width="50" height="42" fill="1"/>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="main2">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 39: Rect_href</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<fill color="blue"/>
|
||||
<rect href="http://www.google.com" x="0" y="800" width="50" height="42" fill="1"/>
|
||||
<fill color="cyan"/>
|
||||
<rect destination="BACK_PAGE" x="50" y="800" width="50" height="42" fill="1"/>
|
||||
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="685"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
|
||||
<paraStyle
|
||||
name="h1"
|
||||
fontName="Helvetica-BoldOblique"
|
||||
fontSize="20"
|
||||
leading="24"
|
||||
/>
|
||||
|
||||
<paraStyle
|
||||
name="normal"
|
||||
fontName="Helvetica"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
|
||||
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
<setNextTemplate name="main2"/>
|
||||
<para style="h1">Testing rectangles with links and destinations</para>
|
||||
<para style="normal">This tests that rectangles with hyperlinks
|
||||
and internal destinations. The top left of the page should have a blue link positioned in
|
||||
absolute coordinates, and licking it should go to http://www.google.com/. The cyan rectangle
|
||||
next to it should take you to page 3.
|
||||
</para>
|
||||
|
||||
<para style="normal">
|
||||
The left one below should be pink, and should take you to http://www.yahoo.com/ . The red one should go to the back page.
|
||||
</para>
|
||||
<illustration width="210" height="100">
|
||||
<fill color="pink"/>
|
||||
<rect href="http://www.yahoo.com/" x="50" y="25" width="50" height="50" fill="1"/>
|
||||
<fill color="red"/>
|
||||
<rect destination="BACK_PAGE" x="100" y="25" width="50" height="50" fill="1"/>
|
||||
</illustration>
|
||||
|
||||
<para style="normal"> Lots of tags now have <i>href</i> or <i>destination</i> attributes - rectangles,
|
||||
table rows, table cells and so on.</para>
|
||||
|
||||
<nextFrame/>
|
||||
<para>We now fill the document with rubbish to take us forwards to the final page 3</para>
|
||||
|
||||
<nextFrame/>
|
||||
<para>This is the last page. This is a destination for some of the buttons on page 1.</para>
|
||||
<bookmark name="BACK_PAGE"/>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
149
z3c/rml/tests/input/rml-examples-039-doc-programming.rml
Normal file
149
z3c/rml/tests/input/rml-examples-039-doc-programming.rml
Normal file
@@ -0,0 +1,149 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_039_doc_programming.pdf" invariant="1">
|
||||
|
||||
<template pagesize="letter" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main" pagesize="letter portrait">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="760">RML Example 40: Doc_programming</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="730" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
|
||||
<pageTemplate id="main2" pagesize="letter portrait">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="760">RML Example 40: Doc_programming</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="730" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<drawRightString x="523" y="800">RML2PDF Test Suite</drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="685"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="autoNextTemplate" pagesize="letter portrait" autoNextTemplate="autoFollow">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="760">RML Example 40: Doc_programming</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="730" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<drawString x="72" y="72">template is autoNextTemplate</drawString>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="685"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="autoFollow" pagesize="letter portrait">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="760">RML Example 40: Doc_programming</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="730" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<drawString x="72" y="72">template is autoFollow</drawString>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="685"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
<paraStyle name="h1" fontName="Helvetica-BoldOblique" fontSize="32" leading="36"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12"/>
|
||||
<paraStyle name="spaced" fontName="Helvetica" fontSize="10" leading="12"
|
||||
spaceBefore="12" spaceAfter="12"/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
<setNextTemplate name="main2"/>
|
||||
<para style="normal">Hello World. This is a normal paragraph. Blah <font color="red">IPO</font> blah blah blah blah growth forecast blah
|
||||
blah blah forecast blah.Blah blah blah blah blah blah blah blah blah blah blah profit blah blah blah blah blah
|
||||
blah blah blah blah blah IPO.Blah blah blah blah blah blah blah reengineering blah growth blah blah blah
|
||||
proactive direction strategic blah blah blah forward-thinking blah.Blah blah doubletalk blah blah blah blah
|
||||
blah profit blah blah growth blah blah blah blah blah profit.Blah blah blah blah venture capital blah blah blah
|
||||
blah blah forward-thinking blah. Here are some common characters &#x92; = ’
|
||||
</para>
|
||||
<para style="normal">This is another normal paragraph. Blah IPO blah blah blah blah growth forecast blah
|
||||
blah blah forecast blah.Blah blah blah blah blah blah blah blah blah blah blah profit blah blah blah blah blah
|
||||
blah blah blah blah blah IPO.Blah blah blah blah blah blah blah reengineering blah growth blah blah blah
|
||||
proactive direction strategic blah blah blah forward-thinking blah.Blah blah doubletalk blah blah blah blah
|
||||
blah profit blah blah growth blah blah blah blah blah profit.Blah blah blah blah venture capital blah blah blah
|
||||
blah blah forward-thinking blah.
|
||||
</para>
|
||||
<para style="normal">
|
||||
I should NOT have a tiny leading space in front of me!
|
||||
</para>
|
||||
<para style="spaced">This is spaced. There should be 12 points before and after.</para>
|
||||
<para style="normal">Hello World. This is a normal paragraph. Blah IPO blah blah blah blah growth forecast blah
|
||||
blah blah forecast blah.Blah blah blah blah blah blah blah blah blah blah blah profit blah blah blah blah blah
|
||||
blah blah blah blah blah IPO.Blah blah blah blah blah blah blah reengineering blah growth blah blah blah
|
||||
proactive direction strategic blah blah blah forward-thinking blah.Blah blah doubletalk blah blah blah blah
|
||||
blah profit blah blah growth blah blah blah blah blah profit.Blah blah blah blah venture capital blah blah blah
|
||||
blah blah forward-thinking blah.
|
||||
</para>
|
||||
<docAssign var='currentFrame' expr='doc.frame.id'/>
|
||||
<docAssign var='currentPageTemplate' expr='doc.pageTemplate.id'/>
|
||||
<docAssign var='aW' expr='availableWidth'/>
|
||||
<docAssign var='aH' expr='availableHeight'/>
|
||||
<docAssign var='aWH' expr='availableWidth,availableHeight'/>
|
||||
<docAssign var='i' expr="3"/>
|
||||
<docIf cond='i>3'>
|
||||
<para style="normal">The value of i is larger than 3</para>
|
||||
<docElse/>
|
||||
<para style="normal">The value of i is not larger than to 3</para>
|
||||
</docIf>
|
||||
<docIf cond='i==3'>
|
||||
<para style="normal">The value of i is equal to 3</para>
|
||||
<docElse/>
|
||||
<para style="normal">The value of i is not equal to 3</para>
|
||||
</docIf>
|
||||
<docIf cond='i<3'>
|
||||
<para style="normal">The value of i is less than 3</para>
|
||||
<docElse/>
|
||||
<para style="normal">The value of i is not less than to 3</para>
|
||||
</docIf>
|
||||
<docWhile cond='i'>
|
||||
<docPara expr='i' format='The value of i is %(__expr__)d'/>
|
||||
<docExec stmt='i-=1'/>
|
||||
</docWhile>
|
||||
<docPara expr='"-".join("a b c d e f g".split())' escape="1"/>
|
||||
<docWhile cond="doc.page<3">
|
||||
<nextPage/>
|
||||
<docIf cond="doc.page<3">
|
||||
<para style="normal">This is the thenPart</para>
|
||||
<para style="normal">thenPart.....</para>
|
||||
<docElse/>
|
||||
<para style="normal">This is the elsePart</para>
|
||||
<para style="normal">elsePart.....</para>
|
||||
</docIf>
|
||||
</docWhile>
|
||||
<para style="normal">Now we should be on page 3</para>
|
||||
<setNextTemplate name="autoNextTemplate"/>
|
||||
<nextPage/>
|
||||
<para style="normal">This should be on a template called autoNextTemplate</para>
|
||||
<docAssert cond="doc.pageTemplate.id=='autoNextTemplate'" format="expected doc.pageTemplate.id=='autoNextTemplate'"/>
|
||||
<nextPage/>
|
||||
<para style="normal">This should be on a template called autoFollow</para>
|
||||
<docAssert cond="doc.pageTemplate.id=='autoFollow'" format="expected doc.pageTemplate.id=='autoFollow'"/>
|
||||
<setNextTemplate name="autoNextTemplate"/>
|
||||
<nextPage/>
|
||||
<para style="normal">(2)This should be on a template called autoNextTemplate</para>
|
||||
<docAssert cond="doc.pageTemplate.id=='autoNextTemplate'" format="expected doc.pageTemplate.id=='autoNextTemplate'"/>
|
||||
<setNextTemplate name="main"/>
|
||||
<nextPage/>
|
||||
<para style="normal">This should be on a template called main</para>
|
||||
<docAssert cond="doc.pageTemplate.id=='main'" format="expected doc.pageTemplate.id=='main'"/>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
44
z3c/rml/tests/input/rml-examples-040-colors.rml
Normal file
44
z3c/rml/tests/input/rml-examples-040-colors.rml
Normal file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_040_colors.pdf" invariant="1">
|
||||
|
||||
<template pagesize="letter" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main" pagesize="letter portrait">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="760">RML Example 41: Colors</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="730" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
<paraStyle name="h1" fontName="Helvetica-BoldOblique" fontSize="32" leading="36"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12"/>
|
||||
<paraStyle name="spaced" fontName="Helvetica" fontSize="10" leading="12"
|
||||
spaceBefore="12" spaceAfter="12"/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
<para style="normal">This document briefly shows a few of the ways of declaring colors in RML.</para>
|
||||
<para style="normal">This text should be <font color="red">red</font>, declared with <font color="red"></para>
|
||||
<para style="normal">This text should be <font color="#00ff00">green</font>, declared with <font color="#00ff00"></para>
|
||||
<para style="normal">This text should be <font color="(0,0,1.0)">blue</font>, declared with <font color="(0.0,0.0,1.0)"></para>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
67
z3c/rml/tests/input/rml-examples-041-masking.rml
Normal file
67
z3c/rml/tests/input/rml-examples-041-masking.rml
Normal file
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_041_masking.pdf" invariant="1">
|
||||
|
||||
<template pagesize="a4" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main" pagesize="a4 portrait">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 42: Masking</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<saveState/>
|
||||
<translate dy="500" dx="200"/>
|
||||
<saveState/>
|
||||
<stroke color="red" width="1"/>
|
||||
<translate dy="133" dx="40"/>
|
||||
<scale sy="-1"/>
|
||||
<path x="0" y="89.93" close="yes" stroke="yes" clip="yes">
|
||||
<moveto>128.755 15.979</moveto>
|
||||
<curvesto>43.5303 37.2158 10.1621 71.8726 0 78.8896</curvesto>
|
||||
0 164.063
|
||||
<curvesto>40.6992 167.07 105.996 158.279 174.089 141.313</curvesto>
|
||||
<curvesto>237.792 125.438 281.841 105.292 319.089 83.2666</curvesto>
|
||||
319.089 3.646
|
||||
<curvesto>274.999 -2.29736 203.875 -2.73926 128.755 15.9795</curvesto>
|
||||
</path>
|
||||
<scale sy="-1"/>
|
||||
<translate dy="-183" dx="-40"/>
|
||||
<image file="400x200.gif" x="0" y="0" width="400" height="200"/>
|
||||
<restoreState/>
|
||||
<restoreState/>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="420"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
<paraStyle name="h1" fontName="Helvetica-BoldOblique" fontSize="32" leading="36"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12"/>
|
||||
<paraStyle name="spaced" fontName="Helvetica" fontSize="10" leading="12"
|
||||
spaceBefore="12" spaceAfter="12"/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
|
||||
<para style="normal">Hello World. This is a normal paragraph. Blah <font color="red">IPO</font> blah blah blah blah growth forecast blah
|
||||
blah blah forecast blah.Blah blah blah blah blah blah blah blah blah blah blah profit blah blah blah blah blah
|
||||
blah blah blah blah blah IPO.Blah blah blah blah blah blah blah reengineering blah growth blah blah blah
|
||||
proactive direction strategic blah blah blah forward-thinking blah.Blah blah doubletalk blah blah blah blah
|
||||
blah profit blah blah growth blah blah blah blah blah profit.Blah blah blah blah venture capital blah blah blah
|
||||
blah blah forward-thinking blah.
|
||||
</para>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
171
z3c/rml/tests/input/rml-examples-042-longdoc.rml
Normal file
171
z3c/rml/tests/input/rml-examples-042-longdoc.rml
Normal file
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "../rml.dtd">
|
||||
<document filename="test_042_longdoc.pdf">
|
||||
<docinit>
|
||||
|
||||
<!--here is how to set values for the first template to see -->
|
||||
<name id="chapterName" value="The secret 'grey' chapter"/>
|
||||
<name id="chapterColor" value="grey"/>
|
||||
|
||||
<!--This doesn't work because they never get 'drawn' and don't set their values'
|
||||
<namedString id="chapterName">The secret "grey" chapter</namedString>
|
||||
<namedString id="chapterColor">grey</namedString>
|
||||
-->
|
||||
<startIndex/>
|
||||
|
||||
|
||||
|
||||
</docinit>
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="0">
|
||||
<pageTemplate id="covr">
|
||||
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 43: Longdoc</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<setFont name="Times-Bold" size="20"/>
|
||||
<drawCentredString x="297" y="720">Examples of long document features</drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
|
||||
<pageTemplate id="cover">
|
||||
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 43: Longdoc</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<setFont name="Times-Bold" size="20"/>
|
||||
<drawCentredString x="297" y="620">Examples of long document features</drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="72" y1="72" width="451" height="400"/>
|
||||
</pageTemplate>
|
||||
|
||||
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<!--pageGraphics is parsed once, but yields a collection
|
||||
of drawing operations which are done lazily each time
|
||||
we start a page. Therefore certain elements can be dynamic.
|
||||
We have a dynamic chapter name, page number, and colour
|
||||
selected for the bars.
|
||||
-->
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 43: Longdoc</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
|
||||
|
||||
<drawRightString x="523" y="620"><getName id="chapterName"/></drawRightString>
|
||||
<drawRightString x="523" y="40"><pageNumber/></drawRightString>
|
||||
|
||||
<fill color="rml:chapterColor"/>
|
||||
<rect x="60" y="56" width="475" height="16" fill="yes" stroke="0"/>
|
||||
<rect x="60" y="700" width="475" height="16" fill="yes" stroke="0"/>
|
||||
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in"/>
|
||||
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
|
||||
<paraStyle name="h1"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="12"
|
||||
spaceBefore = "0.5 cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="normal"
|
||||
fontName="Helvetica"
|
||||
fontSize="10"
|
||||
spaceBefore="6"
|
||||
/>
|
||||
|
||||
<paraStyle name="code"
|
||||
fontName="Courier"
|
||||
fontSize="8"
|
||||
leftIndent="36"
|
||||
textColor="blue"
|
||||
/>
|
||||
|
||||
<paraStyle name="TOC"
|
||||
fontName="Helvetica"
|
||||
fontSize="12"
|
||||
/>
|
||||
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
|
||||
<story firstPageTemplate="cover">
|
||||
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
|
||||
<setNextTemplate name="cover"/>
|
||||
|
||||
<para style="normal">This test case is here to try out various features commonly found in a multi-chapter brochure of catalog.</para>
|
||||
|
||||
|
||||
<setNextTemplate name="main"/>
|
||||
<nextPage/>
|
||||
<para>This page has an undefined colour and chapter name. </para>
|
||||
|
||||
|
||||
|
||||
<namedString id="chapterName">The Red Chapter</namedString>
|
||||
<namedString id="chapterColor">#FF0000</namedString>
|
||||
<nextPage/>
|
||||
<para style="normal">The red chapter</para>
|
||||
<para style="normal">This is on page 3. The template should be red, but that's variable.</para>
|
||||
<nextPage/>
|
||||
<para style="normal">More stuff in the red chapter. This should be indexed under 'red'.
|
||||
<index item="M&S"/></para>
|
||||
|
||||
|
||||
<!--get ready for green-->
|
||||
<namedString id="chapterName">The Green Chapter</namedString>
|
||||
<namedString id="chapterColor">#00FF00</namedString>
|
||||
<!--template is drawn on nextPage -->
|
||||
<nextPage/>
|
||||
<para style="normal">The green chapter</para>
|
||||
<para style="normal">The template should be green, but that's variable.</para>
|
||||
<nextPage/>
|
||||
<para style="normal">More stuff in the green chapter.</para>
|
||||
|
||||
|
||||
<namedString id="chapterName">The Blue Chapter</namedString>
|
||||
<namedString id="chapterColor">#0000FF</namedString>
|
||||
|
||||
<nextPage/>
|
||||
<para style="normal">The blue chapter</para>
|
||||
<para style="normal">The template should be blue, but that's variable.</para>
|
||||
<nextPage/>
|
||||
<para style="normal">More stuff in the blue chapter.</para>
|
||||
|
||||
<!--Don't use <name> in the story; it sets when parsed,
|
||||
so doing this at end of story will set the default for the
|
||||
first chapter to pink. We should have disallowed this in the DTD.
|
||||
<name id="chapterName" value="The secret 'pink' chapter"/>
|
||||
<name id="chapterColor" value="pink"/>
|
||||
|
||||
-->
|
||||
|
||||
<nextFrame/>
|
||||
<showIndex/>
|
||||
</story>
|
||||
</document>
|
||||
64
z3c/rml/tests/input/rml-examples-043-headings.rml
Normal file
64
z3c/rml/tests/input/rml-examples-043-headings.rml
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="test_043_headings.pdf">
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="0">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 44: Headings</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
</pageGraphics>
|
||||
|
||||
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<paraStyle name="code"
|
||||
fontName="Courier"
|
||||
fontSize="8"
|
||||
leftIndent="36"
|
||||
textColor="blue"
|
||||
/>
|
||||
<paraStyle name="style.Heading1"
|
||||
parent="style.Heading1"
|
||||
textColor="red"
|
||||
/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
|
||||
</stylesheet>
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
<title>Headings test</title>
|
||||
<para>You can customize heading styles like this:</para>
|
||||
<xpre style="code"><![CDATA[<paraStyle name="style.Heading1"]]></xpre>
|
||||
<xpre style="code"><![CDATA[ parent="style.Heading1"]]></xpre>
|
||||
<xpre style="code"><![CDATA[ textColor="red"]]></xpre>
|
||||
<xpre style="code"><![CDATA[/>]]></xpre>
|
||||
|
||||
<h1>This is heading 1</h1>
|
||||
<h2>This is heading 2</h2>
|
||||
<h3>This is heading 3</h3>
|
||||
<h4>This is heading 4</h4>
|
||||
<h5>This is heading 5</h5>
|
||||
<h6>This is heading 6</h6>
|
||||
|
||||
<h2>This code is generated with folowing RML:</h2>
|
||||
|
||||
<xpre style="code"><![CDATA[<h1>This is heading 1</h1>]]></xpre>
|
||||
<xpre style="code"><![CDATA[<h2>This is heading 2</h2>]]></xpre>
|
||||
<xpre style="code"><![CDATA[<h3>This is heading 3</h3>]]></xpre>
|
||||
<xpre style="code"><![CDATA[<h4>This is heading 4</h4>]]></xpre>
|
||||
<xpre style="code"><![CDATA[<h5>This is heading 5</h5>]]></xpre>
|
||||
<xpre style="code"><![CDATA[<h6>This is heading 6</h6>]]></xpre>
|
||||
</story>
|
||||
</document>
|
||||
108
z3c/rml/tests/input/rml-examples-044-codesnippets.rml
Normal file
108
z3c/rml/tests/input/rml-examples-044-codesnippets.rml
Normal file
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="test_044_codesnippets.pdf">
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="0">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 45: Codesnippets</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<paraStyle name="my_code"
|
||||
fontName="Courier"
|
||||
fontSize="8"
|
||||
leftIndent="36"
|
||||
textColor="blue"
|
||||
backColor="cornsilk"
|
||||
borderColor="gray"
|
||||
borderPadding="6"
|
||||
borderWidth="1"
|
||||
spaceBefore="12"
|
||||
spaceAfter="12"
|
||||
/>
|
||||
<paraStyle name="style.Heading1"
|
||||
parent="style.Heading1"
|
||||
textColor="red"
|
||||
/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
|
||||
</stylesheet>
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
<title>Code snippets test</title>
|
||||
<para>Python has a code-highlighting package named 'Pygments'. Pygments is installed, you can generate colorized code snippets. If the sample below is in colour, you have it installed; otherwise, you can obtain it from pypi.python.org, or from the <font face="Courier">python-pygments</font> package in Ubuntu. Pygments supports many, many different lexers.</para>
|
||||
|
||||
<para>Here is the code to insert a Python snippet...</para>
|
||||
<spacer length="6"/>
|
||||
<para><font face="Courier"><![CDATA[<codesnippet language="python">...</codesnippet>]]></font></para>
|
||||
<spacer length="6"/>
|
||||
<para>...and here is some sample outout...</para>
|
||||
<spacer length="6"/>
|
||||
|
||||
|
||||
<codesnippet language="python">
|
||||
class code(MapNode):
|
||||
def evaluate(self, tagname, sdict, pcontent, extra, context):
|
||||
stylename = "pre.defaultStyle"
|
||||
if sdict.has_key("style"):
|
||||
stylename = sdict["style"]
|
||||
if sdict.has_key("syntax"):
|
||||
lang = sdict["syntax"]
|
||||
|
||||
|
||||
#clean up the block of code prior to display.
|
||||
|
||||
src = ''.join(map(str, pcontent))
|
||||
#split line ends, strip trailing space
|
||||
|
||||
|
||||
lines = map(lambda x: x.rstrip(), src.split('\n'))
|
||||
#generally we trim off up to one leading and trailing blank lines
|
||||
#that's probably from indenting the XML
|
||||
if lines[0] == '':
|
||||
lines = lines[1:]
|
||||
if lines[-1] == '':
|
||||
lines = lines[:-1]
|
||||
</codesnippet>
|
||||
|
||||
<para>Now we'll show colourised XML:</para>
|
||||
<codesnippet language="xml"><![CDATA[
|
||||
<tag attr="value">
|
||||
<content>Foo bar!</content>
|
||||
</tag>
|
||||
]]></codesnippet>
|
||||
|
||||
|
||||
<para>If you don't specify a language parameter (or if pygments cannot be imported), it won't get colourised.</para>
|
||||
<codesnippet><![CDATA[
|
||||
<tag attr="value">
|
||||
<content>Foo bar!</content>
|
||||
</tag>
|
||||
]]></codesnippet>
|
||||
|
||||
<para>Because your XML might be indented, by default we remove an initial or final blank line, and we also 'dedent' to remove any whitespace on the left of your code block. However, the default paragraph style selected adds an indent on the left side.</para>
|
||||
|
||||
|
||||
<para>The one below specifies a different paragraph style, defined in our document, to add a coloured backdrop...</para>
|
||||
|
||||
<codesnippet language="python" style="my_code">
|
||||
def my_function(arg):
|
||||
foo, bar = do_stuff_to(arg)
|
||||
return [bar, foo[0]]
|
||||
</codesnippet>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
105
z3c/rml/tests/input/rml-examples-045-cmyk.rml
Normal file
105
z3c/rml/tests/input/rml-examples-045-cmyk.rml
Normal file
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_045_cmyk.pdf" invariant="1" colorSpace="CMYK">
|
||||
<docinit>
|
||||
<color id="BLUE" CMYK="[1,0.67,0,0.23]" spotName="PANTONE 288 CV"/>
|
||||
<color id="BLUE75" CMYK="[1,0.67,0,0.23]" spotName="PANTONE 288 CV" density=".75"/>
|
||||
<color id="BLUE50" CMYK="[1,0.67,0,0.23]" spotName="PANTONE 288 CV" density=".5"/>
|
||||
<color id="BLUE25" CMYK="[1,0.67,0,0.23]" spotName="PANTONE 288 CV" density=".25"/>
|
||||
</docinit>
|
||||
|
||||
<template pagesize="letter" leftMargin="72" showBoundary="0">
|
||||
<pageTemplate id="main" pagesize="A4">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 46: Cmyk</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" textColor="black"/>
|
||||
<paraStyle name="h1" parent="normal" fontName="Helvetica-BoldOblique" fontSize="24" leading="28" textColor="BLUE"/>
|
||||
<paraStyle name="spaced" parent="normal" spaceBefore="12" spaceAfter="12"/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
|
||||
<blockTableStyle id="grid">
|
||||
<blockAlignment value="center"/>
|
||||
<blockFont name="Helvetica"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
|
||||
|
||||
<para style="h1">Tests of colour separated PDF output..
|
||||
</para>
|
||||
<para style="normal">On screen, you'll see various blacks and shades of blue. The on-screen
|
||||
appearance depends on CMYK equivalents you supply.
|
||||
</para>
|
||||
<para style="normal">If you open this document in Illustrator, Quark, Acrobat etc and check the
|
||||
separations, there should be plates for black and for Pantone 288. The black/greys should be converted into
|
||||
cmyk automatically.
|
||||
</para>
|
||||
|
||||
<illustration height="50" width="300">
|
||||
<setFont name="Helvetica-Bold" size="12"/>
|
||||
<fill color="black"/>
|
||||
<rect x="0" y="10" width="30" height="30" fill="yes" stroke="no"/>
|
||||
<fill color="[0,0,0,0.75]"/>
|
||||
<rect x="50" y="10" width="30" height="30" fill="yes" stroke="no"/>
|
||||
<fill color="[0,0,0,0.50]"/>
|
||||
<rect x="100" y="10" width="30" height="30" fill="yes" stroke="no"/>
|
||||
<fill color="[0,0,0,0.25]"/>
|
||||
<rect x="150" y="10" width="30" height="30" fill="yes" stroke="no"/>
|
||||
</illustration>
|
||||
|
||||
<para style="normal">The swatches above should fade from black to grey - 100% down to 25%.</para>
|
||||
|
||||
|
||||
<illustration height="50" width="300">
|
||||
<setFont name="Helvetica-Bold" size="12"/>
|
||||
<fill color="BLUE"/>
|
||||
<rect x="0" y="10" width="30" height="30" fill="yes" stroke="no"/>
|
||||
<fill color="BLUE75"/>
|
||||
<rect x="50" y="10" width="30" height="30" fill="yes" stroke="no"/>
|
||||
<fill color="BLUE50"/>
|
||||
<rect x="100" y="10" width="30" height="30" fill="yes" stroke="no"/>
|
||||
<fill color="BLUE25"/>
|
||||
<rect x="150" y="10" width="30" height="30" fill="yes" stroke="no"/>
|
||||
</illustration>
|
||||
|
||||
<para style="normal">The swatches above should be tints of Pantone 288 - 100% down to 25%.</para>
|
||||
|
||||
|
||||
<para style="normal">Now we'll check the colours in a table</para>
|
||||
|
||||
<spacer length="6"/>
|
||||
<blockTable style="grid">
|
||||
<tr><td fontColor="black">Black</td><td fontColor="BLUE">Blue</td></tr>
|
||||
<tr><td background="black"></td><td background="BLUE"></td></tr>
|
||||
</blockTable>
|
||||
<spacer length="6"/>
|
||||
|
||||
<para style="normal">We can now <font color="BLUE75">pass colours</font> through into <font color="BLUE50">substrings</font> in paragraphs even
|
||||
though that's handled by a different parser.</para>
|
||||
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
160
z3c/rml/tests/input/rml-examples-046-lists.rml
Normal file
160
z3c/rml/tests/input/rml-examples-046-lists.rml
Normal file
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_046_lists.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 53: Lists</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<setFont name="Helvetica" size="10"/>
|
||||
<drawCenteredString x="297" y="36"><pageNumber countingFrom="1"/></drawCenteredString>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="590"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="main2">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 53: Lists</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<setFont name="Helvetica" size="10"/>
|
||||
<drawCenteredString x="297" y="36"><pageNumber countingFrom="1"/></drawCenteredString>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="45" width="525" height="685"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" />
|
||||
<paraStyle name="bodytext" parent="normal" spaceBefore="6" />
|
||||
<paraStyle name="lpsty" parent="bodytext" spaceAfter="18" />
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
<paraStyle name="h1" fontName="Helvetica-Bold" fontSize="12" spaceBefore = "0.5cm" />
|
||||
<blockTableStyle id="redgreen" spaceBefore="20">
|
||||
<!--blockAlignment value="left"/>
|
||||
<blockValign value="top"/>
|
||||
<blockBottomPadding length="0" start="0,0" stop="-1,-1"/>
|
||||
<blockLeftPadding length="0" start="0,0" stop="-1,-1"/>
|
||||
<blockTopPadding length="0" start="0,0" stop="-1,-1"/>
|
||||
<blockRightPadding length="0" start="0,0" stop="-1,-1"/-->
|
||||
<lineStyle start="0,0" stop="-1,-1" kind="GRID" colorName="green"/>
|
||||
<lineStyle start="0,0" stop="-1,-1" kind="BOX" colorName="red" thickness="2"/>
|
||||
<!--blockBackground colorName="pink" start="0,0" stop="-1,-1"/>
|
||||
<blockBackground colorName="yellow" start="0,0" stop="-1,-1"/-->
|
||||
</blockTableStyle>
|
||||
<listStyle name="blah" spaceAfter="10" bulletType="A" spaceBefore="23" />
|
||||
<listStyle name="square" spaceAfter="10" bulletType="bullet" spaceBefore="23" bulletColor="red" start="square"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
|
||||
<setNextTemplate name="main2"/>
|
||||
<ol>
|
||||
<li><para style="lpsty">A table with 5 rows</para></li>
|
||||
<li>
|
||||
<blockTable style="redgreen" colWidths="50,100,200">
|
||||
<tr><td>1</td><td><para style="bodytext"></para></td><td><para style="normal"></para></td></tr>
|
||||
<tr><td>2</td><td><para style="bodytext">xx </para></td><td><para style="normal">blah </para></td></tr>
|
||||
<tr><td>3</td><td><para style="bodytext">xx xx </para></td><td><para style="normal">blah blah </para></td></tr>
|
||||
<tr><td>4</td><td><para style="bodytext">xx xx xx </para></td><td><para style="normal">blah blah blah </para></td></tr>
|
||||
<tr><td>5</td><td><para style="bodytext">xx xx xx xx </para></td><td><para style="normal">blah blah blah blah </para></td></tr>
|
||||
</blockTable>
|
||||
</li>
|
||||
<li>
|
||||
<para style="normal">A sublist</para>
|
||||
</li>
|
||||
<li value="7">
|
||||
<ol bulletType="i">
|
||||
<li spaceBefore="6"><para style="normal">Another table with 3 rows</para></li>
|
||||
<li>
|
||||
<blockTable style="redgreen" colWidths="60,90,180">
|
||||
<tr><td>1</td><td><para style="bodytext"></para></td><td><para style="normal"></para></td></tr>
|
||||
<tr><td>2</td><td><para style="bodytext">xx </para></td><td><para style="normal">blah </para></td></tr>
|
||||
<tr><td>3</td><td><para style="bodytext">xx xx </para></td><td><para style="normal">blah blah </para></td></tr>
|
||||
</blockTable>
|
||||
</li>
|
||||
<li><para style="normal">We have already seen that the notion of level of grammaticalness is,
|
||||
apparently, determined by a corpus of utterance tokens upon which
|
||||
conformity has been defined by the paired utterance test. If the
|
||||
position of the trace in (99c) were only relatively inaccessible to
|
||||
movement, a descriptively adequate grammar suffices to account for the
|
||||
traditional practice of grammarians. Notice, incidentally, that this
|
||||
analysis of a formative as a pair of sets of features cannot be
|
||||
arbitrary in the strong generative capacity of the theory.</para>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<para style="normal">An unordered sublist</para>
|
||||
</li>
|
||||
<li>
|
||||
<ul>
|
||||
<li spaceBefore="6"><para style="normal">A table with 2 rows</para></li>
|
||||
<li bulletColor="green" spaceAfter="6">
|
||||
<blockTable style="redgreen" colWidths="60,90,180">
|
||||
<tr><td>1</td><td><para style="bodytext">zz zz zz </para></td><td><para style="normal">duh duh duh </para></td></tr>
|
||||
<tr><td>2</td><td><para style="bodytext">yy yy yy yy </para></td><td><para style="normal">duh duh duh duh </para></td></tr>
|
||||
</blockTable>
|
||||
</li>
|
||||
<li bulletColor="red" value="square"><para style="normal">In the discussion of resumptive pronouns following (81), this
|
||||
selectionally introduced contextual feature is to be regarded as a
|
||||
parasitic gap construction. With this clarification, the systematic use
|
||||
of complex symbols is not to be considered in determining a descriptive
|
||||
fact. On our assumptions, the notion of level of grammaticalness is
|
||||
necessary to impose an interpretation on the strong generative capacity
|
||||
of the theory. It appears that a descriptively adequate grammar is not
|
||||
subject to the requirement that branching is not tolerated within the
|
||||
dominance scope of a complex symbol. Comparing these examples with
|
||||
their parasitic gap counterparts in (96) and (97), we see that this
|
||||
selectionally introduced contextual feature is rather different from a
|
||||
parasitic gap construction.</para>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<para style="normal">Of course, the systematic use of complex symbols raises serious doubts
|
||||
about a stipulation to place the constructions into these various
|
||||
categories. By combining adjunctions and certain deformations, the
|
||||
natural general principle that will subsume this case is to be regarded
|
||||
as a descriptive fact. This suggests that this analysis of a formative
|
||||
as a pair of sets of features suffices to account for the requirement
|
||||
that branching is not tolerated within the dominance scope of a complex
|
||||
symbol.</para>
|
||||
</li>
|
||||
</ol>
|
||||
<ol style="blah">
|
||||
<li><para style="normal">item should be A</para></li>
|
||||
<li><para style="normal">item should be B</para></li>
|
||||
</ol>
|
||||
<ol>
|
||||
<li><para style="normal">item should be 1</para></li>
|
||||
<li><para style="normal">item should be 2</para></li>
|
||||
</ol>
|
||||
<ol bulletType="i">
|
||||
<li><para style="normal">item should be i</para><para style="normal">a second paragraph</para></li>
|
||||
<li><para style="normal">item should be ii</para></li>
|
||||
</ol>
|
||||
<ol bulletType="I">
|
||||
<li><para style="normal">item should be I</para></li>
|
||||
<li><para style="normal">item should be II</para><para style="normal">another paragraph</para></li>
|
||||
</ol>
|
||||
|
||||
<ul style="square">
|
||||
<li><para style="normal">para 1</para></li>
|
||||
<li><para style="normal">para 2</para><para style="normal">another paragraph</para></li>
|
||||
<li value="circle" bulletColor="green"><para style="normal">para 3</para></li>
|
||||
</ul>
|
||||
</story>
|
||||
</document>
|
||||
319
z3c/rml/tests/input/rml-examples-047-condPageBreak.rml
Normal file
319
z3c/rml/tests/input/rml-examples-047-condPageBreak.rml
Normal file
@@ -0,0 +1,319 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="test_047_paraStyle_condPageBreak.pdf">
|
||||
|
||||
|
||||
<template pagesize="(595,842)" leftMargin="72" showBoundary="1">
|
||||
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 55 : Condpagebreak</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<drawCentredString x="297" y="36"><pageNumber countingFrom="1"/></drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="firstLeft" x1="1in" y1="5in" width="3in" height="3.5in"/>
|
||||
<frame id="firstRight" x1="4.27in" y1="5in" width="3in" height="3.5in"/>
|
||||
<frame id="secondLeft" x1="1in" y1="0.75in" width="3in" height="3.5in"/>
|
||||
<frame id="secondRight" x1="4.27in" y1="0.75in" width="3in" height="3.5in"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="keepTogether">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 55 : Condpagebreak</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<drawCentredString x="297" y="36"><pageNumber countingFrom="1"/></drawCentredString>
|
||||
</pageGraphics>
|
||||
|
||||
|
||||
<frame id="firstLeft" x1="1in" y1="5in" width="3in" height="3.5in"/>
|
||||
<frame id="firstRight" x1="4.27in" y1="5in" width="3in" height="3.5in"/>
|
||||
<frame id="secondLeft" x1="1in" y1="0.75in" width="3in" height="3.5in"/>
|
||||
<frame id="secondRight" x1="4.27in" y1="0.75in" width="3in" height="3.5in"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="condPageBreak">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 55 : Condpagebreak</drawString>
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<drawCentredString x="297" y="36"><pageNumber countingFrom="1"/></drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="second" x1="35" y1="55" width="525" height="680"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle name="h1" fontName="Courier-Bold" fontSize="15" spaceBefore = "0.5 cm" />
|
||||
<paraStyle name="FrameBreak" fontName="Helvetica" fontSize="12" leading="14"
|
||||
frameBreakBefore="1" />
|
||||
<paraStyle name="PageBreak" fontName="Helvetica" fontSize="12" leading="14"
|
||||
pageBreakBefore="1" />
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="12" />
|
||||
<paraStyle name="Control" fontName="Helvetica" fontSize="12" leading="14"
|
||||
keepWithNext="0" />
|
||||
<paraStyle name="keepTogether" fontName="Helvetica" fontSize="12" leading="14"
|
||||
keepWithNext="1" />
|
||||
<paraStyle name="noWidows" fontName="Helvetica" fontSize="10" leading="12" allowWidows="0"/>
|
||||
<paraStyle name="yesOrphan" fontName="Helvetica" fontSize="10" leading="12"
|
||||
allowOrphans="1"/>
|
||||
<paraStyle name="dots" fontName="Helvetica" fontSize="10" leading="12" endDots="."/>
|
||||
<paraStyle name="characters" fontName="Helvetica" fontSize="10" leading="12" endDots="123"/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
</stylesheet>
|
||||
<story >
|
||||
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
|
||||
<setNextTemplate name="keepTogether"/>
|
||||
<para style="h1" alignment="center">KeepWithNext</para>
|
||||
<nextFrame/>
|
||||
<para style="normal">The <font face="Courier">keepWithNext</font> attribute for the
|
||||
<font face="Courier">paraStyle</font> tag tells the paragraph, whether it should
|
||||
always be kept together with the next paragraph or not. This can be useful for
|
||||
keeping headings together with the following paragraph. The default value is 0.</para>
|
||||
<para style="normal"> The code looks as follows:</para>
|
||||
<codesnippet language="xml"><![CDATA[
|
||||
<paraStyle name="keepApart" keepWithNext="0" />
|
||||
<paraStyle name="keepTogether" keepWithNext="1" />
|
||||
]]></codesnippet>
|
||||
<nextFrame/>
|
||||
<para style="normal">An example with <font face="Courier">keepWithNext="0"</font>. There is a
|
||||
spacer underneath.</para>
|
||||
<spacer length="2.7in"/>
|
||||
<para style="Control">This is paragraph 1 with the
|
||||
<font face="Courier">keepWithNext="0"</font> attribute.</para>
|
||||
<para>This is paragraph 2.</para>
|
||||
|
||||
<nextFrame/>
|
||||
<para style="normal">An example with <font face="Courier">keepWithNext="1"</font>. There is a
|
||||
spacer underneath</para>
|
||||
<spacer length="2.7in"/>
|
||||
<para style="keepTogether">This is paragraph 1, whose style has the
|
||||
<font face="Courier">keepWithNext="1"</font> attribute.</para>
|
||||
<para style="normal">This is paragraph 2.</para>
|
||||
<setNextTemplate name="condPageBreak"/>
|
||||
<nextFrame/>
|
||||
<para style="h1" alignment="center">condPageBreak</para>
|
||||
<spacer length="0.75in"/>
|
||||
<para style="normal">The <font face="Courier"><condPageBreak/></font> tag will move to
|
||||
the next page if there is not enough space on the page. The length required to
|
||||
stay on the same page is give by the attribute <font face="Courier">height</font>
|
||||
which takes a length in the allowed measurements.</para>
|
||||
<spacer length="2in"/>
|
||||
<para style="normal"><font color="(0,0,0,0.5)">Blah blah blah blah blah blah Lieutenant
|
||||
Commander Data Harry Kim blah
|
||||
blah blah blah blah blah blah blah blah blah blah blah blah. Blah cloaking device
|
||||
blah blah Lieutenant Commander Data blah Dr. Pulaski blah blah blah USS Enterprise
|
||||
blah blah blah emergency transponder. Blah blah Ferrengi blah blah blah blah blah
|
||||
blah blah blah blah blah blah. Blah blah blah blah blah Tom Paris Archer IV blah blah
|
||||
Archer IV blah blah Soyuz class science vessel blah Betazoid blah blah blah blah
|
||||
warship blah blah blah blah blah. Blah blah blah Lieutenant Worf blah blah Lieutenant
|
||||
Worf Vulcan blah blah blah. Blah blah blah blah blah blah blah Tom Paris blah William
|
||||
Riker blah blah blah blah blah blah blah Klingon blah Admiral Nakamura blah blah blah
|
||||
blah blah. Blah blah blah blah blah blah blah Romulan ale blah blah blah asteroid
|
||||
field blah blah blah blah blah blah blah blah. Blah blah blah blah blah Memory Alpha
|
||||
blah blah blah blah blah blah blah. Blah blah blah Captain Picard blah blah Romulan
|
||||
blah blah blah blah blah Admiral Nakamura blah blah. Blah blah blah blah blah blah
|
||||
blah Starfleet Academy blah blah USS Intrepid blah blah blah blah blah blah blah blah
|
||||
holodeck blah blah blah blah. Blah blah blah blah blah ...with a phaser! blah blah
|
||||
blah blah blah Romulan Vulcan blah blah blah. Blah blah quantum flux blah blah blah
|
||||
blah quantum flux Chief O'Brian blah blah blah blah blah blah blah blah blah. Blah
|
||||
Counsellor Troi blah blah blah blah blah blah USS Intrepid blah blah blah blah blah
|
||||
Captain Janeway blah asteroid field blah IKV Pagh blah blah. Blah blah blah blah blah
|
||||
blah Betazoid blah blah blah blah blah IKV Pagh blah blah Captain Janeway blah blah
|
||||
IKV Pagh. Blah photon torpedo blah blah blah blah blah blah photon torpedo blah blah
|
||||
blah blah blah blah blah blah blah Ferrengi blah blah blah blah blah. Blah blah blah
|
||||
blah United Federation of Planets blah blah blah blah blah blah blah Deep Space Nine
|
||||
blah blah blah blah blah blah blah blah blah. Blah blah "Intruder alert!" Romulan
|
||||
blah blah blah blah blah blah blah blah blah. Blah blah blah shuttlecraft Ferrengi
|
||||
Vulcan blah blah blah blah blah blah Galaxy class vessel blah blah blah blah blah
|
||||
blah blah. Blah turbolift blah blah scout ship cruiser blah quantum flux blah blah
|
||||
blah blah blah blah blah blah blah blah blah blah blah William Riker blah blah blah.
|
||||
Blah blah blah blah blah battlecruiser blah blah blah blah blah blah blah blah Dr.
|
||||
Pulaski Pacifica blah blah blah blah blah blah turbolift. Blah blah blah Benzite blah
|
||||
Bajoran blah blah "Borg Invasion imminent!" blah blah blah blah blah blah blah blah
|
||||
blood wine. Blah emergency transponder blah Starfleet blah blah blah blah blah blah
|
||||
blah blah blah blah blah blah blah blah blah shuttle bay 2 blah blah blah. Blah blah
|
||||
blah blah blah blah blah blah distress signal blah spacedock blah Irumodic Syndrome
|
||||
blah Romulan ale blah blah blah blah blah "All hands abandon ship! This is not a
|
||||
drill!" blah blah blah blah blah.</font></para>
|
||||
<para style="normal"><font face="Times-Roman">The conditional page break comes in here and
|
||||
is set for 3 inches.</font></para>
|
||||
<condPageBreak height="3in"/>
|
||||
<para style="normal">This is on the next page since there was less than three inches
|
||||
till the end of the page.</para>
|
||||
<spacer length="0.5in"/>
|
||||
<para style="normal"><font color="(0,0,0,0.5)">Blah blah blah blah blah blah Lieutenant
|
||||
Commander Data Harry Kim blah
|
||||
blah blah blah blah blah blah blah blah blah blah blah blah. Blah cloaking device
|
||||
blah blah Lieutenant Commander Data blah Dr. Pulaski blah blah blah USS Enterprise
|
||||
blah blah blah emergency transponder. Blah blah Ferrengi blah blah blah blah blah
|
||||
blah blah blah blah blah blah. Blah blah blah blah blah Tom Paris Archer IV blah blah
|
||||
Archer IV blah blah Soyuz class science vessel blah Betazoid blah blah blah blah
|
||||
warship blah blah blah blah blah. Blah blah blah Lieutenant Worf blah blah Lieutenant
|
||||
Worf Vulcan blah blah blah. Blah blah blah blah blah blah blah Tom Paris blah William
|
||||
Riker blah blah blah blah blah blah blah Klingon blah Admiral Nakamura blah blah blah
|
||||
blah blah. Blah blah blah blah blah blah blah Romulan ale blah blah blah asteroid
|
||||
field blah blah blah blah blah blah blah blah. Blah blah blah blah blah Memory Alpha
|
||||
blah blah blah blah blah blah blah. Blah blah blah Captain Picard blah blah Romulan
|
||||
blah blah blah blah blah Admiral Nakamura blah blah. Blah blah blah blah blah blah
|
||||
blah Starfleet Academy blah blah USS Intrepid blah blah blah blah blah blah blah blah
|
||||
holodeck blah blah blah blah. Blah blah blah blah blah ...with a phaser! blah blah
|
||||
blah blah blah Romulan Vulcan blah blah blah. Blah blah quantum flux blah blah blah
|
||||
blah quantum flux Chief O'Brian blah blah blah blah blah blah blah blah blah. Blah
|
||||
Counsellor Troi blah blah blah blah blah blah USS Intrepid blah blah blah blah blah
|
||||
Captain Janeway blah asteroid field blah IKV Pagh blah blah. Blah blah blah blah blah
|
||||
blah Betazoid blah blah blah blah blah IKV Pagh blah blah Captain Janeway blah blah
|
||||
IKV Pagh. Blah photon torpedo blah blah blah blah blah blah photon torpedo blah blah
|
||||
blah blah blah blah blah blah blah Ferrengi blah blah blah blah blah. Blah blah blah
|
||||
blah United Federation of Planets blah blah blah blah blah blah blah Deep Space Nine
|
||||
blah blah blah blah blah blah blah blah blah. Blah blah "Intruder alert!" Romulan
|
||||
blah blah blah blah blah blah blah blah blah. Blah blah blah shuttlecraft Ferrengi
|
||||
Vulcan blah blah blah blah blah blah Galaxy class vessel blah blah blah blah blah
|
||||
blah blah. Blah turbolift blah blah scout ship cruiser blah quantum flux blah blah
|
||||
blah blah blah blah blah blah blah blah blah blah blah William Riker blah blah blah.
|
||||
Blah blah blah blah blah battlecruiser blah blah blah blah blah blah blah blah Dr.
|
||||
Pulaski Pacifica blah blah blah blah blah blah turbolift. Blah blah blah Benzite blah
|
||||
Bajoran blah blah "Borg Invasion imminent!" blah blah blah blah blah blah blah blah
|
||||
blood wine. Blah emergency transponder blah Starfleet blah blah blah blah blah blah
|
||||
blah blah blah blah blah blah blah blah blah shuttle bay 2 blah blah blah. Blah blah
|
||||
blah blah blah blah blah blah distress signal blah spacedock blah Irumodic Syndrome
|
||||
blah Romulan ale blah blah blah blah blah "All hands abandon ship! This is not a
|
||||
drill!" blah blah blah blah blah.</font></para>
|
||||
<para style="normal"> <font face="Times-Roman">The conditional page break comes in here
|
||||
and is set for 3 inches.</font></para>
|
||||
<condPageBreak height="3in"/>
|
||||
<spacer length="0.5in"/>
|
||||
<para style="normal">This is at the bottom of the page since there are more than 3in
|
||||
remaining.</para>
|
||||
<setNextTemplate name="keepTogether"/>
|
||||
<nextFrame/>
|
||||
<para style="h1" alignment="center">frameBreakBefore and pageBreakBefore</para>
|
||||
<nextFrame/>
|
||||
<para style="normal">The <font face="Courier">frameBreakBefore</font> and <font
|
||||
face="Courier"> pageBeforeBreak</font> are both attributes of the <font
|
||||
face="Courier"><paraStyle></font> tag.</para>
|
||||
<para style="normal">The <font face="Courier">frameBreakBefore</font> attribute causes
|
||||
the new paragraph to go into the next frame, even if there is still space in the
|
||||
current frame. The default value is 0.</para>
|
||||
<para style="normal">The <font face="Courier">pageBreakBefore</font> attribute causes the
|
||||
new paragraph to go into the next page, even if there is still space in the current
|
||||
frame, or if there are other frames remaining on the page. The default value is 0.
|
||||
</para>
|
||||
<nextFrame/>
|
||||
<para style="normal">This is an example of <font face="Courier">frameBreakBefore</font>.
|
||||
<font face="Times-Roman">The next paragraph will be in a new frame.
|
||||
</font></para>
|
||||
<para style="FrameBreak">This paragraph is in a new frame, since its style has the attribute
|
||||
<font face="Courier">frameBreakBefore="1"</font></para>
|
||||
<nextFrame/>
|
||||
<para style="normal">This is an example of <font face="Courier">pageBreakBefore</font>.
|
||||
<font face="Times-Roman">The next paragraph will be on a new page.
|
||||
</font></para>
|
||||
<setNextTemplate name="condPageBreak"/>
|
||||
<para style="PageBreak">This paragraph is on a new page. It missed out the frame in
|
||||
the lower right corner of the last page, since its style has <font
|
||||
face="Courier">pageBreakBefore="1"</font></para>
|
||||
<setNextTemplate name="keepTogether"/>
|
||||
<nextFrame/>
|
||||
<para style="h1" alignment="center">allowWidows</para>
|
||||
<nextFrame/>
|
||||
<para style="normal">The <font face="Courier">allowWidows</font> attribute, for the <font
|
||||
face="Courier"><paraStyle></font> tag, allows the
|
||||
paragraph to have a widow, a line of text, separated from the rest of the paragraph,
|
||||
at the end. The default value for <font face="Courier">allowWidows</font> is 1.</para>
|
||||
<nextFrame/>
|
||||
<para style="normal">This is an example of <font face="Courier">allowWidows="1"</font></para>
|
||||
<para style="normal"><font color="grey">Blah blah blah blah SQL blah blah blah blah pizza
|
||||
blah blah blah blah TeX blah blah blah blah blah. Blah Intercal blah blah blah blah
|
||||
blah blah TeX OS/2 TFT display blah Linux blah blah blah blah crash! blah blah Sun
|
||||
Microsystems blah Logo blah blah. Blah blah blah blah blah blah blah blah blah blah
|
||||
VB Tcl/Tk Fortran blah blah blah awk blah blah blah. Blah blah blah blah blah blah
|
||||
blah blah blah blah blah blah PGP TCP/IP blah blah blah. Blah cgi Modula-3 SQL blah
|
||||
blah blah Delphi blah LISP blah BETA mailing lists blah. Blah blah blah blah
|
||||
pepperoni pizza blah blah blah blah blah blah blah blah blah blah blah blah blah blah
|
||||
monitor blah. Blah blah blah blah blah blah blah blah blah parallel languages blah
|
||||
blah blah blah blah blah blah blah BEER! blah blah. Blah blah beer blah blah OpenGL
|
||||
monitor blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah
|
||||
blah "illiterate programming" blah blah C: drive. Blah blah blah.</font></para>
|
||||
<para style="normal"><font face="Times-Roman">This example has a widow (the line above).
|
||||
</font></para>
|
||||
<nextFrame/>
|
||||
<para style="normal">This is an example of <font face="Courier">allowWidows="0"</font></para>
|
||||
<para style="noWidows"><font color="(0,0,0,0.5)">Blah blah blah blah SQL blah blah blah blah
|
||||
pizza
|
||||
blah blah blah blah TeX blah blah blah blah blah. Blah Intercal blah blah blah blah
|
||||
blah blah TeX OS/2 TFT display blah Linux blah blah blah blah crash! blah blah Sun
|
||||
Microsystems blah Logo blah blah. Blah blah blah blah blah blah blah blah blah blah
|
||||
VB Tcl/Tk Fortran blah blah blah awk blah blah blah. Blah blah blah blah blah blah
|
||||
blah blah blah blah blah blah PGP TCP/IP blah blah blah. Blah cgi Modula-3 SQL blah
|
||||
blah blah Delphi blah LISP blah BETA mailing lists blah. Blah blah blah blah
|
||||
pepperoni pizza blah blah blah blah blah blah blah blah blah blah blah blah blah blah
|
||||
monitor blah. Blah blah blah blah blah blah blah blah blah parallel languages blah
|
||||
blah blah blah blah blah blah blah BEER! blah blah. Blah blah beer blah blah OpenGL
|
||||
monitor blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah
|
||||
blah "illiterate programming" blah blah C: drive. Blah blah blah.</font></para>
|
||||
<para style="normal"><font face="Times-Roman">This example does not have a widow, since
|
||||
another line has been brought with it.</font></para>
|
||||
<nextFrame/>
|
||||
<para alignment="center" style="h1">allowOrphans</para>
|
||||
<nextFrame/>
|
||||
<para style="normal">The <font face="Courier">allowOrphans</font> attribute allows the
|
||||
paragraph to have an orphan, a line of text, left in the original frame, separated
|
||||
from the rest of the paragraph. The default value is for this attribute is 0.</para>
|
||||
<nextFrame/>
|
||||
<para style="normal">This is an example of <font face="Courier">allowOrphans="0"</font></para>
|
||||
<spacer length="3.0in"/>
|
||||
<para style="normal"><font face="Times-Roman">There is no orphan below.</font></para>
|
||||
<para style="normal"><font color="grey">Blah blah blah blah SQL blah blah blah blah pizza blah blah blah
|
||||
blah TeX blah blah blah blah blah. Blah Intercal blah blah blah blah blah blah TeX
|
||||
OS/2 TFT display blah Linux blah blah blah blah crash! blah blah Sun Microsystems
|
||||
Logo blah blah. Blah blah blah blah blah blah blah blah blah blah VB Tcl/Tk Fortran
|
||||
blah blah blah awk blah blah blah. Blah blah blah blah blah blah blah blah blah blah
|
||||
blah blah PGP TCP/IP blah blah blah. Blah cgi Modula-3 SQL blah blah blah Delphi blah
|
||||
LISP blah BETA mailing lists blah. Blah blah blah blah pepperoni pizza blah blah blah
|
||||
blah blah blah blah blah blah blah blah blah blah blah monitor blah. Blah blah blah
|
||||
blah blah blah blah blah blah parallel languages blah blah blah blah blah blah blah
|
||||
blah BEER! blah blah. Blah blah beer blah blah OpenGL monitor blah blah blah blah.
|
||||
Blah blah Phys blah blah blah blah blah blah blah blah blah "illiterate programming"
|
||||
blah blah C: drive.</font></para>
|
||||
<nextFrame/>
|
||||
<para style="normal">This is an example of <font face="Courier">allowOrphans="1"</font></para>
|
||||
<spacer length="3.0in"/>
|
||||
<para style="normal"><font face="Times-Roman">There is an orphan below.</font></para>
|
||||
<para style="yesOrphan"><font color="grey">Blah blah blah blah SQL blah blah blah blah pizza blah blah blah blah
|
||||
TeX blah blah blah blah blah. Blah Intercal blah blah blah blah blah blah TeX OS/2
|
||||
TFT display blah Linux blah blah blah blah crash! blah blah Sun Microsystems blah
|
||||
Logo blah blah. Blah blah blah blah blah blah blah blah blah blah VB Tcl/Tk Fortran
|
||||
blah blah blah awk blah blah blah. Blah blah blah blah blah blah blah blah blah blah
|
||||
blah blah PGP TCP/IP blah blah blah. Blah cgi Modula-3 SQL blah blah blah Delphi blah
|
||||
LISP blah BETA mailing lists blah. Blah blah blah blah pepperoni pizza blah blah blah
|
||||
blah blah blah blah blah blah blah blah blah blah blah monitor blah. Blah blah blah
|
||||
blah blah blah blah blah blah parallel languages blah blah blah blah blah blah blah
|
||||
blah BEER! blah blah. Blah blah beer blah blah OpenGL monitor blah blah blah blah.
|
||||
Blah blah Phys blah blah blah blah blah blah blah blah blah "illiterate programming"
|
||||
blah blah C: drive.</font></para>
|
||||
<setNextTemplate name="condPageBreak"/>
|
||||
<nextFrame/>
|
||||
<para alignment="center" style="h1">endDots</para>
|
||||
<spacer length="0.5in"/>
|
||||
<para style="normal">The <font face="Courier">endDots</font> attribute fills in the rest of the last line of the
|
||||
paragraph with the characters given for the attribute.</para>
|
||||
<spacer length="0.5in"/>
|
||||
<para style="dots">This paragraph should have dots following it until the end of the line.</para>
|
||||
<spacer length="0.5in"/>
|
||||
<para style="characters">This paragraph should have the characters "123" following it until the end of the
|
||||
line.</para>
|
||||
</story>
|
||||
</document>
|
||||
209
z3c/rml/tests/input/rml-examples-048-paragraph-flow-controls.rml
Normal file
209
z3c/rml/tests/input/rml-examples-048-paragraph-flow-controls.rml
Normal file
@@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="test_048_paragraph_flow_controls.pdf">
|
||||
|
||||
<template pagesize="a4" leftMargin="72" showBoundary="1">
|
||||
<pageTemplate id="page1" pagesize="a4 portrait">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 48: Paragraph flow controls</drawString>
|
||||
<setFont name="Helvetica-Oblique" size="12" />
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
</pageGraphics>
|
||||
|
||||
<frame id="1" x1="35" y1="450" width="525" height="185"/>
|
||||
<frame id="2" x1="35" y1="247.5" width="525" height="185"/>
|
||||
<frame id="3" x1="35" y1="45" width="525" height="185"/>
|
||||
</pageTemplate>
|
||||
|
||||
<pageTemplate id="continued" pagesize="a4 portrait">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 48: Paragraph flow controls</drawString>
|
||||
<setFont name="Helvetica-Oblique" size="12" />
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
|
||||
</pageGraphics>
|
||||
|
||||
<frame id="1" x1="35" y1="515" width="525" height="215"/>
|
||||
<frame id="2" x1="35" y1="280" width="525" height="215"/>
|
||||
<frame id="3" x1="35" y1="45" width="525" height="215"/>
|
||||
</pageTemplate>
|
||||
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle
|
||||
name="intro"
|
||||
fontName="Helvetica"
|
||||
fontSize="12"
|
||||
leading="12"
|
||||
|
||||
spaceAfter="12"/>
|
||||
<paraStyle
|
||||
name="heading"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="24"
|
||||
leading="12"
|
||||
spaceBefore = "24"
|
||||
/>
|
||||
<paraStyle
|
||||
name="h1"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="16"
|
||||
spaceBefore = "0.5 cm"
|
||||
spaceAfter="24"/>
|
||||
<paraStyle
|
||||
name="h2"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="14"
|
||||
spaceBefore = "12"
|
||||
spaceAfter="12"/>
|
||||
<paraStyle
|
||||
name="heading-normal"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="12"
|
||||
keepWithNext="0"
|
||||
spaceBefore = "12"
|
||||
spaceAfter = "12"
|
||||
/>
|
||||
<paraStyle
|
||||
name="heading-keep-with-next"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="12"
|
||||
keepWithNext="1"
|
||||
spaceBefore = "12"
|
||||
spaceAfter = "12"
|
||||
/>
|
||||
<paraStyle
|
||||
name="heading-page-break"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="12"
|
||||
pageBreakBefore="1"
|
||||
spaceBefore = "12"
|
||||
spaceAfter = "12"
|
||||
/>
|
||||
<paraStyle
|
||||
name="heading-frame-break"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="12"
|
||||
frameBreakBefore="1"
|
||||
spaceBefore = "12"
|
||||
spaceAfter = "12"
|
||||
/>
|
||||
<paraStyle
|
||||
name="sample-no-widows"
|
||||
fontName="Helvetica-Oblique"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
allowWidows="0"
|
||||
textColor="green"/>
|
||||
<paraStyle
|
||||
name="sample-yes-orphans"
|
||||
fontName="Helvetica-Oblique"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
allowOrphans="1"
|
||||
textColor="green"/>
|
||||
<paraStyle
|
||||
name="normal"
|
||||
fontName="Helvetica"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
spaceBefore="6"
|
||||
spaceAfter="6"/>
|
||||
<paraStyle
|
||||
name="sample"
|
||||
fontName="Helvetica-Oblique"
|
||||
fontSize="10"
|
||||
leading="12"
|
||||
spaceBefore="6"
|
||||
spaceAfter="6"
|
||||
textColor="green"/>
|
||||
</stylesheet>
|
||||
|
||||
<story firstPageTemplate="page1">
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color="(0,0.99,0.97,0.0)"/>
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1"/>
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
|
||||
<setNextTemplate name="continued"/>
|
||||
|
||||
|
||||
<para style="h1" alignment="center">Paragraph flow controls</para>
|
||||
<para style="intro">One of the most common uses of RML is the creation of dynamic documents from raw content. However, variable content lengths can cause problems around page and frame breaks. RML has a number of built in features to deal with these.</para>
|
||||
<para style="h2">keepTogether</para>
|
||||
<para style="intro">The keepTogether tag may be wrapped around flowables and indicates that everything within should remain on the same frame. See below a paragraph WITHOUT a keepTogether tag enclosing it. Notice that the paragraph is allowed to overflow into the next frame:</para>
|
||||
<para style="sample">Etiam fringilla faucibus libero, at bibendum risus luctus ac. Aliquam erat volutpat. Curabitur at odio non erat tincidunt semper. Proin pulvinar volutpat dolor, viverra blandit neque blandit in. Ut augue quam, vehicula et iaculis vitae, vehicula eu ligula. Aliquam erat volutpat. Donec ultrices magna vel massa rhoncus sed laoreet nunc posuere. Sed sed auctor felis. Vivamus lacinia sem sed mi molestie at malesuada velit consequat. Vestibulum malesuada mauris vel libero tempor hendrerit. Vivamus vel quam sem, sit amet tincidunt metus. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Mauris vel quam nibh, vel posuere justo. Proin sit amet felis convallis velit laoreet semper ut id felis. </para>
|
||||
<para style="intro">Now see the exact same paragraph with <font face="courier"><keepTogether></font> tags used. Note the entire paragraph goes together onto the next frame.</para>
|
||||
<keepTogether>
|
||||
<para style="sample">Etiam fringilla faucibus libero, at bibendum risus luctus ac. Aliquam erat volutpat. Curabitur at odio non erat tincidunt semper. Proin pulvinar volutpat dolor, viverra blandit neque blandit in. Ut augue quam, vehicula et iaculis vitae, vehicula eu ligula. Aliquam erat volutpat. Donec ultrices magna vel massa rhoncus sed laoreet nunc posuere. Sed sed auctor felis. Vivamus lacinia sem sed mi molestie at malesuada velit consequat. Vestibulum malesuada mauris vel libero tempor hendrerit. Vivamus vel quam sem, sit amet tincidunt metus. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Mauris vel quam nibh, vel posuere justo. Proin sit amet felis convallis velit laoreet semper ut id felis. </para>
|
||||
</keepTogether>
|
||||
<para style="normal">Using the tag <nextPage/> will now break to the next page</para>
|
||||
<nextPage/>
|
||||
<para style="h2">keepWithNext</para>
|
||||
<para style="intro">The keepWithNext attribute is assigned to paragraph styles and tells them to stay in the same frame as the following content. If subsequent content overflows, keepWithNext will cause the preceding paragraph to overflow as well.</para>
|
||||
<para style="normal">Below is a paragraph heading that does NOT have keepWithNext turned on. It's styles are defined as below:</para>
|
||||
<codesnippet language="xml"><![CDATA[
|
||||
<paraStyle
|
||||
name="heading-no-keep"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="12"
|
||||
keepWithNext="0"
|
||||
/>
|
||||
]]>
|
||||
|
||||
</codesnippet>
|
||||
<para style="normal">Note how the following paragraph of text (using keep together) overflows onto the next page without bringing the heading with it:</para>
|
||||
<para style="heading-normal">Heading with no "keep with next"</para>
|
||||
<keepTogether>
|
||||
<para style="sample">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vel nunc a purus ullamcorper fermentum id nec felis. Sed suscipit, elit quis bibendum gravida, mauris tortor iaculis justo, id pharetra neque nisi ut turpis. Nulla sit amet risus tortor. Integer congue ullamcorper nisi vitae elementum. Pellentesque eget justo nec lacus porta placerat. Sed nunc ligula, tempus nec ultrices non, posuere nec magna. Quisque laoreet magna sed erat congue euismod. Phasellus libero nisi, volutpat vel sagittis vel, dapibus sed neque.</para>
|
||||
</keepTogether>
|
||||
<para style="normal">Now see the same example using keepWithNext. Note that the heading goes to the next frame with the following paragraph.</para>
|
||||
<para style="heading-keep-with-next">Heading with "keep with next"</para>
|
||||
<keepTogether>
|
||||
<para style="sample">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vel nunc a purus ullamcorper fermentum id nec felis. Sed suscipit, elit quis bibendum gravida, mauris tortor iaculis justo, id pharetra neque nisi ut turpis. Nulla sit amet risus tortor. Integer congue ullamcorper nisi vitae elementum. Pellentesque eget justo nec lacus porta placerat. Sed nunc ligula, tempus nec ultrices non, posuere nec magna. Quisque laoreet magna sed erat congue euismod. Phasellus libero nisi, volutpat vel sagittis vel, dapibus sed neque.</para>
|
||||
</keepTogether>
|
||||
<para style="normal">We will use the <nextFrame/> tag this time to move on. Note that because we are on the last frame of the page, this has the same effect as <nextFrame/>.</para>
|
||||
<nextFrame/>
|
||||
<para style="h2">pageBreakBefore and frameBreakBefore</para>
|
||||
<para style="intro">Paragraphs can also be given the attribute of pageBreakBefore, which will enforce a page break before rendering the content. See a heading below without this attribute.</para>
|
||||
<para style="heading-normal">Heading without a page break</para>
|
||||
<para style="normal">And now one below with pageBreakBefore set. Not surprisingly, it appears on the next page.</para>
|
||||
<para style="heading-page-break">Heading with a page break</para>
|
||||
<para style="normal">A similar attribute allows for automatic frame breaks. See a normal heading below:</para>
|
||||
<para style="heading-normal">Normal heading</para>
|
||||
<para style="normal">And now one with frameBreakBefore set</para>
|
||||
<para style="heading-frame-break">Heading (in the next frame)</para>
|
||||
<para style="normal"><nextPage/> again.</para>
|
||||
<nextPage/>
|
||||
<para style="h2">Widow control</para>
|
||||
<para style="intro">Widows are single lines of text which overflow into the next frame. A paragraph style, allowWidows, can be set to "0" in order to prevent this from happening. See a paragraph below which allows a widow:</para>
|
||||
<para style="sample">Etiam fringilla faucibus libero, at bibendum risus luctus ac. Aliquam erat volutpat. Curabitur at odio non erat tincidunt semper. Proin pulvinar volutpat dolor, viverra blandit neque blandit in. Ut augue quam, vehicula et iaculis vitae, vehicula eu ligula. Aliquam erat volutpat. Donec ultrices magna vel massa rhoncus sed laoreet nunc posuere. Sed sed auctor felis. Vivamus lacinia sem sed mi molestie at malesuada velit consequat. Vestibulum malesuada mauris vel libero tempor hendrerit. Vivamus vel quam sem, sit amet tincidunt metus. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Mauris vel quam nibh, vel posuere justo. Proin sit amet felis convallis velit laoreet semper ut id felis. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Pellentesque quis urna id neque adipiscing ultricies. Integer sem mauris, venenatis eget ornare vel, varius eu sapien.</para>
|
||||
<para style="normal">Isn't that single line above ugly?</para>
|
||||
<para style="normal">Let's try again with a new paragraph style whose settings prevent widows:</para>
|
||||
<para style="sample-no-widows">Etiam fringilla faucibus libero, at bibendum risus luctus ac. Aliquam erat volutpat. Curabitur at odio non erat tincidunt semper. Proin pulvinar volutpat dolor, viverra blandit neque blandit in. Ut augue quam, vehicula et iaculis vitae, vehicula eu ligula. Aliquam erat volutpat. Donec ultrices magna vel massa rhoncus sed laoreet nunc posuere. Sed sed auctor felis. Vivamus lacinia sem sed mi molestie at malesuada velit consequat. Vestibulum malesuada mauris vel libero tempor hendrerit. Vivamus vel quam sem, sit amet tincidunt metus. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Mauris vel quam nibh, vel posuere justo. Proin sit amet felis convallis velit laoreet semper ut id felis. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Pellentesque quis urna id neque adipiscing ultricies. Integer sem mauris, venenatis eget ornare vel, varius eu sapien.</para>
|
||||
<para style="normal">As shown, allowWidows="0" means that a second line of text will overflow as well.</para>
|
||||
<nextPage/>
|
||||
<para style="h2">Orphan control</para>
|
||||
<para style="normal">Orphas are single lines of text which remain at the end of a frame. Unlike widows, orphan control is on by default and the allowOrphans tag can be used to turn it off. Let's put in a some sample text to get near the end of the paragraph</para>
|
||||
<para style="sample">Etiam fringilla faucibus libero, at bibendum risus luctus ac. Aliquam erat volutpat. Curabitur at odio non erat tincidunt semper. Proin pulvinar volutpat dolor, viverra blandit neque blandit in. Ut augue quam, vehicula et iaculis vitae, vehicula eu ligula. Aliquam erat volutpat. Donec ultrices magna vel massa rhoncus sed laoreet nunc posuere. Sed sed auctor felis. Vivamus lacinia sem sed mi molestie at malesuada velit consequat. Vestibulum malesuada mauris vel libero tempor hendrerit. Vivamus vel quam sem, sit amet tincidunt metus. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Mauris vel quam nibh, vel posuere justo. </para>
|
||||
<para style="normal">And now show that, with the normal paragraph style, orphans are not possible:</para>
|
||||
<para style="sample">Etiam fringilla faucibus libero, at bibendum risus luctus ac. Aliquam erat volutpat. Curabitur at odio non erat tincidunt semper. Proin pulvinar volutpat dolor, viverra blandit neque blandit in. Ut augue quam, vehicula et iaculis vitae, vehicula eu ligula. Aliquam erat volutpat. Donec ultrices magna vel massa rhoncus sed laoreet nunc posuere. Sed sed auctor felis. Vivamus lacinia sem sed mi molestie at malesuada velit consequat. Vestibulum malesuada mauris vel libero tempor hendrerit. Vivamus vel quam sem, sit amet tincidunt metus. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Mauris vel quam nibh, vel posuere justo. Proin sit amet felis convallis velit laoreet semper ut id felis. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Pellentesque quis urna id neque adipiscing ultricies. Integer sem mauris, venenatis eget ornare vel, varius eu sapien.</para>
|
||||
<para>Now let's try that again, copying the last frame exactly, but with a paragraph style with orphans allowed</para>
|
||||
<nextFrame/>
|
||||
<para style="h2">Orphan control</para>
|
||||
<para style="normal">Orphas are single lines of text which remain at the end of a frame. Unlike widows, orphan control is on by default and the allowOrphans tag can be used to turn it off. Let's put in a some sample text to get near the end of the paragraph</para>
|
||||
<para style="sample">Etiam fringilla faucibus libero, at bibendum risus luctus ac. Aliquam erat volutpat. Curabitur at odio non erat tincidunt semper. Proin pulvinar volutpat dolor, viverra blandit neque blandit in. Ut augue quam, vehicula et iaculis vitae, vehicula eu ligula. Aliquam erat volutpat. Donec ultrices magna vel massa rhoncus sed laoreet nunc posuere. Sed sed auctor felis. Vivamus lacinia sem sed mi molestie at malesuada velit consequat. Vestibulum malesuada mauris vel libero tempor hendrerit. Vivamus vel quam sem, sit amet tincidunt metus. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Mauris vel quam nibh, vel posuere justo. </para>
|
||||
<para style="normal">And now show that, with the new paragraph style, orphans ARE possible:</para>
|
||||
<para style="sample-yes-orphans">Etiam fringilla faucibus libero, at bibendum risus luctus ac. Aliquam erat volutpat. Curabitur at odio non erat tincidunt semper. Proin pulvinar volutpat dolor, viverra blandit neque blandit in. Ut augue quam, vehicula et iaculis vitae, vehicula eu ligula. Aliquam erat volutpat. Donec ultrices magna vel massa rhoncus sed laoreet nunc posuere. Sed sed auctor felis. Vivamus lacinia sem sed mi molestie at malesuada velit consequat. Vestibulum malesuada mauris vel libero tempor hendrerit. Vivamus vel quam sem, sit amet tincidunt metus. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Mauris vel quam nibh, vel posuere justo. Proin sit amet felis convallis velit laoreet semper ut id felis. Phasellus nibh turpis, varius et feugiat ac, pharetra id leo. In laoreet gravida lorem, sit amet laoreet mi pretium nec. Integer ultricies est at odio tincidunt gravida. Maecenas convallis tellus nec nisl volutpat volutpat. Pellentesque quis urna id neque adipiscing ultricies. Integer sem mauris, venenatis eget ornare vel, varius eu sapien.</para>
|
||||
</story>
|
||||
</document>
|
||||
98
z3c/rml/tests/input/rml-examples-049-pre.rml
Normal file
98
z3c/rml/tests/input/rml-examples-049-pre.rml
Normal file
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
|
||||
<document filename="test_049_pre.pdf">
|
||||
|
||||
<template pagesize="(595, 842)" leftMargin="72" showBoundary="0">
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="18"/>
|
||||
<drawString x="35" y="783">RML Example 56: Preformatted text</drawString>
|
||||
<setFont name="Helvetica-Oblique" size="12" />
|
||||
<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
|
||||
<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
|
||||
<setFont name="Helvetica-BoldOblique" size="18"/>
|
||||
|
||||
<setFont name="Helvetica" size="10"/>
|
||||
<drawCenteredString x="297" y="36"><pageNumber countingFrom="2"/></drawCenteredString>
|
||||
</pageGraphics>
|
||||
<frame id="1" x1="35" y1="45" width="525" height="575"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<alias id="style.normal" value="style.Normal"/>
|
||||
</initialize>
|
||||
<paraStyle name="h1"
|
||||
fontSize="12"
|
||||
spaceBefore = "0.5 cm"
|
||||
/>
|
||||
|
||||
<paraStyle name="style1"
|
||||
fontSize="10"
|
||||
/>
|
||||
<paraStyle name="dotStyle1" parent="style1" endDots="." endDotsDy="3" endDotsFontName="Courier-Bold" endDotsFontSize="10" endDotsColor="red" spaceAfter="12"/>
|
||||
<paraStyle name="dotStyle2"
|
||||
parent="dotStyle1"
|
||||
leftIndent = "0.25in"
|
||||
firstLineIndent = "0.25in"
|
||||
/>
|
||||
<paraStyle name="rstyle1" parent="style1" textColor="red"/>
|
||||
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
|
||||
<story>
|
||||
<storyPlace x="35" y="660" width="525" height="73" origin="page">
|
||||
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
|
||||
<hr color="white" thickness="8pt"/>
|
||||
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
|
||||
<illustration height="3" width="525" align="center">
|
||||
<fill color= "(0,0.99,0.97,0.0)" />
|
||||
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
|
||||
</illustration>
|
||||
</storyPlace>
|
||||
<title>Preformatted text test</title>
|
||||
<para>Our pre tag can be used for printing simple blocks
|
||||
of code. It respects whitespace and newlines, and will not normally attempt
|
||||
to wrap your code. However, if your individual lines are too long, this can
|
||||
overflow the width of the column and even run off the page. Three optional
|
||||
attributes - maximumLineLength, splitCharacters and newLineCharacter -
|
||||
can be used to do simple wrapping. maximumLineLength will force the text to
|
||||
wrap.</para>
|
||||
<para>
|
||||
Note that this simply counts characters - it takes no account of
|
||||
actual width on the page. The examples below wrap lines above a certain length
|
||||
and add a '> ' to the start of the following line.</para>
|
||||
<pre maxLineLength="75" newLineChars="> ">
|
||||
class placePara(MapNode):
|
||||
SUPER = LazyPlaceParagraph
|
||||
def evaluate(self, tagname, sdict, pcontent, extra, context):
|
||||
localdict = sdict.copy()
|
||||
stylename = "para.defaultStyle"
|
||||
if localdict.has_key("style"):
|
||||
stylename = localdict["style"]
|
||||
del localdict["style"]
|
||||
bulletText = None
|
||||
if localdict.has_key("bulletText"):
|
||||
bulletText = localdict["bulletText"]
|
||||
del localdict["bulletText"]
|
||||
extraAttrs = dict(
|
||||
placeX = readLength(localdict.pop('x'),context),
|
||||
placeY = readLength(localdict.pop('y'),context),
|
||||
placeWidth = readLength(localdict.pop('width','0'),context),
|
||||
placeOrigin = localdict.pop('origin','page'),
|
||||
placeAnchor = localdict.pop('anchor','sw'),
|
||||
placeContext = context,
|
||||
)
|
||||
return DeferredInitializationEx(self.SUPER, extraAttrs, ('para',localdict,pcontent,context), context[stylename], bulletText=bulletText)
|
||||
|
||||
def MyProcessContent(self, content, controller, context, overrides):
|
||||
return content #tuple tree parser now in place
|
||||
Controller["placePara"] = placePara()
|
||||
</pre>
|
||||
<nextPage/>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
10
z3c/rml/tests/input/rml-guide-example-01.rml
Normal file
10
z3c/rml/tests/input/rml-guide-example-01.rml
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="rml-guide-example-01.pdf">
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
<pageDrawing>
|
||||
<drawCentredString x="4.1in" y="5.8in">
|
||||
Hello World.
|
||||
</drawCentredString>
|
||||
</pageDrawing>
|
||||
</document>
|
||||
21
z3c/rml/tests/input/rml-guide-example-02.rml
Normal file
21
z3c/rml/tests/input/rml-guide-example-02.rml
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="rml-guide-example-02.pdf">
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
<!-- The story starts below this comment -->
|
||||
<story>
|
||||
<para>
|
||||
This is the "story". This is the part of the RML document where
|
||||
your text is placed.
|
||||
</para>
|
||||
<para>
|
||||
It should be enclosed in "para" and "/para" tags to turn it into
|
||||
paragraphs.
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
109
z3c/rml/tests/input/rml-guide-example-03.rml
Normal file
109
z3c/rml/tests/input/rml-guide-example-03.rml
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="example_3.pdf">
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<!-- set the font and fill colour for the title. -->
|
||||
<fill color="red"/>
|
||||
<setFont name="Helvetica" size="24"/>
|
||||
<!-- Use drawCentredString to place a title on the page -->
|
||||
<drawCentredString x="297.5" y="800">
|
||||
Simple Text and Graphics with RML.
|
||||
</drawCentredString>
|
||||
<fill color="red"/>
|
||||
<!-- look at the output - though a fill color is set, no fill -->
|
||||
<!-- is produced, since fill is set to "no" for the circle -->
|
||||
<circle x="127.5" y="672.75" radius="1 in" fill="no"
|
||||
stroke="yes"/>
|
||||
<fill color="green"/>
|
||||
<stroke color="black"/>
|
||||
<circle x="297.5" y="672.75" radius="1 in" fill="yes"
|
||||
stroke="no"/>
|
||||
<fill color="blue"/>
|
||||
<stroke color="black"/>
|
||||
<circle x="467.5" y="672.75" radius="1 in" fill="yes"
|
||||
stroke="yes"/>
|
||||
<fill color="black"/>
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawCentredString x="127.5" y="567.5">
|
||||
Circle - with stroke, but no fill.
|
||||
</drawCentredString>
|
||||
<drawCentredString x="297.5" y="567.5">
|
||||
Circle - with fill, but no stroke.
|
||||
</drawCentredString>
|
||||
<drawCentredString x="467.5" y="567.5">
|
||||
Circle - with both stroke and fill.
|
||||
</drawCentredString>
|
||||
<fill color="red"/>
|
||||
<ellipse x="77" y="382.25" width="100" height="170"
|
||||
fill="no" stroke="yes"/>
|
||||
<fill color="green"/>
|
||||
<stroke color="black"/>
|
||||
<ellipse x="247" y="382.25" width="100" height="170"
|
||||
fill="yes" stroke="no"/>
|
||||
<fill color="blue"/>
|
||||
<stroke color="black"/>
|
||||
<ellipse x="417" y="382.25" width="100" height="170"
|
||||
fill="yes" stroke="yes"/>
|
||||
<fill color="black"/>
|
||||
<drawCentredString x="127.5" y="357">
|
||||
Ellipse - with stroke, but no fill.
|
||||
</drawCentredString>
|
||||
<drawCentredString x="297.5" y="357">
|
||||
Ellipse - with fill, but no stroke.
|
||||
</drawCentredString>
|
||||
<drawCentredString x="467.5" y="357">
|
||||
Ellipse - with both stroke and fill.
|
||||
</drawCentredString>
|
||||
<rect x="84.5" y="214.3" width="1 in" height="1.15 in"
|
||||
fill="no" stroke="yes"/>
|
||||
<fill color="green"/>
|
||||
<stroke color="black"/>
|
||||
<rect x="254.5" y="214.3" width="1 in" height="1.15 in"
|
||||
fill="yes" stroke="no"/>
|
||||
<fill color="blue"/>
|
||||
<stroke color="black"/>
|
||||
<rect x="424.5" y="214.3" width="1 in" height="1.15 in"
|
||||
fill="yes" stroke="yes"/>
|
||||
<fill color="black"/>
|
||||
<drawCentredString x="127.5" y="199.1">
|
||||
Rect - with stroke, but no fill.
|
||||
</drawCentredString>
|
||||
<drawCentredString x="297.5" y="199.1">
|
||||
Rect - with fill, but no stroke.
|
||||
</drawCentredString>
|
||||
<drawCentredString x="467.5" y="199.1">
|
||||
Rect - with both stroke and fill.
|
||||
</drawCentredString>
|
||||
<rect x="84.5" y="56.5" width="1 in" height="1.15 in"
|
||||
fill="no" stroke="yes" round="0.15 in"/>
|
||||
<fill color="green"/>
|
||||
<stroke color="black"/>
|
||||
<rect x="254.5" y="56.5" width="1 in" height="1.15 in"
|
||||
fill="yes" stroke="no" round="0.15 in"/>
|
||||
<fill color="blue"/>
|
||||
<stroke color="black"/>
|
||||
<rect x="424.5" y="56.5" width="1 in" height="1.15 in"
|
||||
fill="yes" stroke="yes" round="0.15 in"/>
|
||||
<fill color="black"/>
|
||||
<drawCentredString x="127.5" y="41.25">
|
||||
Rect - with stroke and round, but no fill.
|
||||
</drawCentredString>
|
||||
<drawCentredString x="297.5" y="41.25">
|
||||
Rect - with fill and round, but no stroke.
|
||||
</drawCentredString>
|
||||
<drawCentredString x="467.5" y="41.25">
|
||||
Rect - with stroke, fill and round.
|
||||
</drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="0.5in" y1="0.5in"
|
||||
width="20cm" height="28cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para></para>
|
||||
</story>
|
||||
</document>
|
||||
229
z3c/rml/tests/input/rml-guide-example-04.rml
Normal file
229
z3c/rml/tests/input/rml-guide-example-04.rml
Normal file
@@ -0,0 +1,229 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="example_4.pdf">
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<fill color="red"/>
|
||||
|
||||
<setFont name="Helvetica" size="24"/>
|
||||
<drawCentredString x="297.5" y="800">
|
||||
Lines in RML.
|
||||
</drawCentredString>
|
||||
|
||||
<!-- notice that each of these "empty" tags are teminated -->
|
||||
<!-- with a slash -->
|
||||
<lineMode width="1"/>
|
||||
<lines>
|
||||
1in 10.5in 2in 10.5in
|
||||
2in 10.5in 1.5in 10in
|
||||
1.5in 10in 1.5in 10.75in
|
||||
</lines>
|
||||
<fill color="black"/>
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawCentredString x="1.5 in" y="9.75 in">
|
||||
width=1
|
||||
</drawCentredString>
|
||||
<lineMode width="5"/>
|
||||
<lines>
|
||||
2.5in 10.5in 3.5in 10.5in
|
||||
3.5in 10.5in 3in 10in
|
||||
3in 10in 3in 10.75in
|
||||
</lines>
|
||||
<drawCentredString x="3 in" y="9.75 in">
|
||||
width=5
|
||||
</drawCentredString>
|
||||
<lineMode width="10"/>
|
||||
<lines>
|
||||
4in 10.5in 5in 10.5in
|
||||
5in 10.5in 4.5in 10in
|
||||
4.5in 10in 4.5in 10.75in
|
||||
</lines>
|
||||
<drawCentredString x="4.5 in" y="9.75 in">
|
||||
width=10
|
||||
</drawCentredString>
|
||||
<lineMode width="15"/>
|
||||
<lines>
|
||||
5.5in 10.5in 6.5in 10.5in
|
||||
6.5in 10.5in 6in 10in
|
||||
6in 10in 6in 10.75in
|
||||
</lines>
|
||||
<drawCentredString x="6 in" y="9.75 in">
|
||||
width=15
|
||||
</drawCentredString>
|
||||
<!-- examples for the 'join' attribute to 'LineMode' -->
|
||||
<lineMode width="5"/>
|
||||
<lines>
|
||||
1in 9in 2in 9in
|
||||
2in 9in 1.5in 8.5in
|
||||
1.5in 8.5in 1.5in 9.25in
|
||||
</lines>
|
||||
<fill color="black"/>
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawCentredString x="1.5 in" y="8.25 in">
|
||||
width=10
|
||||
</drawCentredString>
|
||||
<!-- options for 'join' are "round", "mitered", or "bevelled" -->
|
||||
<lineMode width="5" join="round"/>
|
||||
<lines>
|
||||
2.5in 9in 3.5in 9in
|
||||
3.5in 9in 3in 8.5in
|
||||
3in 8.5in 3in 9.25in
|
||||
</lines>
|
||||
<drawCentredString x="3 in" y="8.25 in">
|
||||
width=5, join=round
|
||||
</drawCentredString>
|
||||
<lineMode width="5" join="mitered"/>
|
||||
<lines>
|
||||
4in 9in 5in 9in
|
||||
5in 9in 4.5in 8.5in
|
||||
4.5in 8.5in 4.5in 9.25in
|
||||
</lines>
|
||||
<drawCentredString x="4.5 in" y="8.25 in">
|
||||
width=5, join=mitered
|
||||
</drawCentredString>
|
||||
<lineMode width="5" join="bevelled"/>
|
||||
<lines>
|
||||
5.5in 9in 6.5in 9in
|
||||
6.5in 9in 6in 8.5in
|
||||
6in 8.5in 6in 9.25in
|
||||
</lines>
|
||||
<drawCentredString x="6 in" y="8.25 in">
|
||||
width=5, join=bevelled
|
||||
</drawCentredString>
|
||||
<!-- examples for the 'cap' attribute to 'LineMode' -->
|
||||
<lineMode width="10"/>
|
||||
<lines>
|
||||
1in 7.5in 2in 7.5in
|
||||
2in 7.5in 1.5in 7in
|
||||
1.5in 7in 1.5in 7.75in
|
||||
</lines>
|
||||
<fill color="black"/>
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawCentredString x="1.5 in" y="6.75 in">
|
||||
width=10
|
||||
</drawCentredString>
|
||||
<!-- options for 'cap' are "default", "round", or "square" -->
|
||||
<lineMode width="10" cap="default"/>
|
||||
<lines>
|
||||
2.5in 7.5in 3.5in 7.5in
|
||||
3.5in 7.5in 3in 7in
|
||||
3in 7in 3in 7.75in
|
||||
</lines>
|
||||
<drawCentredString x="3 in" y="6.75 in">
|
||||
width=10, cap=default
|
||||
</drawCentredString>
|
||||
<lineMode width="10" cap="round"/>
|
||||
<lines>
|
||||
4in 7.5in 5in 7.5in
|
||||
5in 7.5in 4.5in 7in
|
||||
4.5in 7in 4.5in 7.75in
|
||||
</lines>
|
||||
<drawCentredString x="4.5 in" y="6.75 in">
|
||||
width=10, cap=round
|
||||
</drawCentredString>
|
||||
<lineMode width="10" cap="square"/>
|
||||
<lines>
|
||||
5.5in 7.5in 6.5in 7.5in
|
||||
6.5in 7.5in 6in 7in
|
||||
6in 7in 6in 7.75in
|
||||
</lines>
|
||||
<drawCentredString x="6 in" y="6.75 in">
|
||||
width=10, cap=square
|
||||
</drawCentredString>
|
||||
<lineMode width="5" cap="default"/>
|
||||
<!-- examples for the 'miterLimit' attribute to 'LineMode' -->
|
||||
<lineMode width="5" join="mitered"/>
|
||||
<lines>
|
||||
1in 6in 2in 6in
|
||||
2in 6in 1.5in 5.5in
|
||||
1.5in 5.5in 1.5in 6.25in
|
||||
</lines>
|
||||
<fill color="black"/>
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawCentredString x="1.5 in" y="5.25 in">
|
||||
width=5, join=mitered
|
||||
</drawCentredString>
|
||||
<lineMode width="5" join="mitered" miterLimit="10"/>
|
||||
<lines>
|
||||
2.5in 6in 3.5in 6in
|
||||
3.5in 6in 3in 5.5in
|
||||
3in 5.5in 3in 6.25in
|
||||
</lines>
|
||||
<drawCentredString x="3 in" y="5.25 in">
|
||||
width=5, join=mitered
|
||||
</drawCentredString>
|
||||
<drawCentredString x="3 in" y="5.1 in">
|
||||
miterLimit=10
|
||||
</drawCentredString>
|
||||
<lineMode width="10" join="mitered"/>
|
||||
<lines>
|
||||
4in 6in 5in 6in
|
||||
5in 6in 4.5in 5.5in
|
||||
4.5in 5.5in 4.5in 6.25in
|
||||
</lines>
|
||||
<drawCentredString x="4.5 in" y="5.25 in">
|
||||
width=10, join=mitered
|
||||
</drawCentredString>
|
||||
<lineMode width="10" join="mitered" miterLimit="20"/>
|
||||
<lines>
|
||||
5.5in 6in 6.5in 6in
|
||||
6.5in 6in 6in 5.5in
|
||||
6in 5.5in 6in 6.25in
|
||||
</lines>
|
||||
<drawCentredString x="6 in" y="5.25 in">
|
||||
width=10, join=mitered
|
||||
</drawCentredString>
|
||||
<drawCentredString x="6 in" y="5.1 in">
|
||||
miterLimit=20
|
||||
</drawCentredString>
|
||||
<!-- examples for the 'dash' attribute to 'LineMode' -->
|
||||
<lineMode width="2"/>
|
||||
<lines>
|
||||
1in 4.5in 2in 4.5in
|
||||
2in 4.5in 1.5in 4in
|
||||
1.5in 4in 1.5in 4.75in
|
||||
</lines>
|
||||
<fill color="black"/>
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawCentredString x="1.5 in" y="3.75 in">
|
||||
width=2
|
||||
</drawCentredString>
|
||||
<!-- options for 'dash' are sequences of numbers -->
|
||||
<lineMode width="2" dash="5,5"/>
|
||||
<lines>
|
||||
2.5in 4.5in 3.5in 4.5in
|
||||
3.5in 4.5in 3in 4in
|
||||
3in 4in 3in 4.75in
|
||||
</lines>
|
||||
<drawCentredString x="3 in" y="3.75 in">
|
||||
width=2, dash=5,5
|
||||
</drawCentredString>
|
||||
<lineMode width="2" dash="2,10"/>
|
||||
<lines>
|
||||
4in 4.5in 5in 4.5in
|
||||
5in 4.5in 4.5in 4in
|
||||
4.5in 4in 4.5in 4.75in
|
||||
</lines>
|
||||
<drawCentredString x="4.5 in" y="3.75 in">
|
||||
width=2, dash=2,10
|
||||
</drawCentredString>
|
||||
<lineMode width="2" dash="5,5,2,10"/>
|
||||
<lines>
|
||||
5.5in 4.5in 6.5in 4.5in
|
||||
6.5in 4.5in 6in 4in
|
||||
6in 4in 6in 4.75in
|
||||
</lines>
|
||||
<drawCentredString x="6 in" y="3.75 in">
|
||||
width=2, dash=5,5,2,10
|
||||
</drawCentredString>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para></para>
|
||||
</story>
|
||||
</document>
|
||||
141
z3c/rml/tests/input/rml-guide-example-05.rml
Normal file
141
z3c/rml/tests/input/rml-guide-example-05.rml
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="example_5.pdf">
|
||||
<template pagesize="(21cm, 29.7cm)"
|
||||
leftMargin="2.5cm"
|
||||
rightMargin="2.5cm"
|
||||
topMargin="2.5cm"
|
||||
bottomMargin="2.5cm"
|
||||
title="Example 5 - templates and pageTemplates"
|
||||
author="Reportlab Inc (Documentation Team)"
|
||||
showBoundary="1"
|
||||
allowSplitting="1"
|
||||
>
|
||||
<!-- showBoundary means that we will be able to see the -->
|
||||
<!-- limits of frames -->
|
||||
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
</pageGraphics>
|
||||
<frame id="titleBox" x1="2.5cm" y1="27.7cm" width="16cm"
|
||||
height="1cm"/>
|
||||
<frame id="columnOne" x1="2.5cm" y1="2.5cm" width="7.5cm"
|
||||
height="24.7cm"/>
|
||||
<frame id="columnTwo" x1="11cm" y1="2.5cm" width="7.5cm"
|
||||
height="24.7cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<name id="FileTitle" value="Example 5 - templates and
|
||||
pageTemplates"/>
|
||||
<name id="ColumnOneHeader" value="This is Column One"/>
|
||||
<name id="ColumnTwoHeader" value="This is Column Two"/>
|
||||
</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"
|
||||
/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="titleBox">
|
||||
<b><getName id="FileTitle"/></b>
|
||||
</para>
|
||||
<nextFrame/>
|
||||
<condPageBreak height="144"/>
|
||||
<h2>
|
||||
<getName id="ColumnOneHeader"/>
|
||||
</h2>
|
||||
<para>
|
||||
This is the contents for <b>column one</b>.
|
||||
</para>
|
||||
<para>
|
||||
It uses the default style for paragraph.
|
||||
</para>
|
||||
<para>
|
||||
Does it come out OK?
|
||||
</para>
|
||||
<para>
|
||||
There now follows some random text to see how these paragraphs
|
||||
look with longer content:
|
||||
</para>
|
||||
<para>
|
||||
Blah blah morale blah benchmark blah blah blah blah blah blah
|
||||
communication blah blah blah blah blah blah blah blah blah
|
||||
blah stretch the envelope blah blah blah.
|
||||
</para>
|
||||
<para>
|
||||
Blah blah blah blah blah blah blah blah blah blah blah blah
|
||||
architect blah inter active backward-compatible blah blah blah
|
||||
blah blah. Blah blah blah blah value-added.
|
||||
</para>
|
||||
<para>
|
||||
Blah blah blah blah blah blah blah blah blah re-factoring
|
||||
phase blah knowledge management blah blah. Blah blah blah blah
|
||||
interactive blah vision statement blah.
|
||||
</para>
|
||||
<para>
|
||||
Blah blah blah blah blah blah conceptualize blah downsize blah
|
||||
blah blah blah. Blah blah blah blah blah blah blah blah blah
|
||||
blah blah blah synergy client-centered vision statement.
|
||||
</para>
|
||||
<para>
|
||||
Blah blah dysfunctional blah blah blah blah blah blah blah
|
||||
appropriate blah blah blah blah blah blah blah blah
|
||||
re-factoring go the extra mile blah blah blah blah.
|
||||
</para>
|
||||
<nextFrame/>
|
||||
<condPageBreak height="144"/>
|
||||
<h2>
|
||||
<getName id="ColumnTwoHeader"/>
|
||||
</h2>
|
||||
<para style="body">
|
||||
This is the contents for <i>column two</i>.
|
||||
</para>
|
||||
<para style="body">
|
||||
It uses the paragraph style we have called "body".
|
||||
</para>
|
||||
<para style="body">
|
||||
Does it come out OK?
|
||||
</para>
|
||||
<para style="body">
|
||||
There now follows some random text to see how these paragraphs
|
||||
look with longer content:
|
||||
</para>
|
||||
<para style="body">
|
||||
Blah OS/2 blah blah blah blah coffee blah blah blah blah
|
||||
Windows blah blah blah blah blah blah blah. Blah blah blah
|
||||
blah blah blah blah Modula-3 blah blah blah. Blah blah bug
|
||||
report blah blah blah blah blah memory blah blah TeX TCP/IP
|
||||
SMTP blah blah.
|
||||
</para>
|
||||
<para style="body">
|
||||
Blah blah blah blah blah Em blah letterform blah blah blah
|
||||
blah blah blah blah blah blah letterform blah blah. Blah blah
|
||||
blah blah leader blah blah blah blah.
|
||||
</para>
|
||||
<para style="body">
|
||||
Blah blah blah blah blah uppercase blah blah right justified
|
||||
blah blah blah flush-right blah blah blah. Blah blah blah blah
|
||||
blah blah spot-colour blah Em.
|
||||
</para>
|
||||
<para style="body">
|
||||
Blah dingbat blah blah blah blah blah blah blah blah blah blah
|
||||
blah blah blah blah blah. Blah blah blah blah blah drop-cap
|
||||
blah blah blah blah blah blah blah.
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
131
z3c/rml/tests/input/rml-guide-example-06.rml
Normal file
131
z3c/rml/tests/input/rml-guide-example-06.rml
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="example_6.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<h1>
|
||||
seq in seq, seqDefault and seqReset
|
||||
</h1>
|
||||
<para>
|
||||
copied: <seq id="spam"/>, <seq id="spam"/>, <seq id="spam"/>.
|
||||
Reset<seqReset id="spam"/>. <seq id="spam"/>, <seq id="spam"/>,
|
||||
<seq id="spam"/>.</para>
|
||||
|
||||
<h2>
|
||||
<i>simple use of seq</i>
|
||||
</h2>
|
||||
<para>
|
||||
First seq: <seq/>
|
||||
</para>
|
||||
<para>
|
||||
Second seq: <seq/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
<seqReset/>
|
||||
We have just done a <seqReset/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
First seq after seqReset: <seq/>
|
||||
</para>
|
||||
<para>
|
||||
second seq after seqReset: <seq/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
If you are going to use multiple seq tags, you need to use the "id"
|
||||
attribute.
|
||||
</para>
|
||||
|
||||
<h2>
|
||||
<i>Better use of seq</i>
|
||||
</h2>
|
||||
<para>
|
||||
<seqDefault id="test"/>
|
||||
We have just done a <seqDefault id="test"/>
|
||||
</para>
|
||||
<para>
|
||||
<seqReset id="test"/>
|
||||
We have just done a <seqReset id="test"/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
First seq: <seq id="test"/>
|
||||
</para>
|
||||
<para>
|
||||
Second seq: <seq id="test"/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
<seqReset id="test"/>
|
||||
We have just done a <seqReset id="test"/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
First seq after seqReset: <seq id="test"/>
|
||||
</para>
|
||||
<para>
|
||||
second seq after seqReset: <seq id="test"/>
|
||||
</para>
|
||||
|
||||
<h2>
|
||||
<i>Using two seqs independently</i>
|
||||
</h2>
|
||||
<para>
|
||||
<seqReset id="testOne"/>
|
||||
We have just done a <seqReset id="testOne"/>
|
||||
</para>
|
||||
<para>
|
||||
<seqReset id="testTwo"/>
|
||||
We have just done a <seqReset id="testTwo"/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
First seq for testOne: <seq id="testOne"/>
|
||||
</para>
|
||||
<para>
|
||||
Second seq for testOne: <seq id="testOne"/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
First seq for testTwo: <seq id="testTwo"/>
|
||||
</para>
|
||||
<para>
|
||||
Second seq for testTwo: <seq id="testTwo"/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
<seqReset id="testOne"/>
|
||||
We have just done a <seqReset id="testOne"/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
First seq after seqReset for testOne: <seq id="testOne"/>
|
||||
</para>
|
||||
<para>
|
||||
second seq after seqReset for testOne: <seq id="testOne"/>
|
||||
</para>
|
||||
<spacer length="6"/>
|
||||
<para>
|
||||
First seq after seqReset for testTwo: <seq id="testTwo"/>
|
||||
</para>
|
||||
<para>
|
||||
second seq after seqReset for testTwo: <seq id="testTwo"/>
|
||||
</para>
|
||||
<spacer length="15"/>
|
||||
<para>
|
||||
Notice how resetting testOne doesn't affect testTwo at all.
|
||||
</para>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
50
z3c/rml/tests/input/rml-guide-example-07.rml
Normal file
50
z3c/rml/tests/input/rml-guide-example-07.rml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="example_7a.pdf">
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<fill color="red"/>
|
||||
<stroke color="black"/>
|
||||
<path x="247" y="72" fill="yes" stroke="yes" close="yes">
|
||||
247 172
|
||||
147 172
|
||||
147 272
|
||||
247 272
|
||||
247 372
|
||||
347 372
|
||||
347 372
|
||||
347 272
|
||||
447 272
|
||||
447 172
|
||||
347 172
|
||||
347 72
|
||||
<!-- This completes the first shape: a red cross.-->
|
||||
<moveto>267 572</moveto>
|
||||
<!-- This moves the "pen position" -->
|
||||
<!-- Notice that because we have used a "moveto", the -->
|
||||
<!-- final line at the base of the cross is not completed, even -->
|
||||
<!-- though the "close" attribute of the "path" tag is set to -->
|
||||
<!-- "yes" -->
|
||||
277 612
|
||||
<!-- this acts as the start point for the Bezier curves below -->
|
||||
<curvesto>
|
||||
147 585 147 687 297 792
|
||||
447 687 447 585 317 612
|
||||
</curvesto>
|
||||
327 572
|
||||
<!-- We don't need to give the last point because close is -->
|
||||
<!-- set to "yes" -->
|
||||
</path>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698" />
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<para></para>
|
||||
</story>
|
||||
</document>
|
||||
35
z3c/rml/tests/input/rml-guide-example-08.rml
Normal file
35
z3c/rml/tests/input/rml-guide-example-08.rml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="example_7b.pdf">
|
||||
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
|
||||
<pageDrawing>
|
||||
<fill color="red" />
|
||||
<stroke color="black" />
|
||||
<path x="247" y="72" fill="yes" stroke="yes" close="yes">
|
||||
247 172
|
||||
147 172
|
||||
147 272
|
||||
247 272
|
||||
247 372
|
||||
347 372
|
||||
347 372
|
||||
347 272
|
||||
447 272
|
||||
447 172
|
||||
347 172
|
||||
347 72
|
||||
<moveto>
|
||||
267 572
|
||||
</moveto>
|
||||
277 612
|
||||
<curvesto>
|
||||
147 585 147 687 297 792
|
||||
447 687 447 585 317 612
|
||||
</curvesto>
|
||||
327 572
|
||||
</path>
|
||||
</pageDrawing>
|
||||
</document>
|
||||
83
z3c/rml/tests/input/rml-guide-example-09.rml
Normal file
83
z3c/rml/tests/input/rml-guide-example-09.rml
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="example_9.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
<grid xs="1cm,2cm,3cm,4cm,5cm,10cm,20cm"
|
||||
ys="1cm,2cm,3cm,4cm,5cm,10cm,20cm"/>
|
||||
<place x="10.5cm" y="10.5cm" width="9cm" height="9cm">
|
||||
<title>This is a use of <i>place</i></title>
|
||||
<spacer length="15"/>
|
||||
<para>
|
||||
This is a flowable. In this case, it is in a <para> tag, but
|
||||
it could be any flowable. It has been placed inside a grid, but
|
||||
you could put it inside any graphic or pageGraphics. Using the
|
||||
place tag, you can have complete control over where you want your
|
||||
flowables to appear.
|
||||
</para>
|
||||
<spacer length="12"/>
|
||||
<para>
|
||||
You can include Greek: <greek>abgd</greek>.
|
||||
</para>
|
||||
<spacer length="12"/>
|
||||
<blockTable>
|
||||
<tr>
|
||||
<td>Or</td>
|
||||
<td>even</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>a</td>
|
||||
<td>blockTable.</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</place>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="72" y1="72" width="451" height="758" />
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle
|
||||
name="style.Title"
|
||||
fontName="Courier-Bold"
|
||||
fontSize="24"
|
||||
leading="36"
|
||||
/>
|
||||
</stylesheet>
|
||||
|
||||
<!-- The story starts below this comment -->
|
||||
|
||||
<story>
|
||||
<title>Example 9</title>
|
||||
<para>
|
||||
This is a page which shows you how illustrations, grids and the place
|
||||
tag work.
|
||||
</para>
|
||||
<illustration width="90" height="90">
|
||||
<fill color="red"/>
|
||||
<circle x="45" y="45" radius="30" fill="yes"/>
|
||||
<setFont name="Times-Roman" size="8"/>
|
||||
<drawString x="0" y="0">This is an illustration</drawString>
|
||||
</illustration>
|
||||
<para>
|
||||
The red circle you can see is an <i>illustration</i>, not a
|
||||
<i>pageGraphic</i>.
|
||||
</para>
|
||||
<illustration width="75" height="75">
|
||||
<fill color="teal" />
|
||||
<circle x="30" y="30" radius="30" fill="yes" />
|
||||
<stroke color="darkslategray" />
|
||||
<grid xs="15,30,45" ys="5,10,15,20,25,30,35,40,45,50" />
|
||||
</illustration>
|
||||
<para>
|
||||
So is the teal colored one.
|
||||
</para>
|
||||
<para>
|
||||
These are all flowables in the story.
|
||||
</para>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
89
z3c/rml/tests/input/rml-guide-example-10.rml
Normal file
89
z3c/rml/tests/input/rml-guide-example-10.rml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="rml-guide-example-10.pdf">
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<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>
|
||||
104
z3c/rml/tests/input/rml-guide-example-11.rml
Normal file
104
z3c/rml/tests/input/rml-guide-example-11.rml
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "../rml.dtd">
|
||||
<document filename="example_11.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="myBlockTableStyle">
|
||||
<!-- Set fonts -->
|
||||
<blockFont name="Courier-Bold" size="10" start="0,1" stop="-1,-1"/>
|
||||
<blockFont name="Helvetica-BoldOblique" size="10" start="0,0" stop="3,0"/>
|
||||
|
||||
<!-- This sets a textColor for all the text in the table -->
|
||||
<blockTextColor colorName="black"/>
|
||||
|
||||
<!-- Another example of blockTextColor -->
|
||||
<blockTextColor colorName="green" start="2,2" stop="3,3"/>
|
||||
|
||||
<!-- This sets a blockAlignment for the whole table -->
|
||||
<blockAlignment value="CENTER"/>
|
||||
|
||||
<!-- These overrides the above -->
|
||||
<blockAlignment value="RIGHT" start="3,0" stop="3,-1"/>
|
||||
<blockAlignment value="LEFT" start="0,1" stop="0,-1"/>
|
||||
|
||||
<!-- This sets the vertical alignment for one row -->
|
||||
<blockValign value="TOP" start="0,0" stop="-1,0"/>
|
||||
|
||||
<!-- This sets the vertical alignment for one cell -->
|
||||
<blockValign value="MIDDLE" start="2,2" stop="2,2"/>
|
||||
|
||||
<!-- Use of linestyles -->
|
||||
<lineStyle kind="GRID" colorName="silver"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="orangered" start="0,0"
|
||||
stop="-1,0" thickness="5"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="maroon" start="1,1"
|
||||
stop="1,6" thickness="1"/>
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title>Example 11 - lines and alignment in tables</title>
|
||||
<spacer length="1cm" />
|
||||
<blockTable
|
||||
style="myBlockTableStyle"
|
||||
rowHeights="2cm,2cm,2cm,2cm,2cm,2cm,2cm"
|
||||
colWidths="4cm,3cm,3cm,4cm">
|
||||
<tr>
|
||||
<td>(a=LEFT)(VA=TOP)</td>
|
||||
<td>(VA=TOP)</td>
|
||||
<td>(VA="TOP")</td>
|
||||
<td>(a=RIGHT)(VA=TOP)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>(a=LEFT)</td>
|
||||
<td>1,1</td>
|
||||
<td>Cell 2,1</td>
|
||||
<td>(a=RIGHT)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>(a=LEFT)</td>
|
||||
<td>1,2</td>
|
||||
<td>(VA=MIDDLE)</td>
|
||||
<td>(a=RIGHT)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>(a=LEFT)</td>
|
||||
<td>1,3</td>
|
||||
<td>(VA=MIDDLE)</td>
|
||||
<td>(VA=MDL)(a=RIGHT)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>(a=LEFT)</td>
|
||||
<td>1,4</td>
|
||||
<td>2,4</td>
|
||||
<td>(a=RIGHT)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>(a=LEFT)</td>
|
||||
<td>1,5</td>
|
||||
<td>2,5</td>
|
||||
<td>(a=RIGHT)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>(a=LEFT)</td>
|
||||
<td>1,6</td>
|
||||
<td>2,6</td>
|
||||
<td>(a=RIGHT)</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<spacer length="15" />
|
||||
<para>a=value for <i>blockAlignment</i></para>
|
||||
<para>VA=value for <i>blockValign</i></para>
|
||||
<para><i>MDLE=MIDDLE for VA in cells 3,2 and 3,3</i></para>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
238
z3c/rml/tests/input/rml-guide-example-12.rml
Normal file
238
z3c/rml/tests/input/rml-guide-example-12.rml
Normal file
@@ -0,0 +1,238 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document filename="example_12.pdf"
|
||||
pagesize="(8.5in, 11in)">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<pageGraphics>
|
||||
</pageGraphics>
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="myBlockTableStyle">
|
||||
<blockBackground colorName="silver" start="0,0" stop="-1,0"/>
|
||||
<blockBackground colorName="darkslategray" start="0,1" stop="-1,1"/>
|
||||
<blockBackground colorName="silver" start="0,2" stop="-1,2"/>
|
||||
<blockBackground colorName="darkslategray" start="0,3" stop="-1,3"/>
|
||||
<blockBackground colorName="silver" start="0,4" stop="-1,4"/>
|
||||
<blockBackground colorName="darkslategray" start="0,5" stop="-1,5"/>
|
||||
<blockAlignment value="CENTER"/>
|
||||
<blockValign value="MIDDLE"/>
|
||||
|
||||
<!-- Set fonts -->
|
||||
<blockFont name="Helvetica-BoldOblique" size="10"/>
|
||||
|
||||
<!-- set the left and right padding for cells in first and third -->
|
||||
<!-- columns remember, cell numbering starts from ZERO, not ONE -->
|
||||
<blockLeftPadding length="20" start="0,0" stop="0,-1"/>
|
||||
<blockRightPadding length="20" start="2,0" stop="2,-1"/>
|
||||
|
||||
<!-- set the top and bottom padding for cells in first and third rows -->
|
||||
<blockBottomPadding length="40" start="0,0" stop="-1,0"/>
|
||||
<blockTopPadding length="40" start="1,2" stop="-1,2"/>
|
||||
|
||||
<!-- set the top and bottom padding for the last row -->
|
||||
<blockBottomPadding length="40" start="-1,4" stop="-1,4"/>
|
||||
<blockTopPadding length="40" start="1,4" stop="1,4"/>
|
||||
|
||||
<!-- Use of linestyles -->
|
||||
<lineStyle kind="GRID" colorName="darkblue"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<paraStyle
|
||||
name="paddingTableStyle"
|
||||
fontName="Helvetica-BoldOblique"
|
||||
fontSize="10"
|
||||
textColor="white"
|
||||
alignment="CENTER"
|
||||
/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<title>Example 12 - images and padding in tables</title>
|
||||
<spacer length="1cm"/>
|
||||
<blockTable
|
||||
style="myBlockTableStyle"
|
||||
rowHeights="166,28,166,28,166,28"
|
||||
colWidths="161,161,161">
|
||||
<tr>
|
||||
<td>
|
||||
<illustration width="141" height="90">
|
||||
<image file="images/replogo.gif"
|
||||
x="0" y="0" width="141" height="90"/>
|
||||
<stroke color="deepskyblue"/>
|
||||
<lineMode width="3"/>
|
||||
<lines>
|
||||
0 0 141 0
|
||||
141 0 141 90
|
||||
141 90 0 90
|
||||
0 90 0 0
|
||||
</lines>
|
||||
</illustration>
|
||||
</td>
|
||||
<td><illustration width="141" height="90">
|
||||
<image file="images/replogo.gif"
|
||||
x="0" y="0" width="141" height="90"/>
|
||||
<stroke color="deepskyblue"/>
|
||||
<lineMode width="3"/>
|
||||
<lines>
|
||||
0 0 141 0
|
||||
141 0 141 90
|
||||
141 90 0 90
|
||||
0 90 0 0
|
||||
</lines>
|
||||
</illustration>
|
||||
</td>
|
||||
<td><illustration width="141" height="90">
|
||||
<image file="images/replogo.gif"
|
||||
x="0" y="0" width="141" height="90"/>
|
||||
<stroke color="deepskyblue"/>
|
||||
<lineMode width="3"/>
|
||||
<lines>
|
||||
0 0 141 0
|
||||
141 0 141 90
|
||||
141 90 0 90
|
||||
0 90 0 0
|
||||
</lines>
|
||||
</illustration>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="paddingTableStyle">
|
||||
<b>blockLeftPadding</b> with <b>blockBottomPadding</b>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="paddingTableStyle">
|
||||
just blockBottomPadding
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="paddingTableStyle">
|
||||
<b>blockRightPadding</b> with <b>blockBottomPadding</b>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><illustration width="141" height="90">
|
||||
<image file="images/replogo.gif"
|
||||
x="0" y="0" width="141" height="90"/>
|
||||
<stroke color="deepskyblue"/>
|
||||
<lineMode width="3"/>
|
||||
<lines>
|
||||
0 0 141 0
|
||||
141 0 141 90
|
||||
141 90 0 90
|
||||
0 90 0 0
|
||||
</lines>
|
||||
</illustration>
|
||||
</td>
|
||||
<td><illustration width="141" height="90">
|
||||
<image file="images/replogo.gif"
|
||||
x="0" y="0" width="141" height="90"/>
|
||||
<stroke color="deepskyblue"/>
|
||||
<lineMode width="3"/>
|
||||
<lines>
|
||||
0 0 141 0
|
||||
141 0 141 90
|
||||
141 90 0 90
|
||||
0 90 0 0
|
||||
</lines>
|
||||
</illustration>
|
||||
</td>
|
||||
<td><illustration width="141" height="90">
|
||||
<image file="images/replogo.gif"
|
||||
x="0" y="0" width="141" height="90"/>
|
||||
<stroke color="deepskyblue"/>
|
||||
<lineMode width="3"/>
|
||||
<lines>
|
||||
0 0 141 0
|
||||
141 0 141 90
|
||||
141 90 0 90
|
||||
0 90 0 0
|
||||
</lines>
|
||||
</illustration>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="paddingTableStyle">
|
||||
<b>blockLeftPadding</b> with <b>blockTopPadding</b>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="paddingTableStyle">
|
||||
just blockTopPadding
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="paddingTableStyle">
|
||||
<b>blockRightPadding</b> with <b>blockTopPadding</b>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><illustration width="141" height="90">
|
||||
<image file="images/replogo.gif"
|
||||
x="0" y="0" width="141" height="90"/>
|
||||
<stroke color="deepskyblue"/>
|
||||
<lineMode width="3"/>
|
||||
<lines>
|
||||
0 0 141 0
|
||||
141 0 141 90
|
||||
141 90 0 90
|
||||
0 90 0 0
|
||||
</lines>
|
||||
</illustration>
|
||||
</td>
|
||||
<td><illustration width="141" height="90">
|
||||
<image file="images/replogo.gif"
|
||||
x="0" y="0" width="141" height="90"/>
|
||||
<stroke color="deepskyblue"/>
|
||||
<lineMode width="3"/>
|
||||
<lines>
|
||||
0 0 141 0
|
||||
141 0 141 90
|
||||
141 90 0 90
|
||||
0 90 0 0
|
||||
</lines>
|
||||
</illustration>
|
||||
</td>
|
||||
<td><illustration width="141" height="90">
|
||||
<image file="images/replogo.gif"
|
||||
x="0" y="0" width="141" height="90"/>
|
||||
<stroke color="deepskyblue"/>
|
||||
<lineMode width="3"/>
|
||||
<lines>
|
||||
0 0 141 0
|
||||
141 0 141 90
|
||||
141 90 0 90
|
||||
0 90 0 0
|
||||
</lines>
|
||||
</illustration>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="paddingTableStyle">
|
||||
blockLeftPadding with blockTopPadding
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="paddingTableStyle">
|
||||
no padding
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="paddingTableStyle">
|
||||
blockRightPadding with blockBottomPadding
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
39
z3c/rml/tests/input/simple-layout.rml
Normal file
39
z3c/rml/tests/input/simple-layout.rml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="simple-layout.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<stylesheet doc:example="">
|
||||
<paraStyle
|
||||
name="large"
|
||||
fontSize="3cm"
|
||||
textColor="red"
|
||||
doc:example=""
|
||||
/>
|
||||
</stylesheet>
|
||||
|
||||
<template
|
||||
pagesize="(21cm, 29cm)"
|
||||
rotation="180"
|
||||
leftMargin="1cm"
|
||||
rightMargin="2cm"
|
||||
topMargin="3cm"
|
||||
bottomMargin="4cm"
|
||||
showBoundary="true"
|
||||
allowSplitting="true"
|
||||
title="Test Template Document"
|
||||
author="Stephan Richter">
|
||||
|
||||
<pageTemplate id="main">
|
||||
<frame id="main" x1="1.5cm" y1="3.5cm" width="18cm" height="22cm" />
|
||||
</pageTemplate>
|
||||
|
||||
</template>
|
||||
|
||||
<story doc:example="">
|
||||
<para style="large">Hello <b>World</b>!</para>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
41
z3c/rml/tests/input/special-text.rml
Normal file
41
z3c/rml/tests/input/special-text.rml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
|
||||
<!DOCTYPE document SYSTEM "../rml.dtd">
|
||||
<document filename="special-text.pdf">
|
||||
|
||||
<template pagesize="210mm,297mm" showBoundary="0">
|
||||
<pageTemplate id="main">
|
||||
<frame id="main" x1="15mm" y1="180mm" width="200mm" height="50mm" />
|
||||
<pageGraphics>
|
||||
<drawString x="15mm" y="250mm"><namedString id="test1">tail and invisibility check 1</namedString>drawString thinks: Page number: <pageNumber />, <name id="test3" value="name test 1" />Total pages: <getName id="page-count" default="1" />, Added together: <evalString><pageNumber /> + <getName id="page-count" default="1" /></evalString></drawString>
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
<para>Para thinks: Page number: <pageNumber />, <name id="test4" value="name test 2" />Total pages: <getName id="page-count" default="1" />, Added together: <evalString><pageNumber /> + <getName id="page-count" default="1" /></evalString></para>
|
||||
|
||||
<blockTable>
|
||||
<tr>
|
||||
<td>No tags supported in plain td: <pageNumber />, <getName id="no" />, <evalString>1 + 1</evalString>, etc.</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<para><getName id="test1" default="failed test 1" /></para>
|
||||
<para><getName id="test2" default="this default should show" /></para>
|
||||
<para>Nothing else on this line: <getName id="test2" /></para>
|
||||
<para><getName id="test3" default="failed name test 1" /></para>
|
||||
<para><getName id="test4" default="failed name test 2" /></para>
|
||||
<para><evalString> 5 + 7</evalString></para>
|
||||
|
||||
<name id="test5" value="getName inside namedString" />
|
||||
<namedString id="test6">Success: <getName id="test5" default="fail" /></namedString>
|
||||
<para><getName id="test6" default="fail again" /></para>
|
||||
|
||||
<nextPage />
|
||||
|
||||
<para>This is just a page to push up the page number</para>
|
||||
|
||||
<namedString id="page-count"><pageNumber /></namedString>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
BIN
z3c/rml/tests/input/strapline.png
Normal file
BIN
z3c/rml/tests/input/strapline.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
523
z3c/rml/tests/input/symbols-set.rml
Normal file
523
z3c/rml/tests/input/symbols-set.rml
Normal file
@@ -0,0 +1,523 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="tag-spacer.pdf">
|
||||
<docinit>
|
||||
<!-- For those font registrations to work you need to set your font -->
|
||||
<!-- directory correctly in rl_config. -->
|
||||
<!--
|
||||
<registerType1Face afmFile="wingding.afm" pfbFile="wingding.pfb"/>
|
||||
<registerFont name="Wingdings" faceName="Wingdings-Regular"
|
||||
encName="StandardEncoding"/>
|
||||
<registerType1Face afmFile="webdings.afm" pfbFile="webdings.pfb"/>
|
||||
<registerFont name="Webdings" faceName="Webdings"
|
||||
encName="StandardEncoding"/>
|
||||
-->
|
||||
<!-- This line is necessary, so that the "Standard" and not the -->
|
||||
<!-- "ZapfDingbats" encoding is used for ZpafDingbats. -->
|
||||
<registerFont name="ZapfDingbats" faceName="ZapfDingbats"
|
||||
encName="StandardEncoding"/>
|
||||
</docinit>
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="header" x1="2cm" y1="26cm" width="17cm" height="2cm"/>
|
||||
<frame id="first" x1="2cm" y1="2cm" width="5cm" height="24cm"/>
|
||||
<frame id="second" x1="8cm" y1="2cm" width="5cm" height="24cm"/>
|
||||
<frame id="third" x1="14cm" y1="2cm" width="5cm" height="24cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="table">
|
||||
<!--blockFont name="Wingdings" size="12" start="2,1" stop="2,-1" /-->
|
||||
<!--blockFont name="Webdings" size="12" start="2,1" stop="2,-1" /-->
|
||||
<blockFont name="ZapfDingbats" size="12" start="2,1" stop="2,-1" />
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title>ZapfDingbats (and friends) Character Set</title>
|
||||
<nextFrame />
|
||||
<blockTable style="table">
|
||||
<tr>
|
||||
<td>Num</td>
|
||||
<td>Char</td>
|
||||
<td>Symb</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>32</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>33</td>
|
||||
<td>!</td>
|
||||
<td>!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>34</td>
|
||||
<td>"</td>
|
||||
<td>"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>35</td>
|
||||
<td>#</td>
|
||||
<td>#</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>36</td>
|
||||
<td>$</td>
|
||||
<td>$</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>37</td>
|
||||
<td>%</td>
|
||||
<td>%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>38</td>
|
||||
<td>&</td>
|
||||
<td>&</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>39</td>
|
||||
<td>'</td>
|
||||
<td>'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>40</td>
|
||||
<td>(</td>
|
||||
<td>(</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>41</td>
|
||||
<td>)</td>
|
||||
<td>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>42</td>
|
||||
<td>*</td>
|
||||
<td>*</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>43</td>
|
||||
<td>+</td>
|
||||
<td>+</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>44</td>
|
||||
<td>,</td>
|
||||
<td>,</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>45</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>46</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>47</td>
|
||||
<td>/</td>
|
||||
<td>/</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>48</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>49</td>
|
||||
<td>1</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>50</td>
|
||||
<td>2</td>
|
||||
<td>2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>51</td>
|
||||
<td>3</td>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>52</td>
|
||||
<td>4</td>
|
||||
<td>4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>53</td>
|
||||
<td>5</td>
|
||||
<td>5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>54</td>
|
||||
<td>6</td>
|
||||
<td>6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>55</td>
|
||||
<td>7</td>
|
||||
<td>7</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>56</td>
|
||||
<td>8</td>
|
||||
<td>8</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>57</td>
|
||||
<td>9</td>
|
||||
<td>9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>58</td>
|
||||
<td>:</td>
|
||||
<td>:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>59</td>
|
||||
<td>;</td>
|
||||
<td>;</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>60</td>
|
||||
<td><</td>
|
||||
<td><</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>61</td>
|
||||
<td>=</td>
|
||||
<td>=</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>62</td>
|
||||
<td>></td>
|
||||
<td>></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>63</td>
|
||||
<td>?</td>
|
||||
<td>?</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>64</td>
|
||||
<td>@</td>
|
||||
<td>@</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>65</td>
|
||||
<td>A</td>
|
||||
<td>A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>66</td>
|
||||
<td>B</td>
|
||||
<td>B</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>67</td>
|
||||
<td>C</td>
|
||||
<td>C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>68</td>
|
||||
<td>D</td>
|
||||
<td>D</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>69</td>
|
||||
<td>E</td>
|
||||
<td>E</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>70</td>
|
||||
<td>F</td>
|
||||
<td>F</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>71</td>
|
||||
<td>G</td>
|
||||
<td>G</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>72</td>
|
||||
<td>H</td>
|
||||
<td>H</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>73</td>
|
||||
<td>I</td>
|
||||
<td>I</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>74</td>
|
||||
<td>J</td>
|
||||
<td>J</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>75</td>
|
||||
<td>K</td>
|
||||
<td>K</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>76</td>
|
||||
<td>L</td>
|
||||
<td>L</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>77</td>
|
||||
<td>M</td>
|
||||
<td>M</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>78</td>
|
||||
<td>N</td>
|
||||
<td>N</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>79</td>
|
||||
<td>O</td>
|
||||
<td>O</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>80</td>
|
||||
<td>P</td>
|
||||
<td>P</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>81</td>
|
||||
<td>Q</td>
|
||||
<td>Q</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>82</td>
|
||||
<td>R</td>
|
||||
<td>R</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>83</td>
|
||||
<td>S</td>
|
||||
<td>S</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>84</td>
|
||||
<td>T</td>
|
||||
<td>T</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>85</td>
|
||||
<td>U</td>
|
||||
<td>U</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>86</td>
|
||||
<td>V</td>
|
||||
<td>V</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>87</td>
|
||||
<td>W</td>
|
||||
<td>W</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>88</td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>89</td>
|
||||
<td>Y</td>
|
||||
<td>Y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>90</td>
|
||||
<td>Z</td>
|
||||
<td>Z</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>91</td>
|
||||
<td>[</td>
|
||||
<td>[</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>92</td>
|
||||
<td>\</td>
|
||||
<td>\</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>93</td>
|
||||
<td>]</td>
|
||||
<td>]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>94</td>
|
||||
<td>^</td>
|
||||
<td>^</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>95</td>
|
||||
<td>_</td>
|
||||
<td>_</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>96</td>
|
||||
<td>`</td>
|
||||
<td>`</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>97</td>
|
||||
<td>a</td>
|
||||
<td>a</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>98</td>
|
||||
<td>b</td>
|
||||
<td>b</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>99</td>
|
||||
<td>c</td>
|
||||
<td>c</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>100</td>
|
||||
<td>d</td>
|
||||
<td>d</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>101</td>
|
||||
<td>e</td>
|
||||
<td>e</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>102</td>
|
||||
<td>f</td>
|
||||
<td>f</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>103</td>
|
||||
<td>g</td>
|
||||
<td>g</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>104</td>
|
||||
<td>h</td>
|
||||
<td>h</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>105</td>
|
||||
<td>i</td>
|
||||
<td>i</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>106</td>
|
||||
<td>j</td>
|
||||
<td>j</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>107</td>
|
||||
<td>k</td>
|
||||
<td>k</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>108</td>
|
||||
<td>l</td>
|
||||
<td>l</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>109</td>
|
||||
<td>m</td>
|
||||
<td>m</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>110</td>
|
||||
<td>n</td>
|
||||
<td>n</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>111</td>
|
||||
<td>o</td>
|
||||
<td>o</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>112</td>
|
||||
<td>p</td>
|
||||
<td>p</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>113</td>
|
||||
<td>q</td>
|
||||
<td>q</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>114</td>
|
||||
<td>r</td>
|
||||
<td>r</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>115</td>
|
||||
<td>s</td>
|
||||
<td>s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>116</td>
|
||||
<td>t</td>
|
||||
<td>t</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>117</td>
|
||||
<td>u</td>
|
||||
<td>u</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>118</td>
|
||||
<td>v</td>
|
||||
<td>v</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>119</td>
|
||||
<td>w</td>
|
||||
<td>w</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>120</td>
|
||||
<td>x</td>
|
||||
<td>x</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>121</td>
|
||||
<td>y</td>
|
||||
<td>y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>122</td>
|
||||
<td>z</td>
|
||||
<td>z</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>123</td>
|
||||
<td>{</td>
|
||||
<td>{</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>124</td>
|
||||
<td>|</td>
|
||||
<td>|</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>125</td>
|
||||
<td>}</td>
|
||||
<td>}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>126</td>
|
||||
<td>~</td>
|
||||
<td>~</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
38
z3c/rml/tests/input/tag-addMapping.rml
Normal file
38
z3c/rml/tests/input/tag-addMapping.rml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-addMapping.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<docinit doc:example="">
|
||||
<registerTTFont faceName="Vera" fileName="Vera.ttf" />
|
||||
<addMapping faceName="times" bold="1" italic="0" psName="Vera"
|
||||
doc:example="" />
|
||||
</docinit>
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1cm" y1="1cm" width="19cm" height="26cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle name="normal" fontSize="20" leading="22" spaceAfter="5" />
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<para style="normal">
|
||||
By default, a document will use the font 'times', which is the font of
|
||||
this sentence.
|
||||
</para>
|
||||
<para style="normal">
|
||||
With 'addMapping' we map the bold form of 'times' to use the font
|
||||
'Vera'. So we get the next line:
|
||||
</para>
|
||||
<para style="normal">
|
||||
<b>This line should appear in font 'Vera'</b>
|
||||
</para>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
25
z3c/rml/tests/input/tag-alias.rml
Normal file
25
z3c/rml/tests/input/tag-alias.rml
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-alias.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize doc:example="">
|
||||
<alias id="h1" value="style.Heading1"
|
||||
doc:example="" />
|
||||
</initialize>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
|
||||
<title><font face="Courier"><alias></font> Tag Demo</title>
|
||||
<para style="h1">Header 1 via Alias</para>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
74
z3c/rml/tests/input/tag-barChart.rml
Normal file
74
z3c/rml/tests/input/tag-barChart.rml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-barChart.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<pageDrawing>
|
||||
|
||||
<setFont name="Helvetica-Bold" size="16" />
|
||||
<drawCenteredString x="4.1in" y="11in">
|
||||
Bar Chart Demo
|
||||
</drawCenteredString>
|
||||
|
||||
<barChart
|
||||
dx="2in" dy="7in" dwidth="6in" dheight="4in"
|
||||
x="0" y="0" width="5in" height="3in"
|
||||
barSpacing="7" groupSpacing="15"
|
||||
doc:example="">
|
||||
<bars>
|
||||
<bar fillColor="blue" strokeColor="red" strokeWidth="0.5"
|
||||
doc:example="" />
|
||||
<bar fillColor="yellow" strokeColor="green" strokeWidth="1" />
|
||||
</bars>
|
||||
<categoryAxis strokeColor="black" strokeWidth="1"
|
||||
doc:example="">
|
||||
<labels fontName="Helvetica" fontSize="20"
|
||||
doc:example="z3c.rml.chart.ILabels" />
|
||||
<categoryNames doc:example="">
|
||||
<name doc:example="z3c.rml.chart.IName">Category 1</name>
|
||||
<name>Category 2</name>
|
||||
<name>Category 3</name>
|
||||
<name>Category 4</name>
|
||||
</categoryNames>
|
||||
</categoryAxis>
|
||||
<valueAxis valueMin="0" valueMax="150" valueStep="30"
|
||||
visibleTicks="true" visibleLabels="true"
|
||||
doc:example="">
|
||||
<labels fontName="Helvetica" />
|
||||
</valueAxis>
|
||||
<data doc:example="z3c.rml.chart.IData1D">
|
||||
<series doc:example="z3c.rml.chart.ISeries1D"
|
||||
>100 110 120 130</series>
|
||||
<series> 70 80 85 90</series>
|
||||
</data>
|
||||
</barChart>
|
||||
|
||||
<barChart
|
||||
dx="2in" dy="4in" dwidth="6in" dheight="4in"
|
||||
x="0" y="0" width="5in" height="2in"
|
||||
direction="vertical">
|
||||
<categoryAxis strokeColor="black" strokeWidth="1"
|
||||
visibleGrid="true">
|
||||
<labels fontName="Helvetica" />
|
||||
<categoryNames >
|
||||
<name>Category 1</name>
|
||||
<name>Category 2</name>
|
||||
<name>Category 3</name>
|
||||
<name>Category 4</name>
|
||||
</categoryNames>
|
||||
</categoryAxis>
|
||||
<valueAxis valueMin="0" valueMax="150" valueStep="30"
|
||||
visibleTicks="true" visibleLabels="true"
|
||||
visibleGrid="true">
|
||||
<labels fontName="Helvetica" />
|
||||
</valueAxis>
|
||||
<data>
|
||||
<series>100 110 120 130</series>
|
||||
<series> 70 80 85 90</series>
|
||||
</data>
|
||||
</barChart>
|
||||
|
||||
</pageDrawing>
|
||||
</document>
|
||||
71
z3c/rml/tests/input/tag-barChart3d.rml
Normal file
71
z3c/rml/tests/input/tag-barChart3d.rml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-barChart3d.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<pageDrawing>
|
||||
|
||||
<setFont name="Helvetica-Bold" size="16" />
|
||||
<drawCenteredString x="4.1in" y="11in">
|
||||
3-D Bar Chart Demo
|
||||
</drawCenteredString>
|
||||
|
||||
<barChart3D
|
||||
dx="2in" dy="7in" dwidth="6in" dheight="4in"
|
||||
x="0" y="0" width="5in" height="3in"
|
||||
barSpacing="7"
|
||||
groupSpacing="15">
|
||||
<bars>
|
||||
<bar fillColor="blue" strokeColor="red" strokeWidth="0.5" />
|
||||
<bar fillColor="yellow" strokeColor="green" strokeWidth="1" />
|
||||
</bars>
|
||||
<categoryAxis strokeColor="black" strokeWidth="1">
|
||||
<labels fontName="Helvetica" />
|
||||
<categoryNames>
|
||||
<name>Category 1</name>
|
||||
<name>Category 2</name>
|
||||
<name>Category 3</name>
|
||||
<name>Category 4</name>
|
||||
</categoryNames>
|
||||
</categoryAxis>
|
||||
<valueAxis valueMin="0" valueMax="150" valueStep="30"
|
||||
visibleTicks="true" visibleLabels="true">
|
||||
<labels fontName="Helvetica" />
|
||||
</valueAxis>
|
||||
<data>
|
||||
<series>100 110 120 130</series>
|
||||
<series> 70 80 85 90</series>
|
||||
</data>
|
||||
</barChart3D>
|
||||
|
||||
<barChart3D
|
||||
dx="2in" dy="4in" dwidth="6in" dheight="4in"
|
||||
x="0" y="0" width="5in" height="2in"
|
||||
thetaX="0.3" thetaY="0.3" zDepth="5" zSpace="10"
|
||||
direction="vertical"
|
||||
doc:example="">
|
||||
<categoryAxis strokeColor="black" strokeWidth="1"
|
||||
visibleGrid="true">
|
||||
<labels fontName="Helvetica" />
|
||||
<categoryNames>
|
||||
<name>Category 1</name>
|
||||
<name>Category 2</name>
|
||||
<name>Category 3</name>
|
||||
<name>Category 4</name>
|
||||
</categoryNames>
|
||||
</categoryAxis>
|
||||
<valueAxis valueMin="0" valueMax="150" valueStep="30"
|
||||
visibleTicks="true" visibleLabels="true"
|
||||
visibleGrid="true">
|
||||
<labels fontName="Helvetica" />
|
||||
</valueAxis>
|
||||
<data>
|
||||
<series>100 110 120 130</series>
|
||||
<series> 70 80 85 90</series>
|
||||
</data>
|
||||
</barChart3D>
|
||||
|
||||
</pageDrawing>
|
||||
</document>
|
||||
192
z3c/rml/tests/input/tag-barCodeFlowable.rml
Normal file
192
z3c/rml/tests/input/tag-barCodeFlowable.rml
Normal file
@@ -0,0 +1,192 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-spacer.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="header" x1="2cm" y1="26cm" width="17cm" height="2cm"/>
|
||||
<frame id="first" x1="2cm" y1="2cm" width="8cm" height="24cm"/>
|
||||
<frame id="second" x1="11cm" y1="2cm" width="8cm" height="24cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<paraStyle
|
||||
name="style.Normal"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="12"
|
||||
/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title>"barCodeFlowable" Tag Demo</title>
|
||||
<nextFrame />
|
||||
<para>Code 128</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Code128" value="PFWZF" doc:example="" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Code 128 with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Code128" value="PFWZF" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10"
|
||||
barFillColor="red" barStrokeColor="red"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in"
|
||||
doc:example="" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Standard 93</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Standard93" value="98882137" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Standard 93 with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Standard93" value="98882137" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10" stop="true"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Extended 93</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Extended93" value="988-CD=137" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Extended 93 with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Extended93" value="988-CD=137" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10" stop="true"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Standard 39</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Standard39" value="98882137" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Standard 39 with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Standard39" value="98882137" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10" stop="true"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
|
||||
<nextFrame />
|
||||
|
||||
<para>Extended 39</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Extended39" value="988-CD-137" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Extended 39 with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Extended39" value="988-CD-137" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10" stop="true"
|
||||
checksum="1" bearers="2" ratio="3"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>MSI</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="MSI" value="988137" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>MSI with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="MSI" value="988137" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10" stop="true"
|
||||
checksum="1" bearers="2" ratio="3"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Codabar</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Codabar" value="988137" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Codabar with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Codabar" value="988137" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10" stop="true"
|
||||
checksum="1" bearers="2" ratio="3"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Code 11</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Code11" value="988137" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Code 11 with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Code11" value="988137" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10" stop="true"
|
||||
checksum="1" bearers="2" ratio="3"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
|
||||
<nextFrame />
|
||||
|
||||
<para>FIM</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="FIM" value="B" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>FIM with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="FIM" value="B" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10" stop="true"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Ean13</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Ean13" value="123456789012" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Ean13 with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Ean13" value="123456789012"
|
||||
humanReadable="true" fontName="Helvetica" fontSize="7"
|
||||
barStrokeColor="blue" barFillColor="blue" textColor="blue"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Ean8</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Ean8" value="1234567" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>Ean8 with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="Ean8" value="1234567"
|
||||
humanReadable="true" fontName="Helvetica" fontSize="7"
|
||||
barStrokeColor="blue" barFillColor="blue" textColor="blue"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in" />
|
||||
|
||||
<nextFrame />
|
||||
|
||||
<para>POSTNET</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="POSTNET" value="38104-0001" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>POSTNET with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="POSTNET" value="38104-0001" humanReadable="true"
|
||||
fontName="Helvetica" fontSize="10"
|
||||
barHeight="0.4in" barWidth="0.009in" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>QR</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="QR" value="www.python.org" />
|
||||
<spacer length="10mm" />
|
||||
|
||||
<para>QR with several options</para>
|
||||
<spacer length="5mm" />
|
||||
<barCodeFlowable code="QR" value="www.python.org"
|
||||
barStrokeColor="blue" barFillColor="red"
|
||||
/>
|
||||
<spacer length="10mm" />
|
||||
|
||||
</story>
|
||||
</document>
|
||||
33
z3c/rml/tests/input/tag-barcode.rml
Normal file
33
z3c/rml/tests/input/tag-barcode.rml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-place.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<pageDrawing>
|
||||
|
||||
<drawCenteredString x="10.5cm" y="26cm">
|
||||
barCode Tag Demo
|
||||
</drawCenteredString>
|
||||
|
||||
<barCode x="5cm" y="24cm" code="MSI" doc:example="">
|
||||
23465092892
|
||||
</barCode>
|
||||
|
||||
<barCode x="5cm" y="21cm" code="Standard93">
|
||||
217829804
|
||||
</barCode>
|
||||
|
||||
<barCode
|
||||
x="5cm" y="17cm" height="2cm" width="5cm"
|
||||
code="Ean13"
|
||||
humanReadable="true" fontName="Helvetica" fontSize="7"
|
||||
barStrokeColor="blue" barFillColor="blue" textColor="blue"
|
||||
quiet="false" barHeight="0.4in" barWidth="0.009in"
|
||||
doc:example="">
|
||||
123456789012
|
||||
</barCode>
|
||||
|
||||
</pageDrawing>
|
||||
</document>
|
||||
29
z3c/rml/tests/input/tag-blockTable-1.rml
Normal file
29
z3c/rml/tests/input/tag-blockTable-1.rml
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-pre.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
|
||||
<title><font face="Courier"><blockTable></font> Tag Demo</title>
|
||||
<blockTable
|
||||
colWidths="50% 50%" rowHeights="1cm 1cm"
|
||||
doc:example="">
|
||||
<tr doc:example="">
|
||||
<td doc:example="">This</td>
|
||||
<td>is</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>a</td>
|
||||
<td>blockTable.</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
34
z3c/rml/tests/input/tag-blockTable-10.rml
Normal file
34
z3c/rml/tests/input/tag-blockTable-10.rml
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-blockTable-10.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
|
||||
<title>
|
||||
<font face="Courier"><blockTable></font> Tag Demo with Links
|
||||
</title>
|
||||
|
||||
<bookmarkPage
|
||||
name="top" fitType="fitv" zoom="2"
|
||||
left="2cm" right="10cm" top="20cm"
|
||||
/>
|
||||
<para>Table on the next page.</para>
|
||||
|
||||
<nextPage />
|
||||
|
||||
<blockTable colWidths="50% 50%" rowHeights="1cm">
|
||||
<tr>
|
||||
<td href="http://google.com">Google</td>
|
||||
<td destination="top">TOP</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
47
z3c/rml/tests/input/tag-blockTable-2.rml
Normal file
47
z3c/rml/tests/input/tag-blockTable-2.rml
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="tag-pre.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
|
||||
<title><font face="Courier"><blockTable></font> Tag Demo</title>
|
||||
<blockTable
|
||||
rowHeights="1.25cm,1.25cm"
|
||||
colWidths="4cm,4cm">
|
||||
<tr>
|
||||
<td>
|
||||
<para>
|
||||
This is a <b>more</b> complex <font color="red">blocktable</font>.
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para>
|
||||
This is a more <i>complex</i> blocktable.
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para>
|
||||
<font face="Helvetica">This is a more complex blockTable.</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para>
|
||||
This is <greek>a</greek> more
|
||||
<font color="blue"><i>complex</i></font> blockta<greek>b</greek>le.
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
48
z3c/rml/tests/input/tag-blockTable-3.rml
Normal file
48
z3c/rml/tests/input/tag-blockTable-3.rml
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="tag-blockTable-3.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
|
||||
<title><font face="Courier"><blockTable></font> Tag Demo</title>
|
||||
|
||||
<blockTable
|
||||
rowHeights="1.25cm,1.25cm"
|
||||
colWidths="4cm,4cm">
|
||||
<tr>
|
||||
<td>
|
||||
<para>
|
||||
This is a <b>more</b> complex <font color="red">blocktable</font>.
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para>
|
||||
This is a more <i>complex</i> blocktable.
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para>
|
||||
<font face="Helvetica">This is a more complex blockTable.</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para>
|
||||
This is <greek>a</greek> more
|
||||
<font color="blue"><i>complex</i></font> blockta<greek>b</greek>le.
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
52
z3c/rml/tests/input/tag-blockTable-4.rml
Normal file
52
z3c/rml/tests/input/tag-blockTable-4.rml
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="tag-blockTable-4.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="table">
|
||||
<blockBackground start="1,1" stop="-2,-2" colorName="green" />
|
||||
<blockTextColor start="0,0" stop="1,-1" colorName="red" />
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title><font face="Courier"><blockTable></font> Tag Demo</title>
|
||||
|
||||
<blockTable style="table">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
66
z3c/rml/tests/input/tag-blockTable-5.rml
Normal file
66
z3c/rml/tests/input/tag-blockTable-5.rml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-blockTable-5.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="table">
|
||||
<blockAlignment start="1,1" stop="-2,-2" value="right" />
|
||||
<blockTextColor start="1,1" stop="-2,-2" colorName="red" />
|
||||
<blockValign start="0,0" stop="0,-1" value="top" />
|
||||
<blockTextColor start="0,0" stop="0,-1" colorName="blue" />
|
||||
<blockAlignment start="0,-1" stop="-1,-1" value="center" />
|
||||
<blockValign start="0,-1" stop="-1,-1" value="middle" />
|
||||
<blockTextColor start="0,-1" stop="-1,-1" colorName="green" />
|
||||
<lineStyle start="0,0" stop="-1,-1" kind="INNERGRID"
|
||||
thickness="0.25" colorName="black" />
|
||||
<lineStyle start="0,0" stop="-1,-1" kind="BOX"
|
||||
thickness="0.25" colorName="black"
|
||||
doc:example="" />
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title><font face="Courier"><blockTable></font> Tag Demo</title>
|
||||
|
||||
<blockTable style="table">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
65
z3c/rml/tests/input/tag-blockTable-6.rml
Normal file
65
z3c/rml/tests/input/tag-blockTable-6.rml
Normal file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="tag-blockTable-4.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="table">
|
||||
<lineStyle start="0,0" stop="-1,-1" kind="GRID"
|
||||
thickness="0.5" colorName="grey" />
|
||||
<lineStyle start="1,1" stop="-2,-2" kind="GRID"
|
||||
thickness="1" colorName="green" />
|
||||
<lineStyle start="0,0" stop="1,-1" kind="BOX"
|
||||
thickness="2" colorName="red" />
|
||||
<lineStyle start="0,0" stop="-1,-1" kind="BOX"
|
||||
thickness="2" colorName="black" />
|
||||
<lineStyle start="1,2" stop="-2,2" kind="LINEABOVE"
|
||||
thickness="1" colorName="blue" />
|
||||
<lineStyle start="2,1" stop="2,-2" kind="LINEBEFORE"
|
||||
thickness="1" colorName="pink" />
|
||||
<blockBackground start="0,0" stop="0,1" colorName="pink" />
|
||||
<blockBackground start="1,1" stop="1,2" colorName="lavender" />
|
||||
<blockBackground start="2,2" stop="2,3" colorName="orange" />
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title><font face="Courier"><blockTable></font> Tag Demo</title>
|
||||
|
||||
<blockTable style="table">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
58
z3c/rml/tests/input/tag-blockTable-7.rml
Normal file
58
z3c/rml/tests/input/tag-blockTable-7.rml
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="tag-blockTable-4.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="table">
|
||||
<lineStyle start="0,0" stop="-1,-1" kind="GRID"
|
||||
thickness="0.5" colorName="grey" />
|
||||
<blockBackground start="0,0" stop="1,1" colorName="palegreen" />
|
||||
<blockSpan start="0,0" stop="1,1" />
|
||||
<blockBackground start="-2,-2" stop="-1,-1" colorName="pink" />
|
||||
<blockSpan start="-2,-2" stop="-1,-1" />
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title><font face="Courier"><blockTable></font> Tag Demo</title>
|
||||
|
||||
<blockTable style="table">
|
||||
<tr>
|
||||
<td>Top
|
||||
Left</td>
|
||||
<td></td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>Bottom
|
||||
Right</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
52
z3c/rml/tests/input/tag-blockTable-8.rml
Normal file
52
z3c/rml/tests/input/tag-blockTable-8.rml
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="tag-blockTable-4.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title><font face="Courier"><blockTable></font> Tag Demo</title>
|
||||
<para>
|
||||
This demo demonstrates setting styles via
|
||||
<font face="courier"><td></font> attributes.
|
||||
</para>
|
||||
|
||||
<blockTable>
|
||||
<tr>
|
||||
<td fontName="Helvetica">00</td>
|
||||
<td fontSize="14">01</td>
|
||||
<td leading="10">02</td>
|
||||
<td leftPadding="15">03</td>
|
||||
<td rightPadding="10">04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td topPadding="10">10</td>
|
||||
<td bottomPadding="10">11</td>
|
||||
<td background="pink">12</td>
|
||||
<td lineBelowThickness="2" lineBelowColor="red">13</td>
|
||||
<td lineAboveThickness="2" lineAboveColor="red">14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td lineLeftThickness="2" lineLeftColor="red">23</td>
|
||||
<td lineRightThickness="2" lineRightColor="red">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
90
z3c/rml/tests/input/tag-blockTable-9.rml
Normal file
90
z3c/rml/tests/input/tag-blockTable-9.rml
Normal file
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="tag-blockTable-4.pdf">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="table1">
|
||||
<lineStyle start="0,0" stop="-1,-1" kind="GRID"
|
||||
thickness="0.5" colorName="grey" />
|
||||
<blockRowBackground start="0,0" stop="-1,-1" colorNames="red green" />
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="table2">
|
||||
<lineStyle start="0,0" stop="-1,-1" kind="GRID"
|
||||
thickness="0.5" colorName="grey" />
|
||||
<blockColBackground start="0,0" stop="-1,-1" colorNames="red green" />
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title><font face="Courier"><blockTable></font> Tag Demo</title>
|
||||
|
||||
<blockTable style="table1">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<spacer length="1cm" />
|
||||
<blockTable style="table2">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
27
z3c/rml/tests/input/tag-blockTable-bulkData.rml
Normal file
27
z3c/rml/tests/input/tag-blockTable-bulkData.rml
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-pre.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
|
||||
<title><font face="Courier"><bulkData></font> Tag Demo</title>
|
||||
<blockTable >
|
||||
<bulkData doc:example=""><![CDATA[
|
||||
Product,Profit
|
||||
Sprockets,26
|
||||
Widgets,34
|
||||
Thingummies,217
|
||||
Bits & Bobs,23
|
||||
Total,277
|
||||
]]></bulkData>
|
||||
</blockTable>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
99
z3c/rml/tests/input/tag-blockTableStyle-2.rml
Normal file
99
z3c/rml/tests/input/tag-blockTableStyle-2.rml
Normal file
@@ -0,0 +1,99 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-blockTableStyle-2.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="custom">
|
||||
<blockAlignment value="CENTER" />
|
||||
<lineStyle kind="BOX" colorName="black" />
|
||||
<lineStyle kind="LINEBELOW" colorName="red" start="0,0" stop="-1,0" />
|
||||
<lineStyle kind="LINEAFTER" colorName="blue" start="2,0" />
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title><font face="Courier"><blockTableStyle></font> Tag Demo</title>
|
||||
|
||||
<para>
|
||||
This demo ensures that a table style can be applied multiple times.
|
||||
</para>
|
||||
|
||||
<blockTable style="custom">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
<td>05</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
<td>15</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
<td>25</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
<td>35</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>40</td>
|
||||
<td>41</td>
|
||||
<td>42</td>
|
||||
<td>43</td>
|
||||
<td>44</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<spacer length="1cm" />
|
||||
|
||||
<blockTable style="custom">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
35
z3c/rml/tests/input/tag-blockTableStyle-3.rml
Normal file
35
z3c/rml/tests/input/tag-blockTableStyle-3.rml
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document filename="tag-blockTableStyle-2.pdf">
|
||||
<pageInfo pageSize="A4" />
|
||||
<template showBoundary="0">
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="10mm" y1="15mm" width="190mm" height="272mm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="my-table-style">
|
||||
<blockFont name="Helvetica-Bold" size="6" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<blockTable style="my-table-style" colWidths="50% 50%">
|
||||
<tr>
|
||||
<td>Item1</td>
|
||||
<td align="right">$1.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Item2</td>
|
||||
<td align="right">$2.00</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable style="my-table-style" colWidths="50% 50%">
|
||||
<tr>
|
||||
<td>Item3</td>
|
||||
<td align="right">$3.00</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
197
z3c/rml/tests/input/tag-blockTableStyle.rml
Normal file
197
z3c/rml/tests/input/tag-blockTableStyle.rml
Normal file
@@ -0,0 +1,197 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-blockTableStyle.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<blockTableStyle id="table">
|
||||
<blockAlignment
|
||||
start="0,0" stop="-1,1" value="center"
|
||||
doc:example="" />
|
||||
<blockBackground start="1,1" stop="-2,-2" colorName="green"
|
||||
doc:example="" />
|
||||
<blockTopPadding start="0,0" stop="-1,1" length="5mm"
|
||||
doc:example="" />
|
||||
<blockRightPadding start="0,0" stop="-1,1" length="5mm"
|
||||
doc:example="" />
|
||||
<blockBottomPadding start="0,0" stop="-1,1" length="5mm"
|
||||
doc:example="" />
|
||||
<blockLeftPadding start="0,0" stop="-1,1" length="5mm"
|
||||
doc:example="" />
|
||||
<blockFont
|
||||
start="0,0" stop="1,-1" name="Courier" size="14" leading="18"
|
||||
doc:example="" />
|
||||
<blockTextColor start="0,0" stop="1,-1" colorName="red"
|
||||
doc:example="" />
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="table2">
|
||||
<blockColBackground
|
||||
start="0,0" stop="2,-1" colorNames="red green"
|
||||
doc:example="" />
|
||||
<blockRowBackground
|
||||
start="3,0" stop="-1,-1" colorNames="blue yellow"
|
||||
doc:example="" />
|
||||
<blockLeading
|
||||
start="0,0" stop="-1,1" length="18"
|
||||
doc:example="" />
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="table3">
|
||||
<blockSpan
|
||||
start="0,0" stop="2,2" doc:example="" />
|
||||
<blockAlignment
|
||||
start="0,0" stop="2,2" value="center" />
|
||||
<blockValign
|
||||
start="0,0" stop="2,2" value="middle"
|
||||
doc:example="" />
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="custom-table" doc:example="">
|
||||
<blockFont
|
||||
start="0,0" stop="-1,-1" name="Courier-Bold" size="10" />
|
||||
</blockTableStyle>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<title><font face="Courier"><blockTableStyle></font> Tag Demo</title>
|
||||
|
||||
<blockTable style="table">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<spacer length="1cm" />
|
||||
|
||||
<blockTable style="table2">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<spacer length="1cm" />
|
||||
|
||||
<blockTable style="table3">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<spacer length="1cm" />
|
||||
|
||||
<blockTable style="custom-table">
|
||||
<tr>
|
||||
<td>00</td>
|
||||
<td>01</td>
|
||||
<td>02</td>
|
||||
<td>03</td>
|
||||
<td>04</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td>32</td>
|
||||
<td>33</td>
|
||||
<td>34</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
50
z3c/rml/tests/input/tag-bookmark.rml
Normal file
50
z3c/rml/tests/input/tag-bookmark.rml
Normal file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-bookmark.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="72" y1="72" width="451" height="698"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
|
||||
<title>
|
||||
<font face="Courier"><bookmark></font>
|
||||
and
|
||||
<font face="Courier"><link></font>
|
||||
Tag Demo
|
||||
</title>
|
||||
<bookmarkPage name="TITLE" doc:example="" />
|
||||
<link destination="PAGE_1"
|
||||
boxStrokeColor="red" boxStrokeWidth="1" boxStrokeDashArray="1 2"
|
||||
doc:example="">
|
||||
<para>Go to page 1 now!</para>
|
||||
</link>
|
||||
<nextPage/>
|
||||
<bookmarkPage
|
||||
name="PAGE_1" fitType="fitv" zoom="2"
|
||||
left="2cm" right="10cm" top="20cm"
|
||||
doc:example=""
|
||||
/>
|
||||
<h1>This is page 1.</h1>
|
||||
<link destination="TITLE">
|
||||
<imageAndFlowables
|
||||
imageName="images/replogo.gif"
|
||||
imageSide="left">
|
||||
<para>Go to title.</para>
|
||||
</imageAndFlowables>
|
||||
</link>
|
||||
<link destination="PAGE_1">
|
||||
<para>Go to page 1.</para>
|
||||
</link>
|
||||
|
||||
<link url="http://www.reportlab.org"
|
||||
doc:example="">
|
||||
<para>Link to ReporLab Web Site.</para>
|
||||
</link>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
21
z3c/rml/tests/input/tag-buttonField.rml
Normal file
21
z3c/rml/tests/input/tag-buttonField.rml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-textField.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
<pageDrawing>
|
||||
|
||||
<drawCenteredString x="10.5cm" y="27cm">
|
||||
"buttonField" Tag Demo
|
||||
</drawCenteredString>
|
||||
|
||||
<drawString x="2cm" y="23cm">
|
||||
Button 1:
|
||||
</drawString>
|
||||
<!-- buttonField
|
||||
title="button1" value="Off" x="3.5cm" y="22.9cm"
|
||||
doc:example="" / -->
|
||||
|
||||
</pageDrawing>
|
||||
</document>
|
||||
22
z3c/rml/tests/input/tag-circle.rml
Normal file
22
z3c/rml/tests/input/tag-circle.rml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="circle.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
<pageDrawing>
|
||||
|
||||
<circle x="10cm" y="25cm" radius="2cm"
|
||||
fill="false" stroke="false" doc:example="" />
|
||||
|
||||
<circle x="10cm" y="20cm" radius="2cm"
|
||||
fill="true" stroke="false" />
|
||||
|
||||
<circle x="10cm" y="15cm" radius="2cm"
|
||||
fill="false" stroke="true"/>
|
||||
|
||||
<circle x="10cm" y="10cm" radius="2cm"
|
||||
fill="true" stroke="true" />
|
||||
|
||||
</pageDrawing>
|
||||
</document>
|
||||
46
z3c/rml/tests/input/tag-codesnippet.rml
Normal file
46
z3c/rml/tests/input/tag-codesnippet.rml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-codesnippet.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1cm" y1="1cm" width="19cm" height="26cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<paraStyle name="boxed-code"
|
||||
fontName="Courier"
|
||||
fontSize="8"
|
||||
leftIndent="36"
|
||||
textColor="blue"
|
||||
backColor="cornsilk"
|
||||
borderColor="gray"
|
||||
borderPadding="6"
|
||||
borderWidth="1"
|
||||
spaceBefore="12"
|
||||
spaceAfter="12"
|
||||
/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
|
||||
<codesnippet language="python" style="boxed-code" doc:example="">
|
||||
class HelloWorld(object):
|
||||
|
||||
def render(self):
|
||||
print 'Hello World!'
|
||||
|
||||
HelloWorld().render()
|
||||
</codesnippet>
|
||||
|
||||
<para><br/></para>
|
||||
|
||||
<codesnippet language="xml" style="boxed-code" doc:example=""><![CDATA[
|
||||
<tag attr="value">
|
||||
<content>Hello World!</content>
|
||||
</tag>
|
||||
]]></codesnippet>
|
||||
|
||||
</story>
|
||||
</document>
|
||||
31
z3c/rml/tests/input/tag-color.rml
Normal file
31
z3c/rml/tests/input/tag-color.rml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-color.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
<docinit>
|
||||
<color id="favorite-color" value="yellow"
|
||||
doc:example="" />
|
||||
</docinit>
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1cm" y1="1cm" width="19cm" height="26cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<initialize>
|
||||
<color id="important" value="red" />
|
||||
</initialize>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<para fontSize="40" spaceAfter="45" textColor="favorite-color">
|
||||
This is my favorite color!
|
||||
</para>
|
||||
<para fontSize="40" textColor="important">
|
||||
This is an important color.
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
21
z3c/rml/tests/input/tag-condPageBreak.rml
Normal file
21
z3c/rml/tests/input/tag-condPageBreak.rml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-condPageBreak.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1cm" y1="21cm" width="19cm" height="6cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
<h1>Text 1 - On page 1</h1>
|
||||
<condPageBreak height="8cm" doc:example="" />
|
||||
<h1>Text 2 - On page 2</h1>
|
||||
<condPageBreak height="4cm" />
|
||||
<h1>Text 3 - On page 2</h1>
|
||||
</story>
|
||||
</document>
|
||||
23
z3c/rml/tests/input/tag-cropMarks.rml
Normal file
23
z3c/rml/tests/input/tag-cropMarks.rml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-cropMarks.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<docinit useCropMarks="1">
|
||||
<cropMarks borderWidth="30" markWidth="2"
|
||||
markColor="red" markLength="20" markLast="0" bleedWidth="0"
|
||||
doc:example="" />
|
||||
</docinit>
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1cm" y1="1cm" width="19cm" height="26cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
<title doc:example="">Crop Marks Demo</title>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
16
z3c/rml/tests/input/tag-curves.rml
Normal file
16
z3c/rml/tests/input/tag-curves.rml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="grid.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
<pageDrawing>
|
||||
|
||||
<curves doc:example="">
|
||||
1in 1in 2in 2in 2in 3in 1in 3in
|
||||
1in 2in 2in 3in 2in 4in 1in 4in
|
||||
1in 3in 2in 4in 2in 5in 1in 5in
|
||||
</curves>
|
||||
|
||||
</pageDrawing>
|
||||
</document>
|
||||
41
z3c/rml/tests/input/tag-doc.rml
Normal file
41
z3c/rml/tests/input/tag-doc.rml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
<document
|
||||
filename="tag-doc.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1cm" y1="1cm" width="19cm" height="26cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
<title>Doc Programming Demo</title>
|
||||
|
||||
<docAssign var="currentFrame" expr="doc.frame.id"
|
||||
doc:example="" />
|
||||
|
||||
<docAssign var="i" expr="3" doc:example="" />
|
||||
<docIf cond="i > 3" doc:example="">
|
||||
<para>The value of i is larger than 3</para>
|
||||
<docElse doc:example="" />
|
||||
<para>The value of i is not larger than to 3</para>
|
||||
</docIf>
|
||||
|
||||
<docAssign var="i" expr="5" />
|
||||
<docIf cond="i > 3">
|
||||
<para>Now the value of i is larger than 3</para>
|
||||
<docElse />
|
||||
<para>Now the value of i is not larger than to 3</para>
|
||||
</docIf>
|
||||
|
||||
<docWhile cond="i" doc:example="">
|
||||
<docPara expr="i" format="The value of i is %(__expr__)d"
|
||||
doc:example="" />
|
||||
<docExec stmt="i -= 1" doc:example="" />
|
||||
</docWhile>
|
||||
|
||||
</story>
|
||||
|
||||
</document>
|
||||
35
z3c/rml/tests/input/tag-docinit-viewer-options.rml
Normal file
35
z3c/rml/tests/input/tag-docinit-viewer-options.rml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-docinit-viewer-options.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
|
||||
<docinit
|
||||
hideToolbar="true"
|
||||
hideMenubar="true"
|
||||
hideWindowUI="true"
|
||||
fitWindow="true"
|
||||
centerWindow="true"
|
||||
displayDocTitle="true"
|
||||
nonFullScreenPageMode="UseOutlines"
|
||||
direction="L2R"
|
||||
viewArea="MediaBox"
|
||||
viewClip="MediaBox"
|
||||
printArea="MediaBox"
|
||||
printClip="MediaBox"
|
||||
printScaling="None"
|
||||
doc:example="">
|
||||
</docinit>
|
||||
|
||||
<template>
|
||||
<pageTemplate id="main">
|
||||
<frame id="first" x1="1cm" y1="1cm" width="19cm" height="26cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<story>
|
||||
<h1>Hello RML users!</h1>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
21
z3c/rml/tests/input/tag-document-annotations.rml
Normal file
21
z3c/rml/tests/input/tag-document-annotations.rml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-document-annotations.pdf"
|
||||
title="Sample Document"
|
||||
subject="Testing/Documentation"
|
||||
author="Stephan Richter"
|
||||
creator="Stephan Richter"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc"
|
||||
doc:example="">
|
||||
<template doc:example="">
|
||||
<pageTemplate id="main" doc:example="">
|
||||
<frame id="first" x1="1cm" y1="1cm" width="19cm" height="26cm"
|
||||
doc:example="" />
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<story>
|
||||
<title>See Document Properties.</title>
|
||||
</story>
|
||||
</document>
|
||||
11
z3c/rml/tests/input/tag-document-pageDrawing.rml
Normal file
11
z3c/rml/tests/input/tag-document-pageDrawing.rml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-document-pageDrawing.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc"
|
||||
doc:example="">
|
||||
<pageDrawing>
|
||||
<drawString x="4.1in" y="8in">Hello World!</drawString>
|
||||
</pageDrawing>
|
||||
</document>
|
||||
17
z3c/rml/tests/input/tag-document-story.rml
Normal file
17
z3c/rml/tests/input/tag-document-story.rml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="tag-document.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc"
|
||||
doc:example="">
|
||||
<template doc:example="">
|
||||
<pageTemplate id="main" doc:example="">
|
||||
<frame id="first" x1="1cm" y1="1cm" width="19cm" height="26cm"
|
||||
doc:example="" />
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<story>
|
||||
<title>Hello World!</title>
|
||||
</story>
|
||||
</document>
|
||||
58
z3c/rml/tests/input/tag-drawAlignedString.rml
Normal file
58
z3c/rml/tests/input/tag-drawAlignedString.rml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="drawString.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
<pageDrawing>
|
||||
|
||||
<drawAlignedString
|
||||
x="4.1in" y="9.8in" doc:example=""
|
||||
>$ 13.63</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="9.6in">
|
||||
$ 121.01
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="9.4in">
|
||||
$ 7.13
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="9.2in">
|
||||
$ -97.45
|
||||
</drawAlignedString>
|
||||
|
||||
<drawAlignedString x="4.1in" y="7.8in">
|
||||
12,345.67
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="7.6in">
|
||||
987.15
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="7.4in">
|
||||
42
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="7.2in">
|
||||
-1,234.56
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="7.0in">
|
||||
(456.78)
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="6.8in">
|
||||
(456)
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="6.6in">
|
||||
27 inches
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="6.4in">
|
||||
13cm
|
||||
</drawAlignedString>
|
||||
|
||||
<drawAlignedString x="4.1in" y="5.8in" pivotChar="=">
|
||||
a = 2b + 3
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="5.6in" pivotChar="=">
|
||||
a - 3 = 2b
|
||||
</drawAlignedString>
|
||||
<drawAlignedString x="4.1in" y="5.4in" pivotChar="=">
|
||||
(a - 3)/2 = b
|
||||
</drawAlignedString>
|
||||
|
||||
</pageDrawing>
|
||||
</document>
|
||||
14
z3c/rml/tests/input/tag-drawCenteredString.rml
Normal file
14
z3c/rml/tests/input/tag-drawCenteredString.rml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document
|
||||
filename="drawCenteredString.pdf"
|
||||
xmlns:doc="http://namespaces.zope.org/rml/doc">
|
||||
<pageDrawing>
|
||||
|
||||
<drawCenteredString
|
||||
x="4.1in" y="5.8in" doc:example=""
|
||||
>Hello World.</drawCenteredString>
|
||||
|
||||
</pageDrawing>
|
||||
</document>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user