Hi,
I think I found one defect in the parseToList static method from HTMLWorker.
The problem is like that:
I'm having one html text ('<html><body><font color=\"#0000FF\"><b><i>Title
One</i></b></font><font color=\"black\"><br><br>Some text here<br><br><br><font
color=\"#0000FF\"><b><i>Another title here </i></b></font><font
color=\"black\"><br><br>Text1<br>Text2<br>Text3<br>Text4<br> Text5<br>
Text6<br> Text7<br>Text8<br>Text9<br>Text10</body></html>')
String htmlText=HTML Text that I mentioned ;
RtfFont font = new RtfFont( "Arial" );
Paragraph para = new Paragraph( "", font );
StringReader strReader = new StringReader( htmlText );
ArrayList list = HTMLWorker.parseToList( strReader, null );
for( int i = 0; i < list.size( ); i++ ) {
para.add( (Element)list.get( i ) );
}
para.setLeading( 0 );
Document doc = new Document( );
RtfWriter2.getInstance( doc, new FileOutputStream( "test.rtf" ) );
doc.open();
doc.add(para);
doc.close();
I'm running this code and I'm getting one rtf document, BUT, at the end of the
paragraph I have one Return character.
For me, this seems to be the problem.
Is there a possibility for removing that "\n" from the end of the Paragraph ?
A workaround ?
Is this a bug or this is the design ?
Please let me know, because I need to know ho to make it work.
Thanks in advance.
Alin.
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/