[seam-commits] Seam SVN: r7244 - branches/Seam_2_0/doc/reference/en/modules.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Jan 25 20:47:53 EST 2008


Author: norman.richards at jboss.com
Date: 2008-01-25 20:47:52 -0500 (Fri, 25 Jan 2008)
New Revision: 7244

Modified:
   branches/Seam_2_0/doc/reference/en/modules/itext.xml
Log:
JBSEAM-2392

Modified: branches/Seam_2_0/doc/reference/en/modules/itext.xml
===================================================================
--- branches/Seam_2_0/doc/reference/en/modules/itext.xml	2008-01-26 00:03:59 UTC (rev 7243)
+++ branches/Seam_2_0/doc/reference/en/modules/itext.xml	2008-01-26 01:47:52 UTC (rev 7244)
@@ -1,6 +1,6 @@
 <chapter id="itext">
     <title>iText PDF generation</title>
-    <para>Seam now includes an component set for generating documents using iText. The primary focus of Seam's iText
+    <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 doucuments, but Seam also offers basic support for RTF document
         generation.</para>
 
@@ -38,7 +38,7 @@
                                 <para>
                                     <emphasis>Description</emphasis>
                                 </para>
-                                <para> Documents are generated by facelets documents using tags in the
+                                <para> Documents are generated by facelet XHTML files using tags in the
                                         <literal>http://jboss.com/products/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
@@ -87,6 +87,15 @@
                                             <literal>marginMirroring</literal> &#8212; Indicates that margin
                                             settings should be reversed an alternating pages.</para>
                                     </listitem>
+
+                                    <listitem>
+                                        <para>
+                                            <literal>disposition</literal> &#8212; 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>
                                 </itemizedlist>
 
 
@@ -288,7 +297,64 @@
             </informaltable>
 
 
+            <informaltable>
+                <tgroup cols="2">
+                    <colspec colnum="1" colwidth="1*"/>
+                    <colspec colnum="2" colwidth="3*"/>
 
+                    <tbody>
+                        <row>
+                            <entry valign="top">
+                                <para>
+                                    <literal>&lt;p:html&gt;</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> &#8212; The text to be displayed.</para>
+                                    </listitem>
+                                </itemizedlist>
+
+                                <para>
+                                    <emphasis>Usage</emphasis>
+                                </para>
+
+                                <programlisting>
+&lt;p:html value=&quot;This is HTML with &amp;lt;b&amp;gt;some markup&amp;lt;/b&amp;gt;.&quot; /&gt;
+&lt;p:html&gt;
+    &lt;h1&gt;This is more complex HTML&lt;/h1&gt;
+    &lt;ul&gt;
+        &lt;li&gt;one&lt;/li&gt;
+        &lt;li&gt;two&lt;/li&gt;
+        &lt;li&gt;three&lt;/li&gt;
+    &lt;/ul&gt;
+&lt;/p:html&gt;
+
+&lt;p:html&gt;
+    &lt;s:formattedText value=&quot;*This* is |Seam Text| as HTML.  It&apos;s very^cool^.&quot; /&gt;
+&lt;/p:html&gt;                                    
+</programlisting>
+
+                            </entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+
+
             <informaltable>
                 <tgroup cols="2">
                     <colspec colnum="1" colwidth="1*"/>
@@ -341,7 +407,7 @@
                                     <emphasis>Usage</emphasis>
                                 </para>
 
-                                <programlisting>&lt;p:font family=&quot;courier&quot; style=&quot;bold&quot; size=&quot;24&quot;&gt;
+                                <programlisting>&lt;p:font name=&quot;courier&quot; style=&quot;bold&quot; size=&quot;24&quot;&gt;
     &lt;p:paragraph&gt;My Title&lt;/p:paragraph&gt;
 &lt;/p:font&gt;</programlisting>
 
@@ -1443,11 +1509,11 @@
     <section id="itext.charting">
         <title>Charting</title>
 
-        <para> Charting support is also provided with <literal>jboss-seam-pdf.jar</literal>. Charts can be used in 
-            PDF documents or can be used as images in an HTML page.
-            Charting requires the JFreeChart library (<literal>jfreechart.jar</literal> and <literal>jcommon.jar</literal>) to be added to the 
-            <literal>WEB-INF/lib</literal> directory.  Three types of charts are currently supported: pie charts, bar charts and line charts.
-        </para>
+        <para> Charting support is also provided with <literal>jboss-seam-pdf.jar</literal>. Charts can be used in PDF
+            documents or can be used as images in an HTML page. Charting requires the JFreeChart library
+                (<literal>jfreechart.jar</literal> and <literal>jcommon.jar</literal>) to be added to the
+                <literal>WEB-INF/lib</literal> directory. Three types of charts are currently supported: pie charts, bar
+            charts and line charts. </para>
 
         <informaltable id="itext.barchart">
             <tgroup cols="2">
