  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | -none- | -none- 2007-10-02 - By Alexis Pigeon
Back Hi Alex,
Page numbering in RTF is currently broken (as of iText 2.0.5). It's a known bug that will be corrected in the next release [1]. In the meanwhile, you can use the previous release (2.0.4), available at sourceforge [2].
Cheers, alexis
[1] http://sourceforge.net/mailarchive/forum.php?thread_name =4797adf10709100129l333bf361teace40a534c443d2%40mail.gmail.com&forum_name=itext -questions
[2] http://sourceforge.net/project/showfiles.php?group_id=15255
On 02/10/2007, Alex Jacoby <ajacoby@(protected)> wrote: > It seems that the current rtf page numbering system is either broken > or incompatible with the RTF viewers I have on my mac (OpenOffice 2.2 > and Word 2004). My generated RTF files are missing their page > numbers in the footer, and worse, *the example RTF file on the iText > website doesn't work either*: http://itext.ugent.be/library/com/ > lowagie/examples/rtf/extensions/hf/ExtendedHeaderFooter.rtf > > I'm new to itext, but I've spent hours pouring over available > documentation, mailing list archives, and sample code. Any ideas? > > Thanks, > Alex > > ps- The relevant code, basically identical to example on website: > > import com.lowagie.text.Document; > import com.lowagie.text.Element; > import com.lowagie.text.Font; > import com.lowagie.text.PageSize; > import com.lowagie.text.Paragraph; > import com.lowagie.text.Phrase; > import com.lowagie.text.Rectangle; > import com.lowagie.text.rtf.RtfWriter2; > import com.lowagie.text.rtf.field.RtfPageNumber; > import com.lowagie.text.rtf.headerfooter.RtfHeaderFooter; > > ... > // Page Footer > Paragraph footerText = new Paragraph("Page "); > footerText.add(new RtfPageNumber()); > RtfHeaderFooter footer = > new RtfHeaderFooter(footerText); > footer.setAlignment(Element.ALIGN_RIGHT); > footer.setBorder(Rectangle.NO_BORDER); > doc.setFooter(footer); > > > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > iText-questions mailing list > iText-questions@(protected) > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ >
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
|
|
 |