This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
forked from mareknovotny/jboss-seam
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathItext.xml
executable file
·2696 lines (2282 loc) · 132 KB
/
Itext.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<chapter id="itext">
<title>iText PDF generation</title>
<para>Seam now includes a component set for generating documents using iText. The primary focus of Seam's iText
document support is for the generation of PDF documents, but Seam also offers basic support for RTF document
generation.</para>
<section id="itext.intro">
<title>Using PDF Support</title>
<para>iText support is provided by <literal>jboss-seam-pdf.jar</literal>. This JAR contains the iText JSF
controls, which are used to construct views that can render to PDF, and the DocumentStore component, which
serves the rendered documents to the user. To include PDF support in your application, put
<literal>jboss-seam-pdf.jar</literal> in your <literal>WEB-INF/lib</literal> directory along with the
iText JAR file. There is no further configuration needed to use Seam's iText support. </para>
<para> The Seam iText module requires the use of Facelets as the view technology. Future versions of the library
may also support the use of JSP. Additionally, it requires the use of the seam-ui package.</para>
<para> The <literal>examples/itext</literal> project contains an example of the PDF support in action. It
demonstrates proper deployment packaging, and it contains a number examples that demonstrate the key PDF
generation features current supported. </para>
<section id="itext.document">
<title>Creating a document</title>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*"/>
<colspec colnum="2" colwidth="3*"/>
<tbody>
<row>
<entry valign="top">
<para>
<literal><p:document></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para> Documents are generated by facelet XHTML files using tags in the
<literal>http://jboss.org/schema/seam/pdf</literal> namespace. Documents
should always have the <literal>document</literal> tag at the root of the document.
The <literal>document</literal> tag prepares Seam to generate a document into the
DocumentStore and renders an HTML redirect to that stored content.</para>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>type</literal> — The type of the document to be produced.
Valid values are <literal>PDF</literal>, <literal>RTF</literal> and
<literal>HTML</literal> modes. Seam defaults to PDF generation, and many
of the features only work correctly when generating PDF documents.</para>
</listitem>
<listitem>
<para>
<literal>pageSize</literal> — The size of the page to be generate.
The most commonly used values would be <literal>LETTER</literal> and
<literal>A4</literal>. A full list of supported pages sizes can be found
in <literal>com.lowagie.text.PageSize</literal> class. Alternatively,
pageSize can provide the width and height of the page directly. The value
"612 792", for example, is equivalent to the LETTER page size. </para>
</listitem>
<listitem>
<para>
<literal>orientation</literal> — The orientation of the page.
Valid values are <literal>portrait</literal> and
<literal>landscape</literal>. In landscape mode, the height and width page
size values are reversed. </para>
</listitem>
<listitem>
<para>
<literal>margins</literal> — The left, right, top and bottom
margin values. </para>
</listitem>
<listitem>
<para>
<literal>marginMirroring</literal> — Indicates that margin
settings should be reversed an alternating pages.</para>
</listitem>
<listitem>
<para>
<literal>disposition</literal> — When generating PDFs in a web browser, this determines the HTTP
<literal>Content-Disposition</literal> of the document. Valid values are <literal>inline</literal>, which
indicates the document should be displayed in the browser window if possible,
and <literal>attachment</literal>, which indicates that the document should be treated as a download.
The default value is <literal>inline</literal>.</para>
</listitem>
<listitem>
<para>
<literal>fileName</literal> — For attachments, this value
overrides the downloaded file name.
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Metadata Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>title</literal>
</para>
</listitem>
<listitem>
<para>
<literal>subject</literal>
</para>
</listitem>
<listitem>
<para>
<literal>keywords</literal>
</para>
</listitem>
<listitem>
<para>
<literal>author</literal>
</para>
</listitem>
<listitem>
<para>
<literal>creator</literal>
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<p:document xmlns:p="http://jboss.org/schema/seam/pdf">
The document goes here.
</p:document>]]></programlisting>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section id="itext.text">
<title>Basic Text Elements</title>
<para> Useful documents will need to contain more than just text; however, the standard UI components are
geared towards HTML generation and are not useful for generating PDF content. Instead, Seam provides a
special UI components for generating suitable PDF content. Tags like
<literal><p:image></literal> and <literal><p:paragraph></literal> are the
basic foundations of simple documents. Tags like <literal><p:font></literal> provide style
information to all the content surrounding them. </para>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*"/>
<colspec colnum="2" colwidth="3*"/>
<tbody>
<row>
<entry valign="top">
<para>
<literal><p:paragraph></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para> Most uses of text should be sectioned into paragraphs so that text fragments can
be flowed, formatted and styled in logical groups.</para>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>firstLineIndent</literal>
</para>
</listitem>
<listitem>
<para>
<literal>extraParagraphSpace</literal>
</para>
</listitem>
<listitem>
<para>
<literal>leading</literal>
</para>
</listitem>
<listitem>
<para>
<literal>multipliedLeading</literal>
</para>
</listitem>
<listitem>
<para>
<literal>spacingBefore</literal> — The blank space to be inserted
before the element. </para>
</listitem>
<listitem>
<para>
<literal>spacingAfter</literal> — The blank space to be inserted
after the element.</para>
</listitem>
<listitem>
<para>
<literal>indentationLeft</literal>
</para>
</listitem>
<listitem>
<para>
<literal>indentationRight</literal>
</para>
</listitem>
<listitem>
<para>
<literal>keepTogether</literal>
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<p:paragraph alignment="justify">
This is a simple document. It isn't very fancy.
</p:paragraph>]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:text></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para> The <literal>text</literal> tag allows text fragments to be produced from
application data using normal JSF converter mechanisms. It is very similar to the
<literal>outputText</literal> tag used when rendering HTML documents. </para>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para><literal>value</literal> — The value to be displayed. This will
typically be a value binding expression.</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<p:paragraph>
The item costs <p:text value="#{product.price}">
<f:convertNumber type="currency" currencySymbol="$"/>
</p:text>
</p:paragraph>]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:html></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para> The <literal>html</literal> tag renders HTML content into the PDF.
</para>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para><literal>value</literal> — The text to be displayed.</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[
<p:html value="This is HTML with <b>some markup</b>." />
<p:html>
<h1>This is more complex HTML</h1>
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</p:html>
<p:html>
<s:formattedText value="*This* is |Seam Text| as HTML. It's very^cool^." />
</p:html>
]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:font></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para> The font tag defines the default font to be used for all text inside of it. </para>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para><literal>name</literal> — The font name, for example:
<literal>COURIER</literal>, <literal>HELVETICA</literal>,
<literal>TIMES-ROMAN</literal>, <literal>SYMBOL</literal> or
<literal>ZAPFDINGBATS</literal>.</para>
</listitem>
<listitem>
<para><literal>size</literal> — The point size of the font.</para>
</listitem>
<listitem>
<para><literal>style</literal> — The font styles. Any combination of :
<literal>NORMAL</literal>, <literal>BOLD</literal>,
<literal>ITALIC</literal>, <literal>OBLIQUE</literal>,
<literal>UNDERLINE</literal>, <literal>LINE-THROUGH</literal></para>
</listitem>
<listitem>
<para><literal>color</literal> — The font color. (see <xref linkend="itext.colors"/> for color values)</para>
</listitem>
<listitem>
<para><literal>encoding</literal> — The character set encoding.</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<p:font name="courier" style="bold" size="24">
<p:paragraph>My Title</p:paragraph>
</p:font>]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:textcolumn></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para><literal>p:textcolumn</literal> inserts a text column that can
be used to control the flow of text. The most common case is to
support right to left direction fonts.</para>
<para>
<emphasis>Attributes</emphasis>
<itemizedlist>
<listitem>
<para><literal>left</literal> — The left bounds of
the text column</para>
</listitem>
<listitem>
<para><literal>right</literal> — The right bounds
of the text column</para>
</listitem>
<listitem>
<para><literal>direction</literal> — The run direction
of the text in the column: <literal>RTL</literal>,
<literal>LTR</literal>, <literal
>NO-BIDI</literal>, <literal>DEFAULT</literal>
</para>
</listitem>
</itemizedlist>
</para>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[
<p:textcolumn left="400" right="600" direction="rtl">
<p:font name="/Library/Fonts/Arial Unicode.ttf"
encoding="Identity-H"
embedded="true">#{phrases.arabic}</p:font>
</p:textcolumn>]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:newPage></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para><literal>p:newPage</literal> inserts a page break. </para>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<p:newPage />]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:image></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para><literal>p:image</literal> inserts an image into the document. Images can be
loaded from the classpath or from the web application context using the
<literal>value</literal> attribute. </para>
<para>Resources can also be dynamically generated by application code. The
<literal>imageData</literal> attribute can specify a value binding expression
whose value is a <literal>java.awt.Image</literal> object. </para>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para><literal>value</literal> — A resource name or a method
expression binding to an application-generated image. </para>
</listitem>
<listitem>
<para><literal>rotation</literal> — The rotation of the image in
degrees. </para>
</listitem>
<listitem>
<para><literal>height</literal> — The height of the image. </para>
</listitem>
<listitem>
<para><literal>width</literal> — The width of the image. </para>
</listitem>
<listitem>
<para>
<literal>alignment</literal>— The alignment of the image. (see
<xref linkend="itext.alignment"/> for possible values) </para>
</listitem>
<listitem>
<para>
<literal>alt</literal> — Alternative text representation for the
image.</para>
</listitem>
<listitem>
<para>
<literal>indentationLeft</literal>
</para>
</listitem>
<listitem>
<para>
<literal>indentationRight</literal>
</para>
</listitem>
<listitem>
<para>
<literal>spacingBefore</literal> — The blank space to be inserted
before the element.</para>
</listitem>
<listitem>
<para>
<literal>spacingAfter</literal> — The blank space to be inserted
after the element.</para>
</listitem>
<listitem>
<para>
<literal>widthPercentage</literal>
</para>
</listitem>
<listitem>
<para>
<literal>initialRotation</literal>
</para>
</listitem>
<listitem>
<para>
<literal>dpi</literal>
</para>
</listitem>
<listitem>
<para>
<literal>scalePercent</literal> — The scaling factor (as a
percentage) to use for the image. This can be expressed as a single
percentage value or as two percentage values representing separate x and y
scaling percentages.</para>
</listitem>
<listitem>
<para>
<literal>scaleToFit</literal> — Specifies the X any Y
size to scale the image to. The image will be scale to fit those dimensions
as closely as possible while preserving the XY ratio of the image.</para>
</listitem>
<listitem>
<para>
<literal>wrap</literal>
</para>
</listitem>
<listitem>
<para>
<literal>underlying</literal>
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<p:image value="/jboss.jpg" />]]></programlisting>
<programlisting role="XHTML"><![CDATA[<p:image value="#{images.chart}" />]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:anchor></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para><literal>p:anchor</literal> defines clickable links from a document. It supports
the following attributes:</para>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para><literal>name</literal> — The name of an in-document anchor
destination.</para>
</listitem>
<listitem>
<para><literal>reference</literal> — The destination the link refers
to. Links to other points in the document should begin with a "#". For
example, "#link1" to refer to an anchor position with a
<literal>name</literal> of <literal>link1</literal>. Links may also be a
full URL to point to a resource outside of the document.</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<p:listItem><p:anchor reference="#reason1">Reason 1</p:anchor></p:listItem>
...
<p:paragraph>
<p:anchor name="reason1">It's the quickest way to get "rich"</p:anchor>
...
</p:paragraph>]]></programlisting>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section id="itext.header">
<title>Headers and Footers</title>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*"/>
<colspec colnum="2" colwidth="3*"/>
<tbody>
<row>
<entry valign="top">
<para>
<literal><p:header></literal>
</para>
<para>
<literal><p:footer></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para>The <literal>p:header</literal> and <literal>p:footer</literal> components provide
the ability to place header and footer text on each page of a generated document. Header and footer declarations should appear at the beginning of a document. </para>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>alignment</literal> — The alignment of the header/footer
box section. (see <xref linkend="itext.alignment"/> for alignment values)</para>
</listitem>
<listitem>
<para><literal>backgroundColor</literal> — The background color of the
header/footer box. (see <xref linkend="itext.colors"/> for color values)
</para>
</listitem>
<listitem>
<para><literal>borderColor</literal> — The border color of the
header/footer box. Individual border sides can be set using
<literal>borderColorLeft</literal>, <literal>borderColorRight</literal>,
<literal>borderColorTop</literal> and
<literal>borderColorBottom</literal>.(see <xref linkend="itext.colors"/> for
color values) </para>
</listitem>
<listitem>
<para>
<literal>borderWidth</literal> — The width of the border.
Individual border sides can be specified using
<literal>borderWidthLeft</literal>, <literal>borderWidthRight</literal>,
<literal>borderWidthTop</literal> and
<literal>borderWidthBottom</literal>.</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<f:facet name="header">
<p:font size="12">
<p:footer borderWidthTop="1" borderColorTop="blue"
borderWidthBottom="0" alignment="center">
Why Seam? [<p:pageNumber />]
</p:footer>
</p:font>
</f:facet>]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:pageNumber></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para>The current page number can be placed inside of a header or footer using the
<literal>p:pageNumber</literal> tag. The page number tag can only be used in the
context of a header or footer and can only be used once.</para>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><p:footer borderWidthTop="1" borderColorTop="blue"
borderWidthBottom="0" alignment="center">
Why Seam? [<p:pageNumber />]
</p:footer></programlisting>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section id="itext.chapters">
<title>Chapters and Sections</title>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*"/>
<colspec colnum="2" colwidth="3*"/>
<tbody>
<row>
<entry valign="top">
<para>
<literal><p:chapter></literal>
</para>
<para>
<literal><p:section></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para>If the generated document follows a book/article structure, the
<literal>p:chapter</literal> and <literal>p:section</literal> tags can be used to
provide the necessary structure. Sections can only be used inside of chapters, but
they may be nested arbitrarily deep. Most PDF viewers provide easy navigation
between chapters and sections in a document. </para>
<note>
<para>You cannot include a chapter into another chapter, this can be done only with section(s).</para>
</note>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>alignment</literal> — The alignment of the header/footer
box section. (see <xref linkend="itext.alignment"/> for alignment values)</para>
</listitem>
<listitem>
<para><literal>number</literal> — The chapter/section number. Every chapter/section
should be assigned a number.</para>
</listitem>
<listitem>
<para><literal>numberDepth</literal> — The depth of numbering for
chapter/section. All sections are numbered relative to their surrounding
chapter/sections. The fourth section of the first section of chapter
three would be section 3.1.4, if displayed at the default number depth of
three. To omit the chapter number, a number depth of 2 should be used. In
that case, the section number would be displayed as 1.4.</para>
<note>
<para>Chapter(s) can have a number or without it by setting numberDepth to 0.</para>
</note>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<p:document xmlns:p="http://jboss.org/schema/seam/pdf"
title="Hello">
<p:chapter number="1">
<p:title><p:paragraph>Hello</p:paragraph></p:title>
<p:paragraph>Hello #{user.name}!</p:paragraph>
</p:chapter>
<p:chapter number="2">
<p:title><p:paragraph>Goodbye</p:paragraph></p:title>
<p:paragraph>Goodbye #{user.name}.</p:paragraph>
</p:chapter>
</p:document> ]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:header></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para>Any chapter or section can contain a <literal>p:title</literal>. The title will be
displayed next to the chapter/section number. The body of the title may contain raw
text or may be a <literal>p:paragraph</literal>. </para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section id="itext.list">
<title>Lists</title>
<para>List structures can be displayed using the <literal>p:list</literal> and <literal>p:listItem</literal>
tags. Lists may contain arbitrarily-nested sublists. List items may not be used outside of a list. The
following document uses the <literal>ui:repeat</literal> tag to display a list of values retrieved
from a Seam component. </para>
<programlisting role="XHTML"><![CDATA[<p:document xmlns:p="http://jboss.org/schema/seam/pdf"
xmlns:ui="http://java.sun.com/jsf/facelets"
title="Hello">
<p:list style="numbered">
<ui:repeat value="#{documents}" var="doc">
<p:listItem>#{doc.name}</p:listItem>
</ui:repeat>
</p:list>
</p:document>]]></programlisting>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*"/>
<colspec colnum="2" colwidth="3*"/>
<tbody>
<row>
<entry valign="top">
<para>
<literal><p:list></literal>
</para>
</entry>
<entry valign="top">
<!--
<para>
<emphasis>Description</emphasis>
</para>
<para>...</para>
-->
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para><literal>style</literal> — The ordering/bulleting style of list.
One of: <literal>NUMBERED</literal>, <literal>LETTERED</literal>,
<literal>GREEK</literal>, <literal>ROMAN</literal>,
<literal>ZAPFDINGBATS</literal>, <literal>ZAPFDINGBATS_NUMBER</literal>.
If no style is given, the list items are bulleted.</para>
</listitem>
<listitem>
<para><literal>listSymbol</literal> — For bulleted lists, specifies
the bullet symbol. </para>
</listitem>
<listitem>
<para><literal>indent</literal> — The indentation level of the
list.</para>
</listitem>
<listitem>
<para><literal>lowerCase</literal> — For list styles using letters,
indicates whether the letters should be lower case.</para>
</listitem>
<listitem>
<para><literal>charNumber</literal> — For ZAPFDINGBATS, indicates the
character code of the bullet character.</para>
</listitem>
<listitem>
<para><literal>numberType</literal> — For ZAPFDINGBATS_NUMBER,
indicates the numbering style.</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
</para>
<programlisting role="XHTML"><![CDATA[<p:list style="numbered">
<ui:repeat value="#{documents}" var="doc">
<p:listItem>#{doc.name}</p:listItem>
</ui:repeat>
</p:list>]]></programlisting>
</entry>
</row>
<row>
<entry valign="top">
<para>
<literal><p:listItem></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Description</emphasis>
</para>
<para><literal>p:listItem</literal> supports the following attributes:</para>
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para><literal>alignment</literal> — The alignment of the list item.
(See <xref linkend="itext.alignment"/> for possible values)</para>
</listitem>
<listitem>
<para><literal>indentationLeft</literal> — The left indentation
amount.</para>
</listitem>
<listitem>
<para><literal>indentationRight</literal> — The right indentation
amount.</para>
</listitem>
<listitem>
<para><literal>listSymbol</literal> — Overrides the default list
symbol for this list item.</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Usage</emphasis>