@@ -1895,8 +1961,7 @@
 
                                 <listitem>
                                     <para>
-                                        <literal>title</literal>&#8212; The chart title text. 
-                                    </para>
+                                        <literal>title</literal>&#8212; The chart title text. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
@@ -1905,13 +1970,13 @@
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>legend</literal>&#8212; A boolean value indicating whether or not the chart should include a legend. Default value is true 
-                                    </para>
+                                        <literal>legend</literal>&#8212; A boolean value indicating whether or not
+                                        the chart should include a legend. Default value is true </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>is3D</literal>&#8212;A boolean value indicating that the chart should be rendered in 3D instead of 2D. 
-                                    </para>
+                                        <literal>is3D</literal>&#8212;A boolean value indicating that the chart
+                                        should be rendered in 3D instead of 2D. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
@@ -1920,98 +1985,97 @@
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>labelLinkPaint</literal>&#8212; The paint used for the label linking lines. 
-                                    </para>
+                                        <literal>labelLinkPaint</literal>&#8212; The paint used for the label
+                                        linking lines. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>labelLinkStroke</literal>&#8212; he stroke used for the label linking lines. 
-                                    </para>
+                                        <literal>labelLinkStroke</literal>&#8212; he stroke used for the label
+                                        linking lines. </para>
                                 </listitem>
 
                                 <listitem>
                                     <para>
-                                        <literal>labelLinksVisible</literal>&#8212; A flag that controls whether or not the label links are drawn. 
-                                    </para>
+                                        <literal>labelLinksVisible</literal>&#8212; A flag that controls whether or
+                                        not the label links are drawn. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>labelOutlinePaint</literal>&#8212; The paint used to draw the outline of the section labels.
-                                    </para>
+                                        <literal>labelOutlinePaint</literal>&#8212; The paint used to draw the
+                                        outline of the section labels. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>labelOutlineStroke</literal>&#8212; The stroke used to draw the outline of the section labels.
-                                    </para>
+                                        <literal>labelOutlineStroke</literal>&#8212; The stroke used to draw the
+                                        outline of the section labels. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>labelShadowPaint</literal>&#8212; The paint used to draw the shadow for the section labels.
-                                    </para>
+                                        <literal>labelShadowPaint</literal>&#8212; The paint used to draw the shadow
+                                        for the section labels. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>labelPaint</literal>&#8212;  The color used to draw the section labels 
-                                    </para>
+                                        <literal>labelPaint</literal>&#8212; The color used to draw the section
+                                        labels </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>labelGap</literal>&#8212; The gap between the labels and the plot as a percentage of the plot width. 
-                                    </para>
+                                        <literal>labelGap</literal>&#8212; The gap between the labels and the plot
+                                        as a percentage of the plot width. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>labelBackgroundPaint</literal>&#8212; The color used to draw the background of the section labels. If this is null, the background is not filled. 
+                                        <literal>labelBackgroundPaint</literal>&#8212; The color used to draw the
+                                        background of the section labels. If this is null, the background is not filled.
                                     </para>
                                 </listitem>
 
                                 <listitem>
                                     <para>
