?? rtfwriter.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Nov 20 13:02:04 CET 2002 -->
<TITLE>
RtfWriter
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="RtfWriter";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/lowagie/text/rtf/RtfTOCEntry.html"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="RtfWriter.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.lowagie.text.rtf</FONT>
<BR>
Class RtfWriter</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">java.lang.Object</A>
|
+--<A HREF="../../../../com/lowagie/text/DocWriter.html">com.lowagie.text.DocWriter</A>
|
+--<B>com.lowagie.text.rtf.RtfWriter</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/lowagie/text/DocListener.html">DocListener</A>, <A HREF="../../../../com/lowagie/text/ElementListener.html">ElementListener</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/EventListener.html">EventListener</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>RtfWriter</B><DT>extends <A HREF="../../../../com/lowagie/text/DocWriter.html">DocWriter</A><DT>implements <A HREF="../../../../com/lowagie/text/DocListener.html">DocListener</A></DL>
<P>
A <CODE>DocWriter</CODE> class for Rich Text Files (RTF). <P> A <CODE>RtfWriter</CODE> can be added as a <CODE>DocListener</CODE> to a certain <CODE>Document</CODE> by getting an instance. Every <CODE>Element</CODE> added to the original <CODE>Document</CODE> will be written to the <CODE>OutputStream</CODE> of this <CODE>RtfWriter</CODE>. <P> Example: <BLOCKQUOTE><PRE> // creation of the document with a certain size and certain margins Document document = new Document(PageSize.A4, 50, 50, 50, 50); try { // this will write RTF to the Standard OutputStream <STRONG>RtfWriter.getInstance(document, System.out);</STRONG> // this will write Rtf to a file called text.rtf <STRONG>RtfWriter.getInstance(document, new FileOutputStream("text.rtf"));</STRONG> // this will write Rtf to for instance the OutputStream of a HttpServletResponse-object <STRONG>RtfWriter.getInstance(document, response.getOutputStream());</STRONG> } catch(DocumentException de) { System.err.println(de.getMessage()); } // this will close the document and all the OutputStreams listening to it <STRONG>document.close();</CODE> </PRE></BLOCKQUOTE> <P> <STRONG>LIMITATIONS</STRONG><BR> There are currently still a few limitations on what the RTF Writer can do: <UL> <LI>Only PNG / JPEG Images are supported.</LI> <LI>Rotating of Images is not supported.</LI> <LI>Nested Tables are not supported.</LI> <LI>The <CODE>Leading</CODE> is not supported.</LI> </UL> <br /> Parts of this Class were contributed by Steffen Stundzig. Many thanks for the improvements.
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#alignCenter">alignCenter</A></B></CODE>
<BR>
Text alignment center tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#alignJustify">alignJustify</A></B></CODE>
<BR>
Text alignment justify tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#alignLeft">alignLeft</A></B></CODE>
<BR>
Text alignment left tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#alignRight">alignRight</A></B></CODE>
<BR>
Text alignment right tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#annotation">annotation</A></B></CODE>
<BR>
Annotation text tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#annotationAuthor">annotationAuthor</A></B></CODE>
<BR>
Annotation Author tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#annotationID">annotationID</A></B></CODE>
<BR>
Annotation ID tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#ansi">ansi</A></B></CODE>
<BR>
RTF encoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#ansiCodepage">ansiCodepage</A></B></CODE>
<BR>
RTF encoding codepage.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#bold">bold</A></B></CODE>
<BR>
Bold tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#closeGroup">closeGroup</A></B></CODE>
<BR>
This is the character for closing a group.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#colorBlue">colorBlue</A></B></CODE>
<BR>
Blue value tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#colorGreen">colorGreen</A></B></CODE>
<BR>
Green value tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Vector.html">Vector</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#colorList">colorList</A></B></CODE>
<BR>
This <code>Vector</code> contains all colours used in the document.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#colorRed">colorRed</A></B></CODE>
<BR>
Red value tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/rtf/RtfWriter.html#colorTable">colorTable</A></B></CODE>
<BR>
Begin colour table tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -