Mark Hall <mhall <at> edu.uni-klu.ac.at> writes:

> 
> On Wednesday 12 October 2005 12:36, Stefano wrote:
> > I'm trying to use iText to write rtf and how it's suggested, i'm using
> > RTF2Writer, but if i use color, background and other, it doesn't show them
> > in rtf, while old RTFWriter does it. Do I make some mistake or do I stiil
> > have to use RTFWriter?
> Therw as a bug in the way the RtfWriter2 handled styles & colour if no 
> fontname was set. I've committed a change to the CVS repository. You can 
> either wait for the next release or modify your Paragraph initialisations 
> like this:
> 
> Paragraph paragraph2 = new Paragraph("", new Font(Font.TIMES_ROMAN));
> 
> and replace the font name with the one you want to use.
> 
> Greetings,
> Mark


Thanks, but what can I do if I need to use FontFactory? 
I'm doing an application which reads from an html (editor) and then it writes 
rtf or pdf. 
I debugged HTMLWorker and I saw it can't do yet, so I'm trying to adapt html 
to use iText anyway, but i saw 2 problems: (1) HTMLWorker doesn't see styles 
inside html-tags, so I've to use only <FONT> tag; (2) FontFactory inside the 
code check if the passed style (for example "Times New Roman") is equal to one 
of constants from Font class (for example "Times-Roman"), so I don't 
understand how it can find the right one, because the string is always 
different than the name of font styles (HTMLWorker use FontFactory too). 
And I lost background color too :( 

Greetings,
Stefano

PS: sorry for my bad english and thank to you again alot, your work is very 
good!!! 






-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to