-                                        <literal>startAngle</literal>&#8212; The starting angle of the first section.
-                                    </para>
+                                        <literal>startAngle</literal>&#8212; The starting angle of the first
+                                        section. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>circular</literal>&#8212; A boolean value indicating that the chart should be drawn as a circle.
-                                        If false, the chart is drawn as an ellipse.  The default is true.
-                                    </para>
+                                        <literal>circular</literal>&#8212; A boolean value indicating that the chart
+                                        should be drawn as a circle. If false, the chart is drawn as an ellipse. The
+                                        default is true. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>direction</literal>&#8212; 
-                                        The direction the pie section are drawn.  One of: <literal>clockwise</literal> or <literal>anticlockwise</literal>. 
-                                        The default is <literal>clockwise</literal>.
-                                    </para>
+                                        <literal>direction</literal>&#8212; The direction the pie section are drawn.
+                                        One of: <literal>clockwise</literal> or <literal>anticlockwise</literal>. The
+                                        default is <literal>clockwise</literal>. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>sectionOutlinePaint</literal>&#8212; The outline paint for all sections.
-                                    </para>
+                                        <literal>sectionOutlinePaint</literal>&#8212; The outline paint for all
+                                        sections. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>sectionOutlineStroke</literal>&#8212; The outline stroke for all sections
-                                    </para>
+                                        <literal>sectionOutlineStroke</literal>&#8212; The outline stroke for all
+                                        sections </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>sectionOutlinesVisible</literal>&#8212;  Indicates whether an outline is drawn for each section in the plot. 
-                                    </para>
+                                        <literal>sectionOutlinesVisible</literal>&#8212; Indicates whether an
+                                        outline is drawn for each section in the plot. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>baseSectionOutlinePaint</literal>&#8212; The base section outline paint.
-                                    </para>
+                                        <literal>baseSectionOutlinePaint</literal>&#8212; The base section outline
+                                        paint. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>baseSectionPaint</literal>&#8212; The base section paint.
-                                    </para>
+                                        <literal>baseSectionPaint</literal>&#8212; The base section paint. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>baseSectionOutlineStroke</literal>&#8212; The base section outline stroke.
-                                    </para>
+                                        <literal>baseSectionOutlineStroke</literal>&#8212; The base section outline
+                                        stroke. </para>
                                 </listitem>
                             </itemizedlist>
                             <para>
@@ -2167,15 +2231,18 @@
 
                                 <listitem>
                                     <para>
-                                        <literal>sectionOutlinePaint</literal> &#8212; For bar charts, the color of the section outline.</para>
+                                        <literal>sectionOutlinePaint</literal> &#8212; For bar charts, the color of
+                                        the section outline.</para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>sectionOutlineStroke</literal> &#8212; For bar charts, the stroke type for the section outline.</para>
+                                        <literal>sectionOutlineStroke</literal> &#8212; For bar charts, the stroke
+                                        type for the section outline.</para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>sectionPaint</literal> &#8212; For bar charts, the color of the section.</para>
+                                        <literal>sectionPaint</literal> &#8212; For bar charts, the color of the
+                                        section.</para>
                                 </listitem>
                             </itemizedlist>
                             <para>
@@ -2333,7 +2400,10 @@
 
     <section id="itext.barcodes">
         <title>Bar codes</title>
-        <para>...</para>
+        <para>Seam can use iText to generate barcodes in a wide variety of formats.  These barcodes can
+        be embedded in a PDF document or displayed as an image on a web page. Note that 
+        when used with HTML images, barcodes can not currently display barcode text in the barcode. 
+        </para>
 
         <informaltable id="itext.barcode">
             <tgroup cols="2">
@@ -2351,7 +2421,8 @@
                             <para>
                                 <emphasis>Description</emphasis>
                             </para>
-                            <para/>
+                            <para>Displays a barcode image.</para>
+
                             <para>
                                 <emphasis>Attributes</emphasis>
                             </para>
@@ -2360,15 +2431,13 @@
 
                                 <listitem>
                                     <para>
-                                        <literal>type</literal> &#8212;  A barcode type supported by iText. 
-                                        Valid values include:
-                                        <literal>EAN13</literal>, <literal>EAN8</literal>, <literal>UPCA</literal>, 
-                                        <literal>UPCE</literal>, 
-                                        <literal>SUPP2</literal>, <literal>SUPP5</literal>, <literal>POSTNET</literal>, 
+                                        <literal>type</literal> &#8212; A barcode type supported by iText. Valid
+                                        values include: <literal>EAN13</literal>, <literal>EAN8</literal>,
+                                        <literal>UPCA</literal>, <literal>UPCE</literal>, <literal>SUPP2</literal>,
+                                            <literal>SUPP5</literal>, <literal>POSTNET</literal>,
                                         <literal>PLANET</literal>, <literal>CODE128</literal>,
