Hello, I noticed from an RTF import that the page number was missing for the 
page imported.  All other page numbers in the documented imported into is 
displayed correctly.

Also, is it possible to perform an RTF import into a Section?  Currently, we 
have to add the chapter to the document so the imported RTF will be rendered in 
the proper order.  Adding a chapter creates a section break thus not allowing 
us to add the import content directly after the text of the current section.

Here is a piece of code for the import:

......

// insert text in section before import

String temp = theComments.substring(0,impstart);
titlemsg = new Phrase(temp + "", new Font(Font.TIMES_ROMAN, 12, Font.NORMAL));
section1.add(titlemsg);

// insert the imported RTF file here
if (theDoc.length() > 0)
{
document.add(chap1);                                    
chap1.clear();
writer2.importRtfDocument(new FileInputStream(UPLOADUSERIMAGESDIR + "\\" + 
theDoc));
}                       

// continue with other text in section after import
temp = theComments.substring(impend+6,theComments.length());
titlemsg = new Phrase(temp + "\n", new Font(Font.TIMES_ROMAN, 12, Font.NORMAL));
document.add(titlemsg);
continue;
.......

Any work around for this? Any help is appreciated.  Thanks.

Tri



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to