Merge lp:~logan/ubuntu/raring/z3c.rml/2.0.0 into lp:ubuntu/raring/z3c.rml
- Raring (13.04)
- 2.0.0
- Merge into raring
Proposed by
Logan Rosen
Status: | Merged |
---|---|
Merged at revision: | 7 |
Proposed branch: | lp:~logan/ubuntu/raring/z3c.rml/2.0.0 |
Merge into: | lp:ubuntu/raring/z3c.rml |
Diff against target: | 54995 lines |
To merge this branch: | bzr merge lp:~logan/ubuntu/raring/z3c.rml/2.0.0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Holbach (community) | Approve | ||
Ubuntu branches | Pending | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.pc/no-scripts.patch/setup.py' | |||
2 | --- .pc/no-scripts.patch/setup.py 2012-04-02 19:19:22 +0000 | |||
3 | +++ .pc/no-scripts.patch/setup.py 2013-01-09 02:49:23 +0000 | |||
4 | @@ -21,7 +21,7 @@ | |||
5 | 21 | 21 | ||
6 | 22 | setup ( | 22 | setup ( |
7 | 23 | name='z3c.rml', | 23 | name='z3c.rml', |
9 | 24 | version='1.0.0', | 24 | version='2.0.0', |
10 | 25 | author = "Stephan Richter and the Zope Community", | 25 | author = "Stephan Richter and the Zope Community", |
11 | 26 | author_email = "zope-dev@zope.org", | 26 | author_email = "zope-dev@zope.org", |
12 | 27 | description = "An alternative implementation of RML", | 27 | description = "An alternative implementation of RML", |
13 | @@ -46,12 +46,12 @@ | |||
14 | 46 | extras_require = dict( | 46 | extras_require = dict( |
15 | 47 | test = [ | 47 | test = [ |
16 | 48 | 'zope.pagetemplate', | 48 | 'zope.pagetemplate', |
19 | 49 | 'zope.testing', | 49 | 'Pillow'], |
18 | 50 | 'PIL'], | ||
20 | 51 | pagetemplate = [ | 50 | pagetemplate = [ |
21 | 52 | 'zope.pagetemplate'] | 51 | 'zope.pagetemplate'] |
22 | 53 | ), | 52 | ), |
23 | 54 | install_requires = [ | 53 | install_requires = [ |
24 | 54 | 'Pygments', | ||
25 | 55 | 'lxml', | 55 | 'lxml', |
26 | 56 | 'pyPdf', | 56 | 'pyPdf', |
27 | 57 | 'reportlab', | 57 | 'reportlab', |
28 | 58 | 58 | ||
29 | === modified file 'CHANGES.txt' | |||
30 | --- CHANGES.txt 2012-04-02 15:47:51 +0000 | |||
31 | +++ CHANGES.txt 2013-01-09 02:49:23 +0000 | |||
32 | @@ -2,6 +2,115 @@ | |||
33 | 2 | CHANGES | 2 | CHANGES |
34 | 3 | ======= | 3 | ======= |
35 | 4 | 4 | ||
36 | 5 | 2.0.0 (2012-12-21) | ||
37 | 6 | ------------------ | ||
38 | 7 | |||
39 | 8 | - Implemented ``saveState`` and ``restoreState`` directives. (LP #666194) | ||
40 | 9 | |||
41 | 10 | - Implemented ``storyPlace`` directive. (LP #665941) | ||
42 | 11 | |||
43 | 12 | - Implemented ``clip`` attribute of ``path`` directive. See RML example 041. | ||
44 | 13 | |||
45 | 14 | - Added ``h4``, ``h5``, and ``h6`` directives. | ||
46 | 15 | |||
47 | 16 | - Implemented ``codesnippet`` directive. | ||
48 | 17 | |||
49 | 18 | - Implemented ``pageBreakBefore``, ``frameBreakBefore``, ``textTransform``, | ||
50 | 19 | and ``endDots`` attributes for paragraph styles. | ||
51 | 20 | |||
52 | 21 | - Added ``maxLineLength`` and ``newLineChars`` attributes to the ``pre`` | ||
53 | 22 | directive. | ||
54 | 23 | |||
55 | 24 | - Implemented ``pageNumber`` element for all ``draw*String`` elements. | ||
56 | 25 | |||
57 | 26 | - Implemented ``NamedString`` directive. | ||
58 | 27 | |||
59 | 28 | - Implemented ``startIndex`` and ``showIndex`` directive. Also hooked up | ||
60 | 29 | ``index`` in paragraphs properly. You can now create real book indexes. | ||
61 | 30 | |||
62 | 31 | - Implemented ``ol``, ``ul``, and ``li`` directives, which allow highly | ||
63 | 32 | flexible lists to be created. Also implemented a complimentary ``listStyle`` | ||
64 | 33 | directive. | ||
65 | 34 | |||
66 | 35 | - Implemented the following doc-programming directives: | ||
67 | 36 | |||
68 | 37 | * docAssert | ||
69 | 38 | * docAssign | ||
70 | 39 | * docElse | ||
71 | 40 | * docIf | ||
72 | 41 | * docExec | ||
73 | 42 | * docPara | ||
74 | 43 | * docWhile | ||
75 | 44 | |||
76 | 45 | - Added ``encName`` attribute to ``registerCidFont`` directive. | ||
77 | 46 | |||
78 | 47 | - Renamed ``bookmark`` to ``bookmarkPage``. | ||
79 | 48 | |||
80 | 49 | - Created a new canvas directive called ``bookmark``. | ||
81 | 50 | |||
82 | 51 | - Added ``img`` directive, which is a simple image flowable. | ||
83 | 52 | |||
84 | 53 | - Implemented crop marks support fully. | ||
85 | 54 | |||
86 | 55 | - Added ``pageLayout`` and ``pageMode`` to ``docInit`` directive. | ||
87 | 56 | |||
88 | 57 | - Implemented all logging related directives. | ||
89 | 58 | |||
90 | 59 | - Implemented ``color`` directive inside the ``initialize`` directive. | ||
91 | 60 | |||
92 | 61 | - Renamed ``pdfInclude`` to documented ``includePdfPages`` and added `pages` | ||
93 | 62 | attribute, so that you can only include specific pages. | ||
94 | 63 | |||
95 | 64 | - Don't show "doc" namespace in reference snippets. | ||
96 | 65 | |||
97 | 66 | - Create a list of RML2PDF and z3c.rml differences. | ||
98 | 67 | |||
99 | 68 | - Implemented the ``ABORT_ON_INVALID_DIRECTIVE`` flag, that when set ``True`` | ||
100 | 69 | will raise a ``ValueError`` error on the first occurence of a bad tag. | ||
101 | 70 | |||
102 | 71 | - Implemented ``setFontSize`` directive for page drawings. | ||
103 | 72 | |||
104 | 73 | - Implemented ``plugInGraphic`` which allows inserting graphics rendered in | ||
105 | 74 | Python. | ||
106 | 75 | |||
107 | 76 | - Added `href` and `destination` to table cells and rectangles. | ||
108 | 77 | |||
109 | 78 | - Bug: Due to a logic error, bad directives were never properly detected and | ||
110 | 79 | logged about. | ||
111 | 80 | |||
112 | 81 | - Bug: Overwriting the default paragraph styles did not work properly. | ||
113 | 82 | |||
114 | 83 | - Bug: Specifying a color in any tag inside the paragraph would fail, if the | ||
115 | 84 | color was a referenced name. | ||
116 | 85 | |||
117 | 86 | - Bug: Moved premature ``getName`` evaluation into runtime to properly handle | ||
118 | 87 | synamic content now. This is now properly done for any paragraph and | ||
119 | 88 | draw string variant. | ||
120 | 89 | |||
121 | 90 | - Bug: Fixed DTD generator to properly ignore Text Nodes as attributes. Also | ||
122 | 91 | text nodes were not properly documented as element PCDATA. | ||
123 | 92 | |||
124 | 93 | |||
125 | 94 | 1.1.0 (2012-12-18) | ||
126 | 95 | ------------------ | ||
127 | 96 | |||
128 | 97 | - Upgrade to ReportLab 2.6. This required some font changes and several | ||
129 | 98 | generated PDFs did not match, since some default fonts changed to sans-serif. | ||
130 | 99 | |||
131 | 100 | - Added ``pdfInclude`` directive from Alex Garel. (LP #969399). | ||
132 | 101 | |||
133 | 102 | - Switched to Pillow (from PIL). | ||
134 | 103 | |||
135 | 104 | - Switched RML highlighting in RML Reference from SilverCity to Pygments. | ||
136 | 105 | |||
137 | 106 | - Bug: Addressed a bug in ReportLab 2.6 that disallowed 3-D pie charts from | ||
138 | 107 | rendering. | ||
139 | 108 | |||
140 | 109 | - Bug: Properly reset pdfform before rendering a document. | ||
141 | 110 | |||
142 | 111 | - Bug: Reset fonts properly before a rendering. | ||
143 | 112 | |||
144 | 113 | |||
145 | 5 | 1.0.0 (2012-04-02) | 114 | 1.0.0 (2012-04-02) |
146 | 6 | ------------------ | 115 | ------------------ |
147 | 7 | 116 | ||
148 | @@ -16,6 +125,7 @@ | |||
149 | 16 | is updated, the border supports a border radius and the tag-para.rml sample | 125 | is updated, the border supports a border radius and the tag-para.rml sample |
150 | 17 | has been updated. | 126 | has been updated. |
151 | 18 | 127 | ||
152 | 128 | |||
153 | 19 | 0.9.0 (2010-07-22) | 129 | 0.9.0 (2010-07-22) |
154 | 20 | ------------------ | 130 | ------------------ |
155 | 21 | 131 | ||
156 | 22 | 132 | ||
157 | === modified file 'PKG-INFO' | |||
158 | --- PKG-INFO 2012-04-02 15:47:51 +0000 | |||
159 | +++ PKG-INFO 2013-01-09 02:49:23 +0000 | |||
160 | @@ -1,6 +1,6 @@ | |||
161 | 1 | Metadata-Version: 1.1 | 1 | Metadata-Version: 1.1 |
162 | 2 | Name: z3c.rml | 2 | Name: z3c.rml |
164 | 3 | Version: 1.0.0 | 3 | Version: 2.0.0 |
165 | 4 | Summary: An alternative implementation of RML | 4 | Summary: An alternative implementation of RML |
166 | 5 | Home-page: http://pypi.python.org/pypi/z3c.rml | 5 | Home-page: http://pypi.python.org/pypi/z3c.rml |
167 | 6 | Author: Stephan Richter and the Zope Community | 6 | Author: Stephan Richter and the Zope Community |
168 | @@ -22,6 +22,115 @@ | |||
169 | 22 | CHANGES | 22 | CHANGES |
170 | 23 | ======= | 23 | ======= |
171 | 24 | 24 | ||
172 | 25 | 2.0.0 (2012-12-21) | ||
173 | 26 | ------------------ | ||
174 | 27 | |||
175 | 28 | - Implemented ``saveState`` and ``restoreState`` directives. (LP #666194) | ||
176 | 29 | |||
177 | 30 | - Implemented ``storyPlace`` directive. (LP #665941) | ||
178 | 31 | |||
179 | 32 | - Implemented ``clip`` attribute of ``path`` directive. See RML example 041. | ||
180 | 33 | |||
181 | 34 | - Added ``h4``, ``h5``, and ``h6`` directives. | ||
182 | 35 | |||
183 | 36 | - Implemented ``codesnippet`` directive. | ||
184 | 37 | |||
185 | 38 | - Implemented ``pageBreakBefore``, ``frameBreakBefore``, ``textTransform``, | ||
186 | 39 | and ``endDots`` attributes for paragraph styles. | ||
187 | 40 | |||
188 | 41 | - Added ``maxLineLength`` and ``newLineChars`` attributes to the ``pre`` | ||
189 | 42 | directive. | ||
190 | 43 | |||
191 | 44 | - Implemented ``pageNumber`` element for all ``draw*String`` elements. | ||
192 | 45 | |||
193 | 46 | - Implemented ``NamedString`` directive. | ||
194 | 47 | |||
195 | 48 | - Implemented ``startIndex`` and ``showIndex`` directive. Also hooked up | ||
196 | 49 | ``index`` in paragraphs properly. You can now create real book indexes. | ||
197 | 50 | |||
198 | 51 | - Implemented ``ol``, ``ul``, and ``li`` directives, which allow highly | ||
199 | 52 | flexible lists to be created. Also implemented a complimentary ``listStyle`` | ||
200 | 53 | directive. | ||
201 | 54 | |||
202 | 55 | - Implemented the following doc-programming directives: | ||
203 | 56 | |||
204 | 57 | * docAssert | ||
205 | 58 | * docAssign | ||
206 | 59 | * docElse | ||
207 | 60 | * docIf | ||
208 | 61 | * docExec | ||
209 | 62 | * docPara | ||
210 | 63 | * docWhile | ||
211 | 64 | |||
212 | 65 | - Added ``encName`` attribute to ``registerCidFont`` directive. | ||
213 | 66 | |||
214 | 67 | - Renamed ``bookmark`` to ``bookmarkPage``. | ||
215 | 68 | |||
216 | 69 | - Created a new canvas directive called ``bookmark``. | ||
217 | 70 | |||
218 | 71 | - Added ``img`` directive, which is a simple image flowable. | ||
219 | 72 | |||
220 | 73 | - Implemented crop marks support fully. | ||
221 | 74 | |||
222 | 75 | - Added ``pageLayout`` and ``pageMode`` to ``docInit`` directive. | ||
223 | 76 | |||
224 | 77 | - Implemented all logging related directives. | ||
225 | 78 | |||
226 | 79 | - Implemented ``color`` directive inside the ``initialize`` directive. | ||
227 | 80 | |||
228 | 81 | - Renamed ``pdfInclude`` to documented ``includePdfPages`` and added `pages` | ||
229 | 82 | attribute, so that you can only include specific pages. | ||
230 | 83 | |||
231 | 84 | - Don't show "doc" namespace in reference snippets. | ||
232 | 85 | |||
233 | 86 | - Create a list of RML2PDF and z3c.rml differences. | ||
234 | 87 | |||
235 | 88 | - Implemented the ``ABORT_ON_INVALID_DIRECTIVE`` flag, that when set ``True`` | ||
236 | 89 | will raise a ``ValueError`` error on the first occurence of a bad tag. | ||
237 | 90 | |||
238 | 91 | - Implemented ``setFontSize`` directive for page drawings. | ||
239 | 92 | |||
240 | 93 | - Implemented ``plugInGraphic`` which allows inserting graphics rendered in | ||
241 | 94 | Python. | ||
242 | 95 | |||
243 | 96 | - Added `href` and `destination` to table cells and rectangles. | ||
244 | 97 | |||
245 | 98 | - Bug: Due to a logic error, bad directives were never properly detected and | ||
246 | 99 | logged about. | ||
247 | 100 | |||
248 | 101 | - Bug: Overwriting the default paragraph styles did not work properly. | ||
249 | 102 | |||
250 | 103 | - Bug: Specifying a color in any tag inside the paragraph would fail, if the | ||
251 | 104 | color was a referenced name. | ||
252 | 105 | |||
253 | 106 | - Bug: Moved premature ``getName`` evaluation into runtime to properly handle | ||
254 | 107 | synamic content now. This is now properly done for any paragraph and | ||
255 | 108 | draw string variant. | ||
256 | 109 | |||
257 | 110 | - Bug: Fixed DTD generator to properly ignore Text Nodes as attributes. Also | ||
258 | 111 | text nodes were not properly documented as element PCDATA. | ||
259 | 112 | |||
260 | 113 | |||
261 | 114 | 1.1.0 (2012-12-18) | ||
262 | 115 | ------------------ | ||
263 | 116 | |||
264 | 117 | - Upgrade to ReportLab 2.6. This required some font changes and several | ||
265 | 118 | generated PDFs did not match, since some default fonts changed to sans-serif. | ||
266 | 119 | |||
267 | 120 | - Added ``pdfInclude`` directive from Alex Garel. (LP #969399). | ||
268 | 121 | |||
269 | 122 | - Switched to Pillow (from PIL). | ||
270 | 123 | |||
271 | 124 | - Switched RML highlighting in RML Reference from SilverCity to Pygments. | ||
272 | 125 | |||
273 | 126 | - Bug: Addressed a bug in ReportLab 2.6 that disallowed 3-D pie charts from | ||
274 | 127 | rendering. | ||
275 | 128 | |||
276 | 129 | - Bug: Properly reset pdfform before rendering a document. | ||
277 | 130 | |||
278 | 131 | - Bug: Reset fonts properly before a rendering. | ||
279 | 132 | |||
280 | 133 | |||
281 | 25 | 1.0.0 (2012-04-02) | 134 | 1.0.0 (2012-04-02) |
282 | 26 | ------------------ | 135 | ------------------ |
283 | 27 | 136 | ||
284 | @@ -36,6 +145,7 @@ | |||
285 | 36 | is updated, the border supports a border radius and the tag-para.rml sample | 145 | is updated, the border supports a border radius and the tag-para.rml sample |
286 | 37 | has been updated. | 146 | has been updated. |
287 | 38 | 147 | ||
288 | 148 | |||
289 | 39 | 0.9.0 (2010-07-22) | 149 | 0.9.0 (2010-07-22) |
290 | 40 | ------------------ | 150 | ------------------ |
291 | 41 | 151 | ||
292 | 42 | 152 | ||
293 | === modified file 'buildout.cfg' | |||
294 | --- buildout.cfg 2012-04-02 15:47:51 +0000 | |||
295 | +++ buildout.cfg 2013-01-09 02:49:23 +0000 | |||
296 | @@ -21,7 +21,6 @@ | |||
297 | 21 | eggs = ${test:eggs} | 21 | eggs = ${test:eggs} |
298 | 22 | 22 | ||
299 | 23 | [versions] | 23 | [versions] |
304 | 24 | # tag-textField test fails with reportlab 2.5, because of this change to PDFPattern: | 24 | reportlab = 2.6 |
305 | 25 | # http://two.pairlist.net/pipermail/reportlab-users/2010-January/009216.html | 25 | Pillow = 1.7.8 |
306 | 26 | reportlab = 2.4 | 26 | lxml = 3.0.2 |
303 | 27 | PIL = 1.1.7 | ||
307 | 28 | 27 | ||
308 | === modified file 'debian/changelog' | |||
309 | --- debian/changelog 2012-09-27 17:31:39 +0000 | |||
310 | +++ debian/changelog 2013-01-09 02:49:23 +0000 | |||
311 | @@ -1,3 +1,10 @@ | |||
312 | 1 | z3c.rml (2.0.0-0ubuntu1) raring; urgency=low | ||
313 | 2 | |||
314 | 3 | * New upstream release. | ||
315 | 4 | * debian/control: Bump Standards-Version to 3.9.4. | ||
316 | 5 | |||
317 | 6 | -- Logan Rosen <logatronico@gmail.com> Tue, 08 Jan 2013 21:40:32 -0500 | ||
318 | 7 | |||
319 | 1 | z3c.rml (1.0.0-0ubuntu2) quantal; urgency=low | 8 | z3c.rml (1.0.0-0ubuntu2) quantal; urgency=low |
320 | 2 | 9 | ||
321 | 3 | * debian/control: added the Homepage field. | 10 | * debian/control: added the Homepage field. |
322 | 4 | 11 | ||
323 | === modified file 'debian/control' | |||
324 | --- debian/control 2012-09-27 17:31:39 +0000 | |||
325 | +++ debian/control 2013-01-09 02:49:23 +0000 | |||
326 | @@ -7,7 +7,7 @@ | |||
327 | 7 | python-all (>= 2.6.6-3~), | 7 | python-all (>= 2.6.6-3~), |
328 | 8 | python-setuptools, | 8 | python-setuptools, |
329 | 9 | python-van.pydeb (>= 1.3.0-4) | 9 | python-van.pydeb (>= 1.3.0-4) |
331 | 10 | Standards-Version: 3.9.3 | 10 | Standards-Version: 3.9.4 |
332 | 11 | X-Python-Version: >= 2.5 | 11 | X-Python-Version: >= 2.5 |
333 | 12 | Homepage: http://pypi.python.org/pypi/z3c.rml/ | 12 | Homepage: http://pypi.python.org/pypi/z3c.rml/ |
334 | 13 | 13 | ||
335 | 14 | 14 | ||
336 | === modified file 'setup.py' | |||
337 | --- setup.py 2012-04-02 19:19:22 +0000 | |||
338 | +++ setup.py 2013-01-09 02:49:23 +0000 | |||
339 | @@ -21,7 +21,7 @@ | |||
340 | 21 | 21 | ||
341 | 22 | setup ( | 22 | setup ( |
342 | 23 | name='z3c.rml', | 23 | name='z3c.rml', |
344 | 24 | version='1.0.0', | 24 | version='2.0.0', |
345 | 25 | author = "Stephan Richter and the Zope Community", | 25 | author = "Stephan Richter and the Zope Community", |
346 | 26 | author_email = "zope-dev@zope.org", | 26 | author_email = "zope-dev@zope.org", |
347 | 27 | description = "An alternative implementation of RML", | 27 | description = "An alternative implementation of RML", |
348 | @@ -46,12 +46,12 @@ | |||
349 | 46 | extras_require = dict( | 46 | extras_require = dict( |
350 | 47 | test = [ | 47 | test = [ |
351 | 48 | 'zope.pagetemplate', | 48 | 'zope.pagetemplate', |
354 | 49 | 'zope.testing', | 49 | 'Pillow'], |
353 | 50 | 'PIL'], | ||
355 | 51 | pagetemplate = [ | 50 | pagetemplate = [ |
356 | 52 | 'zope.pagetemplate'] | 51 | 'zope.pagetemplate'] |
357 | 53 | ), | 52 | ), |
358 | 54 | install_requires = [ | 53 | install_requires = [ |
359 | 54 | 'Pygments', | ||
360 | 55 | 'lxml', | 55 | 'lxml', |
361 | 56 | 'pyPdf', | 56 | 'pyPdf', |
362 | 57 | 'reportlab', | 57 | 'reportlab', |
363 | 58 | 58 | ||
364 | === modified file 'src/z3c.rml.egg-info/PKG-INFO' | |||
365 | --- src/z3c.rml.egg-info/PKG-INFO 2012-04-02 15:47:51 +0000 | |||
366 | +++ src/z3c.rml.egg-info/PKG-INFO 2013-01-09 02:49:23 +0000 | |||
367 | @@ -1,6 +1,6 @@ | |||
368 | 1 | Metadata-Version: 1.1 | 1 | Metadata-Version: 1.1 |
369 | 2 | Name: z3c.rml | 2 | Name: z3c.rml |
371 | 3 | Version: 1.0.0 | 3 | Version: 2.0.0 |
372 | 4 | Summary: An alternative implementation of RML | 4 | Summary: An alternative implementation of RML |
373 | 5 | Home-page: http://pypi.python.org/pypi/z3c.rml | 5 | Home-page: http://pypi.python.org/pypi/z3c.rml |
374 | 6 | Author: Stephan Richter and the Zope Community | 6 | Author: Stephan Richter and the Zope Community |
375 | @@ -22,6 +22,115 @@ | |||
376 | 22 | CHANGES | 22 | CHANGES |
377 | 23 | ======= | 23 | ======= |
378 | 24 | 24 | ||
379 | 25 | 2.0.0 (2012-12-21) | ||
380 | 26 | ------------------ | ||
381 | 27 | |||
382 | 28 | - Implemented ``saveState`` and ``restoreState`` directives. (LP #666194) | ||
383 | 29 | |||
384 | 30 | - Implemented ``storyPlace`` directive. (LP #665941) | ||
385 | 31 | |||
386 | 32 | - Implemented ``clip`` attribute of ``path`` directive. See RML example 041. | ||
387 | 33 | |||
388 | 34 | - Added ``h4``, ``h5``, and ``h6`` directives. | ||
389 | 35 | |||
390 | 36 | - Implemented ``codesnippet`` directive. | ||
391 | 37 | |||
392 | 38 | - Implemented ``pageBreakBefore``, ``frameBreakBefore``, ``textTransform``, | ||
393 | 39 | and ``endDots`` attributes for paragraph styles. | ||
394 | 40 | |||
395 | 41 | - Added ``maxLineLength`` and ``newLineChars`` attributes to the ``pre`` | ||
396 | 42 | directive. | ||
397 | 43 | |||
398 | 44 | - Implemented ``pageNumber`` element for all ``draw*String`` elements. | ||
399 | 45 | |||
400 | 46 | - Implemented ``NamedString`` directive. | ||
401 | 47 | |||
402 | 48 | - Implemented ``startIndex`` and ``showIndex`` directive. Also hooked up | ||
403 | 49 | ``index`` in paragraphs properly. You can now create real book indexes. | ||
404 | 50 | |||
405 | 51 | - Implemented ``ol``, ``ul``, and ``li`` directives, which allow highly | ||
406 | 52 | flexible lists to be created. Also implemented a complimentary ``listStyle`` | ||
407 | 53 | directive. | ||
408 | 54 | |||
409 | 55 | - Implemented the following doc-programming directives: | ||
410 | 56 | |||
411 | 57 | * docAssert | ||
412 | 58 | * docAssign | ||
413 | 59 | * docElse | ||
414 | 60 | * docIf | ||
415 | 61 | * docExec | ||
416 | 62 | * docPara | ||
417 | 63 | * docWhile | ||
418 | 64 | |||
419 | 65 | - Added ``encName`` attribute to ``registerCidFont`` directive. | ||
420 | 66 | |||
421 | 67 | - Renamed ``bookmark`` to ``bookmarkPage``. | ||
422 | 68 | |||
423 | 69 | - Created a new canvas directive called ``bookmark``. | ||
424 | 70 | |||
425 | 71 | - Added ``img`` directive, which is a simple image flowable. | ||
426 | 72 | |||
427 | 73 | - Implemented crop marks support fully. | ||
428 | 74 | |||
429 | 75 | - Added ``pageLayout`` and ``pageMode`` to ``docInit`` directive. | ||
430 | 76 | |||
431 | 77 | - Implemented all logging related directives. | ||
432 | 78 | |||
433 | 79 | - Implemented ``color`` directive inside the ``initialize`` directive. | ||
434 | 80 | |||
435 | 81 | - Renamed ``pdfInclude`` to documented ``includePdfPages`` and added `pages` | ||
436 | 82 | attribute, so that you can only include specific pages. | ||
437 | 83 | |||
438 | 84 | - Don't show "doc" namespace in reference snippets. | ||
439 | 85 | |||
440 | 86 | - Create a list of RML2PDF and z3c.rml differences. | ||
441 | 87 | |||
442 | 88 | - Implemented the ``ABORT_ON_INVALID_DIRECTIVE`` flag, that when set ``True`` | ||
443 | 89 | will raise a ``ValueError`` error on the first occurence of a bad tag. | ||
444 | 90 | |||
445 | 91 | - Implemented ``setFontSize`` directive for page drawings. | ||
446 | 92 | |||
447 | 93 | - Implemented ``plugInGraphic`` which allows inserting graphics rendered in | ||
448 | 94 | Python. | ||
449 | 95 | |||
450 | 96 | - Added `href` and `destination` to table cells and rectangles. | ||
451 | 97 | |||
452 | 98 | - Bug: Due to a logic error, bad directives were never properly detected and | ||
453 | 99 | logged about. | ||
454 | 100 | |||
455 | 101 | - Bug: Overwriting the default paragraph styles did not work properly. | ||
456 | 102 | |||
457 | 103 | - Bug: Specifying a color in any tag inside the paragraph would fail, if the | ||
458 | 104 | color was a referenced name. | ||
459 | 105 | |||
460 | 106 | - Bug: Moved premature ``getName`` evaluation into runtime to properly handle | ||
461 | 107 | synamic content now. This is now properly done for any paragraph and | ||
462 | 108 | draw string variant. | ||
463 | 109 | |||
464 | 110 | - Bug: Fixed DTD generator to properly ignore Text Nodes as attributes. Also | ||
465 | 111 | text nodes were not properly documented as element PCDATA. | ||
466 | 112 | |||
467 | 113 | |||
468 | 114 | 1.1.0 (2012-12-18) | ||
469 | 115 | ------------------ | ||
470 | 116 | |||
471 | 117 | - Upgrade to ReportLab 2.6. This required some font changes and several | ||
472 | 118 | generated PDFs did not match, since some default fonts changed to sans-serif. | ||
473 | 119 | |||
474 | 120 | - Added ``pdfInclude`` directive from Alex Garel. (LP #969399). | ||
475 | 121 | |||
476 | 122 | - Switched to Pillow (from PIL). | ||
477 | 123 | |||
478 | 124 | - Switched RML highlighting in RML Reference from SilverCity to Pygments. | ||
479 | 125 | |||
480 | 126 | - Bug: Addressed a bug in ReportLab 2.6 that disallowed 3-D pie charts from | ||
481 | 127 | rendering. | ||
482 | 128 | |||
483 | 129 | - Bug: Properly reset pdfform before rendering a document. | ||
484 | 130 | |||
485 | 131 | - Bug: Reset fonts properly before a rendering. | ||
486 | 132 | |||
487 | 133 | |||
488 | 25 | 1.0.0 (2012-04-02) | 134 | 1.0.0 (2012-04-02) |
489 | 26 | ------------------ | 135 | ------------------ |
490 | 27 | 136 | ||
491 | @@ -36,6 +145,7 @@ | |||
492 | 36 | is updated, the border supports a border radius and the tag-para.rml sample | 145 | is updated, the border supports a border radius and the tag-para.rml sample |
493 | 37 | has been updated. | 146 | has been updated. |
494 | 38 | 147 | ||
495 | 148 | |||
496 | 39 | 0.9.0 (2010-07-22) | 149 | 0.9.0 (2010-07-22) |
497 | 40 | ------------------ | 150 | ------------------ |
498 | 41 | 151 | ||
499 | 42 | 152 | ||
500 | === modified file 'src/z3c.rml.egg-info/SOURCES.txt' | |||
501 | --- src/z3c.rml.egg-info/SOURCES.txt 2012-04-02 15:47:51 +0000 | |||
502 | +++ src/z3c.rml.egg-info/SOURCES.txt 2013-01-09 02:49:23 +0000 | |||
503 | @@ -16,37 +16,42 @@ | |||
504 | 16 | src/z3c.rml.egg-info/not-zip-safe | 16 | src/z3c.rml.egg-info/not-zip-safe |
505 | 17 | src/z3c.rml.egg-info/requires.txt | 17 | src/z3c.rml.egg-info/requires.txt |
506 | 18 | src/z3c.rml.egg-info/top_level.txt | 18 | src/z3c.rml.egg-info/top_level.txt |
507 | 19 | src/z3c/rml/DEPENDENCIES.cfg | ||
508 | 20 | src/z3c/rml/README.txt | 19 | src/z3c/rml/README.txt |
509 | 21 | src/z3c/rml/__init__.py | 20 | src/z3c/rml/__init__.py |
510 | 22 | src/z3c/rml/attr.py | 21 | src/z3c/rml/attr.py |
511 | 23 | src/z3c/rml/canvas.py | 22 | src/z3c/rml/canvas.py |
512 | 24 | src/z3c/rml/chart.py | 23 | src/z3c/rml/chart.py |
513 | 25 | src/z3c/rml/directive.py | 24 | src/z3c/rml/directive.py |
514 | 25 | src/z3c/rml/doclogic.py | ||
515 | 26 | src/z3c/rml/document.py | 26 | src/z3c/rml/document.py |
516 | 27 | src/z3c/rml/dtd.py | 27 | src/z3c/rml/dtd.py |
517 | 28 | src/z3c/rml/error.py | 28 | src/z3c/rml/error.py |
518 | 29 | src/z3c/rml/flowable.py | 29 | src/z3c/rml/flowable.py |
519 | 30 | src/z3c/rml/form.py | 30 | src/z3c/rml/form.py |
520 | 31 | src/z3c/rml/interfaces.py | 31 | src/z3c/rml/interfaces.py |
521 | 32 | src/z3c/rml/list.py | ||
522 | 32 | src/z3c/rml/occurence.py | 33 | src/z3c/rml/occurence.py |
523 | 33 | src/z3c/rml/page.py | 34 | src/z3c/rml/page.py |
524 | 34 | src/z3c/rml/pagetemplate.py | 35 | src/z3c/rml/pagetemplate.py |
525 | 35 | src/z3c/rml/pagetemplate.txt | 36 | src/z3c/rml/pagetemplate.txt |
526 | 36 | src/z3c/rml/paraparser.py | 37 | src/z3c/rml/paraparser.py |
527 | 38 | src/z3c/rml/pdfinclude.py | ||
528 | 37 | src/z3c/rml/platypus.py | 39 | src/z3c/rml/platypus.py |
529 | 38 | src/z3c/rml/reference.pt | 40 | src/z3c/rml/reference.pt |
530 | 39 | src/z3c/rml/reference.py | 41 | src/z3c/rml/reference.py |
531 | 42 | src/z3c/rml/rlfix.py | ||
532 | 40 | src/z3c/rml/rml-reference.pdf | 43 | src/z3c/rml/rml-reference.pdf |
533 | 41 | src/z3c/rml/rml.dtd | 44 | src/z3c/rml/rml.dtd |
534 | 42 | src/z3c/rml/rml2pdf.py | 45 | src/z3c/rml/rml2pdf.py |
535 | 43 | src/z3c/rml/rml2pdfscript.py | 46 | src/z3c/rml/rml2pdfscript.py |
536 | 44 | src/z3c/rml/special.py | 47 | src/z3c/rml/special.py |
537 | 48 | src/z3c/rml/storyplace.py | ||
538 | 45 | src/z3c/rml/stylesheet.py | 49 | src/z3c/rml/stylesheet.py |
539 | 46 | src/z3c/rml/template.py | 50 | src/z3c/rml/template.py |
540 | 47 | src/z3c/rml/tests/__init__.py | 51 | src/z3c/rml/tests/__init__.py |
541 | 48 | src/z3c/rml/tests/flowable.py | 52 | src/z3c/rml/tests/flowable.py |
542 | 49 | src/z3c/rml/tests/module.py | 53 | src/z3c/rml/tests/module.py |
543 | 54 | src/z3c/rml/tests/test_directive.py | ||
544 | 50 | src/z3c/rml/tests/test_pagetemplate.py | 55 | src/z3c/rml/tests/test_pagetemplate.py |
545 | 51 | src/z3c/rml/tests/test_rml.py | 56 | src/z3c/rml/tests/test_rml.py |
546 | 52 | src/z3c/rml/tests/test_subprocess.py | 57 | src/z3c/rml/tests/test_subprocess.py |
547 | 53 | 58 | ||
548 | === modified file 'src/z3c.rml.egg-info/requires.txt' | |||
549 | --- src/z3c.rml.egg-info/requires.txt 2012-04-02 19:19:22 +0000 | |||
550 | +++ src/z3c.rml.egg-info/requires.txt 2013-01-09 02:49:23 +0000 | |||
551 | @@ -1,3 +1,4 @@ | |||
552 | 1 | Pygments | ||
553 | 1 | lxml | 2 | lxml |
554 | 2 | pyPdf | 3 | pyPdf |
555 | 3 | reportlab | 4 | reportlab |
556 | @@ -7,8 +8,7 @@ | |||
557 | 7 | 8 | ||
558 | 8 | [test] | 9 | [test] |
559 | 9 | zope.pagetemplate | 10 | zope.pagetemplate |
562 | 10 | zope.testing | 11 | Pillow |
561 | 11 | PIL | ||
563 | 12 | 12 | ||
564 | 13 | [pagetemplate] | 13 | [pagetemplate] |
565 | 14 | zope.pagetemplate | 14 | zope.pagetemplate |
566 | 15 | \ No newline at end of file | 15 | \ No newline at end of file |
567 | 16 | 16 | ||
568 | === removed file 'src/z3c/rml/DEPENDENCIES.cfg' | |||
569 | --- src/z3c/rml/DEPENDENCIES.cfg 2011-01-05 22:34:45 +0000 | |||
570 | +++ src/z3c/rml/DEPENDENCIES.cfg 1970-01-01 00:00:00 +0000 | |||
571 | @@ -1,5 +0,0 @@ | |||
572 | 1 | zope.interface | ||
573 | 2 | zope.pagetemplate | ||
574 | 3 | zope.testing | ||
575 | 4 | reportlab | ||
576 | 5 | reportlab.graphics.barcode | ||
577 | 6 | 0 | ||
578 | === modified file 'src/z3c/rml/README.txt' | |||
579 | --- src/z3c/rml/README.txt 2011-01-05 22:34:45 +0000 | |||
580 | +++ src/z3c/rml/README.txt 2013-01-09 02:49:23 +0000 | |||
581 | @@ -2,10 +2,10 @@ | |||
582 | 2 | Reportlab Markup Language | 2 | Reportlab Markup Language |
583 | 3 | ========================= | 3 | ========================= |
584 | 4 | 4 | ||
586 | 5 | This pacakge is a free implementation of the RML markup language developed by | 5 | This package is a free implementation of the RML markup language developed by |
587 | 6 | Reportlab. Unfortunately, full compliance cannot be immediately verified, | 6 | Reportlab. Unfortunately, full compliance cannot be immediately verified, |
588 | 7 | since the RML User Guide is ambiguous, incomplete and even incorrect. This | 7 | since the RML User Guide is ambiguous, incomplete and even incorrect. This |
590 | 8 | pacakge can also not support the commercial extensions to Reportlab. | 8 | package can also not support the commercial extensions to Reportlab. |
591 | 9 | 9 | ||
592 | 10 | In the course of implementing the specification, I made already some | 10 | In the course of implementing the specification, I made already some |
593 | 11 | improvements for various tags and added others fully. I also tried hard to | 11 | improvements for various tags and added others fully. I also tried hard to |
594 | 12 | 12 | ||
595 | === modified file 'src/z3c/rml/__init__.py' | |||
596 | --- src/z3c/rml/__init__.py 2011-01-05 22:34:45 +0000 | |||
597 | +++ src/z3c/rml/__init__.py 2013-01-09 02:49:23 +0000 | |||
598 | @@ -1,3 +1,4 @@ | |||
599 | 1 | 1 | ||
600 | 2 | # Hook up our custom paragraph parser. | 2 | # Hook up our custom paragraph parser. |
601 | 3 | import z3c.rml.paraparser | 3 | import z3c.rml.paraparser |
602 | 4 | import z3c.rml.rlfix | ||
603 | 4 | 5 | ||
604 | === modified file 'src/z3c/rml/attr.py' | |||
605 | --- src/z3c/rml/attr.py 2012-04-02 15:47:51 +0000 | |||
606 | +++ src/z3c/rml/attr.py 2013-01-09 02:49:23 +0000 | |||
607 | @@ -13,7 +13,7 @@ | |||
608 | 13 | ############################################################################## | 13 | ############################################################################## |
609 | 14 | """RML Attribute Implementation | 14 | """RML Attribute Implementation |
610 | 15 | 15 | ||
612 | 16 | $Id: attr.py 121449 2011-04-19 16:00:38Z menesis $ | 16 | $Id: attr.py 128842 2012-12-21 05:38:51Z srichter $ |
613 | 17 | """ | 17 | """ |
614 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
615 | 19 | import cStringIO | 19 | import cStringIO |
616 | @@ -37,12 +37,12 @@ | |||
617 | 37 | logger = logging.getLogger("z3c.rml") | 37 | logger = logging.getLogger("z3c.rml") |
618 | 38 | 38 | ||
619 | 39 | 39 | ||
622 | 40 | def getFileInfo(attr): | 40 | def getFileInfo(directive): |
623 | 41 | root = attr.context | 41 | root = directive |
624 | 42 | while root.parent: | 42 | while root.parent: |
625 | 43 | root = root.parent | 43 | root = root.parent |
626 | 44 | return '(file %s, line %i)' % ( | 44 | return '(file %s, line %i)' % ( |
628 | 45 | root.filename, attr.context.element.sourceline) | 45 | root.filename, directive.element.sourceline) |
629 | 46 | 46 | ||
630 | 47 | 47 | ||
631 | 48 | def getManager(context, interface=None): | 48 | def getManager(context, interface=None): |
632 | @@ -87,7 +87,7 @@ | |||
633 | 87 | name = self.deprecatedName | 87 | name = self.deprecatedName |
634 | 88 | logger.warn( | 88 | logger.warn( |
635 | 89 | u'Deprecated attribute "%s": %s %s' % ( | 89 | u'Deprecated attribute "%s": %s %s' % ( |
637 | 90 | name, self.deprecatedReason, getFileInfo(self))) | 90 | name, self.deprecatedReason, getFileInfo(self.context))) |
638 | 91 | else: | 91 | else: |
639 | 92 | name = self.__name__ | 92 | name = self.__name__ |
640 | 93 | # Extract the value. | 93 | # Extract the value. |
641 | @@ -102,14 +102,16 @@ | |||
642 | 102 | 102 | ||
643 | 103 | class BaseChoice(RMLAttribute): | 103 | class BaseChoice(RMLAttribute): |
644 | 104 | choices = {} | 104 | choices = {} |
645 | 105 | doLower = True | ||
646 | 105 | 106 | ||
647 | 106 | def fromUnicode(self, value): | 107 | def fromUnicode(self, value): |
649 | 107 | value = value.lower() | 108 | if self.doLower: |
650 | 109 | value = value.lower() | ||
651 | 108 | if value in self.choices: | 110 | if value in self.choices: |
652 | 109 | return self.choices[value] | 111 | return self.choices[value] |
653 | 110 | raise ValueError( | 112 | raise ValueError( |
654 | 111 | '%r not a valid value for attribute "%s". %s' % ( | 113 | '%r not a valid value for attribute "%s". %s' % ( |
656 | 112 | value, self.__name__, getFileInfo(self))) | 114 | value, self.__name__, getFileInfo(self.context))) |
657 | 113 | 115 | ||
658 | 114 | 116 | ||
659 | 115 | class Combination(RMLAttribute): | 117 | class Combination(RMLAttribute): |
660 | @@ -127,7 +129,8 @@ | |||
661 | 127 | except ValueError: | 129 | except ValueError: |
662 | 128 | pass | 130 | pass |
663 | 129 | raise ValueError( | 131 | raise ValueError( |
665 | 130 | '"%s" is not a valid value. %s' %(value, getFileInfo(self))) | 132 | '"%s" is not a valid value. %s' %( |
666 | 133 | value, getFileInfo(self.context))) | ||
667 | 131 | 134 | ||
668 | 132 | 135 | ||
669 | 133 | class String(RMLAttribute, zope.schema.Bytes): | 136 | class String(RMLAttribute, zope.schema.Bytes): |
670 | @@ -185,18 +188,46 @@ | |||
671 | 185 | (self.max_length is not None and len(result) > self.max_length)): | 188 | (self.max_length is not None and len(result) > self.max_length)): |
672 | 186 | raise ValueError( | 189 | raise ValueError( |
673 | 187 | 'Length of sequence must be at least %s and at most %i. %s' % ( | 190 | 'Length of sequence must be at least %s and at most %i. %s' % ( |
675 | 188 | self.min_length, self.max_length, getFileInfo(self))) | 191 | self.min_length, self.max_length, |
676 | 192 | getFileInfo(self.context))) | ||
677 | 189 | return result | 193 | return result |
678 | 190 | 194 | ||
679 | 191 | 195 | ||
680 | 196 | class IntegerSequence(Sequence): | ||
681 | 197 | """A sequence of integers.""" | ||
682 | 198 | |||
683 | 199 | def fromUnicode(self, ustr): | ||
684 | 200 | ustr = ustr.strip() | ||
685 | 201 | pieces = self.splitre.split(ustr) | ||
686 | 202 | numbers = set([]) | ||
687 | 203 | for piece in pieces: | ||
688 | 204 | # Ignore empty pieces. | ||
689 | 205 | if not piece: | ||
690 | 206 | continue | ||
691 | 207 | # The piece is a range. | ||
692 | 208 | if '-' in piece: | ||
693 | 209 | start, end = piece.split('-') | ||
694 | 210 | # Make range lower and upper bound inclusive. | ||
695 | 211 | numbers.update(range(int(start), int(end)+1)) | ||
696 | 212 | continue | ||
697 | 213 | # The piece is just a number | ||
698 | 214 | numbers.add(int(piece)) | ||
699 | 215 | return list(numbers) | ||
700 | 216 | |||
701 | 192 | class Choice(BaseChoice): | 217 | class Choice(BaseChoice): |
702 | 193 | """A choice of several values. The values are always case-insensitive.""" | 218 | """A choice of several values. The values are always case-insensitive.""" |
703 | 194 | 219 | ||
705 | 195 | def __init__(self, choices=None, *args, **kw): | 220 | def __init__(self, choices=None, doLower=True, *args, **kw): |
706 | 196 | super(Choice, self).__init__(*args, **kw) | 221 | super(Choice, self).__init__(*args, **kw) |
707 | 197 | if isinstance(choices, (tuple, list)): | 222 | if isinstance(choices, (tuple, list)): |
709 | 198 | choices = dict([(val.lower(), val) for val in choices]) | 223 | choices = dict( |
710 | 224 | [(val.lower() if doLower else val, val) for val in choices]) | ||
711 | 225 | else: | ||
712 | 226 | choices = dict( | ||
713 | 227 | [(key.lower() if doLower else key, val) | ||
714 | 228 | for key, val in choices.items()]) | ||
715 | 199 | self.choices = choices | 229 | self.choices = choices |
716 | 230 | self.doLower = doLower | ||
717 | 200 | 231 | ||
718 | 201 | 232 | ||
719 | 202 | class Boolean(BaseChoice): | 233 | class Boolean(BaseChoice): |
720 | @@ -220,7 +251,7 @@ | |||
721 | 220 | class Measurement(RMLAttribute): | 251 | class Measurement(RMLAttribute): |
722 | 221 | '''This field represents a length value. | 252 | '''This field represents a length value. |
723 | 222 | 253 | ||
725 | 223 | The units "in" (inch), "cm", and "mm" are allowed. If no units are | 254 | The units "in" (inch), "cm", "mm", and "pt" are allowed. If no units are |
726 | 224 | specified, the value is given in points/pixels. | 255 | specified, the value is given in points/pixels. |
727 | 225 | ''' | 256 | ''' |
728 | 226 | def __init__(self, allowPercentage=False, allowStar=False, *args, **kw): | 257 | def __init__(self, allowPercentage=False, allowStar=False, *args, **kw): |
729 | @@ -232,6 +263,7 @@ | |||
730 | 232 | (re.compile('^(-?[0-9\.]+)\s*in$'), reportlab.lib.units.inch), | 263 | (re.compile('^(-?[0-9\.]+)\s*in$'), reportlab.lib.units.inch), |
731 | 233 | (re.compile('^(-?[0-9\.]+)\s*cm$'), reportlab.lib.units.cm), | 264 | (re.compile('^(-?[0-9\.]+)\s*cm$'), reportlab.lib.units.cm), |
732 | 234 | (re.compile('^(-?[0-9\.]+)\s*mm$'), reportlab.lib.units.mm), | 265 | (re.compile('^(-?[0-9\.]+)\s*mm$'), reportlab.lib.units.mm), |
733 | 266 | (re.compile('^(-?[0-9\.]+)\s*pt$'), 1), | ||
734 | 235 | (re.compile('^(-?[0-9\.]+)\s*$'), 1) | 267 | (re.compile('^(-?[0-9\.]+)\s*$'), 1) |
735 | 236 | ] | 268 | ] |
736 | 237 | 269 | ||
737 | @@ -251,7 +283,7 @@ | |||
738 | 251 | return unit[1]*float(res.group(1)) | 283 | return unit[1]*float(res.group(1)) |
739 | 252 | raise ValueError( | 284 | raise ValueError( |
740 | 253 | 'The value %r is not a valid measurement. %s' % ( | 285 | 'The value %r is not a valid measurement. %s' % ( |
742 | 254 | value, getFileInfo(self))) | 286 | value, getFileInfo(self.context))) |
743 | 255 | 287 | ||
744 | 256 | 288 | ||
745 | 257 | class File(Text): | 289 | class File(Text): |
746 | @@ -277,7 +309,7 @@ | |||
747 | 277 | if result is None: | 309 | if result is None: |
748 | 278 | raise ValueError( | 310 | raise ValueError( |
749 | 279 | 'The package-path-pair you specified was incorrect. %s' %( | 311 | 'The package-path-pair you specified was incorrect. %s' %( |
751 | 280 | getFileInfo(self))) | 312 | getFileInfo(self.context))) |
752 | 281 | modulepath, path = result.groups() | 313 | modulepath, path = result.groups() |
753 | 282 | module = __import__(modulepath, {}, {}, (modulepath)) | 314 | module = __import__(modulepath, {}, {}, (modulepath)) |
754 | 283 | value = os.path.join(os.path.dirname(module.__file__), path) | 315 | value = os.path.join(os.path.dirname(module.__file__), path) |
755 | @@ -325,9 +357,13 @@ | |||
756 | 325 | self.acceptNone = acceptNone | 357 | self.acceptNone = acceptNone |
757 | 326 | 358 | ||
758 | 327 | def fromUnicode(self, value): | 359 | def fromUnicode(self, value): |
760 | 328 | if self.acceptNone and value == 'None': | 360 | if self.acceptNone and value.lower() == 'none': |
761 | 329 | return None | 361 | return None |
762 | 330 | manager = getManager(self.context) | 362 | manager = getManager(self.context) |
763 | 363 | |||
764 | 364 | if value.startswith('rml:'): | ||
765 | 365 | value = manager.names[value[4:]] | ||
766 | 366 | |||
767 | 331 | if value in manager.colors: | 367 | if value in manager.colors: |
768 | 332 | return manager.colors[value] | 368 | return manager.colors[value] |
769 | 333 | try: | 369 | try: |
770 | @@ -336,7 +372,20 @@ | |||
771 | 336 | except: | 372 | except: |
772 | 337 | raise ValueError( | 373 | raise ValueError( |
773 | 338 | 'The color specification "%s" is not valid. %s' % ( | 374 | 'The color specification "%s" is not valid. %s' % ( |
775 | 339 | value, getFileInfo(self))) | 375 | value, getFileInfo(self.context))) |
776 | 376 | |||
777 | 377 | def _getStyle(context, value): | ||
778 | 378 | manager = getManager(context) | ||
779 | 379 | for styles in (manager.styles, | ||
780 | 380 | reportlab.lib.styles.getSampleStyleSheet().byName): | ||
781 | 381 | if value in styles: | ||
782 | 382 | return styles[value] | ||
783 | 383 | elif 'style.' + value in styles: | ||
784 | 384 | return styles['style.' + value] | ||
785 | 385 | elif value.startswith('style.') and value[6:] in styles: | ||
786 | 386 | return styles[value[6:]] | ||
787 | 387 | raise ValueError('Style %r could not be found. %s' % ( | ||
788 | 388 | value, getFileInfo(context))) | ||
789 | 340 | 389 | ||
790 | 341 | class Style(String): | 390 | class Style(String): |
791 | 342 | """Requires a valid style to be entered. | 391 | """Requires a valid style to be entered. |
792 | @@ -347,17 +396,23 @@ | |||
793 | 347 | default = reportlab.lib.styles.getSampleStyleSheet().byName['Normal'] | 396 | default = reportlab.lib.styles.getSampleStyleSheet().byName['Normal'] |
794 | 348 | 397 | ||
795 | 349 | def fromUnicode(self, value): | 398 | def fromUnicode(self, value): |
807 | 350 | manager = getManager(self.context) | 399 | return _getStyle(self.context, value) |
808 | 351 | for styles in (manager.styles, | 400 | |
809 | 352 | reportlab.lib.styles.getSampleStyleSheet().byName): | 401 | |
810 | 353 | if value in styles: | 402 | class Padding(Sequence): |
811 | 354 | return styles[value] | 403 | """This attribute is specific for padding and will produce the proper |
812 | 355 | elif 'style.' + value in styles: | 404 | length of the padding sequence.""" |
813 | 356 | return styles['style.' + value] | 405 | |
814 | 357 | elif value.startswith('style.') and value[6:] in styles: | 406 | def __init__(self, *args, **kw): |
815 | 358 | return styles[value[6:]] | 407 | kw.update(dict(value_type=Integer(), min_length=1, max_length=4)) |
816 | 359 | raise ValueError('Style %r could not be found. %s' % ( | 408 | super(Padding, self).__init__(*args, **kw) |
817 | 360 | value, getFileInfo(self))) | 409 | |
818 | 410 | def fromUnicode(self, value): | ||
819 | 411 | seq = super(Padding, self).fromUnicode(value) | ||
820 | 412 | # pdfgen does not like a single paddign value. | ||
821 | 413 | if len(seq) == 1: | ||
822 | 414 | seq.append(seq[0]) | ||
823 | 415 | return seq | ||
824 | 361 | 416 | ||
825 | 362 | 417 | ||
826 | 363 | class Symbol(Text): | 418 | class Symbol(Text): |
827 | @@ -420,7 +475,7 @@ | |||
828 | 420 | return text.strip() | 475 | return text.strip() |
829 | 421 | 476 | ||
830 | 422 | 477 | ||
832 | 423 | class TextNodeSequence(Sequence): | 478 | class TextNodeSequence(Sequence, TextNode): |
833 | 424 | """A sequence of values retrieved from the element's content.""" | 479 | """A sequence of values retrieved from the element's content.""" |
834 | 425 | 480 | ||
835 | 426 | def get(self): | 481 | def get(self): |
836 | @@ -443,7 +498,7 @@ | |||
837 | 443 | if len(result) % self.columns != 0: | 498 | if len(result) % self.columns != 0: |
838 | 444 | raise ValueError( | 499 | raise ValueError( |
839 | 445 | 'Number of elements must be divisible by %i. %s' %( | 500 | 'Number of elements must be divisible by %i. %s' %( |
841 | 446 | self.columns, getFileInfo(self))) | 501 | self.columns, getFileInfo(self.context))) |
842 | 447 | return [result[i*self.columns:(i+1)*self.columns] | 502 | return [result[i*self.columns:(i+1)*self.columns] |
843 | 448 | for i in range(len(result)/self.columns)] | 503 | for i in range(len(result)/self.columns)] |
844 | 449 | 504 | ||
845 | @@ -456,28 +511,17 @@ | |||
846 | 456 | 511 | ||
847 | 457 | def __init__(self, *args, **kw): | 512 | def __init__(self, *args, **kw): |
848 | 458 | super(RawXMLContent, self).__init__(*args, **kw) | 513 | super(RawXMLContent, self).__init__(*args, **kw) |
849 | 459 | # Do it in here, since we have a recursive problem otherwise | ||
850 | 460 | from z3c.rml import special | ||
851 | 461 | self.handleElements = {'getName': special.GetName} | ||
852 | 462 | 514 | ||
853 | 463 | def get(self): | 515 | def get(self): |
854 | 464 | # Replace what we can replace | ||
855 | 465 | for subElement in self.context.element.iterdescendants(): | ||
856 | 466 | if subElement.tag in self.handleElements: | ||
857 | 467 | substitute = self.handleElements[subElement.tag]( | ||
858 | 468 | subElement, self.context) | ||
859 | 469 | substitute.process() | ||
860 | 470 | # Now create the text | ||
861 | 471 | # ReportLab's paragraph parser does not like attributes from other | 516 | # ReportLab's paragraph parser does not like attributes from other |
862 | 472 | # namespaces; sigh. So we have to improvize. | 517 | # namespaces; sigh. So we have to improvize. |
863 | 473 | text = etree.tounicode(self.context.element) | 518 | text = etree.tounicode(self.context.element) |
864 | 474 | text = text[text.find('>')+1:text.rfind('<')] | 519 | text = text[text.find('>')+1:text.rfind('<')] |
865 | 475 | return text | 520 | return text |
866 | 476 | 521 | ||
867 | 477 | |||
868 | 478 | class XMLContent(RawXMLContent): | 522 | class XMLContent(RawXMLContent): |
869 | 479 | """Same as 'RawXMLContent', except that the whitespace is normalized.""" | 523 | """Same as 'RawXMLContent', except that the whitespace is normalized.""" |
870 | 480 | 524 | ||
871 | 481 | def get(self): | 525 | def get(self): |
874 | 482 | result = super(XMLContent, self).get() | 526 | text = super(XMLContent, self).get() |
875 | 483 | return result.strip().replace('\t', ' ') | 527 | return text.strip().replace('\t', ' ') |
876 | 484 | 528 | ||
877 | === modified file 'src/z3c/rml/canvas.py' | |||
878 | --- src/z3c/rml/canvas.py 2011-01-05 22:34:45 +0000 | |||
879 | +++ src/z3c/rml/canvas.py 2013-01-09 02:49:23 +0000 | |||
880 | @@ -13,7 +13,7 @@ | |||
881 | 13 | ############################################################################## | 13 | ############################################################################## |
882 | 14 | """Page Drawing Related Element Processing | 14 | """Page Drawing Related Element Processing |
883 | 15 | 15 | ||
885 | 16 | $Id: canvas.py 114908 2010-07-22 02:23:18Z srichter $ | 16 | $Id: canvas.py 128843 2012-12-21 06:58:39Z srichter $ |
886 | 17 | """ | 17 | """ |
887 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
888 | 19 | import zope.interface | 19 | import zope.interface |
889 | @@ -59,6 +59,22 @@ | |||
890 | 59 | getattr(canvas, self.callable)(**kwargs) | 59 | getattr(canvas, self.callable)(**kwargs) |
891 | 60 | 60 | ||
892 | 61 | 61 | ||
893 | 62 | class ISaveState(interfaces.IRMLDirectiveSignature): | ||
894 | 63 | """Saves the current canvas state.""" | ||
895 | 64 | |||
896 | 65 | class SaveState(CanvasRMLDirective): | ||
897 | 66 | signature = ISaveState | ||
898 | 67 | callable = 'saveState' | ||
899 | 68 | |||
900 | 69 | |||
901 | 70 | class IRestoreState(interfaces.IRMLDirectiveSignature): | ||
902 | 71 | """Saves the current canvas state.""" | ||
903 | 72 | |||
904 | 73 | class RestoreState(CanvasRMLDirective): | ||
905 | 74 | signature = IRestoreState | ||
906 | 75 | callable = 'restoreState' | ||
907 | 76 | |||
908 | 77 | |||
909 | 62 | class IDrawString(interfaces.IRMLDirectiveSignature): | 78 | class IDrawString(interfaces.IRMLDirectiveSignature): |
910 | 63 | """Draws a simple string (left aligned) onto the canvas at the specified | 79 | """Draws a simple string (left aligned) onto the canvas at the specified |
911 | 64 | location.""" | 80 | location.""" |
912 | @@ -75,7 +91,7 @@ | |||
913 | 75 | u'string.'), | 91 | u'string.'), |
914 | 76 | required=True) | 92 | required=True) |
915 | 77 | 93 | ||
917 | 78 | text = attr.TextNode( | 94 | text = attr.RawXMLContent( |
918 | 79 | title=u'Text', | 95 | title=u'Text', |
919 | 80 | description=(u'The string/text that is put onto the canvas.'), | 96 | description=(u'The string/text that is put onto the canvas.'), |
920 | 81 | required=True) | 97 | required=True) |
921 | @@ -84,6 +100,31 @@ | |||
922 | 84 | signature = IDrawString | 100 | signature = IDrawString |
923 | 85 | callable = 'drawString' | 101 | callable = 'drawString' |
924 | 86 | 102 | ||
925 | 103 | def getPageNumber(self, elem, canvas): | ||
926 | 104 | return str(canvas.getPageNumber() + int(elem.get('countingFrom', 1)) - 1) | ||
927 | 105 | |||
928 | 106 | def getName(self, elem, canvas): | ||
929 | 107 | return attr.getManager(self).names[elem.get('id')] | ||
930 | 108 | |||
931 | 109 | handleElements = {'pageNumber': getPageNumber, | ||
932 | 110 | 'getName': getName} | ||
933 | 111 | |||
934 | 112 | def _getText(self, node, canvas): | ||
935 | 113 | text = node.text or u'' | ||
936 | 114 | for sub in node.iterdescendants(): | ||
937 | 115 | if sub.tag in self.handleElements: | ||
938 | 116 | text += self.handleElements[sub.tag](self, sub, canvas) | ||
939 | 117 | else: | ||
940 | 118 | self._getText(sub, canvas) | ||
941 | 119 | text += node.tail or u'' | ||
942 | 120 | return text | ||
943 | 121 | |||
944 | 122 | def process(self): | ||
945 | 123 | canvas = attr.getManager(self, interfaces.ICanvasManager).canvas | ||
946 | 124 | kwargs = dict(self.getAttributeValues(attrMapping=self.attrMapping)) | ||
947 | 125 | kwargs['text'] = self._getText(self.element, canvas).strip() | ||
948 | 126 | getattr(canvas, self.callable)(**kwargs) | ||
949 | 127 | |||
950 | 87 | class IDrawRightString(IDrawString): | 128 | class IDrawRightString(IDrawString): |
951 | 88 | """Draws a simple string (right aligned) onto the canvas at the specified | 129 | """Draws a simple string (right aligned) onto the canvas at the specified |
952 | 89 | location.""" | 130 | location.""" |
953 | @@ -180,6 +221,17 @@ | |||
954 | 180 | description=u'The radius of the rounded corners.', | 221 | description=u'The radius of the rounded corners.', |
955 | 181 | required=False) | 222 | required=False) |
956 | 182 | 223 | ||
957 | 224 | href = attr.Text( | ||
958 | 225 | title=u'Link URL', | ||
959 | 226 | description=u'When specified, the rectangle becomes a link to that URL.', | ||
960 | 227 | required=False) | ||
961 | 228 | |||
962 | 229 | destination = attr.Text( | ||
963 | 230 | title=u'Link Destination', | ||
964 | 231 | description=(u'When specified, the rectangle becomes a link to that ' | ||
965 | 232 | u'destination.'), | ||
966 | 233 | required=False) | ||
967 | 234 | |||
968 | 183 | class Rectangle(CanvasRMLDirective): | 235 | class Rectangle(CanvasRMLDirective): |
969 | 184 | signature = IRectangle | 236 | signature = IRectangle |
970 | 185 | callable = 'rect' | 237 | callable = 'rect' |
971 | @@ -188,8 +240,24 @@ | |||
972 | 188 | def process(self): | 240 | def process(self): |
973 | 189 | if 'round' in self.element.keys(): | 241 | if 'round' in self.element.keys(): |
974 | 190 | self.callable = 'roundRect' | 242 | self.callable = 'roundRect' |
976 | 191 | super(Rectangle, self).process() | 243 | kwargs = dict(self.getAttributeValues(attrMapping=self.attrMapping)) |
977 | 244 | canvas = attr.getManager(self, interfaces.ICanvasManager).canvas | ||
978 | 245 | # Create a link | ||
979 | 246 | url = kwargs.pop('href', None) | ||
980 | 247 | if url: | ||
981 | 248 | canvas.linkURL( | ||
982 | 249 | url, | ||
983 | 250 | (kwargs['x'], kwargs['y'], | ||
984 | 251 | kwargs['x']+kwargs['width'], kwargs['y']+kwargs['height'])) | ||
985 | 252 | dest = kwargs.pop('destination', None) | ||
986 | 253 | if dest: | ||
987 | 254 | canvas.linkRect( | ||
988 | 255 | '', dest, | ||
989 | 256 | (kwargs['x'], kwargs['y'], | ||
990 | 257 | kwargs['x']+kwargs['width'], kwargs['y']+kwargs['height'])) | ||
991 | 192 | 258 | ||
992 | 259 | # Render the rectangle | ||
993 | 260 | getattr(canvas, self.callable)(**kwargs) | ||
994 | 193 | 261 | ||
995 | 194 | class IGrid(interfaces.IRMLDirectiveSignature): | 262 | class IGrid(interfaces.IRMLDirectiveSignature): |
996 | 195 | """A shape to be drawn on the canvas.""" | 263 | """A shape to be drawn on the canvas.""" |
997 | @@ -490,6 +558,13 @@ | |||
998 | 490 | default=False, | 558 | default=False, |
999 | 491 | required=False) | 559 | required=False) |
1000 | 492 | 560 | ||
1001 | 561 | clip = attr.Boolean( | ||
1002 | 562 | title=u'Clip Path', | ||
1003 | 563 | description=(u"A flag specifying whether the path should clip " | ||
1004 | 564 | u"overlapping elements."), | ||
1005 | 565 | default=False, | ||
1006 | 566 | required=False) | ||
1007 | 567 | |||
1008 | 493 | class Path(CanvasRMLDirective): | 568 | class Path(CanvasRMLDirective): |
1009 | 494 | signature = IPath | 569 | signature = IPath |
1010 | 495 | factories = { | 570 | factories = { |
1011 | @@ -527,7 +602,10 @@ | |||
1012 | 527 | if kwargs.pop('close', False): | 602 | if kwargs.pop('close', False): |
1013 | 528 | self.path.close() | 603 | self.path.close() |
1014 | 529 | 604 | ||
1016 | 530 | canvas.drawPath(self.path, **kwargs) | 605 | if kwargs.pop('clip', False): |
1017 | 606 | canvas.clipPath(self.path, **kwargs) | ||
1018 | 607 | else: | ||
1019 | 608 | canvas.drawPath(self.path, **kwargs) | ||
1020 | 531 | 609 | ||
1021 | 532 | 610 | ||
1022 | 533 | class IFill(interfaces.IRMLDirectiveSignature): | 611 | class IFill(interfaces.IRMLDirectiveSignature): |
1023 | @@ -582,18 +660,38 @@ | |||
1024 | 582 | attrMapping = {'name': 'psfontname'} | 660 | attrMapping = {'name': 'psfontname'} |
1025 | 583 | 661 | ||
1026 | 584 | 662 | ||
1027 | 663 | class ISetFontSize(interfaces.IRMLDirectiveSignature): | ||
1028 | 664 | """Set the font size.""" | ||
1029 | 665 | |||
1030 | 666 | size = attr.Measurement( | ||
1031 | 667 | title=u'Size', | ||
1032 | 668 | description=(u'The font size.'), | ||
1033 | 669 | required=True) | ||
1034 | 670 | |||
1035 | 671 | leading = attr.Measurement( | ||
1036 | 672 | title=u'Leading', | ||
1037 | 673 | description=(u'The font leading.'), | ||
1038 | 674 | required=False) | ||
1039 | 675 | |||
1040 | 676 | class SetFontSize(CanvasRMLDirective): | ||
1041 | 677 | signature = ISetFontSize | ||
1042 | 678 | callable = 'setFontSize' | ||
1043 | 679 | |||
1044 | 680 | |||
1045 | 585 | class IScale(interfaces.IRMLDirectiveSignature): | 681 | class IScale(interfaces.IRMLDirectiveSignature): |
1046 | 586 | """Scale the drawing using x and y scaling factors.""" | 682 | """Scale the drawing using x and y scaling factors.""" |
1047 | 587 | 683 | ||
1048 | 588 | sx = attr.Float( | 684 | sx = attr.Float( |
1049 | 589 | title=u'X-Scaling-Factor', | 685 | title=u'X-Scaling-Factor', |
1050 | 590 | description=(u'The scaling factor applied on x-coordinates.'), | 686 | description=(u'The scaling factor applied on x-coordinates.'), |
1052 | 591 | required=True) | 687 | default=1, |
1053 | 688 | required=False) | ||
1054 | 592 | 689 | ||
1055 | 593 | sy = attr.Float( | 690 | sy = attr.Float( |
1056 | 594 | title=u'Y-Scaling-Factor', | 691 | title=u'Y-Scaling-Factor', |
1057 | 595 | description=(u'The scaling factor applied on y-coordinates.'), | 692 | description=(u'The scaling factor applied on y-coordinates.'), |
1059 | 596 | required=True) | 693 | default=1, |
1060 | 694 | required=False) | ||
1061 | 597 | 695 | ||
1062 | 598 | class Scale(CanvasRMLDirective): | 696 | class Scale(CanvasRMLDirective): |
1063 | 599 | signature = IScale | 697 | signature = IScale |
1064 | @@ -720,10 +818,87 @@ | |||
1065 | 720 | canvas.setDash(kw['dash']) | 818 | canvas.setDash(kw['dash']) |
1066 | 721 | 819 | ||
1067 | 722 | 820 | ||
1068 | 821 | class IBookmark(interfaces.IRMLDirectiveSignature): | ||
1069 | 822 | """ | ||
1070 | 823 | This creates a bookmark to the current page which can be referred to with | ||
1071 | 824 | the given key elsewhere. (Used inside a page drawing.) | ||
1072 | 825 | """ | ||
1073 | 826 | |||
1074 | 827 | name = attr.Text( | ||
1075 | 828 | title=u'Name', | ||
1076 | 829 | description=u'The name of the bookmark.', | ||
1077 | 830 | required=True) | ||
1078 | 831 | |||
1079 | 832 | fit = attr.Choice( | ||
1080 | 833 | title=u'Fit', | ||
1081 | 834 | description=u'The Fit Type.', | ||
1082 | 835 | choices=('XYZ', 'Fit', 'FitH', 'FitV', 'FitR'), | ||
1083 | 836 | required=False) | ||
1084 | 837 | |||
1085 | 838 | zoom = attr.Float( | ||
1086 | 839 | title=u'Zoom', | ||
1087 | 840 | description=u'The zoom level when clicking on the bookmark.', | ||
1088 | 841 | required=False) | ||
1089 | 842 | |||
1090 | 843 | x = attr.Measurement( | ||
1091 | 844 | title=u'X-Position', | ||
1092 | 845 | description=u'The x-position.', | ||
1093 | 846 | required=False) | ||
1094 | 847 | |||
1095 | 848 | y = attr.Measurement( | ||
1096 | 849 | title=u'Y-Position', | ||
1097 | 850 | description=u'The y-position.', | ||
1098 | 851 | required=False) | ||
1099 | 852 | |||
1100 | 853 | class Bookmark(CanvasRMLDirective): | ||
1101 | 854 | signature = IBookmark | ||
1102 | 855 | |||
1103 | 856 | def process(self): | ||
1104 | 857 | args = dict(self.getAttributeValues()) | ||
1105 | 858 | canvas = attr.getManager(self, interfaces.ICanvasManager).canvas | ||
1106 | 859 | args['left'], args['top'] = canvas.absolutePosition(args['x'], args['y']) | ||
1107 | 860 | canvas.bookmarkPage(**args) | ||
1108 | 861 | |||
1109 | 862 | |||
1110 | 863 | class IPlugInGraphic(interfaces.IRMLDirectiveSignature): | ||
1111 | 864 | """Inserts a custom graphic developed in Python.""" | ||
1112 | 865 | |||
1113 | 866 | module = attr.String( | ||
1114 | 867 | title=u'Module', | ||
1115 | 868 | description=u'The Python module in which the flowable is located.', | ||
1116 | 869 | required=True) | ||
1117 | 870 | |||
1118 | 871 | function = attr.String( | ||
1119 | 872 | title=u'Function', | ||
1120 | 873 | description=(u'The name of the factory function within the module ' | ||
1121 | 874 | u'that returns the custom flowable.'), | ||
1122 | 875 | required=True) | ||
1123 | 876 | |||
1124 | 877 | params = attr.TextNode( | ||
1125 | 878 | title=u'Parameters', | ||
1126 | 879 | description=(u'A list of parameters encoded as a long string.'), | ||
1127 | 880 | required=False) | ||
1128 | 881 | |||
1129 | 882 | class PlugInGraphic(CanvasRMLDirective): | ||
1130 | 883 | signature = IPlugInGraphic | ||
1131 | 884 | |||
1132 | 885 | def process(self): | ||
1133 | 886 | modulePath, functionName, params = self.getAttributeValues( | ||
1134 | 887 | valuesOnly=True) | ||
1135 | 888 | module = __import__(modulePath, {}, {}, [modulePath]) | ||
1136 | 889 | function = getattr(module, functionName) | ||
1137 | 890 | canvas = attr.getManager(self, interfaces.ICanvasManager).canvas | ||
1138 | 891 | function(canvas, params) | ||
1139 | 892 | |||
1140 | 893 | |||
1141 | 723 | class IDrawing(interfaces.IRMLDirectiveSignature): | 894 | class IDrawing(interfaces.IRMLDirectiveSignature): |
1142 | 724 | """A container directive for all directives that draw directly on the | 895 | """A container directive for all directives that draw directly on the |
1143 | 725 | cnavas.""" | 896 | cnavas.""" |
1144 | 726 | occurence.containing( | 897 | occurence.containing( |
1145 | 898 | # State Manipulation | ||
1146 | 899 | occurence.ZeroOrMore('saveState', ISaveState), | ||
1147 | 900 | occurence.ZeroOrMore('restoreState', IRestoreState), | ||
1148 | 901 | # String Drawing | ||
1149 | 727 | occurence.ZeroOrMore('drawString', IDrawString), | 902 | occurence.ZeroOrMore('drawString', IDrawString), |
1150 | 728 | occurence.ZeroOrMore('drawRightString', IDrawRightString), | 903 | occurence.ZeroOrMore('drawRightString', IDrawRightString), |
1151 | 729 | occurence.ZeroOrMore('drawCenteredString', IDrawCenteredString), | 904 | occurence.ZeroOrMore('drawCenteredString', IDrawCenteredString), |
1152 | @@ -744,6 +919,7 @@ | |||
1153 | 744 | occurence.ZeroOrMore('fill', IFill), | 919 | occurence.ZeroOrMore('fill', IFill), |
1154 | 745 | occurence.ZeroOrMore('stroke', IStroke), | 920 | occurence.ZeroOrMore('stroke', IStroke), |
1155 | 746 | occurence.ZeroOrMore('setFont', ISetFont), | 921 | occurence.ZeroOrMore('setFont', ISetFont), |
1156 | 922 | occurence.ZeroOrMore('setFontSize', ISetFontSize), | ||
1157 | 747 | occurence.ZeroOrMore('scale', IScale), | 923 | occurence.ZeroOrMore('scale', IScale), |
1158 | 748 | occurence.ZeroOrMore('translate', ITranslate), | 924 | occurence.ZeroOrMore('translate', ITranslate), |
1159 | 749 | occurence.ZeroOrMore('rotate', IRotate), | 925 | occurence.ZeroOrMore('rotate', IRotate), |
1160 | @@ -763,12 +939,19 @@ | |||
1161 | 763 | occurence.ZeroOrMore('pieChart', chart.IPieChart), | 939 | occurence.ZeroOrMore('pieChart', chart.IPieChart), |
1162 | 764 | occurence.ZeroOrMore('pieChart3D', chart.IPieChart3D), | 940 | occurence.ZeroOrMore('pieChart3D', chart.IPieChart3D), |
1163 | 765 | occurence.ZeroOrMore('spiderChart', chart.ISpiderChart), | 941 | occurence.ZeroOrMore('spiderChart', chart.ISpiderChart), |
1164 | 942 | # Misc | ||
1165 | 943 | occurence.ZeroOrMore('bookmark', IBookmark), | ||
1166 | 944 | occurence.ZeroOrMore('plugInGraphic', IPlugInGraphic), | ||
1167 | 766 | ) | 945 | ) |
1168 | 767 | 946 | ||
1169 | 768 | class Drawing(directive.RMLDirective): | 947 | class Drawing(directive.RMLDirective): |
1170 | 769 | signature = IDrawing | 948 | signature = IDrawing |
1171 | 770 | 949 | ||
1172 | 771 | factories = { | 950 | factories = { |
1173 | 951 | # State Management | ||
1174 | 952 | 'saveState': SaveState, | ||
1175 | 953 | 'restoreState': RestoreState, | ||
1176 | 954 | # Drawing Strings | ||
1177 | 772 | 'drawString': DrawString, | 955 | 'drawString': DrawString, |
1178 | 773 | 'drawRightString': DrawRightString, | 956 | 'drawRightString': DrawRightString, |
1179 | 774 | 'drawCenteredString': DrawCenteredString, | 957 | 'drawCenteredString': DrawCenteredString, |
1180 | @@ -794,6 +977,7 @@ | |||
1181 | 794 | 'fill': Fill, | 977 | 'fill': Fill, |
1182 | 795 | 'stroke': Stroke, | 978 | 'stroke': Stroke, |
1183 | 796 | 'setFont': SetFont, | 979 | 'setFont': SetFont, |
1184 | 980 | 'setFontSize': SetFontSize, | ||
1185 | 797 | 'scale': Scale, | 981 | 'scale': Scale, |
1186 | 798 | 'translate': Translate, | 982 | 'translate': Translate, |
1187 | 799 | 'rotate': Rotate, | 983 | 'rotate': Rotate, |
1188 | @@ -807,7 +991,10 @@ | |||
1189 | 807 | 'linePlot3D': chart.LinePlot3D, | 991 | 'linePlot3D': chart.LinePlot3D, |
1190 | 808 | 'pieChart': chart.PieChart, | 992 | 'pieChart': chart.PieChart, |
1191 | 809 | 'pieChart3D': chart.PieChart3D, | 993 | 'pieChart3D': chart.PieChart3D, |
1193 | 810 | 'spiderChart': chart.SpiderChart | 994 | 'spiderChart': chart.SpiderChart, |
1194 | 995 | # Misc | ||
1195 | 996 | 'bookmark': Bookmark, | ||
1196 | 997 | 'plugInGraphic': PlugInGraphic, | ||
1197 | 811 | } | 998 | } |
1198 | 812 | 999 | ||
1199 | 813 | 1000 | ||
1200 | 814 | 1001 | ||
1201 | === modified file 'src/z3c/rml/chart.py' | |||
1202 | --- src/z3c/rml/chart.py 2011-01-05 22:34:45 +0000 | |||
1203 | +++ src/z3c/rml/chart.py 2013-01-09 02:49:23 +0000 | |||
1204 | @@ -13,7 +13,7 @@ | |||
1205 | 13 | ############################################################################## | 13 | ############################################################################## |
1206 | 14 | """Chart Element Processing | 14 | """Chart Element Processing |
1207 | 15 | 15 | ||
1209 | 16 | $Id: chart.py 114908 2010-07-22 02:23:18Z srichter $ | 16 | $Id: chart.py 128763 2012-12-18 21:44:52Z srichter $ |
1210 | 17 | """ | 17 | """ |
1211 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
1212 | 19 | import reportlab.lib.formatters | 19 | import reportlab.lib.formatters |
1213 | @@ -1621,7 +1621,6 @@ | |||
1214 | 1621 | 'slices': Slices3D, | 1621 | 'slices': Slices3D, |
1215 | 1622 | }) | 1622 | }) |
1216 | 1623 | 1623 | ||
1217 | 1624 | |||
1218 | 1625 | class ISpiderChart(IChart): | 1624 | class ISpiderChart(IChart): |
1219 | 1626 | """A spider chart.""" | 1625 | """A spider chart.""" |
1220 | 1627 | occurence.containing( | 1626 | occurence.containing( |
1221 | 1628 | 1627 | ||
1222 | === modified file 'src/z3c/rml/directive.py' | |||
1223 | --- src/z3c/rml/directive.py 2011-01-05 22:34:45 +0000 | |||
1224 | +++ src/z3c/rml/directive.py 2013-01-09 02:49:23 +0000 | |||
1225 | @@ -13,7 +13,7 @@ | |||
1226 | 13 | ############################################################################## | 13 | ############################################################################## |
1227 | 14 | """RML Directive Implementation | 14 | """RML Directive Implementation |
1228 | 15 | 15 | ||
1230 | 16 | $Id: directive.py 78750 2007-08-12 01:50:06Z rogerineichen $ | 16 | $Id: directive.py 128767 2012-12-19 02:00:30Z srichter $ |
1231 | 17 | """ | 17 | """ |
1232 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
1233 | 19 | import logging | 19 | import logging |
1234 | @@ -26,6 +26,7 @@ | |||
1235 | 26 | logging.raiseExceptions = False | 26 | logging.raiseExceptions = False |
1236 | 27 | logger = logging.getLogger("z3c.rml") | 27 | logger = logging.getLogger("z3c.rml") |
1237 | 28 | 28 | ||
1238 | 29 | ABORT_ON_INVALID_DIRECTIVE = False | ||
1239 | 29 | 30 | ||
1240 | 30 | def DeprecatedDirective(iface, reason): | 31 | def DeprecatedDirective(iface, reason): |
1241 | 31 | zope.interface.directlyProvides(iface, interfaces.IDeprecatedDirective) | 32 | zope.interface.directlyProvides(iface, interfaces.IDeprecatedDirective) |
1242 | @@ -92,18 +93,21 @@ | |||
1243 | 92 | # Ignore all comments | 93 | # Ignore all comments |
1244 | 93 | if isinstance(element, etree._Comment): | 94 | if isinstance(element, etree._Comment): |
1245 | 94 | continue | 95 | continue |
1246 | 96 | # Raise an error/log any unknown directive. | ||
1247 | 97 | if element.tag not in self.factories: | ||
1248 | 98 | msg = "Directive %r could not be processed and was " \ | ||
1249 | 99 | "ignored. %s" %(element.tag, getFileInfo(self)) | ||
1250 | 100 | # Record any tags/elements that could not be processed. | ||
1251 | 101 | logger.warn(msg) | ||
1252 | 102 | if ABORT_ON_INVALID_DIRECTIVE: | ||
1253 | 103 | raise ValueError(msg) | ||
1254 | 104 | continue | ||
1255 | 95 | if select is not None and element.tag not in select: | 105 | if select is not None and element.tag not in select: |
1256 | 96 | continue | 106 | continue |
1257 | 97 | if ignore is not None and element.tag in ignore: | 107 | if ignore is not None and element.tag in ignore: |
1258 | 98 | continue | 108 | continue |
1267 | 99 | # If the element is a directive, process it | 109 | directive = self.factories[element.tag](element, self) |
1268 | 100 | if element.tag in self.factories: | 110 | directive.process() |
1261 | 101 | directive = self.factories[element.tag](element, self) | ||
1262 | 102 | directive.process() | ||
1263 | 103 | else: | ||
1264 | 104 | # Record any tags/elements that could not be processed. | ||
1265 | 105 | logger.warn("Directive %r could not be processed and was " | ||
1266 | 106 | "ignored. %s" %(element.tag, getFileInfo(self))) | ||
1269 | 107 | 111 | ||
1270 | 108 | def process(self): | 112 | def process(self): |
1271 | 109 | self.processSubDirectives() | 113 | self.processSubDirectives() |
1272 | 110 | 114 | ||
1273 | === added file 'src/z3c/rml/doclogic.py' | |||
1274 | --- src/z3c/rml/doclogic.py 1970-01-01 00:00:00 +0000 | |||
1275 | +++ src/z3c/rml/doclogic.py 2013-01-09 02:49:23 +0000 | |||
1276 | @@ -0,0 +1,169 @@ | |||
1277 | 1 | ############################################################################## | ||
1278 | 2 | # | ||
1279 | 3 | # Copyright (c) 2012 Zope Foundation and Contributors. | ||
1280 | 4 | # All Rights Reserved. | ||
1281 | 5 | # | ||
1282 | 6 | # This software is subject to the provisions of the Zope Public License, | ||
1283 | 7 | # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
1284 | 8 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
1285 | 9 | # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
1286 | 10 | # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
1287 | 11 | # FOR A PARTICULAR PURPOSE. | ||
1288 | 12 | # | ||
1289 | 13 | ############################################################################## | ||
1290 | 14 | """``doc*`` directives. | ||
1291 | 15 | """ | ||
1292 | 16 | import reportlab.platypus | ||
1293 | 17 | from z3c.rml import attr, directive, flowable, interfaces, occurence | ||
1294 | 18 | |||
1295 | 19 | class IDocAssign(interfaces.IRMLDirectiveSignature): | ||
1296 | 20 | """Assign a value to the namesapce.""" | ||
1297 | 21 | |||
1298 | 22 | var = attr.String( | ||
1299 | 23 | title=u'Variable Name', | ||
1300 | 24 | description=u'The name under which the value is stored.', | ||
1301 | 25 | required=True) | ||
1302 | 26 | |||
1303 | 27 | expr = attr.String( | ||
1304 | 28 | title=u'Expression', | ||
1305 | 29 | description=u'The expression that creates the value when evaluated.', | ||
1306 | 30 | required=True) | ||
1307 | 31 | |||
1308 | 32 | class DocAssign(flowable.Flowable): | ||
1309 | 33 | signature = IDocAssign | ||
1310 | 34 | klass = reportlab.platypus.flowables.DocAssign | ||
1311 | 35 | |||
1312 | 36 | |||
1313 | 37 | class IDocExec(interfaces.IRMLDirectiveSignature): | ||
1314 | 38 | """Execute a statement.""" | ||
1315 | 39 | |||
1316 | 40 | stmt = attr.String( | ||
1317 | 41 | title=u'Statement', | ||
1318 | 42 | description=u'The statement to be executed.', | ||
1319 | 43 | required=True) | ||
1320 | 44 | |||
1321 | 45 | class DocExec(flowable.Flowable): | ||
1322 | 46 | signature = IDocExec | ||
1323 | 47 | klass = reportlab.platypus.flowables.DocExec | ||
1324 | 48 | |||
1325 | 49 | |||
1326 | 50 | class IDocPara(interfaces.IRMLDirectiveSignature): | ||
1327 | 51 | """Create a paragraph with the value returned from the expression.""" | ||
1328 | 52 | |||
1329 | 53 | expr = attr.String( | ||
1330 | 54 | title=u'Expression', | ||
1331 | 55 | description=u'The expression to be executed.', | ||
1332 | 56 | required=True) | ||
1333 | 57 | |||
1334 | 58 | format = attr.String( | ||
1335 | 59 | title=u'Format', | ||
1336 | 60 | description=u'The format used to render the expression value.', | ||
1337 | 61 | required=False) | ||
1338 | 62 | |||
1339 | 63 | style = attr.Style( | ||
1340 | 64 | title=u'Style', | ||
1341 | 65 | description=u'The style of the paragraph.', | ||
1342 | 66 | required=False) | ||
1343 | 67 | |||
1344 | 68 | escape = attr.Boolean( | ||
1345 | 69 | title=u'Escape Text', | ||
1346 | 70 | description=u'When set (default) the expression value is escaped.', | ||
1347 | 71 | required=False) | ||
1348 | 72 | |||
1349 | 73 | class DocPara(flowable.Flowable): | ||
1350 | 74 | signature = IDocPara | ||
1351 | 75 | klass = reportlab.platypus.flowables.DocPara | ||
1352 | 76 | |||
1353 | 77 | |||
1354 | 78 | class IDocAssert(interfaces.IRMLDirectiveSignature): | ||
1355 | 79 | """Assert a certain condition.""" | ||
1356 | 80 | |||
1357 | 81 | cond = attr.String( | ||
1358 | 82 | title=u'Condition', | ||
1359 | 83 | description=u'The condition to be asserted.', | ||
1360 | 84 | required=True) | ||
1361 | 85 | |||
1362 | 86 | format = attr.String( | ||
1363 | 87 | title=u'Format', | ||
1364 | 88 | description=u'The text displayed if assertion fails.', | ||
1365 | 89 | required=False) | ||
1366 | 90 | |||
1367 | 91 | class DocAssert(flowable.Flowable): | ||
1368 | 92 | signature = IDocAssert | ||
1369 | 93 | klass = reportlab.platypus.flowables.DocAssert | ||
1370 | 94 | |||
1371 | 95 | |||
1372 | 96 | class IDocElse(interfaces.IRMLDirectiveSignature): | ||
1373 | 97 | """Starts 'else' block.""" | ||
1374 | 98 | |||
1375 | 99 | class DocElse(flowable.Flowable): | ||
1376 | 100 | signature = IDocElse | ||
1377 | 101 | |||
1378 | 102 | def process(self): | ||
1379 | 103 | if not isinstance(self.parent, DocIf): | ||
1380 | 104 | raise ValueError("<docElse> can only be placed inside a <docIf>") | ||
1381 | 105 | self.parent.flow = self.parent.elseFlow | ||
1382 | 106 | |||
1383 | 107 | |||
1384 | 108 | class IDocIf(flowable.IFlow): | ||
1385 | 109 | """Display story flow based on the value of the condition.""" | ||
1386 | 110 | |||
1387 | 111 | cond = attr.String( | ||
1388 | 112 | title=u'Condition', | ||
1389 | 113 | description=u'The condition to be tested.', | ||
1390 | 114 | required=True) | ||
1391 | 115 | |||
1392 | 116 | class DocIf(flowable.Flow): | ||
1393 | 117 | signature = IDocAssert | ||
1394 | 118 | klass = reportlab.platypus.flowables.DocIf | ||
1395 | 119 | |||
1396 | 120 | def __init__(self, *args, **kw): | ||
1397 | 121 | super(flowable.Flow, self).__init__(*args, **kw) | ||
1398 | 122 | self.thenFlow = self.flow = [] | ||
1399 | 123 | self.elseFlow = [] | ||
1400 | 124 | |||
1401 | 125 | def process(self): | ||
1402 | 126 | args = dict(self.getAttributeValues()) | ||
1403 | 127 | self.processSubDirectives() | ||
1404 | 128 | dif = self.klass( | ||
1405 | 129 | thenBlock = self.thenFlow, elseBlock = self.elseFlow, **args) | ||
1406 | 130 | self.parent.flow.append(dif) | ||
1407 | 131 | |||
1408 | 132 | class IDocWhile(flowable.IFlow): | ||
1409 | 133 | """Repeat the included directives as long as the condition is true.""" | ||
1410 | 134 | |||
1411 | 135 | cond = attr.String( | ||
1412 | 136 | title=u'Condition', | ||
1413 | 137 | description=u'The condition to be tested.', | ||
1414 | 138 | required=True) | ||
1415 | 139 | |||
1416 | 140 | class DocWhile(flowable.Flow): | ||
1417 | 141 | signature = IDocAssert | ||
1418 | 142 | klass = reportlab.platypus.flowables.DocWhile | ||
1419 | 143 | |||
1420 | 144 | def process(self): | ||
1421 | 145 | args = dict(self.getAttributeValues()) | ||
1422 | 146 | self.processSubDirectives() | ||
1423 | 147 | dwhile = self.klass(whileBlock = self.flow, **args) | ||
1424 | 148 | self.parent.flow.append(dwhile) | ||
1425 | 149 | |||
1426 | 150 | |||
1427 | 151 | flowable.Flow.factories['docAssign'] = DocAssign | ||
1428 | 152 | flowable.Flow.factories['docExec'] = DocExec | ||
1429 | 153 | flowable.Flow.factories['docPara'] = DocPara | ||
1430 | 154 | flowable.Flow.factories['docAssert'] = DocAssert | ||
1431 | 155 | flowable.Flow.factories['docIf'] = DocIf | ||
1432 | 156 | flowable.Flow.factories['docElse'] = DocElse | ||
1433 | 157 | flowable.Flow.factories['docWhile'] = DocWhile | ||
1434 | 158 | |||
1435 | 159 | flowable.IFlow.setTaggedValue( | ||
1436 | 160 | 'directives', | ||
1437 | 161 | flowable.IFlow.getTaggedValue('directives') + | ||
1438 | 162 | (occurence.ZeroOrMore('docAssign', IDocAssign), | ||
1439 | 163 | occurence.ZeroOrMore('docExec', IDocExec), | ||
1440 | 164 | occurence.ZeroOrMore('docPara', IDocPara), | ||
1441 | 165 | occurence.ZeroOrMore('docIf', IDocIf), | ||
1442 | 166 | occurence.ZeroOrMore('docElse', IDocElse), | ||
1443 | 167 | occurence.ZeroOrMore('docWhile', IDocWhile), | ||
1444 | 168 | ) | ||
1445 | 169 | ) | ||
1446 | 0 | 170 | ||
1447 | === modified file 'src/z3c/rml/document.py' | |||
1448 | --- src/z3c/rml/document.py 2011-01-05 22:34:45 +0000 | |||
1449 | +++ src/z3c/rml/document.py 2013-01-09 02:49:23 +0000 | |||
1450 | @@ -13,19 +13,23 @@ | |||
1451 | 13 | ############################################################################## | 13 | ############################################################################## |
1452 | 14 | """RML ``document`` element | 14 | """RML ``document`` element |
1453 | 15 | 15 | ||
1455 | 16 | $Id: document.py 114907 2010-07-22 01:59:57Z srichter $ | 16 | $Id: document.py 128841 2012-12-21 05:02:18Z srichter $ |
1456 | 17 | """ | 17 | """ |
1457 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
1458 | 19 | import cStringIO | 19 | import cStringIO |
1459 | 20 | import logging | ||
1460 | 20 | import sys | 21 | import sys |
1461 | 21 | import zope.interface | 22 | import zope.interface |
1462 | 22 | import reportlab.pdfgen.canvas | 23 | import reportlab.pdfgen.canvas |
1463 | 23 | from reportlab.pdfbase import pdfmetrics, ttfonts, cidfonts | 24 | from reportlab.pdfbase import pdfmetrics, ttfonts, cidfonts |
1469 | 24 | from reportlab.lib import fonts | 25 | from reportlab.lib import colors, fonts |
1470 | 25 | 26 | from reportlab.platypus import tableofcontents | |
1471 | 26 | from z3c.rml import attr, directive, interfaces, occurence | 27 | |
1472 | 27 | from z3c.rml import canvas, stylesheet, template | 28 | from z3c.rml import attr, canvas, directive, doclogic, interfaces, list |
1473 | 28 | 29 | from z3c.rml import occurence, pdfinclude, special, storyplace, stylesheet | |
1474 | 30 | from z3c.rml import template | ||
1475 | 31 | |||
1476 | 32 | LOGGER_NAME = 'z3c.rml.render' | ||
1477 | 29 | 33 | ||
1478 | 30 | class IRegisterType1Face(interfaces.IRMLDirectiveSignature): | 34 | class IRegisterType1Face(interfaces.IRMLDirectiveSignature): |
1479 | 31 | """Register a new Type 1 font face.""" | 35 | """Register a new Type 1 font face.""" |
1480 | @@ -141,13 +145,58 @@ | |||
1481 | 141 | u'be previously registered.'), | 145 | u'be previously registered.'), |
1482 | 142 | required=True) | 146 | required=True) |
1483 | 143 | 147 | ||
1484 | 148 | encName = attr.String( | ||
1485 | 149 | title=u'Encoding Name', | ||
1486 | 150 | description=(u'The name of the encoding to use for the font.'), | ||
1487 | 151 | required=False) | ||
1488 | 152 | |||
1489 | 144 | class RegisterCidFont(directive.RMLDirective): | 153 | class RegisterCidFont(directive.RMLDirective): |
1490 | 145 | signature = IRegisterCidFont | 154 | signature = IRegisterCidFont |
1491 | 155 | attrMapping = {'faceName': 'face', 'encName': 'encoding'} | ||
1492 | 156 | |||
1493 | 157 | def process(self): | ||
1494 | 158 | args = dict(self.getAttributeValues(attrMapping=self.attrMapping)) | ||
1495 | 159 | if 'encoding' in args: | ||
1496 | 160 | font = cidfonts.CIDFont(**args) | ||
1497 | 161 | else: | ||
1498 | 162 | font = cidfonts.UnicodeCIDFont(**args) | ||
1499 | 163 | pdfmetrics.registerFont(font) | ||
1500 | 164 | |||
1501 | 165 | |||
1502 | 166 | class IRegisterFontFamily(interfaces.IRMLDirectiveSignature): | ||
1503 | 167 | """Register a new font family.""" | ||
1504 | 168 | |||
1505 | 169 | name = attr.String( | ||
1506 | 170 | title=u'Name', | ||
1507 | 171 | description=(u'The name of the font family.'), | ||
1508 | 172 | required=True) | ||
1509 | 173 | |||
1510 | 174 | normal = attr.String( | ||
1511 | 175 | title=u'Normal Font Name', | ||
1512 | 176 | description=(u'The name of the normal font variant.'), | ||
1513 | 177 | required=False) | ||
1514 | 178 | |||
1515 | 179 | bold = attr.String( | ||
1516 | 180 | title=u'Bold Font Name', | ||
1517 | 181 | description=(u'The name of the bold font variant.'), | ||
1518 | 182 | required=False) | ||
1519 | 183 | |||
1520 | 184 | italic = attr.String( | ||
1521 | 185 | title=u'Italic Font Name', | ||
1522 | 186 | description=(u'The name of the italic font variant.'), | ||
1523 | 187 | required=False) | ||
1524 | 188 | |||
1525 | 189 | boldItalic = attr.String( | ||
1526 | 190 | title=u'Bold/Italic Font Name', | ||
1527 | 191 | description=(u'The name of the bold/italic font variant.'), | ||
1528 | 192 | required=True) | ||
1529 | 193 | |||
1530 | 194 | class RegisterFontFamily(directive.RMLDirective): | ||
1531 | 195 | signature = IRegisterFontFamily | ||
1532 | 146 | 196 | ||
1533 | 147 | def process(self): | 197 | def process(self): |
1534 | 148 | args = self.getAttributeValues(valuesOnly=True) | 198 | args = self.getAttributeValues(valuesOnly=True) |
1537 | 149 | font = cidfonts.UnicodeCIDFont(*args) | 199 | pdfmetrics.registerFontFamily(*args) |
1536 | 150 | pdfmetrics.registerFont(font) | ||
1538 | 151 | 200 | ||
1539 | 152 | 201 | ||
1540 | 153 | class IColorDefinition(interfaces.IRMLDirectiveSignature): | 202 | class IColorDefinition(interfaces.IRMLDirectiveSignature): |
1541 | @@ -158,45 +207,264 @@ | |||
1542 | 158 | description=(u'The id/name the color will be available under.'), | 207 | description=(u'The id/name the color will be available under.'), |
1543 | 159 | required=True) | 208 | required=True) |
1544 | 160 | 209 | ||
1545 | 210 | RGB = attr.Color( | ||
1546 | 211 | title=u'RGB Color', | ||
1547 | 212 | description=(u'The color value that is represented.'), | ||
1548 | 213 | required=False) | ||
1549 | 214 | |||
1550 | 215 | CMYK = attr.Color( | ||
1551 | 216 | title=u'CMYK Color', | ||
1552 | 217 | description=(u'The color value that is represented.'), | ||
1553 | 218 | required=False) | ||
1554 | 219 | |||
1555 | 161 | value = attr.Color( | 220 | value = attr.Color( |
1556 | 162 | title=u'Color', | 221 | title=u'Color', |
1557 | 163 | description=(u'The color value that is represented.'), | 222 | description=(u'The color value that is represented.'), |
1563 | 164 | required=True) | 223 | required=False) |
1564 | 165 | attr.deprecated( | 224 | |
1565 | 166 | 'RGB', value, | 225 | spotName = attr.String( |
1566 | 167 | (u'Ensures compatibility with ReportLab RML. Please use ' | 226 | title=u'Spot Name', |
1567 | 168 | u'the "value" attribute.')) | 227 | description=(u'The Spot Name of the CMYK color.'), |
1568 | 228 | required=False) | ||
1569 | 229 | |||
1570 | 230 | density = attr.Float( | ||
1571 | 231 | title=u'Density', | ||
1572 | 232 | description=(u'The color density of the CMYK color.'), | ||
1573 | 233 | min=0.0, | ||
1574 | 234 | max=1.0, | ||
1575 | 235 | required=False) | ||
1576 | 236 | |||
1577 | 237 | knockout = attr.String( | ||
1578 | 238 | title=u'Knockout', | ||
1579 | 239 | description=(u'The knockout of the CMYK color.'), | ||
1580 | 240 | required=False) | ||
1581 | 241 | |||
1582 | 242 | alpha = attr.Float( | ||
1583 | 243 | title=u'Alpha', | ||
1584 | 244 | description=(u'The alpha channel of the color.'), | ||
1585 | 245 | min=0.0, | ||
1586 | 246 | max=1.0, | ||
1587 | 247 | required=False) | ||
1588 | 169 | 248 | ||
1589 | 170 | class ColorDefinition(directive.RMLDirective): | 249 | class ColorDefinition(directive.RMLDirective): |
1590 | 171 | signature = IColorDefinition | 250 | signature = IColorDefinition |
1591 | 172 | 251 | ||
1592 | 173 | def process(self): | 252 | def process(self): |
1594 | 174 | id, value = self.getAttributeValues(valuesOnly=True) | 253 | kwargs = dict(self.getAttributeValues()) |
1595 | 254 | id = kwargs.pop('id') | ||
1596 | 255 | for attrName in ('RGB', 'CMYK', 'value'): | ||
1597 | 256 | color = kwargs.pop(attrName, None) | ||
1598 | 257 | if color is not None: | ||
1599 | 258 | # CMYK has additional attributes. | ||
1600 | 259 | for name, value in kwargs.items(): | ||
1601 | 260 | setattr(color, name, value) | ||
1602 | 261 | manager = attr.getManager(self) | ||
1603 | 262 | manager.colors[id] = color | ||
1604 | 263 | return | ||
1605 | 264 | raise ValueError('At least one color definition must be specified.') | ||
1606 | 265 | |||
1607 | 266 | # Initialize also supports the <color> tag. | ||
1608 | 267 | stylesheet.Initialize.factories['color'] = ColorDefinition | ||
1609 | 268 | stylesheet.IInitialize.setTaggedValue( | ||
1610 | 269 | 'directives', | ||
1611 | 270 | stylesheet.IInitialize.getTaggedValue('directives') + | ||
1612 | 271 | (occurence.ZeroOrMore('color', IColorDefinition),) | ||
1613 | 272 | ) | ||
1614 | 273 | |||
1615 | 274 | |||
1616 | 275 | class IStartIndex(interfaces.IRMLDirectiveSignature): | ||
1617 | 276 | """Start a new index.""" | ||
1618 | 277 | |||
1619 | 278 | name = attr.String( | ||
1620 | 279 | title=u'Name', | ||
1621 | 280 | description=u'The name of the index.', | ||
1622 | 281 | default='index', | ||
1623 | 282 | required=True) | ||
1624 | 283 | |||
1625 | 284 | offset = attr.Integer( | ||
1626 | 285 | title=u'Offset', | ||
1627 | 286 | description=u'The counting offset.', | ||
1628 | 287 | min=0, | ||
1629 | 288 | required=False) | ||
1630 | 289 | |||
1631 | 290 | format = attr.Choice( | ||
1632 | 291 | title=u'Format', | ||
1633 | 292 | description=(u'The format the index is going to use.'), | ||
1634 | 293 | choices=interfaces.LIST_FORMATS, | ||
1635 | 294 | required=False) | ||
1636 | 295 | |||
1637 | 296 | class StartIndex(directive.RMLDirective): | ||
1638 | 297 | signature = IStartIndex | ||
1639 | 298 | |||
1640 | 299 | def process(self): | ||
1641 | 300 | kwargs = dict(self.getAttributeValues()) | ||
1642 | 301 | name = kwargs['name'] | ||
1643 | 175 | manager = attr.getManager(self) | 302 | manager = attr.getManager(self) |
1645 | 176 | manager.colors[id] = value | 303 | manager.indexes[name] = tableofcontents.SimpleIndex(**kwargs) |
1646 | 304 | |||
1647 | 305 | |||
1648 | 306 | class ICropMarks(interfaces.IRMLDirectiveSignature): | ||
1649 | 307 | """Crop Marks specification""" | ||
1650 | 308 | |||
1651 | 309 | name = attr.String( | ||
1652 | 310 | title=u'Name', | ||
1653 | 311 | description=u'The name of the index.', | ||
1654 | 312 | default='index', | ||
1655 | 313 | required=True) | ||
1656 | 314 | |||
1657 | 315 | borderWidth = attr.Measurement( | ||
1658 | 316 | title=u'Border Width', | ||
1659 | 317 | description=u'The width of the crop mark border.', | ||
1660 | 318 | required=False) | ||
1661 | 319 | |||
1662 | 320 | markColor = attr.Color( | ||
1663 | 321 | title=u'Mark Color', | ||
1664 | 322 | description=u'The color of the crop marks.', | ||
1665 | 323 | required=False) | ||
1666 | 324 | |||
1667 | 325 | markWidth = attr.Measurement( | ||
1668 | 326 | title=u'Mark Width', | ||
1669 | 327 | description=u'The line width of the actual crop marks.', | ||
1670 | 328 | required=False) | ||
1671 | 329 | |||
1672 | 330 | markLength = attr.Measurement( | ||
1673 | 331 | title=u'Mark Length', | ||
1674 | 332 | description=u'The length of the actual crop marks.', | ||
1675 | 333 | required=False) | ||
1676 | 334 | |||
1677 | 335 | markLast = attr.Boolean( | ||
1678 | 336 | title=u'Mark Last', | ||
1679 | 337 | description=u'If set, marks are drawn after the content is rendered.', | ||
1680 | 338 | required=False) | ||
1681 | 339 | |||
1682 | 340 | bleedWidth = attr.Measurement( | ||
1683 | 341 | title=u'Bleed Width', | ||
1684 | 342 | description=(u'The width of the page bleed.'), | ||
1685 | 343 | required=False) | ||
1686 | 344 | |||
1687 | 345 | class CropMarksProperties(object): | ||
1688 | 346 | borderWidth = 36 | ||
1689 | 347 | markWidth = 0.5 | ||
1690 | 348 | markColor = colors.toColor('green') | ||
1691 | 349 | markLength = 18 | ||
1692 | 350 | markLast = True | ||
1693 | 351 | bleedWidth = 0 | ||
1694 | 352 | |||
1695 | 353 | class CropMarks(directive.RMLDirective): | ||
1696 | 354 | signature = ICropMarks | ||
1697 | 355 | |||
1698 | 356 | def process(self): | ||
1699 | 357 | cmp = CropMarksProperties() | ||
1700 | 358 | for name, value in self.getAttributeValues(): | ||
1701 | 359 | setattr(cmp, name, value) | ||
1702 | 360 | self.parent.parent.cropMarks = cmp | ||
1703 | 361 | |||
1704 | 362 | class ILogConfig(interfaces.IRMLDirectiveSignature): | ||
1705 | 363 | """Configure the render logger.""" | ||
1706 | 364 | |||
1707 | 365 | level = attr.Choice( | ||
1708 | 366 | title=u'Level', | ||
1709 | 367 | description=u'The default log level.', | ||
1710 | 368 | choices=interfaces.LOG_LEVELS, | ||
1711 | 369 | doLower=False, | ||
1712 | 370 | required=False) | ||
1713 | 371 | |||
1714 | 372 | format = attr.String( | ||
1715 | 373 | title=u'Format', | ||
1716 | 374 | description=u'The format of the log messages.', | ||
1717 | 375 | required=False) | ||
1718 | 376 | |||
1719 | 377 | filename = attr.File( | ||
1720 | 378 | title=u'File Name', | ||
1721 | 379 | description=u'The path to the file that is being logged.', | ||
1722 | 380 | doNotOpen=True, | ||
1723 | 381 | required=True) | ||
1724 | 382 | |||
1725 | 383 | filemode = attr.Choice( | ||
1726 | 384 | title=u'File Mode', | ||
1727 | 385 | description=u'The mode to open the file in.', | ||
1728 | 386 | choices={'WRITE': 'w', 'APPEND': 'a'}, | ||
1729 | 387 | default='a', | ||
1730 | 388 | required=False) | ||
1731 | 389 | |||
1732 | 390 | datefmt = attr.String( | ||
1733 | 391 | title=u'Date Format', | ||
1734 | 392 | description=u'The format of the log message date.', | ||
1735 | 393 | required=False) | ||
1736 | 394 | |||
1737 | 395 | class LogConfig(directive.RMLDirective): | ||
1738 | 396 | signature = ILogConfig | ||
1739 | 397 | |||
1740 | 398 | def process(self): | ||
1741 | 399 | args = dict(self.getAttributeValues()) | ||
1742 | 400 | logger = logging.Logger(LOGGER_NAME) | ||
1743 | 401 | handler = logging.FileHandler(args['filename'], args['filemode']) | ||
1744 | 402 | formatter = logging.Formatter( | ||
1745 | 403 | args.get('format'), args.get('datefmt')) | ||
1746 | 404 | handler.setFormatter(formatter) | ||
1747 | 405 | logger.addHandler(handler) | ||
1748 | 406 | if 'level' in args: | ||
1749 | 407 | logger.setLevel(args['level']) | ||
1750 | 408 | self.parent.parent.logger = logger | ||
1751 | 177 | 409 | ||
1752 | 178 | 410 | ||
1753 | 179 | class IDocInit(interfaces.IRMLDirectiveSignature): | 411 | class IDocInit(interfaces.IRMLDirectiveSignature): |
1754 | 180 | occurence.containing( | 412 | occurence.containing( |
1755 | 413 | occurence.ZeroOrMore('color', IColorDefinition), | ||
1756 | 414 | occurence.ZeroOrMore('name', special.IName), | ||
1757 | 181 | occurence.ZeroOrMore('registerType1Face', IRegisterType1Face), | 415 | occurence.ZeroOrMore('registerType1Face', IRegisterType1Face), |
1758 | 182 | occurence.ZeroOrMore('registerFont', IRegisterFont), | 416 | occurence.ZeroOrMore('registerFont', IRegisterFont), |
1759 | 417 | occurence.ZeroOrMore('registerCidFont', IRegisterCidFont), | ||
1760 | 183 | occurence.ZeroOrMore('registerTTFont', IRegisterTTFont), | 418 | occurence.ZeroOrMore('registerTTFont', IRegisterTTFont), |
1763 | 184 | occurence.ZeroOrMore('registerCidFont', IRegisterCidFont), | 419 | occurence.ZeroOrMore('registerFontFamily', IRegisterFontFamily), |
1762 | 185 | occurence.ZeroOrMore('color', IColorDefinition), | ||
1764 | 186 | occurence.ZeroOrMore('addMapping', IAddMapping), | 420 | occurence.ZeroOrMore('addMapping', IAddMapping), |
1765 | 421 | occurence.ZeroOrMore('logConfig', ILogConfig), | ||
1766 | 422 | occurence.ZeroOrMore('cropMarks', ICropMarks), | ||
1767 | 423 | occurence.ZeroOrMore('startIndex', IStartIndex), | ||
1768 | 187 | ) | 424 | ) |
1769 | 188 | 425 | ||
1770 | 426 | pageMode = attr.Choice( | ||
1771 | 427 | title=u'Page Mode', | ||
1772 | 428 | description=(u'The page mode in which the document is opened in ' | ||
1773 | 429 | u'the viewer.'), | ||
1774 | 430 | choices=('UseNone', 'UseOutlines', 'UseThumbs', 'FullScreen'), | ||
1775 | 431 | required=False) | ||
1776 | 432 | |||
1777 | 433 | pageLayout = attr.Choice( | ||
1778 | 434 | title=u'Page Layout', | ||
1779 | 435 | description=(u'The layout in which the pages are displayed in ' | ||
1780 | 436 | u'the viewer.'), | ||
1781 | 437 | choices=('SinglePage', 'OneColumn', 'TwoColumnLeft', 'TwoColumnRight'), | ||
1782 | 438 | required=False) | ||
1783 | 439 | |||
1784 | 440 | useCropMarks = attr.Boolean( | ||
1785 | 441 | title=u'Use Crop Marks', | ||
1786 | 442 | description=u'A flag when set shows crop marks on the page.', | ||
1787 | 443 | required=False) | ||
1788 | 444 | |||
1789 | 445 | |||
1790 | 189 | class DocInit(directive.RMLDirective): | 446 | class DocInit(directive.RMLDirective): |
1791 | 190 | signature = IDocInit | 447 | signature = IDocInit |
1792 | 191 | factories = { | 448 | factories = { |
1793 | 449 | 'name': special.Name, | ||
1794 | 450 | 'color': ColorDefinition, | ||
1795 | 192 | 'registerType1Face': RegisterType1Face, | 451 | 'registerType1Face': RegisterType1Face, |
1796 | 193 | 'registerFont': RegisterFont, | 452 | 'registerFont': RegisterFont, |
1797 | 194 | 'registerTTFont': RegisterTTFont, | 453 | 'registerTTFont': RegisterTTFont, |
1798 | 195 | 'registerCidFont': RegisterCidFont, | 454 | 'registerCidFont': RegisterCidFont, |
1799 | 196 | 'color': ColorDefinition, | ||
1800 | 197 | 'addMapping': AddMapping, | 455 | 'addMapping': AddMapping, |
1801 | 456 | 'logConfig': LogConfig, | ||
1802 | 457 | 'cropMarks': CropMarks, | ||
1803 | 458 | 'startIndex': StartIndex, | ||
1804 | 198 | } | 459 | } |
1805 | 199 | 460 | ||
1806 | 461 | def process(self): | ||
1807 | 462 | kwargs = dict(self.getAttributeValues()) | ||
1808 | 463 | self.parent.cropMarks = kwargs.get('useCropMarks', False) | ||
1809 | 464 | self.parent.pageMode = kwargs.get('pageMode') | ||
1810 | 465 | self.parent.pageLayout = kwargs.get('pageLayout') | ||
1811 | 466 | super(DocInit, self).process() | ||
1812 | 467 | |||
1813 | 200 | 468 | ||
1814 | 201 | class IDocument(interfaces.IRMLDirectiveSignature): | 469 | class IDocument(interfaces.IRMLDirectiveSignature): |
1815 | 202 | occurence.containing( | 470 | occurence.containing( |
1816 | @@ -252,11 +520,38 @@ | |||
1817 | 252 | self.names = {} | 520 | self.names = {} |
1818 | 253 | self.styles = {} | 521 | self.styles = {} |
1819 | 254 | self.colors = {} | 522 | self.colors = {} |
1820 | 523 | self.indexes = {} | ||
1821 | 255 | self.postProcessors = [] | 524 | self.postProcessors = [] |
1823 | 256 | self.filename = '<unknwon>' | 525 | self.filename = '<unknown>' |
1824 | 526 | self.cropMarks = False | ||
1825 | 527 | self.pageLayout = None | ||
1826 | 528 | self.pageMode = None | ||
1827 | 529 | self.logger = None | ||
1828 | 530 | |||
1829 | 531 | def _indexAdd(self, canvas, name, label): | ||
1830 | 532 | self.indexes[name](canvas, name, label) | ||
1831 | 533 | |||
1832 | 534 | def _beforeDocument(self): | ||
1833 | 535 | self._initCanvas(self.doc.canv) | ||
1834 | 536 | self.canvas = self.doc.canv | ||
1835 | 537 | |||
1836 | 538 | def _initCanvas(self, canvas): | ||
1837 | 539 | canvas._indexAdd = self._indexAdd | ||
1838 | 540 | canvas.manager = self | ||
1839 | 541 | if self.pageLayout: | ||
1840 | 542 | canvas._doc._catalog.setPageLayout(self.pageLayout) | ||
1841 | 543 | if self.pageMode: | ||
1842 | 544 | canvas._doc._catalog.setPageMode(self.pageMode) | ||
1843 | 257 | 545 | ||
1844 | 258 | def process(self, outputFile=None): | 546 | def process(self, outputFile=None): |
1845 | 259 | """Process document""" | 547 | """Process document""" |
1846 | 548 | # Reset all reportlab global variables. This is very important for | ||
1847 | 549 | # ReportLab not to fail. | ||
1848 | 550 | reportlab.rl_config._reset() | ||
1849 | 551 | |||
1850 | 552 | # Add our colors mapping to the default ones. | ||
1851 | 553 | colors.toColor.setExtraColorsNameSpace(self.colors) | ||
1852 | 554 | |||
1853 | 260 | if outputFile is None: | 555 | if outputFile is None: |
1854 | 261 | # TODO: This is relative to the input file *not* the CWD!!! | 556 | # TODO: This is relative to the input file *not* the CWD!!! |
1855 | 262 | outputFile = open(self.element.get('filename'), 'wb') | 557 | outputFile = open(self.element.get('filename'), 'wb') |
1856 | @@ -275,14 +570,17 @@ | |||
1857 | 275 | attrMapping={'compression': 'pageCompression', | 570 | attrMapping={'compression': 'pageCompression', |
1858 | 276 | 'debug': 'verbosity'} | 571 | 'debug': 'verbosity'} |
1859 | 277 | )) | 572 | )) |
1860 | 573 | kwargs['cropMarks'] = self.cropMarks | ||
1861 | 278 | 574 | ||
1862 | 279 | self.canvas = reportlab.pdfgen.canvas.Canvas(tempOutput, **kwargs) | 575 | self.canvas = reportlab.pdfgen.canvas.Canvas(tempOutput, **kwargs) |
1863 | 576 | self._initCanvas(self.canvas) | ||
1864 | 280 | self.processSubDirectives(select=('pageInfo', 'pageDrawing')) | 577 | self.processSubDirectives(select=('pageInfo', 'pageDrawing')) |
1865 | 281 | self.canvas.save() | 578 | self.canvas.save() |
1866 | 282 | 579 | ||
1867 | 283 | # Handle Flowable-based documents. | 580 | # Handle Flowable-based documents. |
1868 | 284 | elif self.element.find('template') is not None: | 581 | elif self.element.find('template') is not None: |
1869 | 285 | self.processSubDirectives(select=('template', 'story')) | 582 | self.processSubDirectives(select=('template', 'story')) |
1870 | 583 | self.doc.beforeDocument = self._beforeDocument | ||
1871 | 286 | self.doc.multiBuild(self.flowables) | 584 | self.doc.multiBuild(self.flowables) |
1872 | 287 | 585 | ||
1873 | 288 | # Process all post processors | 586 | # Process all post processors |
1874 | @@ -294,3 +592,6 @@ | |||
1875 | 294 | tempOutput.seek(0) | 592 | tempOutput.seek(0) |
1876 | 295 | outputFile.write(tempOutput.getvalue()) | 593 | outputFile.write(tempOutput.getvalue()) |
1877 | 296 | 594 | ||
1878 | 595 | # Cleanup. | ||
1879 | 596 | colors.toColor.setExtraColorsNameSpace({}) | ||
1880 | 597 | |||
1881 | 297 | 598 | ||
1882 | === modified file 'src/z3c/rml/dtd.py' | |||
1883 | --- src/z3c/rml/dtd.py 2011-01-05 22:34:45 +0000 | |||
1884 | +++ src/z3c/rml/dtd.py 2013-01-09 02:49:23 +0000 | |||
1885 | @@ -13,7 +13,7 @@ | |||
1886 | 13 | ############################################################################## | 13 | ############################################################################## |
1887 | 14 | """Generate a DTD from the code | 14 | """Generate a DTD from the code |
1888 | 15 | 15 | ||
1890 | 16 | $Id: dtd.py 76810 2007-06-19 19:49:26Z srichter $ | 16 | $Id: dtd.py 128803 2012-12-20 14:19:44Z srichter $ |
1891 | 17 | """ | 17 | """ |
1892 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
1893 | 19 | import zope.schema | 19 | import zope.schema |
1894 | @@ -36,15 +36,20 @@ | |||
1895 | 36 | subElementList.append( | 36 | subElementList.append( |
1896 | 37 | occurence.tag + occurence2Symbol.get(occurence.__class__, '') | 37 | occurence.tag + occurence2Symbol.get(occurence.__class__, '') |
1897 | 38 | ) | 38 | ) |
1901 | 39 | fields = zope.schema.getFields(signature).keys() | 39 | fields = zope.schema.getFieldsInOrder(signature) |
1902 | 40 | if len(fields) == 1 and isinstance(fields[0], attr.TextNode): | 40 | for attrName, field in fields: |
1903 | 41 | subElementList.append('#PCDATA') | 41 | if isinstance(field, attr.TextNode): |
1904 | 42 | subElementList.append('#PCDATA') | ||
1905 | 43 | break | ||
1906 | 42 | subElementList = ','.join(subElementList) | 44 | subElementList = ','.join(subElementList) |
1907 | 43 | if subElementList: | 45 | if subElementList: |
1908 | 44 | subElementList = ' (' + subElementList + ')' | 46 | subElementList = ' (' + subElementList + ')' |
1909 | 45 | text = '\n<!ELEMENT %s%s>' %(name, subElementList) | 47 | text = '\n<!ELEMENT %s%s>' %(name, subElementList) |
1910 | 46 | # Create a list of attributes for this element. | 48 | # Create a list of attributes for this element. |
1912 | 47 | for attrName, field in zope.schema.getFieldsInOrder(signature): | 49 | for attrName, field in fields: |
1913 | 50 | # Ignore text nodes, since they are not attributes. | ||
1914 | 51 | if isinstance(field, attr.TextNode): | ||
1915 | 52 | continue | ||
1916 | 48 | # Create the type | 53 | # Create the type |
1917 | 49 | if isinstance(field, attr.Choice): | 54 | if isinstance(field, attr.Choice): |
1918 | 50 | type = '(' + '|'.join(field.choices.keys()) + ')' | 55 | type = '(' + '|'.join(field.choices.keys()) + ')' |
1919 | 51 | 56 | ||
1920 | === modified file 'src/z3c/rml/flowable.py' | |||
1921 | --- src/z3c/rml/flowable.py 2011-01-05 22:34:45 +0000 | |||
1922 | +++ src/z3c/rml/flowable.py 2013-01-09 02:49:23 +0000 | |||
1923 | @@ -13,10 +13,11 @@ | |||
1924 | 13 | ############################################################################## | 13 | ############################################################################## |
1925 | 14 | """Flowable Element Processing | 14 | """Flowable Element Processing |
1926 | 15 | 15 | ||
1928 | 16 | $Id: flowable.py 84838 2008-03-21 12:32:58Z rogerineichen $ | 16 | $Id: flowable.py 128843 2012-12-21 06:58:39Z srichter $ |
1929 | 17 | """ | 17 | """ |
1930 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
1931 | 19 | import copy | 19 | import copy |
1932 | 20 | import logging | ||
1933 | 20 | import re | 21 | import re |
1934 | 21 | import reportlab.lib.styles | 22 | import reportlab.lib.styles |
1935 | 22 | import reportlab.platypus | 23 | import reportlab.platypus |
1936 | @@ -24,7 +25,8 @@ | |||
1937 | 24 | import reportlab.platypus.flowables | 25 | import reportlab.platypus.flowables |
1938 | 25 | import reportlab.platypus.tables | 26 | import reportlab.platypus.tables |
1939 | 26 | import zope.schema | 27 | import zope.schema |
1941 | 27 | from reportlab.lib import styles | 28 | from reportlab.lib import styles, pygments2xpre |
1942 | 29 | from xml.sax.saxutils import unescape | ||
1943 | 28 | from z3c.rml import attr, directive, interfaces, occurence | 30 | from z3c.rml import attr, directive, interfaces, occurence |
1944 | 29 | from z3c.rml import form, platypus, special, stylesheet | 31 | from z3c.rml import form, platypus, special, stylesheet |
1945 | 30 | 32 | ||
1946 | @@ -141,8 +143,7 @@ | |||
1947 | 141 | description=(u'The paragraph style that is applied to the paragraph. ' | 143 | description=(u'The paragraph style that is applied to the paragraph. ' |
1948 | 142 | u'See the ``paraStyle`` tag for creating a paragraph ' | 144 | u'See the ``paraStyle`` tag for creating a paragraph ' |
1949 | 143 | u'style.'), | 145 | u'style.'), |
1952 | 144 | default=reportlab.lib.styles.getSampleStyleSheet()['Normal'], | 146 | required=False) |
1951 | 145 | required=True) | ||
1953 | 146 | 147 | ||
1954 | 147 | bulletText = attr.String( | 148 | bulletText = attr.String( |
1955 | 148 | title=u'Bullet Character', | 149 | title=u'Bullet Character', |
1956 | @@ -185,19 +186,44 @@ | |||
1957 | 185 | class IPreformatted(IMinimalParagraphBase): | 186 | class IPreformatted(IMinimalParagraphBase): |
1958 | 186 | """A preformatted text, similar to the <pre> tag in HTML.""" | 187 | """A preformatted text, similar to the <pre> tag in HTML.""" |
1959 | 187 | 188 | ||
1960 | 189 | style = attr.Style( | ||
1961 | 190 | title=u'Style', | ||
1962 | 191 | description=(u'The paragraph style that is applied to the paragraph. ' | ||
1963 | 192 | u'See the ``paraStyle`` tag for creating a paragraph ' | ||
1964 | 193 | u'style.'), | ||
1965 | 194 | default=reportlab.lib.styles.getSampleStyleSheet()['Code'], | ||
1966 | 195 | required=False) | ||
1967 | 196 | |||
1968 | 188 | text = attr.RawXMLContent( | 197 | text = attr.RawXMLContent( |
1969 | 189 | title=u'Text', | 198 | title=u'Text', |
1970 | 190 | description=(u'The text that will be layed out.'), | 199 | description=(u'The text that will be layed out.'), |
1971 | 191 | required=True) | 200 | required=True) |
1972 | 192 | 201 | ||
1973 | 202 | maxLineLength = attr.Integer( | ||
1974 | 203 | title=u'Max Line Length', | ||
1975 | 204 | description=(u'The maximum number of characters on one line.'), | ||
1976 | 205 | required=False) | ||
1977 | 206 | |||
1978 | 207 | newLineChars = attr.Text( | ||
1979 | 208 | title=u'New Line Characters', | ||
1980 | 209 | description=u'The characters placed at the beginning of a wrapped line', | ||
1981 | 210 | required=False) | ||
1982 | 211 | |||
1983 | 193 | class Preformatted(Flowable): | 212 | class Preformatted(Flowable): |
1984 | 194 | signature = IPreformatted | 213 | signature = IPreformatted |
1985 | 195 | klass = reportlab.platypus.Preformatted | 214 | klass = reportlab.platypus.Preformatted |
1986 | 196 | 215 | ||
1987 | 197 | |||
1988 | 198 | class IXPreformatted(IParagraphBase): | 216 | class IXPreformatted(IParagraphBase): |
1989 | 199 | """A preformatted text that allows paragraph markup.""" | 217 | """A preformatted text that allows paragraph markup.""" |
1990 | 200 | 218 | ||
1991 | 219 | style = attr.Style( | ||
1992 | 220 | title=u'Style', | ||
1993 | 221 | description=(u'The paragraph style that is applied to the paragraph. ' | ||
1994 | 222 | u'See the ``paraStyle`` tag for creating a paragraph ' | ||
1995 | 223 | u'style.'), | ||
1996 | 224 | default=reportlab.lib.styles.getSampleStyleSheet()['Normal'], | ||
1997 | 225 | required=False) | ||
1998 | 226 | |||
1999 | 201 | text = attr.RawXMLContent( | 227 | text = attr.RawXMLContent( |
2000 | 202 | title=u'Text', | 228 | title=u'Text', |
2001 | 203 | description=(u'The text that will be layed out.'), | 229 | description=(u'The text that will be layed out.'), |
2002 | @@ -208,6 +234,36 @@ | |||
2003 | 208 | klass = reportlab.platypus.XPreformatted | 234 | klass = reportlab.platypus.XPreformatted |
2004 | 209 | 235 | ||
2005 | 210 | 236 | ||
2006 | 237 | class ICodeSnippet(IXPreformatted): | ||
2007 | 238 | """A code snippet with text highlighting.""" | ||
2008 | 239 | |||
2009 | 240 | style = attr.Style( | ||
2010 | 241 | title=u'Style', | ||
2011 | 242 | description=(u'The paragraph style that is applied to the paragraph. ' | ||
2012 | 243 | u'See the ``paraStyle`` tag for creating a paragraph ' | ||
2013 | 244 | u'style.'), | ||
2014 | 245 | required=False) | ||
2015 | 246 | |||
2016 | 247 | language = attr.String( | ||
2017 | 248 | title=u'Language', | ||
2018 | 249 | description=u'The language the code snippet is written in.', | ||
2019 | 250 | required=False) | ||
2020 | 251 | |||
2021 | 252 | class CodeSnippet(XPreformatted): | ||
2022 | 253 | signature = ICodeSnippet | ||
2023 | 254 | |||
2024 | 255 | def process(self): | ||
2025 | 256 | args = dict(self.getAttributeValues()) | ||
2026 | 257 | lang = args.pop('language', None) | ||
2027 | 258 | args['text'] = unescape(args['text']) | ||
2028 | 259 | if lang is not None: | ||
2029 | 260 | args['text'] = pygments2xpre.pygments2xpre( | ||
2030 | 261 | args['text'], lang.lower()) | ||
2031 | 262 | if 'style' not in args: | ||
2032 | 263 | args['style'] = attr._getStyle(self, 'Code') | ||
2033 | 264 | self.parent.flow.append(self.klass(**args)) | ||
2034 | 265 | |||
2035 | 266 | |||
2036 | 211 | class IParagraph(IParagraphBase, stylesheet.IBaseParagraphStyle): | 267 | class IParagraph(IParagraphBase, stylesheet.IBaseParagraphStyle): |
2037 | 212 | """Lays out an entire paragraph.""" | 268 | """Lays out an entire paragraph.""" |
2038 | 213 | 269 | ||
2039 | @@ -219,6 +275,7 @@ | |||
2040 | 219 | class Paragraph(Flowable): | 275 | class Paragraph(Flowable): |
2041 | 220 | signature = IParagraph | 276 | signature = IParagraph |
2042 | 221 | klass = reportlab.platypus.Paragraph | 277 | klass = reportlab.platypus.Paragraph |
2043 | 278 | defaultStyle = 'Normal' | ||
2044 | 222 | 279 | ||
2045 | 223 | styleAttributes = zope.schema.getFieldNames(stylesheet.IBaseParagraphStyle) | 280 | styleAttributes = zope.schema.getFieldNames(stylesheet.IBaseParagraphStyle) |
2046 | 224 | 281 | ||
2047 | @@ -232,6 +289,8 @@ | |||
2048 | 232 | 289 | ||
2049 | 233 | def process(self): | 290 | def process(self): |
2050 | 234 | args = dict(self.getAttributeValues(ignore=self.styleAttributes)) | 291 | args = dict(self.getAttributeValues(ignore=self.styleAttributes)) |
2051 | 292 | if 'style' not in args: | ||
2052 | 293 | args['style'] = attr._getStyle(self, self.defaultStyle) | ||
2053 | 235 | args['style'] = self.processStyle(args['style']) | 294 | args['style'] = self.processStyle(args['style']) |
2054 | 236 | self.parent.flow.append(self.klass(**args)) | 295 | self.parent.flow.append(self.klass(**args)) |
2055 | 237 | 296 | ||
2056 | @@ -239,61 +298,56 @@ | |||
2057 | 239 | class ITitle(IParagraph): | 298 | class ITitle(IParagraph): |
2058 | 240 | """The title is a simple paragraph with a special title style.""" | 299 | """The title is a simple paragraph with a special title style.""" |
2059 | 241 | 300 | ||
2060 | 242 | style = attr.Style( | ||
2061 | 243 | title=u'Style', | ||
2062 | 244 | description=(u'The paragraph style that is applied to the paragraph. ' | ||
2063 | 245 | u'See the ``paraStyle`` tag for creating a paragraph ' | ||
2064 | 246 | u'style.'), | ||
2065 | 247 | default=reportlab.lib.styles.getSampleStyleSheet()['Title'], | ||
2066 | 248 | required=True) | ||
2067 | 249 | |||
2068 | 250 | class Title(Paragraph): | 301 | class Title(Paragraph): |
2069 | 251 | signature = ITitle | 302 | signature = ITitle |
2071 | 252 | 303 | defaultStyle = 'Title' | |
2072 | 253 | 304 | ||
2073 | 254 | class IHeading1(IParagraph): | 305 | class IHeading1(IParagraph): |
2074 | 255 | """Heading 1 is a simple paragraph with a special heading 1 style.""" | 306 | """Heading 1 is a simple paragraph with a special heading 1 style.""" |
2075 | 256 | 307 | ||
2076 | 257 | style = attr.Style( | ||
2077 | 258 | title=u'Style', | ||
2078 | 259 | description=(u'The paragraph style that is applied to the paragraph. ' | ||
2079 | 260 | u'See the ``paraStyle`` tag for creating a paragraph ' | ||
2080 | 261 | u'style.'), | ||
2081 | 262 | default=reportlab.lib.styles.getSampleStyleSheet()['Heading1'], | ||
2082 | 263 | required=True) | ||
2083 | 264 | |||
2084 | 265 | class Heading1(Paragraph): | 308 | class Heading1(Paragraph): |
2085 | 266 | signature = IHeading1 | 309 | signature = IHeading1 |
2086 | 310 | defaultStyle = 'Heading1' | ||
2087 | 267 | 311 | ||
2088 | 268 | 312 | ||
2089 | 269 | class IHeading2(IParagraph): | 313 | class IHeading2(IParagraph): |
2090 | 270 | """Heading 2 is a simple paragraph with a special heading 2 style.""" | 314 | """Heading 2 is a simple paragraph with a special heading 2 style.""" |
2091 | 271 | 315 | ||
2092 | 272 | style = attr.Style( | ||
2093 | 273 | title=u'Style', | ||
2094 | 274 | description=(u'The paragraph style that is applied to the paragraph. ' | ||
2095 | 275 | u'See the ``paraStyle`` tag for creating a paragraph ' | ||
2096 | 276 | u'style.'), | ||
2097 | 277 | default=reportlab.lib.styles.getSampleStyleSheet()['Heading2'], | ||
2098 | 278 | required=True) | ||
2099 | 279 | |||
2100 | 280 | class Heading2(Paragraph): | 316 | class Heading2(Paragraph): |
2101 | 281 | signature = IHeading2 | 317 | signature = IHeading2 |
2102 | 318 | defaultStyle = 'Heading2' | ||
2103 | 282 | 319 | ||
2104 | 283 | 320 | ||
2105 | 284 | class IHeading3(IParagraph): | 321 | class IHeading3(IParagraph): |
2106 | 285 | """Heading 3 is a simple paragraph with a special heading 3 style.""" | 322 | """Heading 3 is a simple paragraph with a special heading 3 style.""" |
2107 | 286 | 323 | ||
2108 | 287 | style = attr.Style( | ||
2109 | 288 | title=u'Style', | ||
2110 | 289 | description=(u'The paragraph style that is applied to the paragraph. ' | ||
2111 | 290 | u'See the ``paraStyle`` tag for creating a paragraph ' | ||
2112 | 291 | u'style.'), | ||
2113 | 292 | default=reportlab.lib.styles.getSampleStyleSheet()['Heading3'], | ||
2114 | 293 | required=True) | ||
2115 | 294 | |||
2116 | 295 | class Heading3(Paragraph): | 324 | class Heading3(Paragraph): |
2117 | 296 | signature = IHeading3 | 325 | signature = IHeading3 |
2118 | 326 | defaultStyle = 'Heading3' | ||
2119 | 327 | |||
2120 | 328 | |||
2121 | 329 | class IHeading4(IParagraph): | ||
2122 | 330 | """Heading 4 is a simple paragraph with a special heading 4 style.""" | ||
2123 | 331 | |||
2124 | 332 | class Heading4(Paragraph): | ||
2125 | 333 | signature = IHeading4 | ||
2126 | 334 | defaultStyle = 'Heading4' | ||
2127 | 335 | |||
2128 | 336 | |||
2129 | 337 | class IHeading5(IParagraph): | ||
2130 | 338 | """Heading 5 is a simple paragraph with a special heading 5 style.""" | ||
2131 | 339 | |||
2132 | 340 | class Heading5(Paragraph): | ||
2133 | 341 | signature = IHeading5 | ||
2134 | 342 | defaultStyle = 'Heading5' | ||
2135 | 343 | |||
2136 | 344 | |||
2137 | 345 | class IHeading6(IParagraph): | ||
2138 | 346 | """Heading 6 is a simple paragraph with a special heading 6 style.""" | ||
2139 | 347 | |||
2140 | 348 | class Heading6(Paragraph): | ||
2141 | 349 | signature = IHeading6 | ||
2142 | 350 | defaultStyle = 'Heading6' | ||
2143 | 297 | 351 | ||
2144 | 298 | 352 | ||
2145 | 299 | class ITableCell(interfaces.IRMLDirectiveSignature): | 353 | class ITableCell(interfaces.IRMLDirectiveSignature): |
2146 | @@ -470,6 +524,18 @@ | |||
2147 | 470 | description=u'The space of the line right of the cell.', | 524 | description=u'The space of the line right of the cell.', |
2148 | 471 | required=False) | 525 | required=False) |
2149 | 472 | 526 | ||
2150 | 527 | href = attr.Text( | ||
2151 | 528 | title=u'Link URL', | ||
2152 | 529 | description=u'When specified, the cell becomes a link to that URL.', | ||
2153 | 530 | required=False) | ||
2154 | 531 | |||
2155 | 532 | destination = attr.Text( | ||
2156 | 533 | title=u'Link Destination', | ||
2157 | 534 | description=(u'When specified, the cell becomes a link to that ' | ||
2158 | 535 | u'destination.'), | ||
2159 | 536 | required=False) | ||
2160 | 537 | |||
2161 | 538 | |||
2162 | 473 | class TableCell(directive.RMLDirective): | 539 | class TableCell(directive.RMLDirective): |
2163 | 474 | signature = ITableCell | 540 | signature = ITableCell |
2164 | 475 | styleAttributesMapping = ( | 541 | styleAttributesMapping = ( |
2165 | @@ -492,6 +558,8 @@ | |||
2166 | 492 | 'lineLeftCap', 'lineLeftCount', 'lineLeftSpace')), | 558 | 'lineLeftCap', 'lineLeftCount', 'lineLeftSpace')), |
2167 | 493 | ('LINEAFTER', ('lineRightThickness', 'lineRightColor', | 559 | ('LINEAFTER', ('lineRightThickness', 'lineRightColor', |
2168 | 494 | 'lineRightCap', 'lineRightCount', 'lineRightSpace')), | 560 | 'lineRightCap', 'lineRightCount', 'lineRightSpace')), |
2169 | 561 | ('HREF', ('href',)), | ||
2170 | 562 | ('DESTINATION', ('destination',)), | ||
2171 | 495 | ) | 563 | ) |
2172 | 496 | 564 | ||
2173 | 497 | def processStyle(self): | 565 | def processStyle(self): |
2174 | @@ -755,7 +823,7 @@ | |||
2175 | 755 | description=u'The maximum height the flowables are allotted.', | 823 | description=u'The maximum height the flowables are allotted.', |
2176 | 756 | default=None, | 824 | default=None, |
2177 | 757 | required=False) | 825 | required=False) |
2179 | 758 | 826 | ||
2180 | 759 | class KeepTogether(Flowable): | 827 | class KeepTogether(Flowable): |
2181 | 760 | signature = IKeepTogether | 828 | signature = IKeepTogether |
2182 | 761 | klass = reportlab.platypus.flowables.KeepTogether | 829 | klass = reportlab.platypus.flowables.KeepTogether |
2183 | @@ -771,6 +839,50 @@ | |||
2184 | 771 | frame = self.klass(flow.flow, **args) | 839 | frame = self.klass(flow.flow, **args) |
2185 | 772 | self.parent.flow.append(frame) | 840 | self.parent.flow.append(frame) |
2186 | 773 | 841 | ||
2187 | 842 | class IImage(interfaces.IRMLDirectiveSignature): | ||
2188 | 843 | """An image.""" | ||
2189 | 844 | |||
2190 | 845 | src = attr.Image( | ||
2191 | 846 | title=u'Image Source', | ||
2192 | 847 | description=u'The file that is used to extract the image data.', | ||
2193 | 848 | onlyOpen=True, | ||
2194 | 849 | required=True) | ||
2195 | 850 | |||
2196 | 851 | width = attr.Measurement( | ||
2197 | 852 | title=u'Image Width', | ||
2198 | 853 | description=u'The width of the image.', | ||
2199 | 854 | required=False) | ||
2200 | 855 | |||
2201 | 856 | height = attr.Measurement( | ||
2202 | 857 | title=u'Image Height', | ||
2203 | 858 | description=u'The height the image.', | ||
2204 | 859 | required=False) | ||
2205 | 860 | |||
2206 | 861 | mask = attr.Color( | ||
2207 | 862 | title=u'Mask', | ||
2208 | 863 | description=u'The color mask used to render the image.', | ||
2209 | 864 | required=False) | ||
2210 | 865 | |||
2211 | 866 | vAlign = attr.Choice( | ||
2212 | 867 | title=u'Vertical Alignment', | ||
2213 | 868 | description=u'The vertical alignment of the image.', | ||
2214 | 869 | choices=interfaces.VALIGN_TEXT_CHOICES, | ||
2215 | 870 | required=False) | ||
2216 | 871 | |||
2217 | 872 | class Image(Flowable): | ||
2218 | 873 | signature = IImage | ||
2219 | 874 | klass = reportlab.platypus.flowables.Image | ||
2220 | 875 | attrMapping = {'src': 'filename'} | ||
2221 | 876 | |||
2222 | 877 | def process(self): | ||
2223 | 878 | args = dict(self.getAttributeValues(attrMapping=self.attrMapping)) | ||
2224 | 879 | vAlign = args.pop('vAlign', None) | ||
2225 | 880 | img = self.klass(**args) | ||
2226 | 881 | if vAlign: | ||
2227 | 882 | img.vAlign = vAlign | ||
2228 | 883 | self.parent.flow.append(img) | ||
2229 | 884 | |||
2230 | 885 | |||
2231 | 774 | class IImageAndFlowables(interfaces.IRMLDirectiveSignature): | 886 | class IImageAndFlowables(interfaces.IRMLDirectiveSignature): |
2232 | 775 | """An image with flowables around it.""" | 887 | """An image with flowables around it.""" |
2233 | 776 | 888 | ||
2234 | @@ -931,7 +1043,7 @@ | |||
2235 | 931 | self.parent.flow.append(frame) | 1043 | self.parent.flow.append(frame) |
2236 | 932 | 1044 | ||
2237 | 933 | 1045 | ||
2239 | 934 | class IBookmark(interfaces.IRMLDirectiveSignature): | 1046 | class IBookmarkPage(interfaces.IRMLDirectiveSignature): |
2240 | 935 | """ | 1047 | """ |
2241 | 936 | This creates a bookmark to the current page which can be referred to with | 1048 | This creates a bookmark to the current page which can be referred to with |
2242 | 937 | the given key elsewhere. | 1049 | the given key elsewhere. |
2243 | @@ -947,20 +1059,10 @@ | |||
2244 | 947 | description=u'The name of the bookmark.', | 1059 | description=u'The name of the bookmark.', |
2245 | 948 | required=True) | 1060 | required=True) |
2246 | 949 | 1061 | ||
2249 | 950 | fitType = attr.Choice( | 1062 | fit = attr.Choice( |
2250 | 951 | title=u'Fit Type', | 1063 | title=u'Fit', |
2251 | 952 | description=u'The Fit Type.', | 1064 | description=u'The Fit Type.', |
2263 | 953 | choices=('Fit', 'FitH', 'FitV', 'FitR'), | 1065 | choices=('XYZ', 'Fit', 'FitH', 'FitV', 'FitR'), |
2253 | 954 | required=False) | ||
2254 | 955 | |||
2255 | 956 | left = attr.Measurement( | ||
2256 | 957 | title=u'Left', | ||
2257 | 958 | description=u'The left position.', | ||
2258 | 959 | required=False) | ||
2259 | 960 | |||
2260 | 961 | right = attr.Measurement( | ||
2261 | 962 | title=u'Right', | ||
2262 | 963 | description=u'The right position.', | ||
2264 | 964 | required=False) | 1066 | required=False) |
2265 | 965 | 1067 | ||
2266 | 966 | top = attr.Measurement( | 1068 | top = attr.Measurement( |
2267 | @@ -968,6 +1070,16 @@ | |||
2268 | 968 | description=u'The top position.', | 1070 | description=u'The top position.', |
2269 | 969 | required=False) | 1071 | required=False) |
2270 | 970 | 1072 | ||
2271 | 1073 | bottom = attr.Measurement( | ||
2272 | 1074 | title=u'Bottom', | ||
2273 | 1075 | description=u'The bottom position.', | ||
2274 | 1076 | required=False) | ||
2275 | 1077 | |||
2276 | 1078 | left = attr.Measurement( | ||
2277 | 1079 | title=u'Left', | ||
2278 | 1080 | description=u'The left position.', | ||
2279 | 1081 | required=False) | ||
2280 | 1082 | |||
2281 | 971 | right = attr.Measurement( | 1083 | right = attr.Measurement( |
2282 | 972 | title=u'Right', | 1084 | title=u'Right', |
2283 | 973 | description=u'The right position.', | 1085 | description=u'The right position.', |
2284 | @@ -978,10 +1090,39 @@ | |||
2285 | 978 | description=u'The zoom level when clicking on the bookmark.', | 1090 | description=u'The zoom level when clicking on the bookmark.', |
2286 | 979 | required=False) | 1091 | required=False) |
2287 | 980 | 1092 | ||
2288 | 1093 | class BookmarkPage(Flowable): | ||
2289 | 1094 | signature = IBookmarkPage | ||
2290 | 1095 | klass = platypus.BookmarkPage | ||
2291 | 1096 | attrMapping = {'name': 'key', 'fitType': 'fit'} | ||
2292 | 1097 | |||
2293 | 1098 | |||
2294 | 1099 | class IBookmark(interfaces.IRMLDirectiveSignature): | ||
2295 | 1100 | """ | ||
2296 | 1101 | This creates a bookmark to the current page which can be referred to with | ||
2297 | 1102 | the given key elsewhere. (Used inside a story.) | ||
2298 | 1103 | """ | ||
2299 | 1104 | |||
2300 | 1105 | name = attr.Text( | ||
2301 | 1106 | title=u'Name', | ||
2302 | 1107 | description=u'The name of the bookmark.', | ||
2303 | 1108 | required=True) | ||
2304 | 1109 | |||
2305 | 1110 | x = attr.Measurement( | ||
2306 | 1111 | title=u'X Coordinate', | ||
2307 | 1112 | description=u'The x-position of the bookmark.', | ||
2308 | 1113 | default=0, | ||
2309 | 1114 | required=False) | ||
2310 | 1115 | |||
2311 | 1116 | y = attr.Measurement( | ||
2312 | 1117 | title=u'Y Coordinate', | ||
2313 | 1118 | description=u'The y-position of the bookmark.', | ||
2314 | 1119 | default=0, | ||
2315 | 1120 | required=False) | ||
2316 | 1121 | |||
2317 | 981 | class Bookmark(Flowable): | 1122 | class Bookmark(Flowable): |
2318 | 982 | signature = IBookmark | 1123 | signature = IBookmark |
2321 | 983 | klass = platypus.BookmarkPage | 1124 | klass = platypus.Bookmark |
2322 | 984 | attrMapping = {'name': 'key', 'fitType': 'fit'} | 1125 | attrMapping = {'name': 'key', 'x': 'relativeX', 'y': 'relativeY'} |
2323 | 985 | 1126 | ||
2324 | 986 | 1127 | ||
2325 | 987 | class ILink(interfaces.IRMLDirectiveSignature): | 1128 | class ILink(interfaces.IRMLDirectiveSignature): |
2326 | @@ -1118,6 +1259,170 @@ | |||
2327 | 1118 | klass = platypus.OutlineAdd | 1259 | klass = platypus.OutlineAdd |
2328 | 1119 | 1260 | ||
2329 | 1120 | 1261 | ||
2330 | 1262 | class NamedStringFlowable(reportlab.platypus.flowables.Flowable): | ||
2331 | 1263 | |||
2332 | 1264 | def __init__(self, manager, id, value): | ||
2333 | 1265 | reportlab.platypus.flowables.Flowable.__init__(self) | ||
2334 | 1266 | self.manager = manager | ||
2335 | 1267 | self.id = id | ||
2336 | 1268 | self.value = value | ||
2337 | 1269 | |||
2338 | 1270 | def wrap(self, *args): | ||
2339 | 1271 | return (0, 0) | ||
2340 | 1272 | |||
2341 | 1273 | def draw(self): | ||
2342 | 1274 | self.manager.names[self.id] = self.value | ||
2343 | 1275 | |||
2344 | 1276 | |||
2345 | 1277 | class INamedString(interfaces.IRMLDirectiveSignature): | ||
2346 | 1278 | """Defines a name for a string.""" | ||
2347 | 1279 | |||
2348 | 1280 | id = attr.String( | ||
2349 | 1281 | title=u'Id', | ||
2350 | 1282 | description=u'The id under which the value will be known.', | ||
2351 | 1283 | required=True) | ||
2352 | 1284 | |||
2353 | 1285 | value = attr.XMLContent( | ||
2354 | 1286 | title=u'Value', | ||
2355 | 1287 | description=u'The text that is displayed if the id is called.', | ||
2356 | 1288 | required=True) | ||
2357 | 1289 | |||
2358 | 1290 | class NamedString(directive.RMLDirective): | ||
2359 | 1291 | signature = INamedString | ||
2360 | 1292 | |||
2361 | 1293 | def process(self): | ||
2362 | 1294 | id, value = self.getAttributeValues(valuesOnly=True) | ||
2363 | 1295 | manager = attr.getManager(self) | ||
2364 | 1296 | # We have to delay assigning values, otherwise the last one wins. | ||
2365 | 1297 | self.parent.flow.append(NamedStringFlowable(manager, id, value)) | ||
2366 | 1298 | |||
2367 | 1299 | |||
2368 | 1300 | class IShowIndex(interfaces.IRMLDirectiveSignature): | ||
2369 | 1301 | """Creates an index in the document.""" | ||
2370 | 1302 | |||
2371 | 1303 | name = attr.String( | ||
2372 | 1304 | title=u'Name', | ||
2373 | 1305 | description=u'The name of the index.', | ||
2374 | 1306 | default='index', | ||
2375 | 1307 | required=False) | ||
2376 | 1308 | |||
2377 | 1309 | dot = attr.String( | ||
2378 | 1310 | title=u'Dot', | ||
2379 | 1311 | description=u'The character to use as a dot.', | ||
2380 | 1312 | required=False) | ||
2381 | 1313 | |||
2382 | 1314 | style = attr.Style( | ||
2383 | 1315 | title=u'Style', | ||
2384 | 1316 | description=u'The paragraph style that is applied to the index. ', | ||
2385 | 1317 | required=False) | ||
2386 | 1318 | |||
2387 | 1319 | tableStyle = attr.Style( | ||
2388 | 1320 | title=u'Table Style', | ||
2389 | 1321 | description=u'The table style that is applied to the index layout. ', | ||
2390 | 1322 | required=False) | ||
2391 | 1323 | |||
2392 | 1324 | class ShowIndex(directive.RMLDirective): | ||
2393 | 1325 | signature = IShowIndex | ||
2394 | 1326 | |||
2395 | 1327 | def process(self): | ||
2396 | 1328 | args = dict(self.getAttributeValues()) | ||
2397 | 1329 | manager = attr.getManager(self) | ||
2398 | 1330 | index = manager.indexes[args['name']] | ||
2399 | 1331 | args['format'] = index.formatFunc.__name__[8:] | ||
2400 | 1332 | args['offset'] = index.offset | ||
2401 | 1333 | index.setup(**args) | ||
2402 | 1334 | self.parent.flow.append(index) | ||
2403 | 1335 | |||
2404 | 1336 | |||
2405 | 1337 | class IBaseLogCall(interfaces.IRMLDirectiveSignature): | ||
2406 | 1338 | |||
2407 | 1339 | message = attr.RawXMLContent( | ||
2408 | 1340 | title=u'Message', | ||
2409 | 1341 | description=u'The message to be logged.', | ||
2410 | 1342 | required=True) | ||
2411 | 1343 | |||
2412 | 1344 | class LogCallFlowable(reportlab.platypus.flowables.Flowable): | ||
2413 | 1345 | |||
2414 | 1346 | def __init__(self, logger, level, message): | ||
2415 | 1347 | self.logger = logger | ||
2416 | 1348 | self.level = level | ||
2417 | 1349 | self.message = message | ||
2418 | 1350 | |||
2419 | 1351 | def wrap(self, *args): | ||
2420 | 1352 | return (0, 0) | ||
2421 | 1353 | |||
2422 | 1354 | def draw(self): | ||
2423 | 1355 | self.logger.log(self.level, self.message) | ||
2424 | 1356 | |||
2425 | 1357 | class BaseLogCall(directive.RMLDirective): | ||
2426 | 1358 | signature = IBaseLogCall | ||
2427 | 1359 | level = None | ||
2428 | 1360 | |||
2429 | 1361 | def process(self): | ||
2430 | 1362 | message = self.getAttributeValues( | ||
2431 | 1363 | select=('message',), valuesOnly=True)[0] | ||
2432 | 1364 | manager = attr.getManager(self) | ||
2433 | 1365 | self.parent.flow.append( | ||
2434 | 1366 | LogCallFlowable(manager.logger, self.level, message)) | ||
2435 | 1367 | |||
2436 | 1368 | class ILog(IBaseLogCall): | ||
2437 | 1369 | """Log message at DEBUG level.""" | ||
2438 | 1370 | |||
2439 | 1371 | level = attr.Choice( | ||
2440 | 1372 | title=u'Level', | ||
2441 | 1373 | description=u'The default log level.', | ||
2442 | 1374 | choices=interfaces.LOG_LEVELS, | ||
2443 | 1375 | doLower=False, | ||
2444 | 1376 | default=logging.INFO, | ||
2445 | 1377 | required=True) | ||
2446 | 1378 | |||
2447 | 1379 | class Log(BaseLogCall): | ||
2448 | 1380 | signature = ILog | ||
2449 | 1381 | |||
2450 | 1382 | @property | ||
2451 | 1383 | def level(self): | ||
2452 | 1384 | return self.getAttributeValues(select=('level',), valuesOnly=True)[0] | ||
2453 | 1385 | |||
2454 | 1386 | class IDebug(IBaseLogCall): | ||
2455 | 1387 | """Log message at DEBUG level.""" | ||
2456 | 1388 | |||
2457 | 1389 | class Debug(BaseLogCall): | ||
2458 | 1390 | signature = IDebug | ||
2459 | 1391 | level = logging.DEBUG | ||
2460 | 1392 | |||
2461 | 1393 | |||
2462 | 1394 | class IInfo(IBaseLogCall): | ||
2463 | 1395 | """Log message at INFO level.""" | ||
2464 | 1396 | |||
2465 | 1397 | class Info(BaseLogCall): | ||
2466 | 1398 | signature = IInfo | ||
2467 | 1399 | level = logging.INFO | ||
2468 | 1400 | |||
2469 | 1401 | |||
2470 | 1402 | class IWarning(IBaseLogCall): | ||
2471 | 1403 | """Log message at WARNING level.""" | ||
2472 | 1404 | |||
2473 | 1405 | class Warning(BaseLogCall): | ||
2474 | 1406 | signature = IWarning | ||
2475 | 1407 | level = logging.WARNING | ||
2476 | 1408 | |||
2477 | 1409 | |||
2478 | 1410 | class IError(IBaseLogCall): | ||
2479 | 1411 | """Log message at ERROR level.""" | ||
2480 | 1412 | |||
2481 | 1413 | class Error(BaseLogCall): | ||
2482 | 1414 | signature = IError | ||
2483 | 1415 | level = logging.ERROR | ||
2484 | 1416 | |||
2485 | 1417 | |||
2486 | 1418 | class ICritical(IBaseLogCall): | ||
2487 | 1419 | """Log message at CRITICAL level.""" | ||
2488 | 1420 | |||
2489 | 1421 | class Critical(BaseLogCall): | ||
2490 | 1422 | signature = ICritical | ||
2491 | 1423 | level = logging.CRITICAL | ||
2492 | 1424 | |||
2493 | 1425 | |||
2494 | 1121 | class IFlow(interfaces.IRMLDirectiveSignature): | 1426 | class IFlow(interfaces.IRMLDirectiveSignature): |
2495 | 1122 | """A list of flowables.""" | 1427 | """A list of flowables.""" |
2496 | 1123 | occurence.containing( | 1428 | occurence.containing( |
2497 | @@ -1125,6 +1430,7 @@ | |||
2498 | 1125 | occurence.ZeroOrMore('illustration', IIllustration), | 1430 | occurence.ZeroOrMore('illustration', IIllustration), |
2499 | 1126 | occurence.ZeroOrMore('pre', IPreformatted), | 1431 | occurence.ZeroOrMore('pre', IPreformatted), |
2500 | 1127 | occurence.ZeroOrMore('xpre', IXPreformatted), | 1432 | occurence.ZeroOrMore('xpre', IXPreformatted), |
2501 | 1433 | occurence.ZeroOrMore('codesnippet', ICodeSnippet), | ||
2502 | 1128 | occurence.ZeroOrMore('plugInFlowable', IPluginFlowable), | 1434 | occurence.ZeroOrMore('plugInFlowable', IPluginFlowable), |
2503 | 1129 | occurence.ZeroOrMore('barCodeFlowable', IBarCodeFlowable), | 1435 | occurence.ZeroOrMore('barCodeFlowable', IBarCodeFlowable), |
2504 | 1130 | occurence.ZeroOrMore('outlineAdd', IOutlineAdd), | 1436 | occurence.ZeroOrMore('outlineAdd', IOutlineAdd), |
2505 | @@ -1132,6 +1438,9 @@ | |||
2506 | 1132 | occurence.ZeroOrMore('h1', IHeading1), | 1438 | occurence.ZeroOrMore('h1', IHeading1), |
2507 | 1133 | occurence.ZeroOrMore('h2', IHeading2), | 1439 | occurence.ZeroOrMore('h2', IHeading2), |
2508 | 1134 | occurence.ZeroOrMore('h3', IHeading3), | 1440 | occurence.ZeroOrMore('h3', IHeading3), |
2509 | 1441 | occurence.ZeroOrMore('h4', IHeading4), | ||
2510 | 1442 | occurence.ZeroOrMore('h5', IHeading5), | ||
2511 | 1443 | occurence.ZeroOrMore('h6', IHeading6), | ||
2512 | 1135 | occurence.ZeroOrMore('para', IParagraph), | 1444 | occurence.ZeroOrMore('para', IParagraph), |
2513 | 1136 | occurence.ZeroOrMore('blockTable', IBlockTable), | 1445 | occurence.ZeroOrMore('blockTable', IBlockTable), |
2514 | 1137 | occurence.ZeroOrMore('nextFrame', INextFrame), | 1446 | occurence.ZeroOrMore('nextFrame', INextFrame), |
2515 | @@ -1141,14 +1450,24 @@ | |||
2516 | 1141 | occurence.ZeroOrMore('condPageBreak', IConditionalPageBreak), | 1450 | occurence.ZeroOrMore('condPageBreak', IConditionalPageBreak), |
2517 | 1142 | occurence.ZeroOrMore('keepInFrame', IKeepInFrame), | 1451 | occurence.ZeroOrMore('keepInFrame', IKeepInFrame), |
2518 | 1143 | occurence.ZeroOrMore('keepTogether', IKeepTogether), | 1452 | occurence.ZeroOrMore('keepTogether', IKeepTogether), |
2519 | 1453 | occurence.ZeroOrMore('img', IImage), | ||
2520 | 1144 | occurence.ZeroOrMore('imageAndFlowables', IImageAndFlowables), | 1454 | occurence.ZeroOrMore('imageAndFlowables', IImageAndFlowables), |
2521 | 1145 | occurence.ZeroOrMore('pto', IPTO), | 1455 | occurence.ZeroOrMore('pto', IPTO), |
2522 | 1146 | occurence.ZeroOrMore('indent', IIndent), | 1456 | occurence.ZeroOrMore('indent', IIndent), |
2523 | 1147 | occurence.ZeroOrMore('fixedSize', IFixedSize), | 1457 | occurence.ZeroOrMore('fixedSize', IFixedSize), |
2524 | 1458 | occurence.ZeroOrMore('bookmarkPage', IBookmarkPage), | ||
2525 | 1148 | occurence.ZeroOrMore('bookmark', IBookmark), | 1459 | occurence.ZeroOrMore('bookmark', IBookmark), |
2526 | 1149 | occurence.ZeroOrMore('link', ILink), | 1460 | occurence.ZeroOrMore('link', ILink), |
2527 | 1150 | occurence.ZeroOrMore('hr', IHorizontalRow), | 1461 | occurence.ZeroOrMore('hr', IHorizontalRow), |
2528 | 1462 | occurence.ZeroOrMore('showIndex', IShowIndex), | ||
2529 | 1151 | occurence.ZeroOrMore('name', special.IName), | 1463 | occurence.ZeroOrMore('name', special.IName), |
2530 | 1464 | occurence.ZeroOrMore('namedString', INamedString), | ||
2531 | 1465 | occurence.ZeroOrMore('log', ILog), | ||
2532 | 1466 | occurence.ZeroOrMore('debug', IDebug), | ||
2533 | 1467 | occurence.ZeroOrMore('info', IInfo), | ||
2534 | 1468 | occurence.ZeroOrMore('warning', IWarning), | ||
2535 | 1469 | occurence.ZeroOrMore('error', IError), | ||
2536 | 1470 | occurence.ZeroOrMore('critical', ICritical), | ||
2537 | 1152 | ) | 1471 | ) |
2538 | 1153 | 1472 | ||
2539 | 1154 | class Flow(directive.RMLDirective): | 1473 | class Flow(directive.RMLDirective): |
2540 | @@ -1159,6 +1478,7 @@ | |||
2541 | 1159 | 'illustration': Illustration, | 1478 | 'illustration': Illustration, |
2542 | 1160 | 'pre': Preformatted, | 1479 | 'pre': Preformatted, |
2543 | 1161 | 'xpre': XPreformatted, | 1480 | 'xpre': XPreformatted, |
2544 | 1481 | 'codesnippet': CodeSnippet, | ||
2545 | 1162 | 'plugInFlowable': PluginFlowable, | 1482 | 'plugInFlowable': PluginFlowable, |
2546 | 1163 | 'barCodeFlowable': BarCodeFlowable, | 1483 | 'barCodeFlowable': BarCodeFlowable, |
2547 | 1164 | 'outlineAdd': OutlineAdd, | 1484 | 'outlineAdd': OutlineAdd, |
2548 | @@ -1167,6 +1487,9 @@ | |||
2549 | 1167 | 'h1': Heading1, | 1487 | 'h1': Heading1, |
2550 | 1168 | 'h2': Heading2, | 1488 | 'h2': Heading2, |
2551 | 1169 | 'h3': Heading3, | 1489 | 'h3': Heading3, |
2552 | 1490 | 'h4': Heading4, | ||
2553 | 1491 | 'h5': Heading5, | ||
2554 | 1492 | 'h6': Heading6, | ||
2555 | 1170 | 'para': Paragraph, | 1493 | 'para': Paragraph, |
2556 | 1171 | # Table Flowable | 1494 | # Table Flowable |
2557 | 1172 | 'blockTable': BlockTable, | 1495 | 'blockTable': BlockTable, |
2558 | @@ -1178,15 +1501,26 @@ | |||
2559 | 1178 | 'condPageBreak': ConditionalPageBreak, | 1501 | 'condPageBreak': ConditionalPageBreak, |
2560 | 1179 | 'keepInFrame': KeepInFrame, | 1502 | 'keepInFrame': KeepInFrame, |
2561 | 1180 | 'keepTogether': KeepTogether, | 1503 | 'keepTogether': KeepTogether, |
2562 | 1504 | 'img': Image, | ||
2563 | 1181 | 'imageAndFlowables': ImageAndFlowables, | 1505 | 'imageAndFlowables': ImageAndFlowables, |
2564 | 1182 | 'pto': PTO, | 1506 | 'pto': PTO, |
2565 | 1183 | 'indent': Indent, | 1507 | 'indent': Indent, |
2566 | 1184 | 'fixedSize': FixedSize, | 1508 | 'fixedSize': FixedSize, |
2567 | 1509 | 'bookmarkPage': BookmarkPage, | ||
2568 | 1185 | 'bookmark': Bookmark, | 1510 | 'bookmark': Bookmark, |
2569 | 1186 | 'link': Link, | 1511 | 'link': Link, |
2570 | 1187 | 'hr': HorizontalRow, | 1512 | 'hr': HorizontalRow, |
2571 | 1513 | 'showIndex': ShowIndex, | ||
2572 | 1188 | # Special Elements | 1514 | # Special Elements |
2573 | 1189 | 'name': special.Name, | 1515 | 'name': special.Name, |
2574 | 1516 | 'namedString': NamedString, | ||
2575 | 1517 | # Logging | ||
2576 | 1518 | 'log': Log, | ||
2577 | 1519 | 'debug': Debug, | ||
2578 | 1520 | 'info': Info, | ||
2579 | 1521 | 'warning': Warning, | ||
2580 | 1522 | 'error': Error, | ||
2581 | 1523 | 'critical': Critical, | ||
2582 | 1190 | } | 1524 | } |
2583 | 1191 | 1525 | ||
2584 | 1192 | def __init__(self, *args, **kw): | 1526 | def __init__(self, *args, **kw): |
2585 | 1193 | 1527 | ||
2586 | === modified file 'src/z3c/rml/form.py' | |||
2587 | --- src/z3c/rml/form.py 2011-01-05 22:34:45 +0000 | |||
2588 | +++ src/z3c/rml/form.py 2013-01-09 02:49:23 +0000 | |||
2589 | @@ -13,7 +13,7 @@ | |||
2590 | 13 | ############################################################################## | 13 | ############################################################################## |
2591 | 14 | """Page Drawing Related Element Processing | 14 | """Page Drawing Related Element Processing |
2592 | 15 | 15 | ||
2594 | 16 | $Id: form.py 74162 2007-04-16 04:16:37Z srichter $ | 16 | $Id: form.py 128806 2012-12-20 16:34:40Z srichter $ |
2595 | 17 | """ | 17 | """ |
2596 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
2597 | 19 | import types | 19 | import types |
2598 | @@ -54,21 +54,6 @@ | |||
2599 | 54 | description=u'The height of the barcode.', | 54 | description=u'The height of the barcode.', |
2600 | 55 | required=False) | 55 | required=False) |
2601 | 56 | 56 | ||
2602 | 57 | strokeColor = attr.Color( | ||
2603 | 58 | title=u'Stroke Color', | ||
2604 | 59 | description=(u'The color of the line strokes in the area.'), | ||
2605 | 60 | required=False) | ||
2606 | 61 | |||
2607 | 62 | strokeWidth = attr.Measurement( | ||
2608 | 63 | title=u'Stroke Width', | ||
2609 | 64 | description=u'The width of the line strokes in the area.', | ||
2610 | 65 | required=False) | ||
2611 | 66 | |||
2612 | 67 | fillColor = attr.Color( | ||
2613 | 68 | title=u'Fill Color', | ||
2614 | 69 | description=(u'The color of the filled shapes in the area.'), | ||
2615 | 70 | required=False) | ||
2616 | 71 | |||
2617 | 72 | barStrokeColor = attr.Color( | 57 | barStrokeColor = attr.Color( |
2618 | 73 | title=u'Bar Stroke Color', | 58 | title=u'Bar Stroke Color', |
2619 | 74 | description=(u'The color of the line strokes in the barcode.'), | 59 | description=(u'The color of the line strokes in the barcode.'), |
2620 | @@ -196,6 +181,12 @@ | |||
2621 | 196 | description=(u'The color of human readable text.'), | 181 | description=(u'The color of human readable text.'), |
2622 | 197 | required=False) | 182 | required=False) |
2623 | 198 | 183 | ||
2624 | 184 | # USPS4S | ||
2625 | 185 | routing = attr.String( | ||
2626 | 186 | title=u'Routing', | ||
2627 | 187 | description=u'The routing information string.', | ||
2628 | 188 | required=False) | ||
2629 | 189 | |||
2630 | 199 | 190 | ||
2631 | 200 | class IBarCode(IBarCodeBase): | 191 | class IBarCode(IBarCodeBase): |
2632 | 201 | """A barcode graphic.""" | 192 | """A barcode graphic.""" |
2633 | @@ -212,7 +203,10 @@ | |||
2634 | 212 | default=0, | 203 | default=0, |
2635 | 213 | required=False) | 204 | required=False) |
2636 | 214 | 205 | ||
2638 | 215 | 206 | isoScale = attr.Boolean( | |
2639 | 207 | title=u'Isometric Scaling', | ||
2640 | 208 | description=u'When set, the aspect ration of the barcode is enforced.', | ||
2641 | 209 | required=False) | ||
2642 | 216 | 210 | ||
2643 | 217 | class BarCode(directive.RMLDirective): | 211 | class BarCode(directive.RMLDirective): |
2644 | 218 | signature = IBarCode | 212 | signature = IBarCode |
2645 | 219 | 213 | ||
2646 | === modified file 'src/z3c/rml/interfaces.py' | |||
2647 | --- src/z3c/rml/interfaces.py 2011-01-05 22:34:45 +0000 | |||
2648 | +++ src/z3c/rml/interfaces.py 2013-01-09 02:49:23 +0000 | |||
2649 | @@ -12,10 +12,9 @@ | |||
2650 | 12 | # | 12 | # |
2651 | 13 | ############################################################################## | 13 | ############################################################################## |
2652 | 14 | """RML to PDF Converter Interfaces | 14 | """RML to PDF Converter Interfaces |
2653 | 15 | |||
2654 | 16 | $Id: interfaces.py 74195 2007-04-16 22:41:24Z srichter $ | ||
2655 | 17 | """ | 15 | """ |
2656 | 18 | __docformat__ = "reStructuredText" | 16 | __docformat__ = "reStructuredText" |
2657 | 17 | import logging | ||
2658 | 19 | import reportlab.lib.enums | 18 | import reportlab.lib.enums |
2659 | 20 | import zope.interface | 19 | import zope.interface |
2660 | 21 | import zope.schema | 20 | import zope.schema |
2661 | @@ -36,7 +35,16 @@ | |||
2662 | 36 | VALIGN_TEXT_CHOICES = { | 35 | VALIGN_TEXT_CHOICES = { |
2663 | 37 | 'top': 'TOP', 'middle': 'MIDDLE', 'bottom': 'BOTTOM'} | 36 | 'top': 'TOP', 'middle': 'MIDDLE', 'bottom': 'BOTTOM'} |
2664 | 38 | SPLIT_CHOICES = ('splitfirst', 'splitlast') | 37 | SPLIT_CHOICES = ('splitfirst', 'splitlast') |
2666 | 39 | 38 | TEXT_TRANSFORM_CHOICES = ('uppercase', 'lowercase') | |
2667 | 39 | LIST_FORMATS = ('I', 'i', '123', 'ABC', 'abc') | ||
2668 | 40 | ORDERED_LIST_TYPES = ('I', 'i', '1', 'A', 'a') | ||
2669 | 41 | UNORDERED_BULLET_VALUES = ('circle', 'square', 'disc', 'diamond', 'rarrowhead') | ||
2670 | 42 | LOG_LEVELS = { | ||
2671 | 43 | 'DEBUG': logging.DEBUG, | ||
2672 | 44 | 'INFO': logging.INFO, | ||
2673 | 45 | 'WARNING': logging.WARNING, | ||
2674 | 46 | 'ERROR': logging.ERROR, | ||
2675 | 47 | 'CRITICAL': logging.CRITICAL} | ||
2676 | 40 | 48 | ||
2677 | 41 | class IRML2PDF(zope.interface.Interface): | 49 | class IRML2PDF(zope.interface.Interface): |
2678 | 42 | """This is the main public API of z3c.rml""" | 50 | """This is the main public API of z3c.rml""" |
2679 | 43 | 51 | ||
2680 | === added file 'src/z3c/rml/list.py' | |||
2681 | --- src/z3c/rml/list.py 1970-01-01 00:00:00 +0000 | |||
2682 | +++ src/z3c/rml/list.py 2013-01-09 02:49:23 +0000 | |||
2683 | @@ -0,0 +1,181 @@ | |||
2684 | 1 | ############################################################################## | ||
2685 | 2 | # | ||
2686 | 3 | # Copyright (c) 2012 Zope Foundation and Contributors. | ||
2687 | 4 | # All Rights Reserved. | ||
2688 | 5 | # | ||
2689 | 6 | # This software is subject to the provisions of the Zope Public License, | ||
2690 | 7 | # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
2691 | 8 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
2692 | 9 | # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
2693 | 10 | # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
2694 | 11 | # FOR A PARTICULAR PURPOSE. | ||
2695 | 12 | # | ||
2696 | 13 | ############################################################################## | ||
2697 | 14 | """``ul``, ``ol``, and ``li`` directives. | ||
2698 | 15 | """ | ||
2699 | 16 | __docformat__ = "reStructuredText" | ||
2700 | 17 | import copy | ||
2701 | 18 | import reportlab.lib.styles | ||
2702 | 19 | import reportlab.platypus | ||
2703 | 20 | import zope.schema | ||
2704 | 21 | from reportlab.platypus import flowables | ||
2705 | 22 | |||
2706 | 23 | from z3c.rml import attr, directive, flowable, interfaces, occurence, stylesheet | ||
2707 | 24 | |||
2708 | 25 | |||
2709 | 26 | class IListItem(stylesheet.IMinimalListStyle, flowable.IFlow): | ||
2710 | 27 | """A list item in an ordered or unordered list.""" | ||
2711 | 28 | |||
2712 | 29 | style = attr.Style( | ||
2713 | 30 | title=u'Style', | ||
2714 | 31 | description=u'The list style that is applied to the list.', | ||
2715 | 32 | required=False) | ||
2716 | 33 | |||
2717 | 34 | class ListItem(flowable.Flow): | ||
2718 | 35 | signature = IListItem | ||
2719 | 36 | klass = reportlab.platypus.ListItem | ||
2720 | 37 | attrMapping = {} | ||
2721 | 38 | |||
2722 | 39 | styleAttributes = zope.schema.getFieldNames(stylesheet.IMinimalListStyle) | ||
2723 | 40 | |||
2724 | 41 | def processStyle(self, style): | ||
2725 | 42 | attrs = self.getAttributeValues(select=self.styleAttributes) | ||
2726 | 43 | if attrs or not hasattr(style, 'value'): | ||
2727 | 44 | style = copy.deepcopy(style) | ||
2728 | 45 | # Sigh, this is needed since unordered list items expect the value. | ||
2729 | 46 | style.value = style.start | ||
2730 | 47 | for name, value in attrs: | ||
2731 | 48 | setattr(style, name, value) | ||
2732 | 49 | return style | ||
2733 | 50 | |||
2734 | 51 | def process(self): | ||
2735 | 52 | self.processSubDirectives() | ||
2736 | 53 | args = dict(self.getAttributeValues(ignore=self.styleAttributes)) | ||
2737 | 54 | if 'style' not in args: | ||
2738 | 55 | args['style'] = self.parent.baseStyle | ||
2739 | 56 | args['style'] = self.processStyle(args['style']) | ||
2740 | 57 | li = self.klass(self.flow, **args) | ||
2741 | 58 | self.parent.flow.append(li) | ||
2742 | 59 | |||
2743 | 60 | |||
2744 | 61 | class IOrderedListItem(IListItem): | ||
2745 | 62 | """An ordered list item.""" | ||
2746 | 63 | |||
2747 | 64 | value = attr.Integer( | ||
2748 | 65 | title=u'Bullet Value', | ||
2749 | 66 | description=u'The counter value.', | ||
2750 | 67 | required=False) | ||
2751 | 68 | |||
2752 | 69 | class OrderedListItem(ListItem): | ||
2753 | 70 | signature = IOrderedListItem | ||
2754 | 71 | |||
2755 | 72 | |||
2756 | 73 | class IUnorderedListItem(IListItem): | ||
2757 | 74 | """An ordered list item.""" | ||
2758 | 75 | |||
2759 | 76 | value = attr.Choice( | ||
2760 | 77 | title=u'Bullet Value', | ||
2761 | 78 | description=u'The type of bullet character.', | ||
2762 | 79 | choices=interfaces.UNORDERED_BULLET_VALUES, | ||
2763 | 80 | required=False) | ||
2764 | 81 | |||
2765 | 82 | class UnorderedListItem(ListItem): | ||
2766 | 83 | signature = IUnorderedListItem | ||
2767 | 84 | |||
2768 | 85 | styleAttributes = ListItem.styleAttributes + ['value'] | ||
2769 | 86 | |||
2770 | 87 | |||
2771 | 88 | class IListBase(stylesheet.IBaseListStyle): | ||
2772 | 89 | |||
2773 | 90 | style = attr.Style( | ||
2774 | 91 | title=u'Style', | ||
2775 | 92 | description=u'The list style that is applied to the list.', | ||
2776 | 93 | required=False) | ||
2777 | 94 | |||
2778 | 95 | class ListBase(directive.RMLDirective): | ||
2779 | 96 | klass = reportlab.platypus.ListFlowable | ||
2780 | 97 | factories = {'li': ListItem} | ||
2781 | 98 | attrMapping = {} | ||
2782 | 99 | |||
2783 | 100 | styleAttributes = zope.schema.getFieldNames(stylesheet.IBaseListStyle) | ||
2784 | 101 | |||
2785 | 102 | def __init__(self, *args, **kw): | ||
2786 | 103 | super(ListBase, self).__init__(*args, **kw) | ||
2787 | 104 | self.flow = [] | ||
2788 | 105 | |||
2789 | 106 | def processStyle(self, style): | ||
2790 | 107 | attrs = self.getAttributeValues( | ||
2791 | 108 | select=self.styleAttributes, attrMapping=self.attrMapping) | ||
2792 | 109 | if attrs: | ||
2793 | 110 | style = copy.deepcopy(style) | ||
2794 | 111 | for name, value in attrs: | ||
2795 | 112 | setattr(style, name, value) | ||
2796 | 113 | return style | ||
2797 | 114 | |||
2798 | 115 | def process(self): | ||
2799 | 116 | args = dict(self.getAttributeValues( | ||
2800 | 117 | ignore=self.styleAttributes, attrMapping=self.attrMapping)) | ||
2801 | 118 | if 'style' not in args: | ||
2802 | 119 | args['style'] = reportlab.lib.styles.ListStyle('List') | ||
2803 | 120 | args['style'] = self.baseStyle = self.processStyle(args['style']) | ||
2804 | 121 | self.processSubDirectives() | ||
2805 | 122 | li = self.klass(self.flow, **args) | ||
2806 | 123 | self.parent.flow.append(li) | ||
2807 | 124 | |||
2808 | 125 | |||
2809 | 126 | class IOrderedList(IListBase): | ||
2810 | 127 | """An ordered list.""" | ||
2811 | 128 | occurence.containing( | ||
2812 | 129 | occurence.ZeroOrMore('li', IOrderedListItem), | ||
2813 | 130 | ) | ||
2814 | 131 | |||
2815 | 132 | bulletType = attr.Choice( | ||
2816 | 133 | title=u'Bullet Type', | ||
2817 | 134 | description=u'The type of bullet formatting.', | ||
2818 | 135 | choices=interfaces.ORDERED_LIST_TYPES, | ||
2819 | 136 | doLower=False, | ||
2820 | 137 | required=False) | ||
2821 | 138 | |||
2822 | 139 | class OrderedList(ListBase): | ||
2823 | 140 | signature = IOrderedList | ||
2824 | 141 | factories = {'li': OrderedListItem} | ||
2825 | 142 | |||
2826 | 143 | styleAttributes = ListBase.styleAttributes + ['bulletType'] | ||
2827 | 144 | |||
2828 | 145 | |||
2829 | 146 | class IUnorderedList(IListBase): | ||
2830 | 147 | """And unordered list.""" | ||
2831 | 148 | occurence.containing( | ||
2832 | 149 | occurence.ZeroOrMore('li', IUnorderedListItem), | ||
2833 | 150 | ) | ||
2834 | 151 | |||
2835 | 152 | value = attr.Choice( | ||
2836 | 153 | title=u'Bullet Value', | ||
2837 | 154 | description=u'The type of bullet character.', | ||
2838 | 155 | choices=interfaces.UNORDERED_BULLET_VALUES, | ||
2839 | 156 | default='disc', | ||
2840 | 157 | required=False) | ||
2841 | 158 | |||
2842 | 159 | class UnorderedList(ListBase): | ||
2843 | 160 | signature = IUnorderedList | ||
2844 | 161 | attrMapping = {'value': 'start'} | ||
2845 | 162 | factories = {'li': UnorderedListItem} | ||
2846 | 163 | |||
2847 | 164 | def getAttributeValues(self, *args, **kw): | ||
2848 | 165 | res = super(UnorderedList, self).getAttributeValues(*args, **kw) | ||
2849 | 166 | res.append(('bulletType', 'bullet')) | ||
2850 | 167 | return res | ||
2851 | 168 | |||
2852 | 169 | flowable.Flow.factories['ol'] = OrderedList | ||
2853 | 170 | flowable.IFlow.setTaggedValue( | ||
2854 | 171 | 'directives', | ||
2855 | 172 | flowable.IFlow.getTaggedValue('directives') + | ||
2856 | 173 | (occurence.ZeroOrMore('ol', IOrderedList),) | ||
2857 | 174 | ) | ||
2858 | 175 | |||
2859 | 176 | flowable.Flow.factories['ul'] = UnorderedList | ||
2860 | 177 | flowable.IFlow.setTaggedValue( | ||
2861 | 178 | 'directives', | ||
2862 | 179 | flowable.IFlow.getTaggedValue('directives') + | ||
2863 | 180 | (occurence.ZeroOrMore('ul', IUnorderedList),) | ||
2864 | 181 | ) | ||
2865 | 0 | 182 | ||
2866 | === modified file 'src/z3c/rml/paraparser.py' | |||
2867 | --- src/z3c/rml/paraparser.py 2011-01-05 22:34:45 +0000 | |||
2868 | +++ src/z3c/rml/paraparser.py 2013-01-09 02:49:23 +0000 | |||
2869 | @@ -24,9 +24,12 @@ | |||
2870 | 24 | import reportlab.platypus.paraparser | 24 | import reportlab.platypus.paraparser |
2871 | 25 | 25 | ||
2872 | 26 | 26 | ||
2874 | 27 | class DynamicFragment(reportlab.platypus.paraparser.ParaFrag): | 27 | class PageNumberFragment(reportlab.platypus.paraparser.ParaFrag): |
2875 | 28 | """A fragment whose `text` is computed at access time.""" | 28 | """A fragment whose `text` is computed at access time.""" |
2876 | 29 | 29 | ||
2877 | 30 | def __init__(self, attributes): | ||
2878 | 31 | reportlab.platypus.paraparser.ParaFrag.__init__(self) | ||
2879 | 32 | |||
2880 | 30 | @property | 33 | @property |
2881 | 31 | def text(self): | 34 | def text(self): |
2882 | 32 | # Guess 1: We're in a paragraph in a story. | 35 | # Guess 1: We're in a paragraph in a story. |
2883 | @@ -43,18 +46,54 @@ | |||
2884 | 43 | return str(canvas.getPageNumber()) | 46 | return str(canvas.getPageNumber()) |
2885 | 44 | 47 | ||
2886 | 45 | 48 | ||
2887 | 49 | class GetNameFragment(reportlab.platypus.paraparser.ParaFrag): | ||
2888 | 50 | """A fragment whose `text` is computed at access time.""" | ||
2889 | 51 | |||
2890 | 52 | def __init__(self, attributes): | ||
2891 | 53 | reportlab.platypus.paraparser.ParaFrag.__init__(self) | ||
2892 | 54 | self.id = attributes['id'] | ||
2893 | 55 | |||
2894 | 56 | @property | ||
2895 | 57 | def text(self): | ||
2896 | 58 | # Guess 1: We're in a paragraph in a story. | ||
2897 | 59 | frame = inspect.currentframe(4) | ||
2898 | 60 | canvas = frame.f_locals.get('canvas', None) | ||
2899 | 61 | |||
2900 | 62 | if canvas is None: | ||
2901 | 63 | # Guess 2: We're in a template | ||
2902 | 64 | canvas = frame.f_locals.get('canv', None) | ||
2903 | 65 | |||
2904 | 66 | if canvas is None: | ||
2905 | 67 | raise Exception("Can't use <getName/> in this location.") | ||
2906 | 68 | |||
2907 | 69 | return canvas.manager.names[self.id] | ||
2908 | 70 | |||
2909 | 71 | |||
2910 | 46 | class Z3CParagraphParser(reportlab.platypus.paraparser.ParaParser): | 72 | class Z3CParagraphParser(reportlab.platypus.paraparser.ParaParser): |
2911 | 47 | """Extensions to paragraph-internal XML parsing.""" | 73 | """Extensions to paragraph-internal XML parsing.""" |
2912 | 48 | 74 | ||
2915 | 49 | def start_pageNumber(self, attributes): | 75 | def startDynamic(self, attributes, klass): |
2916 | 50 | frag = DynamicFragment() | 76 | frag = klass(attributes) |
2917 | 51 | frag.__dict__.update(self._stack[-1].__dict__) | 77 | frag.__dict__.update(self._stack[-1].__dict__) |
2919 | 52 | frag.fontName = reportlab.lib.fonts.tt2ps(frag.fontName, frag.bold, frag.italic) | 78 | frag.fontName = reportlab.lib.fonts.tt2ps( |
2920 | 79 | frag.fontName, frag.bold, frag.italic) | ||
2921 | 53 | self.fragList.append(frag) | 80 | self.fragList.append(frag) |
2922 | 54 | self._stack.append(frag) | 81 | self._stack.append(frag) |
2923 | 55 | 82 | ||
2924 | 83 | def endDynamic(self): | ||
2925 | 84 | self._pop() | ||
2926 | 85 | |||
2927 | 86 | def start_pageNumber(self, attributes): | ||
2928 | 87 | self.startDynamic(attributes, PageNumberFragment) | ||
2929 | 88 | |||
2930 | 56 | def end_pageNumber(self): | 89 | def end_pageNumber(self): |
2932 | 57 | self._pop() | 90 | self.endDynamic() |
2933 | 91 | |||
2934 | 92 | def start_getName(self, attributes): | ||
2935 | 93 | self.startDynamic(attributes, GetNameFragment) | ||
2936 | 94 | |||
2937 | 95 | def end_getName(self): | ||
2938 | 96 | self.endDynamic() | ||
2939 | 58 | 97 | ||
2940 | 59 | 98 | ||
2941 | 60 | # Monkey-patch reportlabs global parser instance. Wah. | 99 | # Monkey-patch reportlabs global parser instance. Wah. |
2942 | 61 | 100 | ||
2943 | === added file 'src/z3c/rml/pdfinclude.py' | |||
2944 | --- src/z3c/rml/pdfinclude.py 1970-01-01 00:00:00 +0000 | |||
2945 | +++ src/z3c/rml/pdfinclude.py 2013-01-09 02:49:23 +0000 | |||
2946 | @@ -0,0 +1,113 @@ | |||
2947 | 1 | ############################################################################## | ||
2948 | 2 | # | ||
2949 | 3 | # Copyright (c) 2012 Zope Foundation and Contributors. | ||
2950 | 4 | # All Rights Reserved. | ||
2951 | 5 | # | ||
2952 | 6 | # This software is subject to the provisions of the Zope Public License, | ||
2953 | 7 | # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
2954 | 8 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
2955 | 9 | # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
2956 | 10 | # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
2957 | 11 | # FOR A PARTICULAR PURPOSE. | ||
2958 | 12 | # | ||
2959 | 13 | ############################################################################## | ||
2960 | 14 | """``pdfInclude`` Directive. | ||
2961 | 15 | """ | ||
2962 | 16 | __docformat__ = "reStructuredText" | ||
2963 | 17 | try: | ||
2964 | 18 | import pyPdf | ||
2965 | 19 | except ImportError: | ||
2966 | 20 | pyPdf = None | ||
2967 | 21 | from reportlab.platypus import flowables | ||
2968 | 22 | |||
2969 | 23 | from z3c.rml import attr, flowable, interfaces, occurence, page | ||
2970 | 24 | |||
2971 | 25 | |||
2972 | 26 | class IncludePdfPagesFlowable(flowables.Flowable): | ||
2973 | 27 | |||
2974 | 28 | def __init__(self, pdf_file, pages, mergeprocessor): | ||
2975 | 29 | flowables.Flowable.__init__(self) | ||
2976 | 30 | self.pdf_file = pdf_file | ||
2977 | 31 | self.proc = mergeprocessor | ||
2978 | 32 | |||
2979 | 33 | pdf = pyPdf.PdfFileReader(pdf_file) | ||
2980 | 34 | self.num_pages = pdf.getNumPages() | ||
2981 | 35 | self.pages = pages if pages else range(1, self.num_pages+1) | ||
2982 | 36 | |||
2983 | 37 | self.width = 10<<32 | ||
2984 | 38 | self.height = 10<<32 | ||
2985 | 39 | |||
2986 | 40 | def draw(): | ||
2987 | 41 | return NotImplementedError('PDFPages shall be drawn not me') | ||
2988 | 42 | |||
2989 | 43 | def split(self, availWidth, availheight): | ||
2990 | 44 | result = [] | ||
2991 | 45 | for i in self.pages: | ||
2992 | 46 | result.append(flowables.PageBreak()) | ||
2993 | 47 | result.append(PDFPageFlowable(self, i-1, availWidth, availheight)) | ||
2994 | 48 | return result | ||
2995 | 49 | |||
2996 | 50 | |||
2997 | 51 | class PDFPageFlowable(flowables.Flowable): | ||
2998 | 52 | |||
2999 | 53 | def __init__(self, parent, pagenumber, width, height): | ||
3000 | 54 | flowables.Flowable.__init__(self) | ||
3001 | 55 | self.parent = parent | ||
3002 | 56 | self.pagenumber = pagenumber | ||
3003 | 57 | self.width = width | ||
3004 | 58 | self.height = height | ||
3005 | 59 | |||
3006 | 60 | def draw(self): | ||
3007 | 61 | # FIXME : scale and rotate ? | ||
3008 | 62 | # self.canv.addLiteral(self.page.getContents()) | ||
3009 | 63 | proc = self.parent.proc | ||
3010 | 64 | outPage = self.canv.getPageNumber()-1 | ||
3011 | 65 | pageOperations = proc.operations.setdefault(outPage, []) | ||
3012 | 66 | pageOperations.append((self.parent.pdf_file, self.pagenumber)) | ||
3013 | 67 | # flowable.NextPage() | ||
3014 | 68 | |||
3015 | 69 | def split(self, availWidth, availheight): | ||
3016 | 70 | return [self] | ||
3017 | 71 | |||
3018 | 72 | class IIncludePdfPages(interfaces.IRMLDirectiveSignature): | ||
3019 | 73 | """Inserts a set of pages from a given PDF.""" | ||
3020 | 74 | |||
3021 | 75 | filename = attr.File( | ||
3022 | 76 | title=u'Path to file', | ||
3023 | 77 | description=u'The pdf file to include.', | ||
3024 | 78 | required=True) | ||
3025 | 79 | |||
3026 | 80 | pages = attr.IntegerSequence( | ||
3027 | 81 | title=u'Pages', | ||
3028 | 82 | description=u'A list of pages to insert.', | ||
3029 | 83 | required=False) | ||
3030 | 84 | |||
3031 | 85 | |||
3032 | 86 | class IncludePdfPages(flowable.Flowable): | ||
3033 | 87 | signature = IIncludePdfPages | ||
3034 | 88 | |||
3035 | 89 | def getProcessor(self): | ||
3036 | 90 | manager = attr.getManager(self, interfaces.IPostProcessorManager) | ||
3037 | 91 | procs = dict(manager.postProcessors) | ||
3038 | 92 | if 'MERGE' not in procs: | ||
3039 | 93 | proc = page.MergePostProcessor() | ||
3040 | 94 | manager.postProcessors.append(('MERGE', proc)) | ||
3041 | 95 | return proc | ||
3042 | 96 | return procs['MERGE'] | ||
3043 | 97 | |||
3044 | 98 | def process(self): | ||
3045 | 99 | if pyPdf is None: | ||
3046 | 100 | raise Exception( | ||
3047 | 101 | 'pyPdf is not installed, so this feature is not available.') | ||
3048 | 102 | args = dict(self.getAttributeValues()) | ||
3049 | 103 | proc = self.getProcessor() | ||
3050 | 104 | self.parent.flow.append( | ||
3051 | 105 | IncludePdfPagesFlowable(args['filename'], args.get('pages'), proc)) | ||
3052 | 106 | |||
3053 | 107 | |||
3054 | 108 | flowable.Flow.factories['includePdfPages'] = IncludePdfPages | ||
3055 | 109 | flowable.IFlow.setTaggedValue( | ||
3056 | 110 | 'directives', | ||
3057 | 111 | flowable.IFlow.getTaggedValue('directives') + | ||
3058 | 112 | (occurence.ZeroOrMore('includePdfPages', IIncludePdfPages),) | ||
3059 | 113 | ) | ||
3060 | 0 | 114 | ||
3061 | === modified file 'src/z3c/rml/platypus.py' | |||
3062 | --- src/z3c/rml/platypus.py 2012-04-02 15:47:51 +0000 | |||
3063 | +++ src/z3c/rml/platypus.py 2013-01-09 02:49:23 +0000 | |||
3064 | @@ -13,7 +13,7 @@ | |||
3065 | 13 | ############################################################################## | 13 | ############################################################################## |
3066 | 14 | """Style Related Element Processing | 14 | """Style Related Element Processing |
3067 | 15 | 15 | ||
3069 | 16 | $Id: platypus.py 121449 2011-04-19 16:00:38Z menesis $ | 16 | $Id: platypus.py 128833 2012-12-21 02:02:02Z srichter $ |
3070 | 17 | """ | 17 | """ |
3071 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
3072 | 19 | import reportlab.platypus.flowables | 19 | import reportlab.platypus.flowables |
3073 | @@ -79,6 +79,11 @@ | |||
3074 | 79 | self.canv.bookmarkPage(*self.args, **self.kw) | 79 | self.canv.bookmarkPage(*self.args, **self.kw) |
3075 | 80 | 80 | ||
3076 | 81 | 81 | ||
3077 | 82 | class Bookmark(BaseFlowable): | ||
3078 | 83 | def draw(self): | ||
3079 | 84 | self.canv.bookmarkHorizontal(*self.args, **self.kw) | ||
3080 | 85 | |||
3081 | 86 | |||
3082 | 82 | class OutlineAdd(BaseFlowable): | 87 | class OutlineAdd(BaseFlowable): |
3083 | 83 | def draw(self): | 88 | def draw(self): |
3084 | 84 | if self.kw.get('key', None) is None: | 89 | if self.kw.get('key', None) is None: |
3085 | 85 | 90 | ||
3086 | === modified file 'src/z3c/rml/reference.pt' | |||
3087 | --- src/z3c/rml/reference.pt 2011-01-05 22:34:45 +0000 | |||
3088 | +++ src/z3c/rml/reference.pt 2013-01-09 02:49:23 +0000 | |||
3089 | @@ -112,7 +112,7 @@ | |||
3090 | 112 | </drawCenteredString> | 112 | </drawCenteredString> |
3091 | 113 | <setFont name="Helvetica" size="24" /> | 113 | <setFont name="Helvetica" size="24" /> |
3092 | 114 | <drawCenteredString x="10.5cm" y="18.5cm"> | 114 | <drawCenteredString x="10.5cm" y="18.5cm"> |
3094 | 115 | Version 0.9 | 115 | Version 2.0 |
3095 | 116 | </drawCenteredString> | 116 | </drawCenteredString> |
3096 | 117 | </pageGraphics> | 117 | </pageGraphics> |
3097 | 118 | <frame id="main" x1="3cm" y1="2cm" width="17cm" height="25.7cm" /> | 118 | <frame id="main" x1="3cm" y1="2cm" width="17cm" height="25.7cm" /> |
3098 | @@ -181,7 +181,7 @@ | |||
3099 | 181 | <outlineAdd level="1" tal:content="directive/name"> | 181 | <outlineAdd level="1" tal:content="directive/name"> |
3100 | 182 | Element Name | 182 | Element Name |
3101 | 183 | </outlineAdd> | 183 | </outlineAdd> |
3103 | 184 | <bookmark tal:attributes="name directive/id"/> | 184 | <bookmarkPage tal:attributes="name directive/id"/> |
3104 | 185 | <para style="deprecation" | 185 | <para style="deprecation" |
3105 | 186 | tal:condition="directive/deprecated"> | 186 | tal:condition="directive/deprecated"> |
3106 | 187 | <b>Deprecated:</b> | 187 | <b>Deprecated:</b> |
3107 | 188 | 188 | ||
3108 | === modified file 'src/z3c/rml/reference.py' | |||
3109 | --- src/z3c/rml/reference.py 2011-01-05 22:34:45 +0000 | |||
3110 | +++ src/z3c/rml/reference.py 2013-01-09 02:49:23 +0000 | |||
3111 | @@ -13,23 +13,20 @@ | |||
3112 | 13 | ############################################################################## | 13 | ############################################################################## |
3113 | 14 | """RML Reference Generator | 14 | """RML Reference Generator |
3114 | 15 | 15 | ||
3116 | 16 | $Id: reference.py 114907 2010-07-22 01:59:57Z srichter $ | 16 | $Id: reference.py 128766 2012-12-19 01:37:16Z srichter $ |
3117 | 17 | """ | 17 | """ |
3118 | 18 | __docformat__ = "reStructuredText" | 18 | __docformat__ = "reStructuredText" |
3119 | 19 | import copy | 19 | import copy |
3120 | 20 | import re | 20 | import re |
3121 | 21 | import os | 21 | import os |
3122 | 22 | import pygments.token | ||
3123 | 22 | import zope.schema | 23 | import zope.schema |
3124 | 23 | import zope.schema.interfaces | 24 | import zope.schema.interfaces |
3125 | 24 | from lxml import etree | 25 | from lxml import etree |
3126 | 25 | from xml.sax import saxutils | 26 | from xml.sax import saxutils |
3127 | 27 | from pygments.lexers import XmlLexer | ||
3128 | 26 | from z3c.rml import attr, document, interfaces, pagetemplate | 28 | from z3c.rml import attr, document, interfaces, pagetemplate |
3129 | 27 | 29 | ||
3130 | 28 | try: | ||
3131 | 29 | import SilverCity | ||
3132 | 30 | except ImportError: | ||
3133 | 31 | SilverCity = None | ||
3134 | 32 | |||
3135 | 33 | 30 | ||
3136 | 34 | INPUT_URL = ('http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/' | 31 | INPUT_URL = ('http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/' |
3137 | 35 | 'rml/tests/input/%s') | 32 | 'rml/tests/input/%s') |
3138 | @@ -41,10 +38,8 @@ | |||
3139 | 41 | attr.TextNode, attr.TextNodeSequence, attr.TextNodeGrid, | 38 | attr.TextNode, attr.TextNodeSequence, attr.TextNodeGrid, |
3140 | 42 | attr.RawXMLContent, attr.XMLContent) | 39 | attr.RawXMLContent, attr.XMLContent) |
3141 | 43 | STYLES_FORMATTING = { | 40 | STYLES_FORMATTING = { |
3146 | 44 | 1 : ('<font textColor="red">', '</font>'), | 41 | pygments.token.Name.Tag : ('<font textColor="red">', '</font>'), |
3147 | 45 | #3 : ('<font textColor="blue">', '</font>'), | 42 | pygments.token.Literal.String : ('<font textColor="blue">', '</font>'), |
3144 | 46 | 6 : ('<font textColor="blue">', '</font>'), | ||
3145 | 47 | 11 : ('<font textColor="red">', '</font>'), | ||
3148 | 48 | } | 43 | } |
3149 | 49 | EXAMPLE_NS = 'http://namespaces.zope.org/rml/doc' | 44 | EXAMPLE_NS = 'http://namespaces.zope.org/rml/doc' |
3150 | 50 | EXAMPLE_ATTR_NAME = '{%s}example' %EXAMPLE_NS | 45 | EXAMPLE_ATTR_NAME = '{%s}example' %EXAMPLE_NS |
3151 | @@ -79,13 +74,11 @@ | |||
3152 | 79 | return '\n'.join(result) | 74 | return '\n'.join(result) |
3153 | 80 | 75 | ||
3154 | 81 | def highlightRML(rml): | 76 | def highlightRML(rml): |
3158 | 82 | if SilverCity is None: | 77 | lexer = XmlLexer() |
3156 | 83 | return saxutils.escape(rml) | ||
3157 | 84 | lexer = SilverCity.XML.XMLLexer() | ||
3159 | 85 | styledRml = '' | 78 | styledRml = '' |
3163 | 86 | for piece in lexer.tokenize_by_style(rml): | 79 | for ttype, token in lexer.get_tokens(rml): |
3164 | 87 | start, end = STYLES_FORMATTING.get(piece['style'], ('', '')) | 80 | start, end = STYLES_FORMATTING.get(ttype, ('', '')) |
3165 | 88 | styledRml += start + saxutils.escape(piece['text']) + end | 81 | styledRml += start + saxutils.escape(token) + end |
3166 | 89 | return styledRml | 82 | return styledRml |
3167 | 90 | 83 | ||
3168 | 91 | 84 | ||
3169 | @@ -228,6 +221,8 @@ | |||
3170 | 228 | for dirExamples in examples.values(): | 221 | for dirExamples in examples.values(): |
3171 | 229 | for example in dirExamples: | 222 | for example in dirExamples: |
3172 | 230 | xml = etree.tounicode(example['element']).strip() | 223 | xml = etree.tounicode(example['element']).strip() |
3173 | 224 | xml = re.sub( | ||
3174 | 225 | ' ?xmlns:doc="http://namespaces.zope.org/rml/doc"', '', xml) | ||
3175 | 231 | xml = dedent(xml) | 226 | xml = dedent(xml) |
3176 | 232 | xml = enforceColumns(xml, 80) | 227 | xml = enforceColumns(xml, 80) |
3177 | 233 | xml = highlightRML(xml) | 228 | xml = highlightRML(xml) |
3178 | 234 | 229 | ||
3179 | === added file 'src/z3c/rml/rlfix.py' | |||
3180 | --- src/z3c/rml/rlfix.py 1970-01-01 00:00:00 +0000 | |||
3181 | +++ src/z3c/rml/rlfix.py 2013-01-09 02:49:23 +0000 | |||
3182 | @@ -0,0 +1,42 @@ | |||
3183 | 1 | ############################################################################## | ||
3184 | 2 | # | ||
3185 | 3 | # Copyright (c) 2012 Zope Foundation and Contributors. | ||
3186 | 4 | # All Rights Reserved. | ||
3187 | 5 | # | ||
3188 | 6 | # This software is subject to the provisions of the Zope Public License, | ||
3189 | 7 | # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
3190 | 8 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
3191 | 9 | # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
3192 | 10 | # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
3193 | 11 | # FOR A PARTICULAR PURPOSE. | ||
3194 | 12 | # | ||
3195 | 13 | ############################################################################## | ||
3196 | 14 | """ReportLab fixups. | ||
3197 | 15 | """ | ||
3198 | 16 | __docformat__ = "reStructuredText" | ||
3199 | 17 | from reportlab.pdfbase import pdfform | ||
3200 | 18 | from reportlab.pdfbase.pdfpattern import PDFPattern | ||
3201 | 19 | from reportlab.graphics import testshapes | ||
3202 | 20 | |||
3203 | 21 | def resetPdfForm(): | ||
3204 | 22 | pdfform.PDFDOCENC = PDFPattern(pdfform.PDFDocEncodingPattern) | ||
3205 | 23 | pdfform.ENCODING = PDFPattern( | ||
3206 | 24 | pdfform.EncodingPattern, PDFDocEncoding=pdfform.PDFDOCENC) | ||
3207 | 25 | pdfform.GLOBALFONTSDICTIONARY = pdfform.FormFontsDictionary() | ||
3208 | 26 | pdfform.GLOBALRESOURCES = pdfform.FormResources() | ||
3209 | 27 | pdfform.ZADB = PDFPattern(pdfform.ZaDbPattern) | ||
3210 | 28 | |||
3211 | 29 | def resetFonts(): | ||
3212 | 30 | for f in testshapes._setup(): | ||
3213 | 31 | if f not in testshapes._FONTS: | ||
3214 | 32 | testshapes._FONTS.append(f) | ||
3215 | 33 | |||
3216 | 34 | def setSideLabels(): | ||
3217 | 35 | from reportlab.graphics.charts import piecharts | ||
3218 | 36 | piecharts.Pie3d.sideLabels = 0 | ||
3219 | 37 | setSideLabels() | ||
3220 | 38 | |||
3221 | 39 | from reportlab.rl_config import register_reset | ||
3222 | 40 | register_reset(resetPdfForm) | ||
3223 | 41 | register_reset(resetFonts) | ||
3224 | 42 | del register_reset | ||
3225 | 0 | 43 | ||
3226 | === modified file 'src/z3c/rml/rml-reference.pdf' | |||
3227 | --- src/z3c/rml/rml-reference.pdf 2011-01-05 22:34:45 +0000 | |||
3228 | +++ src/z3c/rml/rml-reference.pdf 2013-01-09 02:49:23 +0000 | |||
3229 | @@ -23,12 +23,12 @@ | |||
3230 | 23 | % 'Page1': class PDFPage | 23 | % 'Page1': class PDFPage |
3231 | 24 | 3 0 obj | 24 | 3 0 obj |
3232 | 25 | % Page dictionary | 25 | % Page dictionary |
3234 | 26 | << /Contents 1007 0 R | 26 | << /Contents 1248 0 R |
3235 | 27 | /MediaBox [ 0 | 27 | /MediaBox [ 0 |
3236 | 28 | 0 | 28 | 0 |
3237 | 29 | 595.2756 | 29 | 595.2756 |
3238 | 30 | 841.8898 ] | 30 | 841.8898 ] |
3240 | 31 | /Parent 1006 0 R | 31 | /Parent 1247 0 R |
3241 | 32 | /Resources << /Font 1 0 R | 32 | /Resources << /Font 1 0 R |
3242 | 33 | /ProcSet [ /PDF | 33 | /ProcSet [ /PDF |
3243 | 34 | /Text | 34 | /Text |
3244 | @@ -60,12 +60,12 @@ | |||
3245 | 60 | % 'Page2': class PDFPage | 60 | % 'Page2': class PDFPage |
3246 | 61 | 6 0 obj | 61 | 6 0 obj |
3247 | 62 | % Page dictionary | 62 | % Page dictionary |
3249 | 63 | << /Contents 1008 0 R | 63 | << /Contents 1249 0 R |
3250 | 64 | /MediaBox [ 0 | 64 | /MediaBox [ 0 |
3251 | 65 | 0 | 65 | 0 |
3252 | 66 | 595.2756 | 66 | 595.2756 |
3253 | 67 | 841.8898 ] | 67 | 841.8898 ] |
3255 | 68 | /Parent 1006 0 R | 68 | /Parent 1247 0 R |
3256 | 69 | /Resources << /Font 1 0 R | 69 | /Resources << /Font 1 0 R |
3257 | 70 | /ProcSet [ /PDF | 70 | /ProcSet [ /PDF |
3258 | 71 | /Text | 71 | /Text |
3259 | @@ -88,12 +88,12 @@ | |||
3260 | 88 | % 'Page3': class PDFPage | 88 | % 'Page3': class PDFPage |
3261 | 89 | 8 0 obj | 89 | 8 0 obj |
3262 | 90 | % Page dictionary | 90 | % Page dictionary |
3264 | 91 | << /Contents 1009 0 R | 91 | << /Contents 1250 0 R |
3265 | 92 | /MediaBox [ 0 | 92 | /MediaBox [ 0 |
3266 | 93 | 0 | 93 | 0 |
3267 | 94 | 595.2756 | 94 | 595.2756 |
3268 | 95 | 841.8898 ] | 95 | 841.8898 ] |
3270 | 96 | /Parent 1006 0 R | 96 | /Parent 1247 0 R |
3271 | 97 | /Resources << /Font 1 0 R | 97 | /Resources << /Font 1 0 R |
3272 | 98 | /ProcSet [ /PDF | 98 | /ProcSet [ /PDF |
3273 | 99 | /Text | 99 | /Text |
3274 | @@ -107,12 +107,12 @@ | |||
3275 | 107 | % 'Page4': class PDFPage | 107 | % 'Page4': class PDFPage |
3276 | 108 | 9 0 obj | 108 | 9 0 obj |
3277 | 109 | % Page dictionary | 109 | % Page dictionary |
3279 | 110 | << /Contents 1010 0 R | 110 | << /Contents 1251 0 R |
3280 | 111 | /MediaBox [ 0 | 111 | /MediaBox [ 0 |
3281 | 112 | 0 | 112 | 0 |
3282 | 113 | 595.2756 | 113 | 595.2756 |
3283 | 114 | 841.8898 ] | 114 | 841.8898 ] |
3285 | 115 | /Parent 1006 0 R | 115 | /Parent 1247 0 R |
3286 | 116 | /Resources << /Font 1 0 R | 116 | /Resources << /Font 1 0 R |
3287 | 117 | /ProcSet [ /PDF | 117 | /ProcSet [ /PDF |
3288 | 118 | /Text | 118 | /Text |
3289 | @@ -159,9 +159,9 @@ | |||
3290 | 159 | 0 | 159 | 0 |
3291 | 160 | 0 ] | 160 | 0 ] |
3292 | 161 | /Rect [ 150.2861 | 161 | /Rect [ 150.2861 |
3294 | 162 | 470.9469 | 162 | 482.9469 |
3295 | 163 | 241.3961 | 163 | 241.3961 |
3297 | 164 | 482.9469 ] | 164 | 494.9469 ] |
3298 | 165 | /Subtype /Link | 165 | /Subtype /Link |
3299 | 166 | /Type /Annot >> | 166 | /Type /Annot >> |
3300 | 167 | endobj | 167 | endobj |
3301 | @@ -174,9 +174,9 @@ | |||
3302 | 174 | 0 | 174 | 0 |
3303 | 175 | 0 ] | 175 | 0 ] |
3304 | 176 | /Rect [ 297.6378 | 176 | /Rect [ 297.6378 |
3306 | 177 | 470.9469 | 177 | 482.9469 |
3307 | 178 | 297.6378 | 178 | 297.6378 |
3309 | 179 | 482.9469 ] | 179 | 494.9469 ] |
3310 | 180 | /Subtype /Link | 180 | /Subtype /Link |
3311 | 181 | /Type /Annot >> | 181 | /Type /Annot >> |
3312 | 182 | endobj | 182 | endobj |
3313 | @@ -189,9 +189,9 @@ | |||
3314 | 189 | 0 | 189 | 0 |
3315 | 190 | 0 ] | 190 | 0 ] |
3316 | 191 | /Rect [ 297.6378 | 191 | /Rect [ 297.6378 |
3320 | 192 | 470.9469 | 192 | 482.9469 |
3321 | 193 | 322.6378 | 193 | 323.1978 |
3322 | 194 | 482.9469 ] | 194 | 494.9469 ] |
3323 | 195 | /Subtype /Link | 195 | /Subtype /Link |
3324 | 196 | /Type /Annot >> | 196 | /Type /Annot >> |
3325 | 197 | endobj | 197 | endobj |
3326 | @@ -203,10 +203,10 @@ | |||
3327 | 203 | /Border [ 0 | 203 | /Border [ 0 |
3328 | 204 | 0 | 204 | 0 |
3329 | 205 | 0 ] | 205 | 0 ] |
3334 | 206 | /Rect [ 322.6378 | 206 | /Rect [ 323.1978 |
3335 | 207 | 470.9469 | 207 | 482.9469 |
3336 | 208 | 322.6378 | 208 | 323.1978 |
3337 | 209 | 482.9469 ] | 209 | 494.9469 ] |
3338 | 210 | /Subtype /Link | 210 | /Subtype /Link |
3339 | 211 | /Type /Annot >> | 211 | /Type /Annot >> |
3340 | 212 | endobj | 212 | endobj |
3341 | @@ -219,9 +219,9 @@ | |||
3342 | 219 | 0 | 219 | 0 |
3343 | 220 | 0 ] | 220 | 0 ] |
3344 | 221 | /Rect [ 150.2861 | 221 | /Rect [ 150.2861 |
3346 | 222 | 282.9469 | 222 | 306.9469 |
3347 | 223 | 209.7361 | 223 | 209.7361 |
3349 | 224 | 294.9469 ] | 224 | 318.9469 ] |
3350 | 225 | /Subtype /Link | 225 | /Subtype /Link |
3351 | 226 | /Type /Annot >> | 226 | /Type /Annot >> |
3352 | 227 | endobj | 227 | endobj |
3353 | @@ -234,9 +234,9 @@ | |||
3354 | 234 | 0 | 234 | 0 |
3355 | 235 | 0 ] | 235 | 0 ] |
3356 | 236 | /Rect [ 297.6378 | 236 | /Rect [ 297.6378 |
3358 | 237 | 282.9469 | 237 | 306.9469 |
3359 | 238 | 297.6378 | 238 | 297.6378 |
3361 | 239 | 294.9469 ] | 239 | 318.9469 ] |
3362 | 240 | /Subtype /Link | 240 | /Subtype /Link |
3363 | 241 | /Type /Annot >> | 241 | /Type /Annot >> |
3364 | 242 | endobj | 242 | endobj |
3365 | @@ -249,9 +249,9 @@ | |||
3366 | 249 | 0 | 249 | 0 |
3367 | 250 | 0 ] | 250 | 0 ] |
3368 | 251 | /Rect [ 297.6378 | 251 | /Rect [ 297.6378 |
3372 | 252 | 282.9469 | 252 | 306.9469 |
3373 | 253 | 322.6378 | 253 | 323.1978 |
3374 | 254 | 294.9469 ] | 254 | 318.9469 ] |
3375 | 255 | /Subtype /Link | 255 | /Subtype /Link |
3376 | 256 | /Type /Annot >> | 256 | /Type /Annot >> |
3377 | 257 | endobj | 257 | endobj |
3378 | @@ -263,10 +263,10 @@ | |||
3379 | 263 | /Border [ 0 | 263 | /Border [ 0 |
3380 | 264 | 0 | 264 | 0 |
3381 | 265 | 0 ] | 265 | 0 ] |
3386 | 266 | /Rect [ 322.6378 | 266 | /Rect [ 323.1978 |
3387 | 267 | 282.9469 | 267 | 306.9469 |
3388 | 268 | 322.6378 | 268 | 323.1978 |
3389 | 269 | 294.9469 ] | 269 | 318.9469 ] |
3390 | 270 | /Subtype /Link | 270 | /Subtype /Link |
3391 | 271 | /Type /Annot >> | 271 | /Type /Annot >> |
3392 | 272 | endobj | 272 | endobj |
3393 | @@ -279,9 +279,9 @@ | |||
3394 | 279 | 0 | 279 | 0 |
3395 | 280 | 0 ] | 280 | 0 ] |
3396 | 281 | /Rect [ 150.2861 | 281 | /Rect [ 150.2861 |
3398 | 282 | 65.94685 | 282 | 101.9469 |
3399 | 283 | 227.5161 | 283 | 227.5161 |
3401 | 284 | 77.94685 ] | 284 | 113.9469 ] |
3402 | 285 | /Subtype /Link | 285 | /Subtype /Link |
3403 | 286 | /Type /Annot >> | 286 | /Type /Annot >> |
3404 | 287 | endobj | 287 | endobj |
3405 | @@ -294,9 +294,9 @@ | |||
3406 | 294 | 0 | 294 | 0 |
3407 | 295 | 0 ] | 295 | 0 ] |
3408 | 296 | /Rect [ 297.6378 | 296 | /Rect [ 297.6378 |
3410 | 297 | 65.94685 | 297 | 101.9469 |
3411 | 298 | 297.6378 | 298 | 297.6378 |
3413 | 299 | 77.94685 ] | 299 | 113.9469 ] |
3414 | 300 | /Subtype /Link | 300 | /Subtype /Link |
3415 | 301 | /Type /Annot >> | 301 | /Type /Annot >> |
3416 | 302 | endobj | 302 | endobj |
3417 | @@ -309,9 +309,9 @@ | |||
3418 | 309 | 0 | 309 | 0 |
3419 | 310 | 0 ] | 310 | 0 ] |
3420 | 311 | /Rect [ 297.6378 | 311 | /Rect [ 297.6378 |
3424 | 312 | 65.94685 | 312 | 101.9469 |
3425 | 313 | 322.6378 | 313 | 323.1978 |
3426 | 314 | 77.94685 ] | 314 | 113.9469 ] |
3427 | 315 | /Subtype /Link | 315 | /Subtype /Link |
3428 | 316 | /Type /Annot >> | 316 | /Type /Annot >> |
3429 | 317 | endobj | 317 | endobj |
3430 | @@ -323,10 +323,10 @@ | |||
3431 | 323 | /Border [ 0 | 323 | /Border [ 0 |
3432 | 324 | 0 | 324 | 0 |
3433 | 325 | 0 ] | 325 | 0 ] |
3438 | 326 | /Rect [ 322.6378 | 326 | /Rect [ 323.1978 |
3439 | 327 | 65.94685 | 327 | 101.9469 |
3440 | 328 | 322.6378 | 328 | 323.1978 |
3441 | 329 | 77.94685 ] | 329 | 113.9469 ] |
3442 | 330 | /Subtype /Link | 330 | /Subtype /Link |
3443 | 331 | /Type /Annot >> | 331 | /Type /Annot >> |
3444 | 332 | endobj | 332 | endobj |
3445 | @@ -345,12 +345,12 @@ | |||
3446 | 345 | 22 0 R | 345 | 22 0 R |
3447 | 346 | 23 0 R | 346 | 23 0 R |
3448 | 347 | 24 0 R ] | 347 | 24 0 R ] |
3450 | 348 | /Contents 1011 0 R | 348 | /Contents 1252 0 R |
3451 | 349 | /MediaBox [ 0 | 349 | /MediaBox [ 0 |
3452 | 350 | 0 | 350 | 0 |
3453 | 351 | 595.2756 | 351 | 595.2756 |
3454 | 352 | 841.8898 ] | 352 | 841.8898 ] |
3456 | 353 | /Parent 1006 0 R | 353 | /Parent 1247 0 R |
3457 | 354 | /Resources << /Font 1 0 R | 354 | /Resources << /Font 1 0 R |
3458 | 355 | /ProcSet [ /PDF | 355 | /ProcSet [ /PDF |
3459 | 356 | /Text | 356 | /Text |
3460 | @@ -367,12 +367,12 @@ | |||
3461 | 367 | 0 | 367 | 0 |
3462 | 368 | 0 ] | 368 | 0 ] |
3463 | 369 | /Contents () | 369 | /Contents () |
3465 | 370 | /Dest [ 230 0 R | 370 | /Dest [ 229 0 R |
3466 | 371 | /Fit ] | 371 | /Fit ] |
3467 | 372 | /Rect [ 56.69291 | 372 | /Rect [ 56.69291 |
3469 | 373 | 144.1969 | 373 | 183.1969 |
3470 | 374 | 538.5827 | 374 | 538.5827 |
3472 | 375 | 156.1969 ] | 375 | 195.1969 ] |
3473 | 376 | /Subtype /Link | 376 | /Subtype /Link |
3474 | 377 | /Type /Annot >> | 377 | /Type /Annot >> |
3475 | 378 | endobj | 378 | endobj |
3476 | @@ -382,12 +382,12 @@ | |||
3477 | 382 | 0 | 382 | 0 |
3478 | 383 | 0 ] | 383 | 0 ] |
3479 | 384 | /Contents () | 384 | /Contents () |
3481 | 385 | /Dest [ 75 0 R | 385 | /Dest [ 69 0 R |
3482 | 386 | /Fit ] | 386 | /Fit ] |
3483 | 387 | /Rect [ 56.69291 | 387 | /Rect [ 56.69291 |
3485 | 388 | 132.1969 | 388 | 171.1969 |
3486 | 389 | 538.5827 | 389 | 538.5827 |
3488 | 390 | 144.1969 ] | 390 | 183.1969 ] |
3489 | 391 | /Subtype /Link | 391 | /Subtype /Link |
3490 | 392 | /Type /Annot >> | 392 | /Type /Annot >> |
3491 | 393 | endobj | 393 | endobj |
3492 | @@ -400,9 +400,9 @@ | |||
3493 | 400 | /Dest [ 166 0 R | 400 | /Dest [ 166 0 R |
3494 | 401 | /Fit ] | 401 | /Fit ] |
3495 | 402 | /Rect [ 56.69291 | 402 | /Rect [ 56.69291 |
3497 | 403 | 120.1969 | 403 | 159.1969 |
3498 | 404 | 538.5827 | 404 | 538.5827 |
3500 | 405 | 132.1969 ] | 405 | 171.1969 ] |
3501 | 406 | /Subtype /Link | 406 | /Subtype /Link |
3502 | 407 | /Type /Annot >> | 407 | /Type /Annot >> |
3503 | 408 | endobj | 408 | endobj |
3504 | @@ -412,12 +412,12 @@ | |||
3505 | 412 | 0 | 412 | 0 |
3506 | 413 | 0 ] | 413 | 0 ] |
3507 | 414 | /Contents () | 414 | /Contents () |
3509 | 415 | /Dest [ 815 0 R | 415 | /Dest [ 1015 0 R |
3510 | 416 | /Fit ] | 416 | /Fit ] |
3511 | 417 | /Rect [ 56.69291 | 417 | /Rect [ 56.69291 |
3513 | 418 | 108.1969 | 418 | 147.1969 |
3514 | 419 | 538.5827 | 419 | 538.5827 |
3516 | 420 | 120.1969 ] | 420 | 159.1969 ] |
3517 | 421 | /Subtype /Link | 421 | /Subtype /Link |
3518 | 422 | /Type /Annot >> | 422 | /Type /Annot >> |
3519 | 423 | endobj | 423 | endobj |
3520 | @@ -427,12 +427,12 @@ | |||
3521 | 427 | 0 | 427 | 0 |
3522 | 428 | 0 ] | 428 | 0 ] |
3523 | 429 | /Contents () | 429 | /Contents () |
3525 | 430 | /Dest [ 68 0 R | 430 | /Dest [ 67 0 R |
3526 | 431 | /Fit ] | 431 | /Fit ] |
3527 | 432 | /Rect [ 56.69291 | 432 | /Rect [ 56.69291 |
3529 | 433 | 96.19685 | 433 | 135.1969 |
3530 | 434 | 538.5827 | 434 | 538.5827 |
3532 | 435 | 108.1969 ] | 435 | 147.1969 ] |
3533 | 436 | /Subtype /Link | 436 | /Subtype /Link |
3534 | 437 | /Type /Annot >> | 437 | /Type /Annot >> |
3535 | 438 | endobj | 438 | endobj |
3536 | @@ -442,12 +442,12 @@ | |||
3537 | 442 | 0 | 442 | 0 |
3538 | 443 | 0 ] | 443 | 0 ] |
3539 | 444 | /Contents () | 444 | /Contents () |
3541 | 445 | /Dest [ 796 0 R | 445 | /Dest [ 981 0 R |
3542 | 446 | /Fit ] | 446 | /Fit ] |
3543 | 447 | /Rect [ 56.69291 | 447 | /Rect [ 56.69291 |
3545 | 448 | 84.19685 | 448 | 123.1969 |
3546 | 449 | 538.5827 | 449 | 538.5827 |
3548 | 450 | 96.19685 ] | 450 | 135.1969 ] |
3549 | 451 | /Subtype /Link | 451 | /Subtype /Link |
3550 | 452 | /Type /Annot >> | 452 | /Type /Annot >> |
3551 | 453 | endobj | 453 | endobj |
3552 | @@ -460,12 +460,12 @@ | |||
3553 | 460 | 29 0 R | 460 | 29 0 R |
3554 | 461 | 30 0 R | 461 | 30 0 R |
3555 | 462 | 31 0 R ] | 462 | 31 0 R ] |
3557 | 463 | /Contents 1012 0 R | 463 | /Contents 1253 0 R |
3558 | 464 | /MediaBox [ 0 | 464 | /MediaBox [ 0 |
3559 | 465 | 0 | 465 | 0 |
3560 | 466 | 595.2756 | 466 | 595.2756 |
3561 | 467 | 841.8898 ] | 467 | 841.8898 ] |
3563 | 468 | /Parent 1006 0 R | 468 | /Parent 1247 0 R |
3564 | 469 | /Resources << /Font 1 0 R | 469 | /Resources << /Font 1 0 R |
3565 | 470 | /ProcSet [ /PDF | 470 | /ProcSet [ /PDF |
3566 | 471 | /Text | 471 | /Text |
3567 | @@ -485,9 +485,9 @@ | |||
3568 | 485 | 0 | 485 | 0 |
3569 | 486 | 0 ] | 486 | 0 ] |
3570 | 487 | /Rect [ 150.2861 | 487 | /Rect [ 150.2861 |
3572 | 488 | 470.9469 | 488 | 518.9469 |
3573 | 489 | 227.5161 | 489 | 227.5161 |
3575 | 490 | 482.9469 ] | 490 | 530.9469 ] |
3576 | 491 | /Subtype /Link | 491 | /Subtype /Link |
3577 | 492 | /Type /Annot >> | 492 | /Type /Annot >> |
3578 | 493 | endobj | 493 | endobj |
3579 | @@ -500,9 +500,9 @@ | |||
3580 | 500 | 0 | 500 | 0 |
3581 | 501 | 0 ] | 501 | 0 ] |
3582 | 502 | /Rect [ 297.6378 | 502 | /Rect [ 297.6378 |
3584 | 503 | 470.9469 | 503 | 518.9469 |
3585 | 504 | 297.6378 | 504 | 297.6378 |
3587 | 505 | 482.9469 ] | 505 | 530.9469 ] |
3588 | 506 | /Subtype /Link | 506 | /Subtype /Link |
3589 | 507 | /Type /Annot >> | 507 | /Type /Annot >> |
3590 | 508 | endobj | 508 | endobj |
3591 | @@ -515,9 +515,9 @@ | |||
3592 | 515 | 0 | 515 | 0 |
3593 | 516 | 0 ] | 516 | 0 ] |
3594 | 517 | /Rect [ 297.6378 | 517 | /Rect [ 297.6378 |
3598 | 518 | 470.9469 | 518 | 518.9469 |
3599 | 519 | 322.6378 | 519 | 323.1978 |
3600 | 520 | 482.9469 ] | 520 | 530.9469 ] |
3601 | 521 | /Subtype /Link | 521 | /Subtype /Link |
3602 | 522 | /Type /Annot >> | 522 | /Type /Annot >> |
3603 | 523 | endobj | 523 | endobj |
3604 | @@ -529,10 +529,10 @@ | |||
3605 | 529 | /Border [ 0 | 529 | /Border [ 0 |
3606 | 530 | 0 | 530 | 0 |
3607 | 531 | 0 ] | 531 | 0 ] |
3612 | 532 | /Rect [ 322.6378 | 532 | /Rect [ 323.1978 |
3613 | 533 | 470.9469 | 533 | 518.9469 |
3614 | 534 | 322.6378 | 534 | 323.1978 |
3615 | 535 | 482.9469 ] | 535 | 530.9469 ] |
3616 | 536 | /Subtype /Link | 536 | /Subtype /Link |
3617 | 537 | /Type /Annot >> | 537 | /Type /Annot >> |
3618 | 538 | endobj | 538 | endobj |
3619 | @@ -543,12 +543,12 @@ | |||
3620 | 543 | 34 0 R | 543 | 34 0 R |
3621 | 544 | 35 0 R | 544 | 35 0 R |
3622 | 545 | 36 0 R ] | 545 | 36 0 R ] |
3624 | 546 | /Contents 1013 0 R | 546 | /Contents 1254 0 R |
3625 | 547 | /MediaBox [ 0 | 547 | /MediaBox [ 0 |
3626 | 548 | 0 | 548 | 0 |
3627 | 549 | 595.2756 | 549 | 595.2756 |
3628 | 550 | 841.8898 ] | 550 | 841.8898 ] |
3630 | 551 | /Parent 1006 0 R | 551 | /Parent 1247 0 R |
3631 | 552 | /Resources << /Font 1 0 R | 552 | /Resources << /Font 1 0 R |
3632 | 553 | /ProcSet [ /PDF | 553 | /ProcSet [ /PDF |
3633 | 554 | /Text | 554 | /Text |
3634 | @@ -565,12 +565,12 @@ | |||
3635 | 565 | 0 | 565 | 0 |
3636 | 566 | 0 ] | 566 | 0 ] |
3637 | 567 | /Contents () | 567 | /Contents () |
3639 | 568 | /Dest [ 230 0 R | 568 | /Dest [ 229 0 R |
3640 | 569 | /Fit ] | 569 | /Fit ] |
3641 | 570 | /Rect [ 56.69291 | 570 | /Rect [ 56.69291 |
3643 | 571 | 432.1969 | 571 | 473.1969 |
3644 | 572 | 538.5827 | 572 | 538.5827 |
3646 | 573 | 444.1969 ] | 573 | 485.1969 ] |
3647 | 574 | /Subtype /Link | 574 | /Subtype /Link |
3648 | 575 | /Type /Annot >> | 575 | /Type /Annot >> |
3649 | 576 | endobj | 576 | endobj |
3650 | @@ -580,12 +580,12 @@ | |||
3651 | 580 | 0 | 580 | 0 |
3652 | 581 | 0 ] | 581 | 0 ] |
3653 | 582 | /Contents () | 582 | /Contents () |
3655 | 583 | /Dest [ 75 0 R | 583 | /Dest [ 69 0 R |
3656 | 584 | /Fit ] | 584 | /Fit ] |
3657 | 585 | /Rect [ 56.69291 | 585 | /Rect [ 56.69291 |
3659 | 586 | 420.1969 | 586 | 461.1969 |
3660 | 587 | 538.5827 | 587 | 538.5827 |
3662 | 588 | 432.1969 ] | 588 | 473.1969 ] |
3663 | 589 | /Subtype /Link | 589 | /Subtype /Link |
3664 | 590 | /Type /Annot >> | 590 | /Type /Annot >> |
3665 | 591 | endobj | 591 | endobj |
3666 | @@ -598,9 +598,9 @@ | |||
3667 | 598 | /Dest [ 166 0 R | 598 | /Dest [ 166 0 R |
3668 | 599 | /Fit ] | 599 | /Fit ] |
3669 | 600 | /Rect [ 56.69291 | 600 | /Rect [ 56.69291 |
3671 | 601 | 408.1969 | 601 | 449.1969 |
3672 | 602 | 538.5827 | 602 | 538.5827 |
3674 | 603 | 420.1969 ] | 603 | 461.1969 ] |
3675 | 604 | /Subtype /Link | 604 | /Subtype /Link |
3676 | 605 | /Type /Annot >> | 605 | /Type /Annot >> |
3677 | 606 | endobj | 606 | endobj |
3678 | @@ -610,12 +610,12 @@ | |||
3679 | 610 | 0 | 610 | 0 |
3680 | 611 | 0 ] | 611 | 0 ] |
3681 | 612 | /Contents () | 612 | /Contents () |
3683 | 613 | /Dest [ 815 0 R | 613 | /Dest [ 1015 0 R |
3684 | 614 | /Fit ] | 614 | /Fit ] |
3685 | 615 | /Rect [ 56.69291 | 615 | /Rect [ 56.69291 |
3687 | 616 | 396.1969 | 616 | 437.1969 |
3688 | 617 | 538.5827 | 617 | 538.5827 |
3690 | 618 | 408.1969 ] | 618 | 449.1969 ] |
3691 | 619 | /Subtype /Link | 619 | /Subtype /Link |
3692 | 620 | /Type /Annot >> | 620 | /Type /Annot >> |
3693 | 621 | endobj | 621 | endobj |
3694 | @@ -625,12 +625,12 @@ | |||
3695 | 625 | 0 | 625 | 0 |
3696 | 626 | 0 ] | 626 | 0 ] |
3697 | 627 | /Contents () | 627 | /Contents () |
3699 | 628 | /Dest [ 68 0 R | 628 | /Dest [ 67 0 R |
3700 | 629 | /Fit ] | 629 | /Fit ] |
3701 | 630 | /Rect [ 56.69291 | 630 | /Rect [ 56.69291 |
3703 | 631 | 384.1969 | 631 | 425.1969 |
3704 | 632 | 538.5827 | 632 | 538.5827 |
3706 | 633 | 396.1969 ] | 633 | 437.1969 ] |
3707 | 634 | /Subtype /Link | 634 | /Subtype /Link |
3708 | 635 | /Type /Annot >> | 635 | /Type /Annot >> |
3709 | 636 | endobj | 636 | endobj |
3710 | @@ -640,12 +640,12 @@ | |||
3711 | 640 | 0 | 640 | 0 |
3712 | 641 | 0 ] | 641 | 0 ] |
3713 | 642 | /Contents () | 642 | /Contents () |
3715 | 643 | /Dest [ 796 0 R | 643 | /Dest [ 981 0 R |
3716 | 644 | /Fit ] | 644 | /Fit ] |
3717 | 645 | /Rect [ 56.69291 | 645 | /Rect [ 56.69291 |
3719 | 646 | 372.1969 | 646 | 413.1969 |
3720 | 647 | 538.5827 | 647 | 538.5827 |
3722 | 648 | 384.1969 ] | 648 | 425.1969 ] |
3723 | 649 | /Subtype /Link | 649 | /Subtype /Link |
3724 | 650 | /Type /Annot >> | 650 | /Type /Annot >> |
3725 | 651 | endobj | 651 | endobj |
3726 | @@ -658,9 +658,9 @@ | |||
3727 | 658 | 0 | 658 | 0 |
3728 | 659 | 0 ] | 659 | 0 ] |
3729 | 660 | /Rect [ 150.2861 | 660 | /Rect [ 150.2861 |
3731 | 661 | 66.94685 | 661 | 119.9469 |
3732 | 662 | 237.5161 | 662 | 237.5161 |
3734 | 663 | 78.94685 ] | 663 | 131.9469 ] |
3735 | 664 | /Subtype /Link | 664 | /Subtype /Link |
3736 | 665 | /Type /Annot >> | 665 | /Type /Annot >> |
3737 | 666 | endobj | 666 | endobj |
3738 | @@ -673,9 +673,9 @@ | |||
3739 | 673 | 0 | 673 | 0 |
3740 | 674 | 0 ] | 674 | 0 ] |
3741 | 675 | /Rect [ 297.6378 | 675 | /Rect [ 297.6378 |
3743 | 676 | 66.94685 | 676 | 119.9469 |
3744 | 677 | 297.6378 | 677 | 297.6378 |
3746 | 678 | 78.94685 ] | 678 | 131.9469 ] |
3747 | 679 | /Subtype /Link | 679 | /Subtype /Link |
3748 | 680 | /Type /Annot >> | 680 | /Type /Annot >> |
3749 | 681 | endobj | 681 | endobj |
3750 | @@ -688,9 +688,9 @@ | |||
3751 | 688 | 0 | 688 | 0 |
3752 | 689 | 0 ] | 689 | 0 ] |
3753 | 690 | /Rect [ 297.6378 | 690 | /Rect [ 297.6378 |
3757 | 691 | 66.94685 | 691 | 119.9469 |
3758 | 692 | 322.6378 | 692 | 323.1978 |
3759 | 693 | 78.94685 ] | 693 | 131.9469 ] |
3760 | 694 | /Subtype /Link | 694 | /Subtype /Link |
3761 | 695 | /Type /Annot >> | 695 | /Type /Annot >> |
3762 | 696 | endobj | 696 | endobj |
3763 | @@ -702,10 +702,10 @@ | |||
3764 | 702 | /Border [ 0 | 702 | /Border [ 0 |
3765 | 703 | 0 | 703 | 0 |
3766 | 704 | 0 ] | 704 | 0 ] |
3771 | 705 | /Rect [ 322.6378 | 705 | /Rect [ 323.1978 |
3772 | 706 | 66.94685 | 706 | 119.9469 |
3773 | 707 | 322.6378 | 707 | 323.1978 |
3774 | 708 | 78.94685 ] | 708 | 131.9469 ] |
3775 | 709 | /Subtype /Link | 709 | /Subtype /Link |
3776 | 710 | /Type /Annot >> | 710 | /Type /Annot >> |
3777 | 711 | endobj | 711 | endobj |
3778 | @@ -722,12 +722,12 @@ | |||
3779 | 722 | 45 0 R | 722 | 45 0 R |
3780 | 723 | 46 0 R | 723 | 46 0 R |
3781 | 724 | 47 0 R ] | 724 | 47 0 R ] |
3783 | 725 | /Contents 1014 0 R | 725 | /Contents 1255 0 R |
3784 | 726 | /MediaBox [ 0 | 726 | /MediaBox [ 0 |
3785 | 727 | 0 | 727 | 0 |
3786 | 728 | 595.2756 | 728 | 595.2756 |
3787 | 729 | 841.8898 ] | 729 | 841.8898 ] |
3789 | 730 | /Parent 1006 0 R | 730 | /Parent 1247 0 R |
3790 | 731 | /Resources << /Font 1 0 R | 731 | /Resources << /Font 1 0 R |
3791 | 732 | /ProcSet [ /PDF | 732 | /ProcSet [ /PDF |
3792 | 733 | /Text | 733 | /Text |
3793 | @@ -741,12 +741,12 @@ | |||
3794 | 741 | % 'Page9': class PDFPage | 741 | % 'Page9': class PDFPage |
3795 | 742 | 49 0 obj | 742 | 49 0 obj |
3796 | 743 | % Page dictionary | 743 | % Page dictionary |
3798 | 744 | << /Contents 1015 0 R | 744 | << /Contents 1256 0 R |
3799 | 745 | /MediaBox [ 0 | 745 | /MediaBox [ 0 |
3800 | 746 | 0 | 746 | 0 |
3801 | 747 | 595.2756 | 747 | 595.2756 |
3802 | 748 | 841.8898 ] | 748 | 841.8898 ] |
3804 | 749 | /Parent 1006 0 R | 749 | /Parent 1247 0 R |
3805 | 750 | /Resources << /Font 1 0 R | 750 | /Resources << /Font 1 0 R |
3806 | 751 | /ProcSet [ /PDF | 751 | /ProcSet [ /PDF |
3807 | 752 | /Text | 752 | /Text |
3808 | @@ -766,9 +766,9 @@ | |||
3809 | 766 | 0 | 766 | 0 |
3810 | 767 | 0 ] | 767 | 0 ] |
3811 | 768 | /Rect [ 150.2861 | 768 | /Rect [ 150.2861 |
3813 | 769 | 458.9469 | 769 | 545.9469 |
3814 | 770 | 223.0561 | 770 | 223.0561 |
3816 | 771 | 470.9469 ] | 771 | 557.9469 ] |
3817 | 772 | /Subtype /Link | 772 | /Subtype /Link |
3818 | 773 | /Type /Annot >> | 773 | /Type /Annot >> |
3819 | 774 | endobj | 774 | endobj |
3820 | @@ -781,9 +781,9 @@ | |||
3821 | 781 | 0 | 781 | 0 |
3822 | 782 | 0 ] | 782 | 0 ] |
3823 | 783 | /Rect [ 297.6378 | 783 | /Rect [ 297.6378 |
3825 | 784 | 458.9469 | 784 | 545.9469 |
3826 | 785 | 297.6378 | 785 | 297.6378 |
3828 | 786 | 470.9469 ] | 786 | 557.9469 ] |
3829 | 787 | /Subtype /Link | 787 | /Subtype /Link |
3830 | 788 | /Type /Annot >> | 788 | /Type /Annot >> |
3831 | 789 | endobj | 789 | endobj |
3832 | @@ -796,9 +796,9 @@ | |||
3833 | 796 | 0 | 796 | 0 |
3834 | 797 | 0 ] | 797 | 0 ] |
3835 | 798 | /Rect [ 297.6378 | 798 | /Rect [ 297.6378 |
3839 | 799 | 458.9469 | 799 | 545.9469 |
3840 | 800 | 322.6378 | 800 | 323.1978 |
3841 | 801 | 470.9469 ] | 801 | 557.9469 ] |
3842 | 802 | /Subtype /Link | 802 | /Subtype /Link |
3843 | 803 | /Type /Annot >> | 803 | /Type /Annot >> |
3844 | 804 | endobj | 804 | endobj |
3845 | @@ -810,10 +810,10 @@ | |||
3846 | 810 | /Border [ 0 | 810 | /Border [ 0 |
3847 | 811 | 0 | 811 | 0 |
3848 | 812 | 0 ] | 812 | 0 ] |
3853 | 813 | /Rect [ 322.6378 | 813 | /Rect [ 323.1978 |
3854 | 814 | 458.9469 | 814 | 545.9469 |
3855 | 815 | 322.6378 | 815 | 323.1978 |
3856 | 816 | 470.9469 ] | 816 | 557.9469 ] |
3857 | 817 | /Subtype /Link | 817 | /Subtype /Link |
3858 | 818 | /Type /Annot >> | 818 | /Type /Annot >> |
3859 | 819 | endobj | 819 | endobj |
3860 | @@ -826,9 +826,9 @@ | |||
3861 | 826 | 0 | 826 | 0 |
3862 | 827 | 0 ] | 827 | 0 ] |
3863 | 828 | /Rect [ 150.2861 | 828 | /Rect [ 150.2861 |
3865 | 829 | 356.9469 | 829 | 455.9469 |
3866 | 830 | 223.0561 | 830 | 223.0561 |
3868 | 831 | 368.9469 ] | 831 | 467.9469 ] |
3869 | 832 | /Subtype /Link | 832 | /Subtype /Link |
3870 | 833 | /Type /Annot >> | 833 | /Type /Annot >> |
3871 | 834 | endobj | 834 | endobj |
3872 | @@ -841,9 +841,9 @@ | |||
3873 | 841 | 0 | 841 | 0 |
3874 | 842 | 0 ] | 842 | 0 ] |
3875 | 843 | /Rect [ 297.6378 | 843 | /Rect [ 297.6378 |
3877 | 844 | 356.9469 | 844 | 455.9469 |
3878 | 845 | 297.6378 | 845 | 297.6378 |
3880 | 846 | 368.9469 ] | 846 | 467.9469 ] |
3881 | 847 | /Subtype /Link | 847 | /Subtype /Link |
3882 | 848 | /Type /Annot >> | 848 | /Type /Annot >> |
3883 | 849 | endobj | 849 | endobj |
3884 | @@ -856,9 +856,9 @@ | |||
3885 | 856 | 0 | 856 | 0 |
3886 | 857 | 0 ] | 857 | 0 ] |
3887 | 858 | /Rect [ 297.6378 | 858 | /Rect [ 297.6378 |
3891 | 859 | 356.9469 | 859 | 455.9469 |
3892 | 860 | 322.6378 | 860 | 323.1978 |
3893 | 861 | 368.9469 ] | 861 | 467.9469 ] |
3894 | 862 | /Subtype /Link | 862 | /Subtype /Link |
3895 | 863 | /Type /Annot >> | 863 | /Type /Annot >> |
3896 | 864 | endobj | 864 | endobj |
3897 | @@ -870,10 +870,10 @@ | |||
3898 | 870 | /Border [ 0 | 870 | /Border [ 0 |
3899 | 871 | 0 | 871 | 0 |
3900 | 872 | 0 ] | 872 | 0 ] |
3905 | 873 | /Rect [ 322.6378 | 873 | /Rect [ 323.1978 |
3906 | 874 | 356.9469 | 874 | 455.9469 |
3907 | 875 | 322.6378 | 875 | 323.1978 |
3908 | 876 | 368.9469 ] | 876 | 467.9469 ] |
3909 | 877 | /Subtype /Link | 877 | /Subtype /Link |
3910 | 878 | /Type /Annot >> | 878 | /Type /Annot >> |
3911 | 879 | endobj | 879 | endobj |
3912 | @@ -888,12 +888,12 @@ | |||
3913 | 888 | 55 0 R | 888 | 55 0 R |
3914 | 889 | 56 0 R | 889 | 56 0 R |
3915 | 890 | 57 0 R ] | 890 | 57 0 R ] |
3917 | 891 | /Contents 1016 0 R | 891 | /Contents 1257 0 R |
3918 | 892 | /MediaBox [ 0 | 892 | /MediaBox [ 0 |
3919 | 893 | 0 | 893 | 0 |
3920 | 894 | 595.2756 | 894 | 595.2756 |
3921 | 895 | 841.8898 ] | 895 | 841.8898 ] |
3923 | 896 | /Parent 1006 0 R | 896 | /Parent 1247 0 R |
3924 | 897 | /Resources << /Font 1 0 R | 897 | /Resources << /Font 1 0 R |
3925 | 898 | /ProcSet [ /PDF | 898 | /ProcSet [ /PDF |
3926 | 899 | /Text | 899 | /Text |
3927 | @@ -913,9 +913,9 @@ | |||
3928 | 913 | 0 | 913 | 0 |
3929 | 914 | 0 ] | 914 | 0 ] |
3930 | 915 | /Rect [ 150.2861 | 915 | /Rect [ 150.2861 |
3932 | 916 | 125.9469 | 916 | 294.9469 |
3933 | 917 | 263.0661 | 917 | 263.0661 |
3935 | 918 | 137.9469 ] | 918 | 306.9469 ] |
3936 | 919 | /Subtype /Link | 919 | /Subtype /Link |
3937 | 920 | /Type /Annot >> | 920 | /Type /Annot >> |
3938 | 921 | endobj | 921 | endobj |
3939 | @@ -928,9 +928,9 @@ | |||
3940 | 928 | 0 | 928 | 0 |
3941 | 929 | 0 ] | 929 | 0 ] |
3942 | 930 | /Rect [ 297.6378 | 930 | /Rect [ 297.6378 |
3944 | 931 | 113.9469 | 931 | 282.9469 |
3945 | 932 | 297.6378 | 932 | 297.6378 |
3947 | 933 | 125.9469 ] | 933 | 294.9469 ] |
3948 | 934 | /Subtype /Link | 934 | /Subtype /Link |
3949 | 935 | /Type /Annot >> | 935 | /Type /Annot >> |
3950 | 936 | endobj | 936 | endobj |
3951 | @@ -943,9 +943,9 @@ | |||
3952 | 943 | 0 | 943 | 0 |
3953 | 944 | 0 ] | 944 | 0 ] |
3954 | 945 | /Rect [ 297.6378 | 945 | /Rect [ 297.6378 |
3958 | 946 | 113.9469 | 946 | 282.9469 |
3959 | 947 | 322.6378 | 947 | 323.1978 |
3960 | 948 | 125.9469 ] | 948 | 294.9469 ] |
3961 | 949 | /Subtype /Link | 949 | /Subtype /Link |
3962 | 950 | /Type /Annot >> | 950 | /Type /Annot >> |
3963 | 951 | endobj | 951 | endobj |
3964 | @@ -957,52 +957,44 @@ | |||
3965 | 957 | /Border [ 0 | 957 | /Border [ 0 |
3966 | 958 | 0 | 958 | 0 |
3967 | 959 | 0 ] | 959 | 0 ] |
3972 | 960 | /Rect [ 322.6378 | 960 | /Rect [ 323.1978 |
3973 | 961 | 113.9469 | 961 | 282.9469 |
3974 | 962 | 322.6378 | 962 | 323.1978 |
3975 | 963 | 125.9469 ] | 963 | 294.9469 ] |
3976 | 964 | /Subtype /Link | 964 | /Subtype /Link |
3977 | 965 | /Type /Annot >> | 965 | /Type /Annot >> |
3978 | 966 | endobj | 966 | endobj |
3980 | 967 | % 'Page11': class PDFPage | 967 | % 'Annot.NUMBER45': class PDFDictionary |
3981 | 968 | 63 0 obj | 968 | 63 0 obj |
3989 | 969 | % Page dictionary | 969 | << /A << /S /URI |
3990 | 970 | << /Annots [ 59 0 R | 970 | /Type /Action |
3991 | 971 | 60 0 R | 971 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-barCodeFlowable.rml) >> |
3992 | 972 | 61 0 R | 972 | /Border [ 0 |
3986 | 973 | 62 0 R ] | ||
3987 | 974 | /Contents 1017 0 R | ||
3988 | 975 | /MediaBox [ 0 | ||
3993 | 976 | 0 | 973 | 0 |
4006 | 977 | 595.2756 | 974 | 0 ] |
4007 | 978 | 841.8898 ] | 975 | /Rect [ 150.2861 |
4008 | 979 | /Parent 1006 0 R | 976 | 216.9469 |
4009 | 980 | /Resources << /Font 1 0 R | 977 | 263.0661 |
4010 | 981 | /ProcSet [ /PDF | 978 | 228.9469 ] |
4011 | 982 | /Text | 979 | /Subtype /Link |
4012 | 983 | /ImageB | 980 | /Type /Annot >> |
4001 | 984 | /ImageC | ||
4002 | 985 | /ImageI ] >> | ||
4003 | 986 | /Rotate 0 | ||
4004 | 987 | /Trans << >> | ||
4005 | 988 | /Type /Page >> | ||
4013 | 989 | endobj | 981 | endobj |
4015 | 990 | % 'Annot.NUMBER45': class PDFDictionary | 982 | % 'Annot.NUMBER46': class PDFDictionary |
4016 | 991 | 64 0 obj | 983 | 64 0 obj |
4017 | 992 | << /A << /S /URI | 984 | << /A << /S /URI |
4018 | 993 | /Type /Action | 985 | /Type /Action |
4020 | 994 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-barCodeFlowable.rml) >> | 986 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-barCodeFlowable.pdf?view=auto) >> |
4021 | 995 | /Border [ 0 | 987 | /Border [ 0 |
4022 | 996 | 0 | 988 | 0 |
4023 | 997 | 0 ] | 989 | 0 ] |
4028 | 998 | /Rect [ 150.2861 | 990 | /Rect [ 297.6378 |
4029 | 999 | 770.9469 | 991 | 204.9469 |
4030 | 1000 | 263.0661 | 992 | 297.6378 |
4031 | 1001 | 782.9469 ] | 993 | 216.9469 ] |
4032 | 1002 | /Subtype /Link | 994 | /Subtype /Link |
4033 | 1003 | /Type /Annot >> | 995 | /Type /Annot >> |
4034 | 1004 | endobj | 996 | endobj |
4036 | 1005 | % 'Annot.NUMBER46': class PDFDictionary | 997 | % 'Annot.NUMBER47': class PDFDictionary |
4037 | 1006 | 65 0 obj | 998 | 65 0 obj |
4038 | 1007 | << /A << /S /URI | 999 | << /A << /S /URI |
4039 | 1008 | /Type /Action | 1000 | /Type /Action |
4040 | @@ -1011,13 +1003,13 @@ | |||
4041 | 1011 | 0 | 1003 | 0 |
4042 | 1012 | 0 ] | 1004 | 0 ] |
4043 | 1013 | /Rect [ 297.6378 | 1005 | /Rect [ 297.6378 |
4047 | 1014 | 758.9469 | 1006 | 204.9469 |
4048 | 1015 | 297.6378 | 1007 | 323.1978 |
4049 | 1016 | 770.9469 ] | 1008 | 216.9469 ] |
4050 | 1017 | /Subtype /Link | 1009 | /Subtype /Link |
4051 | 1018 | /Type /Annot >> | 1010 | /Type /Annot >> |
4052 | 1019 | endobj | 1011 | endobj |
4054 | 1020 | % 'Annot.NUMBER47': class PDFDictionary | 1012 | % 'Annot.NUMBER48': class PDFDictionary |
4055 | 1021 | 66 0 obj | 1013 | 66 0 obj |
4056 | 1022 | << /A << /S /URI | 1014 | << /A << /S /URI |
4057 | 1023 | /Type /Action | 1015 | /Type /Action |
4058 | @@ -1025,41 +1017,30 @@ | |||
4059 | 1025 | /Border [ 0 | 1017 | /Border [ 0 |
4060 | 1026 | 0 | 1018 | 0 |
4061 | 1027 | 0 ] | 1019 | 0 ] |
4066 | 1028 | /Rect [ 297.6378 | 1020 | /Rect [ 323.1978 |
4067 | 1029 | 758.9469 | 1021 | 204.9469 |
4068 | 1030 | 322.6378 | 1022 | 323.1978 |
4069 | 1031 | 770.9469 ] | 1023 | 216.9469 ] |
4070 | 1032 | /Subtype /Link | 1024 | /Subtype /Link |
4071 | 1033 | /Type /Annot >> | 1025 | /Type /Annot >> |
4072 | 1034 | endobj | 1026 | endobj |
4074 | 1035 | % 'Annot.NUMBER48': class PDFDictionary | 1027 | % 'Page11': class PDFPage |
4075 | 1036 | 67 0 obj | 1028 | 67 0 obj |
4076 | 1037 | << /A << /S /URI | ||
4077 | 1038 | /Type /Action | ||
4078 | 1039 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-barCodeFlowable.pdf?view=auto) >> | ||
4079 | 1040 | /Border [ 0 | ||
4080 | 1041 | 0 | ||
4081 | 1042 | 0 ] | ||
4082 | 1043 | /Rect [ 322.6378 | ||
4083 | 1044 | 758.9469 | ||
4084 | 1045 | 322.6378 | ||
4085 | 1046 | 770.9469 ] | ||
4086 | 1047 | /Subtype /Link | ||
4087 | 1048 | /Type /Annot >> | ||
4088 | 1049 | endobj | ||
4089 | 1050 | % 'Page12': class PDFPage | ||
4090 | 1051 | 68 0 obj | ||
4091 | 1052 | % Page dictionary | 1029 | % Page dictionary |
4093 | 1053 | << /Annots [ 64 0 R | 1030 | << /Annots [ 59 0 R |
4094 | 1031 | 60 0 R | ||
4095 | 1032 | 61 0 R | ||
4096 | 1033 | 62 0 R | ||
4097 | 1034 | 63 0 R | ||
4098 | 1035 | 64 0 R | ||
4099 | 1054 | 65 0 R | 1036 | 65 0 R |
4103 | 1055 | 66 0 R | 1037 | 66 0 R ] |
4104 | 1056 | 67 0 R ] | 1038 | /Contents 1258 0 R |
4102 | 1057 | /Contents 1018 0 R | ||
4105 | 1058 | /MediaBox [ 0 | 1039 | /MediaBox [ 0 |
4106 | 1059 | 0 | 1040 | 0 |
4107 | 1060 | 595.2756 | 1041 | 595.2756 |
4108 | 1061 | 841.8898 ] | 1042 | 841.8898 ] |
4110 | 1062 | /Parent 1006 0 R | 1043 | /Parent 1247 0 R |
4111 | 1063 | /Resources << /Font 1 0 R | 1044 | /Resources << /Font 1 0 R |
4112 | 1064 | /ProcSet [ /PDF | 1045 | /ProcSet [ /PDF |
4113 | 1065 | /Text | 1046 | /Text |
4114 | @@ -1071,19 +1052,39 @@ | |||
4115 | 1071 | /Type /Page >> | 1052 | /Type /Page >> |
4116 | 1072 | endobj | 1053 | endobj |
4117 | 1073 | % 'Annot.NUMBER49': class LinkAnnotation | 1054 | % 'Annot.NUMBER49': class LinkAnnotation |
4118 | 1055 | 68 0 obj | ||
4119 | 1056 | << /Border [ 0 | ||
4120 | 1057 | 0 | ||
4121 | 1058 | 0 ] | ||
4122 | 1059 | /Contents () | ||
4123 | 1060 | /Dest [ 449 0 R | ||
4124 | 1061 | /Fit ] | ||
4125 | 1062 | /Rect [ 56.69291 | ||
4126 | 1063 | 154.1969 | ||
4127 | 1064 | 538.5827 | ||
4128 | 1065 | 166.1969 ] | ||
4129 | 1066 | /Subtype /Link | ||
4130 | 1067 | /Type /Annot >> | ||
4131 | 1068 | endobj | ||
4132 | 1069 | % 'Page12': class PDFPage | ||
4133 | 1074 | 69 0 obj | 1070 | 69 0 obj |
4135 | 1075 | << /Border [ 0 | 1071 | % Page dictionary |
4136 | 1072 | << /Annots [ 68 0 R ] | ||
4137 | 1073 | /Contents 1259 0 R | ||
4138 | 1074 | /MediaBox [ 0 | ||
4139 | 1076 | 0 | 1075 | 0 |
4150 | 1077 | 0 ] | 1076 | 595.2756 |
4151 | 1078 | /Contents () | 1077 | 841.8898 ] |
4152 | 1079 | /Dest [ 338 0 R | 1078 | /Parent 1247 0 R |
4153 | 1080 | /Fit ] | 1079 | /Resources << /Font 1 0 R |
4154 | 1081 | /Rect [ 56.69291 | 1080 | /ProcSet [ /PDF |
4155 | 1082 | 705.1969 | 1081 | /Text |
4156 | 1083 | 538.5827 | 1082 | /ImageB |
4157 | 1084 | 717.1969 ] | 1083 | /ImageC |
4158 | 1085 | /Subtype /Link | 1084 | /ImageI ] >> |
4159 | 1086 | /Type /Annot >> | 1085 | /Rotate 0 |
4160 | 1086 | /Trans << >> | ||
4161 | 1087 | /Type /Page >> | ||
4162 | 1087 | endobj | 1088 | endobj |
4163 | 1088 | % 'Annot.NUMBER50': class LinkAnnotation | 1089 | % 'Annot.NUMBER50': class LinkAnnotation |
4164 | 1089 | 70 0 obj | 1090 | 70 0 obj |
4165 | @@ -1094,9 +1095,9 @@ | |||
4166 | 1094 | /Dest [ 25 0 R | 1095 | /Dest [ 25 0 R |
4167 | 1095 | /Fit ] | 1096 | /Fit ] |
4168 | 1096 | /Rect [ 56.69291 | 1097 | /Rect [ 56.69291 |
4170 | 1097 | 518.1969 | 1098 | 693.1969 |
4171 | 1098 | 538.5827 | 1099 | 538.5827 |
4173 | 1099 | 530.1969 ] | 1100 | 705.1969 ] |
4174 | 1100 | /Subtype /Link | 1101 | /Subtype /Link |
4175 | 1101 | /Type /Annot >> | 1102 | /Type /Annot >> |
4176 | 1102 | endobj | 1103 | endobj |
4177 | @@ -1109,9 +1110,9 @@ | |||
4178 | 1109 | 0 | 1110 | 0 |
4179 | 1110 | 0 ] | 1111 | 0 ] |
4180 | 1111 | /Rect [ 150.2861 | 1112 | /Rect [ 150.2861 |
4182 | 1112 | 304.9469 | 1113 | 491.9469 |
4183 | 1113 | 254.1661 | 1114 | 254.1661 |
4185 | 1114 | 316.9469 ] | 1115 | 503.9469 ] |
4186 | 1115 | /Subtype /Link | 1116 | /Subtype /Link |
4187 | 1116 | /Type /Annot >> | 1117 | /Type /Annot >> |
4188 | 1117 | endobj | 1118 | endobj |
4189 | @@ -1124,9 +1125,9 @@ | |||
4190 | 1124 | 0 | 1125 | 0 |
4191 | 1125 | 0 ] | 1126 | 0 ] |
4192 | 1126 | /Rect [ 297.6378 | 1127 | /Rect [ 297.6378 |
4194 | 1127 | 304.9469 | 1128 | 491.9469 |
4195 | 1128 | 297.6378 | 1129 | 297.6378 |
4197 | 1129 | 316.9469 ] | 1130 | 503.9469 ] |
4198 | 1130 | /Subtype /Link | 1131 | /Subtype /Link |
4199 | 1131 | /Type /Annot >> | 1132 | /Type /Annot >> |
4200 | 1132 | endobj | 1133 | endobj |
4201 | @@ -1139,9 +1140,9 @@ | |||
4202 | 1139 | 0 | 1140 | 0 |
4203 | 1140 | 0 ] | 1141 | 0 ] |
4204 | 1141 | /Rect [ 297.6378 | 1142 | /Rect [ 297.6378 |
4208 | 1142 | 304.9469 | 1143 | 491.9469 |
4209 | 1143 | 322.6378 | 1144 | 323.1978 |
4210 | 1144 | 316.9469 ] | 1145 | 503.9469 ] |
4211 | 1145 | /Subtype /Link | 1146 | /Subtype /Link |
4212 | 1146 | /Type /Annot >> | 1147 | /Type /Annot >> |
4213 | 1147 | endobj | 1148 | endobj |
4214 | @@ -1153,54 +1154,44 @@ | |||
4215 | 1153 | /Border [ 0 | 1154 | /Border [ 0 |
4216 | 1154 | 0 | 1155 | 0 |
4217 | 1155 | 0 ] | 1156 | 0 ] |
4222 | 1156 | /Rect [ 322.6378 | 1157 | /Rect [ 323.1978 |
4223 | 1157 | 304.9469 | 1158 | 491.9469 |
4224 | 1158 | 322.6378 | 1159 | 323.1978 |
4225 | 1159 | 316.9469 ] | 1160 | 503.9469 ] |
4226 | 1160 | /Subtype /Link | 1161 | /Subtype /Link |
4227 | 1161 | /Type /Annot >> | 1162 | /Type /Annot >> |
4228 | 1162 | endobj | 1163 | endobj |
4230 | 1163 | % 'Page13': class PDFPage | 1164 | % 'Annot.NUMBER55': class PDFDictionary |
4231 | 1164 | 75 0 obj | 1165 | 75 0 obj |
4241 | 1165 | % Page dictionary | 1166 | << /A << /S /URI |
4242 | 1166 | << /Annots [ 69 0 R | 1167 | /Type /Action |
4243 | 1167 | 70 0 R | 1168 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-blockTableStyle.rml) >> |
4244 | 1168 | 71 0 R | 1169 | /Border [ 0 |
4236 | 1169 | 72 0 R | ||
4237 | 1170 | 73 0 R | ||
4238 | 1171 | 74 0 R ] | ||
4239 | 1172 | /Contents 1019 0 R | ||
4240 | 1173 | /MediaBox [ 0 | ||
4245 | 1174 | 0 | 1170 | 0 |
4258 | 1175 | 595.2756 | 1171 | 0 ] |
4259 | 1176 | 841.8898 ] | 1172 | /Rect [ 150.2861 |
4260 | 1177 | /Parent 1006 0 R | 1173 | 228.9469 |
4261 | 1178 | /Resources << /Font 1 0 R | 1174 | 254.1661 |
4262 | 1179 | /ProcSet [ /PDF | 1175 | 240.9469 ] |
4263 | 1180 | /Text | 1176 | /Subtype /Link |
4264 | 1181 | /ImageB | 1177 | /Type /Annot >> |
4253 | 1182 | /ImageC | ||
4254 | 1183 | /ImageI ] >> | ||
4255 | 1184 | /Rotate 0 | ||
4256 | 1185 | /Trans << >> | ||
4257 | 1186 | /Type /Page >> | ||
4265 | 1187 | endobj | 1178 | endobj |
4267 | 1188 | % 'Annot.NUMBER55': class PDFDictionary | 1179 | % 'Annot.NUMBER56': class PDFDictionary |
4268 | 1189 | 76 0 obj | 1180 | 76 0 obj |
4269 | 1190 | << /A << /S /URI | 1181 | << /A << /S /URI |
4270 | 1191 | /Type /Action | 1182 | /Type /Action |
4272 | 1192 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-blockTableStyle.rml) >> | 1183 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> |
4273 | 1193 | /Border [ 0 | 1184 | /Border [ 0 |
4274 | 1194 | 0 | 1185 | 0 |
4275 | 1195 | 0 ] | 1186 | 0 ] |
4280 | 1196 | /Rect [ 150.2861 | 1187 | /Rect [ 297.6378 |
4281 | 1197 | 746.9469 | 1188 | 228.9469 |
4282 | 1198 | 254.1661 | 1189 | 297.6378 |
4283 | 1199 | 758.9469 ] | 1190 | 240.9469 ] |
4284 | 1200 | /Subtype /Link | 1191 | /Subtype /Link |
4285 | 1201 | /Type /Annot >> | 1192 | /Type /Annot >> |
4286 | 1202 | endobj | 1193 | endobj |
4288 | 1203 | % 'Annot.NUMBER56': class PDFDictionary | 1194 | % 'Annot.NUMBER57': class PDFDictionary |
4289 | 1204 | 77 0 obj | 1195 | 77 0 obj |
4290 | 1205 | << /A << /S /URI | 1196 | << /A << /S /URI |
4291 | 1206 | /Type /Action | 1197 | /Type /Action |
4292 | @@ -1209,13 +1200,13 @@ | |||
4293 | 1209 | 0 | 1200 | 0 |
4294 | 1210 | 0 ] | 1201 | 0 ] |
4295 | 1211 | /Rect [ 297.6378 | 1202 | /Rect [ 297.6378 |
4299 | 1212 | 746.9469 | 1203 | 228.9469 |
4300 | 1213 | 297.6378 | 1204 | 323.1978 |
4301 | 1214 | 758.9469 ] | 1205 | 240.9469 ] |
4302 | 1215 | /Subtype /Link | 1206 | /Subtype /Link |
4303 | 1216 | /Type /Annot >> | 1207 | /Type /Annot >> |
4304 | 1217 | endobj | 1208 | endobj |
4306 | 1218 | % 'Annot.NUMBER57': class PDFDictionary | 1209 | % 'Annot.NUMBER58': class PDFDictionary |
4307 | 1219 | 78 0 obj | 1210 | 78 0 obj |
4308 | 1220 | << /A << /S /URI | 1211 | << /A << /S /URI |
4309 | 1221 | /Type /Action | 1212 | /Type /Action |
4310 | @@ -1223,27 +1214,40 @@ | |||
4311 | 1223 | /Border [ 0 | 1214 | /Border [ 0 |
4312 | 1224 | 0 | 1215 | 0 |
4313 | 1225 | 0 ] | 1216 | 0 ] |
4318 | 1226 | /Rect [ 297.6378 | 1217 | /Rect [ 323.1978 |
4319 | 1227 | 746.9469 | 1218 | 228.9469 |
4320 | 1228 | 322.6378 | 1219 | 323.1978 |
4321 | 1229 | 758.9469 ] | 1220 | 240.9469 ] |
4322 | 1230 | /Subtype /Link | 1221 | /Subtype /Link |
4323 | 1231 | /Type /Annot >> | 1222 | /Type /Annot >> |
4324 | 1232 | endobj | 1223 | endobj |
4326 | 1233 | % 'Annot.NUMBER58': class PDFDictionary | 1224 | % 'Page13': class PDFPage |
4327 | 1234 | 79 0 obj | 1225 | 79 0 obj |
4332 | 1235 | << /A << /S /URI | 1226 | % Page dictionary |
4333 | 1236 | /Type /Action | 1227 | << /Annots [ 70 0 R |
4334 | 1237 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> | 1228 | 71 0 R |
4335 | 1238 | /Border [ 0 | 1229 | 72 0 R |
4336 | 1230 | 73 0 R | ||
4337 | 1231 | 74 0 R | ||
4338 | 1232 | 75 0 R | ||
4339 | 1233 | 76 0 R | ||
4340 | 1234 | 77 0 R | ||
4341 | 1235 | 78 0 R ] | ||
4342 | 1236 | /Contents 1260 0 R | ||
4343 | 1237 | /MediaBox [ 0 | ||
4344 | 1239 | 0 | 1238 | 0 |
4352 | 1240 | 0 ] | 1239 | 595.2756 |
4353 | 1241 | /Rect [ 322.6378 | 1240 | 841.8898 ] |
4354 | 1242 | 746.9469 | 1241 | /Parent 1247 0 R |
4355 | 1243 | 322.6378 | 1242 | /Resources << /Font 1 0 R |
4356 | 1244 | 758.9469 ] | 1243 | /ProcSet [ /PDF |
4357 | 1245 | /Subtype /Link | 1244 | /Text |
4358 | 1246 | /Type /Annot >> | 1245 | /ImageB |
4359 | 1246 | /ImageC | ||
4360 | 1247 | /ImageI ] >> | ||
4361 | 1248 | /Rotate 0 | ||
4362 | 1249 | /Trans << >> | ||
4363 | 1250 | /Type /Page >> | ||
4364 | 1247 | endobj | 1251 | endobj |
4365 | 1248 | % 'Annot.NUMBER59': class PDFDictionary | 1252 | % 'Annot.NUMBER59': class PDFDictionary |
4366 | 1249 | 80 0 obj | 1253 | 80 0 obj |
4367 | @@ -1254,9 +1258,9 @@ | |||
4368 | 1254 | 0 | 1258 | 0 |
4369 | 1255 | 0 ] | 1259 | 0 ] |
4370 | 1256 | /Rect [ 150.2861 | 1260 | /Rect [ 150.2861 |
4372 | 1257 | 529.9469 | 1261 | 741.9469 |
4373 | 1258 | 254.1661 | 1262 | 254.1661 |
4375 | 1259 | 541.9469 ] | 1263 | 753.9469 ] |
4376 | 1260 | /Subtype /Link | 1264 | /Subtype /Link |
4377 | 1261 | /Type /Annot >> | 1265 | /Type /Annot >> |
4378 | 1262 | endobj | 1266 | endobj |
4379 | @@ -1269,9 +1273,9 @@ | |||
4380 | 1269 | 0 | 1273 | 0 |
4381 | 1270 | 0 ] | 1274 | 0 ] |
4382 | 1271 | /Rect [ 297.6378 | 1275 | /Rect [ 297.6378 |
4384 | 1272 | 529.9469 | 1276 | 741.9469 |
4385 | 1273 | 297.6378 | 1277 | 297.6378 |
4387 | 1274 | 541.9469 ] | 1278 | 753.9469 ] |
4388 | 1275 | /Subtype /Link | 1279 | /Subtype /Link |
4389 | 1276 | /Type /Annot >> | 1280 | /Type /Annot >> |
4390 | 1277 | endobj | 1281 | endobj |
4391 | @@ -1284,9 +1288,9 @@ | |||
4392 | 1284 | 0 | 1288 | 0 |
4393 | 1285 | 0 ] | 1289 | 0 ] |
4394 | 1286 | /Rect [ 297.6378 | 1290 | /Rect [ 297.6378 |
4398 | 1287 | 529.9469 | 1291 | 741.9469 |
4399 | 1288 | 322.6378 | 1292 | 323.1978 |
4400 | 1289 | 541.9469 ] | 1293 | 753.9469 ] |
4401 | 1290 | /Subtype /Link | 1294 | /Subtype /Link |
4402 | 1291 | /Type /Annot >> | 1295 | /Type /Annot >> |
4403 | 1292 | endobj | 1296 | endobj |
4404 | @@ -1298,10 +1302,10 @@ | |||
4405 | 1298 | /Border [ 0 | 1302 | /Border [ 0 |
4406 | 1299 | 0 | 1303 | 0 |
4407 | 1300 | 0 ] | 1304 | 0 ] |
4412 | 1301 | /Rect [ 322.6378 | 1305 | /Rect [ 323.1978 |
4413 | 1302 | 529.9469 | 1306 | 741.9469 |
4414 | 1303 | 322.6378 | 1307 | 323.1978 |
4415 | 1304 | 541.9469 ] | 1308 | 753.9469 ] |
4416 | 1305 | /Subtype /Link | 1309 | /Subtype /Link |
4417 | 1306 | /Type /Annot >> | 1310 | /Type /Annot >> |
4418 | 1307 | endobj | 1311 | endobj |
4419 | @@ -1314,9 +1318,9 @@ | |||
4420 | 1314 | 0 | 1318 | 0 |
4421 | 1315 | 0 ] | 1319 | 0 ] |
4422 | 1316 | /Rect [ 150.2861 | 1320 | /Rect [ 150.2861 |
4424 | 1317 | 312.9469 | 1321 | 536.9469 |
4425 | 1318 | 254.1661 | 1322 | 254.1661 |
4427 | 1319 | 324.9469 ] | 1323 | 548.9469 ] |
4428 | 1320 | /Subtype /Link | 1324 | /Subtype /Link |
4429 | 1321 | /Type /Annot >> | 1325 | /Type /Annot >> |
4430 | 1322 | endobj | 1326 | endobj |
4431 | @@ -1329,9 +1333,9 @@ | |||
4432 | 1329 | 0 | 1333 | 0 |
4433 | 1330 | 0 ] | 1334 | 0 ] |
4434 | 1331 | /Rect [ 297.6378 | 1335 | /Rect [ 297.6378 |
4436 | 1332 | 312.9469 | 1336 | 536.9469 |
4437 | 1333 | 297.6378 | 1337 | 297.6378 |
4439 | 1334 | 324.9469 ] | 1338 | 548.9469 ] |
4440 | 1335 | /Subtype /Link | 1339 | /Subtype /Link |
4441 | 1336 | /Type /Annot >> | 1340 | /Type /Annot >> |
4442 | 1337 | endobj | 1341 | endobj |
4443 | @@ -1344,9 +1348,9 @@ | |||
4444 | 1344 | 0 | 1348 | 0 |
4445 | 1345 | 0 ] | 1349 | 0 ] |
4446 | 1346 | /Rect [ 297.6378 | 1350 | /Rect [ 297.6378 |
4450 | 1347 | 312.9469 | 1351 | 536.9469 |
4451 | 1348 | 322.6378 | 1352 | 323.1978 |
4452 | 1349 | 324.9469 ] | 1353 | 548.9469 ] |
4453 | 1350 | /Subtype /Link | 1354 | /Subtype /Link |
4454 | 1351 | /Type /Annot >> | 1355 | /Type /Annot >> |
4455 | 1352 | endobj | 1356 | endobj |
4456 | @@ -1358,60 +1362,44 @@ | |||
4457 | 1358 | /Border [ 0 | 1362 | /Border [ 0 |
4458 | 1359 | 0 | 1363 | 0 |
4459 | 1360 | 0 ] | 1364 | 0 ] |
4464 | 1361 | /Rect [ 322.6378 | 1365 | /Rect [ 323.1978 |
4465 | 1362 | 312.9469 | 1366 | 536.9469 |
4466 | 1363 | 322.6378 | 1367 | 323.1978 |
4467 | 1364 | 324.9469 ] | 1368 | 548.9469 ] |
4468 | 1365 | /Subtype /Link | 1369 | /Subtype /Link |
4469 | 1366 | /Type /Annot >> | 1370 | /Type /Annot >> |
4470 | 1367 | endobj | 1371 | endobj |
4472 | 1368 | % 'Page14': class PDFPage | 1372 | % 'Annot.NUMBER67': class PDFDictionary |
4473 | 1369 | 88 0 obj | 1373 | 88 0 obj |
4489 | 1370 | % Page dictionary | 1374 | << /A << /S /URI |
4490 | 1371 | << /Annots [ 76 0 R | 1375 | /Type /Action |
4491 | 1372 | 77 0 R | 1376 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-blockTableStyle.rml) >> |
4492 | 1373 | 78 0 R | 1377 | /Border [ 0 |
4478 | 1374 | 79 0 R | ||
4479 | 1375 | 80 0 R | ||
4480 | 1376 | 81 0 R | ||
4481 | 1377 | 82 0 R | ||
4482 | 1378 | 83 0 R | ||
4483 | 1379 | 84 0 R | ||
4484 | 1380 | 85 0 R | ||
4485 | 1381 | 86 0 R | ||
4486 | 1382 | 87 0 R ] | ||
4487 | 1383 | /Contents 1020 0 R | ||
4488 | 1384 | /MediaBox [ 0 | ||
4493 | 1385 | 0 | 1378 | 0 |
4506 | 1386 | 595.2756 | 1379 | 0 ] |
4507 | 1387 | 841.8898 ] | 1380 | /Rect [ 150.2861 |
4508 | 1388 | /Parent 1006 0 R | 1381 | 273.9469 |
4509 | 1389 | /Resources << /Font 1 0 R | 1382 | 254.1661 |
4510 | 1390 | /ProcSet [ /PDF | 1383 | 285.9469 ] |
4511 | 1391 | /Text | 1384 | /Subtype /Link |
4512 | 1392 | /ImageB | 1385 | /Type /Annot >> |
4501 | 1393 | /ImageC | ||
4502 | 1394 | /ImageI ] >> | ||
4503 | 1395 | /Rotate 0 | ||
4504 | 1396 | /Trans << >> | ||
4505 | 1397 | /Type /Page >> | ||
4513 | 1398 | endobj | 1386 | endobj |
4515 | 1399 | % 'Annot.NUMBER67': class PDFDictionary | 1387 | % 'Annot.NUMBER68': class PDFDictionary |
4516 | 1400 | 89 0 obj | 1388 | 89 0 obj |
4517 | 1401 | << /A << /S /URI | 1389 | << /A << /S /URI |
4518 | 1402 | /Type /Action | 1390 | /Type /Action |
4520 | 1403 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-blockTableStyle.rml) >> | 1391 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> |
4521 | 1404 | /Border [ 0 | 1392 | /Border [ 0 |
4522 | 1405 | 0 | 1393 | 0 |
4523 | 1406 | 0 ] | 1394 | 0 ] |
4528 | 1407 | /Rect [ 150.2861 | 1395 | /Rect [ 297.6378 |
4529 | 1408 | 746.9469 | 1396 | 273.9469 |
4530 | 1409 | 254.1661 | 1397 | 297.6378 |
4531 | 1410 | 758.9469 ] | 1398 | 285.9469 ] |
4532 | 1411 | /Subtype /Link | 1399 | /Subtype /Link |
4533 | 1412 | /Type /Annot >> | 1400 | /Type /Annot >> |
4534 | 1413 | endobj | 1401 | endobj |
4536 | 1414 | % 'Annot.NUMBER68': class PDFDictionary | 1402 | % 'Annot.NUMBER69': class PDFDictionary |
4537 | 1415 | 90 0 obj | 1403 | 90 0 obj |
4538 | 1416 | << /A << /S /URI | 1404 | << /A << /S /URI |
4539 | 1417 | /Type /Action | 1405 | /Type /Action |
4540 | @@ -1420,13 +1408,13 @@ | |||
4541 | 1420 | 0 | 1408 | 0 |
4542 | 1421 | 0 ] | 1409 | 0 ] |
4543 | 1422 | /Rect [ 297.6378 | 1410 | /Rect [ 297.6378 |
4547 | 1423 | 746.9469 | 1411 | 273.9469 |
4548 | 1424 | 297.6378 | 1412 | 323.1978 |
4549 | 1425 | 758.9469 ] | 1413 | 285.9469 ] |
4550 | 1426 | /Subtype /Link | 1414 | /Subtype /Link |
4551 | 1427 | /Type /Annot >> | 1415 | /Type /Annot >> |
4552 | 1428 | endobj | 1416 | endobj |
4554 | 1429 | % 'Annot.NUMBER69': class PDFDictionary | 1417 | % 'Annot.NUMBER70': class PDFDictionary |
4555 | 1430 | 91 0 obj | 1418 | 91 0 obj |
4556 | 1431 | << /A << /S /URI | 1419 | << /A << /S /URI |
4557 | 1432 | /Type /Action | 1420 | /Type /Action |
4558 | @@ -1434,44 +1422,44 @@ | |||
4559 | 1434 | /Border [ 0 | 1422 | /Border [ 0 |
4560 | 1435 | 0 | 1423 | 0 |
4561 | 1436 | 0 ] | 1424 | 0 ] |
4566 | 1437 | /Rect [ 297.6378 | 1425 | /Rect [ 323.1978 |
4567 | 1438 | 746.9469 | 1426 | 273.9469 |
4568 | 1439 | 322.6378 | 1427 | 323.1978 |
4569 | 1440 | 758.9469 ] | 1428 | 285.9469 ] |
4570 | 1441 | /Subtype /Link | 1429 | /Subtype /Link |
4571 | 1442 | /Type /Annot >> | 1430 | /Type /Annot >> |
4572 | 1443 | endobj | 1431 | endobj |
4574 | 1444 | % 'Annot.NUMBER70': class PDFDictionary | 1432 | % 'Annot.NUMBER71': class PDFDictionary |
4575 | 1445 | 92 0 obj | 1433 | 92 0 obj |
4576 | 1446 | << /A << /S /URI | 1434 | << /A << /S /URI |
4577 | 1447 | /Type /Action | 1435 | /Type /Action |
4579 | 1448 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> | 1436 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-blockTableStyle.rml) >> |
4580 | 1449 | /Border [ 0 | 1437 | /Border [ 0 |
4581 | 1450 | 0 | 1438 | 0 |
4582 | 1451 | 0 ] | 1439 | 0 ] |
4587 | 1452 | /Rect [ 322.6378 | 1440 | /Rect [ 150.2861 |
4588 | 1453 | 746.9469 | 1441 | 68.94685 |
4589 | 1454 | 322.6378 | 1442 | 254.1661 |
4590 | 1455 | 758.9469 ] | 1443 | 80.94685 ] |
4591 | 1456 | /Subtype /Link | 1444 | /Subtype /Link |
4592 | 1457 | /Type /Annot >> | 1445 | /Type /Annot >> |
4593 | 1458 | endobj | 1446 | endobj |
4595 | 1459 | % 'Annot.NUMBER71': class PDFDictionary | 1447 | % 'Annot.NUMBER72': class PDFDictionary |
4596 | 1460 | 93 0 obj | 1448 | 93 0 obj |
4597 | 1461 | << /A << /S /URI | 1449 | << /A << /S /URI |
4598 | 1462 | /Type /Action | 1450 | /Type /Action |
4600 | 1463 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-blockTableStyle.rml) >> | 1451 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> |
4601 | 1464 | /Border [ 0 | 1452 | /Border [ 0 |
4602 | 1465 | 0 | 1453 | 0 |
4603 | 1466 | 0 ] | 1454 | 0 ] |
4608 | 1467 | /Rect [ 150.2861 | 1455 | /Rect [ 297.6378 |
4609 | 1468 | 529.9469 | 1456 | 68.94685 |
4610 | 1469 | 254.1661 | 1457 | 297.6378 |
4611 | 1470 | 541.9469 ] | 1458 | 80.94685 ] |
4612 | 1471 | /Subtype /Link | 1459 | /Subtype /Link |
4613 | 1472 | /Type /Annot >> | 1460 | /Type /Annot >> |
4614 | 1473 | endobj | 1461 | endobj |
4616 | 1474 | % 'Annot.NUMBER72': class PDFDictionary | 1462 | % 'Annot.NUMBER73': class PDFDictionary |
4617 | 1475 | 94 0 obj | 1463 | 94 0 obj |
4618 | 1476 | << /A << /S /URI | 1464 | << /A << /S /URI |
4619 | 1477 | /Type /Action | 1465 | /Type /Action |
4620 | @@ -1480,13 +1468,13 @@ | |||
4621 | 1480 | 0 | 1468 | 0 |
4622 | 1481 | 0 ] | 1469 | 0 ] |
4623 | 1482 | /Rect [ 297.6378 | 1470 | /Rect [ 297.6378 |
4627 | 1483 | 529.9469 | 1471 | 68.94685 |
4628 | 1484 | 297.6378 | 1472 | 323.1978 |
4629 | 1485 | 541.9469 ] | 1473 | 80.94685 ] |
4630 | 1486 | /Subtype /Link | 1474 | /Subtype /Link |
4631 | 1487 | /Type /Annot >> | 1475 | /Type /Annot >> |
4632 | 1488 | endobj | 1476 | endobj |
4634 | 1489 | % 'Annot.NUMBER73': class PDFDictionary | 1477 | % 'Annot.NUMBER74': class PDFDictionary |
4635 | 1490 | 95 0 obj | 1478 | 95 0 obj |
4636 | 1491 | << /A << /S /URI | 1479 | << /A << /S /URI |
4637 | 1492 | /Type /Action | 1480 | /Type /Action |
4638 | @@ -1494,27 +1482,47 @@ | |||
4639 | 1494 | /Border [ 0 | 1482 | /Border [ 0 |
4640 | 1495 | 0 | 1483 | 0 |
4641 | 1496 | 0 ] | 1484 | 0 ] |
4646 | 1497 | /Rect [ 297.6378 | 1485 | /Rect [ 323.1978 |
4647 | 1498 | 529.9469 | 1486 | 68.94685 |
4648 | 1499 | 322.6378 | 1487 | 323.1978 |
4649 | 1500 | 541.9469 ] | 1488 | 80.94685 ] |
4650 | 1501 | /Subtype /Link | 1489 | /Subtype /Link |
4651 | 1502 | /Type /Annot >> | 1490 | /Type /Annot >> |
4652 | 1503 | endobj | 1491 | endobj |
4654 | 1504 | % 'Annot.NUMBER74': class PDFDictionary | 1492 | % 'Page14': class PDFPage |
4655 | 1505 | 96 0 obj | 1493 | 96 0 obj |
4660 | 1506 | << /A << /S /URI | 1494 | % Page dictionary |
4661 | 1507 | /Type /Action | 1495 | << /Annots [ 80 0 R |
4662 | 1508 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> | 1496 | 81 0 R |
4663 | 1509 | /Border [ 0 | 1497 | 82 0 R |
4664 | 1498 | 83 0 R | ||
4665 | 1499 | 84 0 R | ||
4666 | 1500 | 85 0 R | ||
4667 | 1501 | 86 0 R | ||
4668 | 1502 | 87 0 R | ||
4669 | 1503 | 88 0 R | ||
4670 | 1504 | 89 0 R | ||
4671 | 1505 | 90 0 R | ||
4672 | 1506 | 91 0 R | ||
4673 | 1507 | 92 0 R | ||
4674 | 1508 | 93 0 R | ||
4675 | 1509 | 94 0 R | ||
4676 | 1510 | 95 0 R ] | ||
4677 | 1511 | /Contents 1261 0 R | ||
4678 | 1512 | /MediaBox [ 0 | ||
4679 | 1510 | 0 | 1513 | 0 |
4687 | 1511 | 0 ] | 1514 | 595.2756 |
4688 | 1512 | /Rect [ 322.6378 | 1515 | 841.8898 ] |
4689 | 1513 | 529.9469 | 1516 | /Parent 1247 0 R |
4690 | 1514 | 322.6378 | 1517 | /Resources << /Font 1 0 R |
4691 | 1515 | 541.9469 ] | 1518 | /ProcSet [ /PDF |
4692 | 1516 | /Subtype /Link | 1519 | /Text |
4693 | 1517 | /Type /Annot >> | 1520 | /ImageB |
4694 | 1521 | /ImageC | ||
4695 | 1522 | /ImageI ] >> | ||
4696 | 1523 | /Rotate 0 | ||
4697 | 1524 | /Trans << >> | ||
4698 | 1525 | /Type /Page >> | ||
4699 | 1518 | endobj | 1526 | endobj |
4700 | 1519 | % 'Annot.NUMBER75': class PDFDictionary | 1527 | % 'Annot.NUMBER75': class PDFDictionary |
4701 | 1520 | 97 0 obj | 1528 | 97 0 obj |
4702 | @@ -1525,9 +1533,9 @@ | |||
4703 | 1525 | 0 | 1533 | 0 |
4704 | 1526 | 0 ] | 1534 | 0 ] |
4705 | 1527 | /Rect [ 150.2861 | 1535 | /Rect [ 150.2861 |
4707 | 1528 | 312.9469 | 1536 | 593.9469 |
4708 | 1529 | 254.1661 | 1537 | 254.1661 |
4710 | 1530 | 324.9469 ] | 1538 | 605.9469 ] |
4711 | 1531 | /Subtype /Link | 1539 | /Subtype /Link |
4712 | 1532 | /Type /Annot >> | 1540 | /Type /Annot >> |
4713 | 1533 | endobj | 1541 | endobj |
4714 | @@ -1540,9 +1548,9 @@ | |||
4715 | 1540 | 0 | 1548 | 0 |
4716 | 1541 | 0 ] | 1549 | 0 ] |
4717 | 1542 | /Rect [ 297.6378 | 1550 | /Rect [ 297.6378 |
4719 | 1543 | 312.9469 | 1551 | 593.9469 |
4720 | 1544 | 297.6378 | 1552 | 297.6378 |
4722 | 1545 | 324.9469 ] | 1553 | 605.9469 ] |
4723 | 1546 | /Subtype /Link | 1554 | /Subtype /Link |
4724 | 1547 | /Type /Annot >> | 1555 | /Type /Annot >> |
4725 | 1548 | endobj | 1556 | endobj |
4726 | @@ -1555,9 +1563,9 @@ | |||
4727 | 1555 | 0 | 1563 | 0 |
4728 | 1556 | 0 ] | 1564 | 0 ] |
4729 | 1557 | /Rect [ 297.6378 | 1565 | /Rect [ 297.6378 |
4733 | 1558 | 312.9469 | 1566 | 593.9469 |
4734 | 1559 | 322.6378 | 1567 | 323.1978 |
4735 | 1560 | 324.9469 ] | 1568 | 605.9469 ] |
4736 | 1561 | /Subtype /Link | 1569 | /Subtype /Link |
4737 | 1562 | /Type /Annot >> | 1570 | /Type /Annot >> |
4738 | 1563 | endobj | 1571 | endobj |
4739 | @@ -1569,10 +1577,10 @@ | |||
4740 | 1569 | /Border [ 0 | 1577 | /Border [ 0 |
4741 | 1570 | 0 | 1578 | 0 |
4742 | 1571 | 0 ] | 1579 | 0 ] |
4747 | 1572 | /Rect [ 322.6378 | 1580 | /Rect [ 323.1978 |
4748 | 1573 | 312.9469 | 1581 | 593.9469 |
4749 | 1574 | 322.6378 | 1582 | 323.1978 |
4750 | 1575 | 324.9469 ] | 1583 | 605.9469 ] |
4751 | 1576 | /Subtype /Link | 1584 | /Subtype /Link |
4752 | 1577 | /Type /Annot >> | 1585 | /Type /Annot >> |
4753 | 1578 | endobj | 1586 | endobj |
4754 | @@ -1585,9 +1593,9 @@ | |||
4755 | 1585 | 0 | 1593 | 0 |
4756 | 1586 | 0 ] | 1594 | 0 ] |
4757 | 1587 | /Rect [ 150.2861 | 1595 | /Rect [ 150.2861 |
4759 | 1588 | 95.94685 | 1596 | 388.9469 |
4760 | 1589 | 254.1661 | 1597 | 254.1661 |
4762 | 1590 | 107.9469 ] | 1598 | 400.9469 ] |
4763 | 1591 | /Subtype /Link | 1599 | /Subtype /Link |
4764 | 1592 | /Type /Annot >> | 1600 | /Type /Annot >> |
4765 | 1593 | endobj | 1601 | endobj |
4766 | @@ -1600,9 +1608,9 @@ | |||
4767 | 1600 | 0 | 1608 | 0 |
4768 | 1601 | 0 ] | 1609 | 0 ] |
4769 | 1602 | /Rect [ 297.6378 | 1610 | /Rect [ 297.6378 |
4771 | 1603 | 95.94685 | 1611 | 388.9469 |
4772 | 1604 | 297.6378 | 1612 | 297.6378 |
4774 | 1605 | 107.9469 ] | 1613 | 400.9469 ] |
4775 | 1606 | /Subtype /Link | 1614 | /Subtype /Link |
4776 | 1607 | /Type /Annot >> | 1615 | /Type /Annot >> |
4777 | 1608 | endobj | 1616 | endobj |
4778 | @@ -1615,9 +1623,9 @@ | |||
4779 | 1615 | 0 | 1623 | 0 |
4780 | 1616 | 0 ] | 1624 | 0 ] |
4781 | 1617 | /Rect [ 297.6378 | 1625 | /Rect [ 297.6378 |
4785 | 1618 | 95.94685 | 1626 | 388.9469 |
4786 | 1619 | 322.6378 | 1627 | 323.1978 |
4787 | 1620 | 107.9469 ] | 1628 | 400.9469 ] |
4788 | 1621 | /Subtype /Link | 1629 | /Subtype /Link |
4789 | 1622 | /Type /Annot >> | 1630 | /Type /Annot >> |
4790 | 1623 | endobj | 1631 | endobj |
4791 | @@ -1629,38 +1637,94 @@ | |||
4792 | 1629 | /Border [ 0 | 1637 | /Border [ 0 |
4793 | 1630 | 0 | 1638 | 0 |
4794 | 1631 | 0 ] | 1639 | 0 ] |
4799 | 1632 | /Rect [ 322.6378 | 1640 | /Rect [ 323.1978 |
4800 | 1633 | 95.94685 | 1641 | 388.9469 |
4801 | 1634 | 322.6378 | 1642 | 323.1978 |
4802 | 1635 | 107.9469 ] | 1643 | 400.9469 ] |
4803 | 1644 | /Subtype /Link | ||
4804 | 1645 | /Type /Annot >> | ||
4805 | 1646 | endobj | ||
4806 | 1647 | % 'Annot.NUMBER83': class PDFDictionary | ||
4807 | 1648 | 105 0 obj | ||
4808 | 1649 | << /A << /S /URI | ||
4809 | 1650 | /Type /Action | ||
4810 | 1651 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-blockTableStyle.rml) >> | ||
4811 | 1652 | /Border [ 0 | ||
4812 | 1653 | 0 | ||
4813 | 1654 | 0 ] | ||
4814 | 1655 | /Rect [ 150.2861 | ||
4815 | 1656 | 183.9469 | ||
4816 | 1657 | 254.1661 | ||
4817 | 1658 | 195.9469 ] | ||
4818 | 1659 | /Subtype /Link | ||
4819 | 1660 | /Type /Annot >> | ||
4820 | 1661 | endobj | ||
4821 | 1662 | % 'Annot.NUMBER84': class PDFDictionary | ||
4822 | 1663 | 106 0 obj | ||
4823 | 1664 | << /A << /S /URI | ||
4824 | 1665 | /Type /Action | ||
4825 | 1666 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> | ||
4826 | 1667 | /Border [ 0 | ||
4827 | 1668 | 0 | ||
4828 | 1669 | 0 ] | ||
4829 | 1670 | /Rect [ 297.6378 | ||
4830 | 1671 | 183.9469 | ||
4831 | 1672 | 297.6378 | ||
4832 | 1673 | 195.9469 ] | ||
4833 | 1674 | /Subtype /Link | ||
4834 | 1675 | /Type /Annot >> | ||
4835 | 1676 | endobj | ||
4836 | 1677 | % 'Annot.NUMBER85': class PDFDictionary | ||
4837 | 1678 | 107 0 obj | ||
4838 | 1679 | << /A << /S /URI | ||
4839 | 1680 | /Type /Action | ||
4840 | 1681 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> | ||
4841 | 1682 | /Border [ 0 | ||
4842 | 1683 | 0 | ||
4843 | 1684 | 0 ] | ||
4844 | 1685 | /Rect [ 297.6378 | ||
4845 | 1686 | 183.9469 | ||
4846 | 1687 | 323.1978 | ||
4847 | 1688 | 195.9469 ] | ||
4848 | 1689 | /Subtype /Link | ||
4849 | 1690 | /Type /Annot >> | ||
4850 | 1691 | endobj | ||
4851 | 1692 | % 'Annot.NUMBER86': class PDFDictionary | ||
4852 | 1693 | 108 0 obj | ||
4853 | 1694 | << /A << /S /URI | ||
4854 | 1695 | /Type /Action | ||
4855 | 1696 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> | ||
4856 | 1697 | /Border [ 0 | ||
4857 | 1698 | 0 | ||
4858 | 1699 | 0 ] | ||
4859 | 1700 | /Rect [ 323.1978 | ||
4860 | 1701 | 183.9469 | ||
4861 | 1702 | 323.1978 | ||
4862 | 1703 | 195.9469 ] | ||
4863 | 1636 | /Subtype /Link | 1704 | /Subtype /Link |
4864 | 1637 | /Type /Annot >> | 1705 | /Type /Annot >> |
4865 | 1638 | endobj | 1706 | endobj |
4866 | 1639 | % 'Page15': class PDFPage | 1707 | % 'Page15': class PDFPage |
4868 | 1640 | 105 0 obj | 1708 | 109 0 obj |
4869 | 1641 | % Page dictionary | 1709 | % Page dictionary |
4879 | 1642 | << /Annots [ 89 0 R | 1710 | << /Annots [ 97 0 R |
4871 | 1643 | 90 0 R | ||
4872 | 1644 | 91 0 R | ||
4873 | 1645 | 92 0 R | ||
4874 | 1646 | 93 0 R | ||
4875 | 1647 | 94 0 R | ||
4876 | 1648 | 95 0 R | ||
4877 | 1649 | 96 0 R | ||
4878 | 1650 | 97 0 R | ||
4880 | 1651 | 98 0 R | 1711 | 98 0 R |
4881 | 1652 | 99 0 R | 1712 | 99 0 R |
4882 | 1653 | 100 0 R | 1713 | 100 0 R |
4883 | 1654 | 101 0 R | 1714 | 101 0 R |
4884 | 1655 | 102 0 R | 1715 | 102 0 R |
4885 | 1656 | 103 0 R | 1716 | 103 0 R |
4888 | 1657 | 104 0 R ] | 1717 | 104 0 R |
4889 | 1658 | /Contents 1021 0 R | 1718 | 105 0 R |
4890 | 1719 | 106 0 R | ||
4891 | 1720 | 107 0 R | ||
4892 | 1721 | 108 0 R ] | ||
4893 | 1722 | /Contents 1262 0 R | ||
4894 | 1659 | /MediaBox [ 0 | 1723 | /MediaBox [ 0 |
4895 | 1660 | 0 | 1724 | 0 |
4896 | 1661 | 595.2756 | 1725 | 595.2756 |
4897 | 1662 | 841.8898 ] | 1726 | 841.8898 ] |
4899 | 1663 | /Parent 1006 0 R | 1727 | /Parent 1247 0 R |
4900 | 1664 | /Resources << /Font 1 0 R | 1728 | /Resources << /Font 1 0 R |
4901 | 1665 | /ProcSet [ /PDF | 1729 | /ProcSet [ /PDF |
4902 | 1666 | /Text | 1730 | /Text |
4903 | @@ -1671,66 +1735,6 @@ | |||
4904 | 1671 | /Trans << >> | 1735 | /Trans << >> |
4905 | 1672 | /Type /Page >> | 1736 | /Type /Page >> |
4906 | 1673 | endobj | 1737 | endobj |
4907 | 1674 | % 'Annot.NUMBER83': class PDFDictionary | ||
4908 | 1675 | 106 0 obj | ||
4909 | 1676 | << /A << /S /URI | ||
4910 | 1677 | /Type /Action | ||
4911 | 1678 | /URI (http://svn.zope.org/*checkout*/z3c.rml/trunk/src/z3c/rml/tests/input/tag-blockTableStyle.rml) >> | ||
4912 | 1679 | /Border [ 0 | ||
4913 | 1680 | 0 | ||
4914 | 1681 | 0 ] | ||
4915 | 1682 | /Rect [ 150.2861 | ||
4916 | 1683 | 598.9469 | ||
4917 | 1684 | 254.1661 | ||
4918 | 1685 | 610.9469 ] | ||
4919 | 1686 | /Subtype /Link | ||
4920 | 1687 | /Type /Annot >> | ||
4921 | 1688 | endobj | ||
4922 | 1689 | % 'Annot.NUMBER84': class PDFDictionary | ||
4923 | 1690 | 107 0 obj | ||
4924 | 1691 | << /A << /S /URI | ||
4925 | 1692 | /Type /Action | ||
4926 | 1693 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> | ||
4927 | 1694 | /Border [ 0 | ||
4928 | 1695 | 0 | ||
4929 | 1696 | 0 ] | ||
4930 | 1697 | /Rect [ 297.6378 | ||
4931 | 1698 | 598.9469 | ||
4932 | 1699 | 297.6378 | ||
4933 | 1700 | 610.9469 ] | ||
4934 | 1701 | /Subtype /Link | ||
4935 | 1702 | /Type /Annot >> | ||
4936 | 1703 | endobj | ||
4937 | 1704 | % 'Annot.NUMBER85': class PDFDictionary | ||
4938 | 1705 | 108 0 obj | ||
4939 | 1706 | << /A << /S /URI | ||
4940 | 1707 | /Type /Action | ||
4941 | 1708 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> | ||
4942 | 1709 | /Border [ 0 | ||
4943 | 1710 | 0 | ||
4944 | 1711 | 0 ] | ||
4945 | 1712 | /Rect [ 297.6378 | ||
4946 | 1713 | 598.9469 | ||
4947 | 1714 | 322.6378 | ||
4948 | 1715 | 610.9469 ] | ||
4949 | 1716 | /Subtype /Link | ||
4950 | 1717 | /Type /Annot >> | ||
4951 | 1718 | endobj | ||
4952 | 1719 | % 'Annot.NUMBER86': class PDFDictionary | ||
4953 | 1720 | 109 0 obj | ||
4954 | 1721 | << /A << /S /URI | ||
4955 | 1722 | /Type /Action | ||
4956 | 1723 | /URI (http://svn.zope.org/z3c.rml/trunk/src/z3c/rml/tests/expected/tag-blockTableStyle.pdf?view=auto) >> | ||
4957 | 1724 | /Border [ 0 | ||
4958 | 1725 | 0 | ||
4959 | 1726 | 0 ] | ||
4960 | 1727 | /Rect [ 322.6378 | ||
4961 | 1728 | 598.9469 | ||
4962 | 1729 | 322.6378 | ||
4963 | 1730 | 610.9469 ] | ||
4964 | 1731 | /Subtype /Link | ||
4965 | 1732 | /Type /Annot >> | ||
4966 | 1733 | endobj | ||
4967 | 1734 | % 'Annot.NUMBER87': class PDFDictionary | 1738 | % 'Annot.NUMBER87': class PDFDictionary |
4968 | 1735 | 110 0 obj | 1739 | 110 0 obj |
4969 | 1736 | << /A << /S /URI | 1740 | << /A << /S /URI |
4970 | @@ -1740,9 +1744,9 @@ | |||
4971 | 1740 | 0 | 1744 | 0 |
4972 | 1741 | 0 ] | 1745 | 0 ] |
4973 | 1742 | /Rect [ 150.2861 | 1746 | /Rect [ 150.2861 |
4975 | 1743 | 410.9469 | 1747 | 741.9469 |
4976 | 1744 | 254.1661 | 1748 | 254.1661 |
4978 | 1745 | 422.9469 ] | 1749 | 753.9469 ] |
4979 | 1746 | /Subtype /Link | 1750 | /Subtype /Link |
4980 | 1747 | /Type /Annot >> | 1751 | /Type /Annot >> |
4981 | 1748 | endobj | 1752 | endobj |
4982 | @@ -1755,9 +1759,9 @@ | |||
4983 | 1755 | 0 | 1759 | 0 |
4984 | 1756 | 0 ] | 1760 | 0 ] |
4985 | 1757 | /Rect [ 297.6378 | 1761 | /Rect [ 297.6378 |
4987 | 1758 | 410.9469 | 1762 | 741.9469 |
4988 | 1759 | 297.6378 | 1763 | 297.6378 |
4990 | 1760 | 422.9469 ] | 1764 | 753.9469 ] |
4991 | 1761 | /Subtype /Link | 1765 | /Subtype /Link |
4992 | 1762 | /Type /Annot >> | 1766 | /Type /Annot >> |
4993 | 1763 | endobj | 1767 | endobj |
4994 | @@ -1770,9 +1774,9 @@ | |||
4995 | 1770 | 0 | 1774 | 0 |
4996 | 1771 | 0 ] | 1775 | 0 ] |
4997 | 1772 | /Rect [ 297.6378 | 1776 | /Rect [ 297.6378 |
4998 | 1773 | 410.9469 | ||
4999 | 1774 | 322.6378 | ||
5000 | 1775 | 422.9469 ] |
The diff has been truncated for viewing.
Thanks. Uploaded.