-                                        <literal>CODE128_UCC</literal>, <literal>CODE128_RAW</literal> and <literal>CODABAR</literal>.
-                                        
-                                    </para>
+                                        <literal>CODE128_UCC</literal>, <literal>CODE128_RAW</literal> and
+                                            <literal>CODABAR</literal>. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
@@ -2377,18 +2446,18 @@
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>xpos</literal>&#8212; For PDFs, the absolute y position of the barcode on the page.
-                                    </para>
+                                        <literal>xpos</literal>&#8212; For PDFs, the absolute y position of the
+                                        barcode on the page. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>ypos</literal>&#8212; For PDFs, the absolute y position of the barcode on the page.
-                                    </para>
+                                        <literal>ypos</literal>&#8212; For PDFs, the absolute y position of the
+                                        barcode on the page. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>rotDegrees</literal> &#8212; For PDFs, the rotation factor of the barcode in degrees.
-                                    </para>
+                                        <literal>rotDegrees</literal> &#8212; For PDFs, the rotation factor of the
+                                        barcode in degrees. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
@@ -2398,34 +2467,36 @@
 
                                 <listitem>
                                     <para>
-                                        <literal>minBarWidth</literal> &#8212; The minimum bar width.
-                                    </para>
+                                        <literal>minBarWidth</literal> &#8212; The minimum bar width. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>barMultiplier</literal> &#8212; The bar multiplier for wide bars or the
-                                        distance between bars for <literal>POSTNET</literal> and <literal>PLANET</literal> code.
-                                        
-                                    </para>
+                                        <literal>barMultiplier</literal> &#8212; The bar multiplier for wide bars or
+                                        the distance between bars for <literal>POSTNET</literal> and
+                                        <literal>PLANET</literal> code. </para>
                                 </listitem>
                                 <listitem>
                                     <para>
-                                        <literal>barColor</literal>  &#8212;  The color to draw the bars.
-                                    </para>
-                                </listitem>                                
-                                
+                                        <literal>barColor</literal> &#8212; The color to draw the bars. </para>
+                                </listitem>
+
                                 <listitem>
                                     <para>
-                                        <literal>textColor</literal>  &#8212;  The color of any text on the barcode.
+                                        <literal>textColor</literal> &#8212; The color of any text on the barcode.
                                     </para>
                                 </listitem>
-                                                                <listitem>
+                                <listitem>
                                     <para>
                                         <literal>textSize</literal> &#8212; The size of the barcode text, if any.
                                     </para>
                                 </listitem>
-                                
-                                
+                                <listitem>
+                                    <para>
+                                        <literal>altText</literal> &#8212; The <literal>alt</literal> text for HTML image links.
+                                    </para>
+                                </listitem>                                                                
+
+
                             </itemizedlist>
                             <para>
                                 <emphasis>Usage</emphasis>
@@ -2446,7 +2517,66 @@
     </section>
 
 
+    <section id="itext.swingcomponents">
+        <title>Rendering Swing/AWT components</title>
+        <para>Seam now provides experimental support for rendering Swing components to into a PDF
+        image.  Some Swing look and feels supports, notably ones that use native widgets, will not
+        render correctly.
+        </para>
 
+        <informaltable id="itext.swing">
+            <tgroup cols="2">
+                <colspec colnum="1" colwidth="1*"/>
+                <colspec colnum="2" colwidth="3*"/>
+
+                <tbody>
+                    <row>
+                        <entry valign="top">
+                            <para>
+                                <literal>&lt;p:swing&gt;</literal>
+                            </para>
+                        </entry>
+                        <entry valign="top">
+                            <para>
+                                <emphasis>Description</emphasis>  
+                            </para>
+                            
+                            <para>Renders a Swing component into a PDF document.</para>
+                            <para>
+                                <emphasis>Attributes</emphasis>
+                            </para>
+
+                            <itemizedlist>
+
+                                <listitem>
+                                    <para>
+                                        <literal>width</literal> &#8212; The width of the component to be rendered. </para>
+                                </listitem>
+                                <listitem>
+                                    <para>
+                                        <literal>height</literal> &#8212; ..The height of the component to be rendered. </para>
+                                </listitem>
+                                <listitem>
+                                    <para>
+                                        <literal>component</literal> &#8212; An expression whose value is a Swing or AWT component. </para>
+                                </listitem>                                
+
+                            </itemizedlist>
+                            <para>
+                                <emphasis>Usage</emphasis>
+                            </para>
+                            <programlisting>
+&lt;p:swing width=&quot;310&quot; height=&quot;120&quot; component=&quot;#{aButton}&quot; /&gt;
+                            </programlisting>
+
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </informaltable>
+    </section>
+
+
     <section id="itext.links">
         <title>Further documentation</title>
 




More information about the seam-commits mailing list