Here is the code in Coldfusion:
<cfset rtfwriter = CreateObject("java", "com.lowagie.text.rtf.RtfWriter")>
<cfset footer = CreateObject("java", "com.lowagie.text.HeaderFooter")>
<cfset rtfHeaderFooter = CreateObject("java",
"com.lowagie.text.rtf.RtfHeaderFooter")>
<cfset document.open()>
<cfset rtfWriter.setHasTitlePage(true)> <!-- I moved this line to other
places in the code, got same error --->
<cfset document.resetPageCount()>
<cfset chunk.init("", fontNormal)>
<cfset phrase.init(leading, chunk)>
<cfset footer.init(phrase, true)>
<cfset footer.setBorder(rectangle.NO_BORDER)>
<cfset footer.setAlignment(Element.align_right)>
<cfset document.setFooter(footer)>
The RTF file is created from dynamic output, cannot tell where the first
page ends.
Thanks for your help,
Min
At 09:40 AM 8/25/2005, Mark Hall wrote:
On Thursday 25 August 2005 04:50, Min Zhao wrote:
> I am having the same request from client, that is NOT to display page
> number on first page. I tried
> rtfWriter.setHasTitlePage(true);
> thrown me an error: java.lang.InstantiationException
> I have rtfWriter, not rtfWriter2 which has RTFheaderfooter class(read this
> is a class new in rtfwriter2). do I have to use rtfWriter2 to make it work?
> I use iText in Coldfusion.
If you use the com.lowagie.text.rtf.RtfWriter and the
com.lowagie.text.rtf.RtfHeaderFooter this should work. Please post the code
that is creating this error or a test case that creates the error.
Greetings,
Mark
--
You'll be called to a post requiring ability in handling groups of people.
My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Min Zhao
QRC Division of Macro International, Inc.
[EMAIL PROTECTED]
(914) 373-4177
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions