Hi,

thanks for the pointers. I am aware the the RtfParser makes some assumptions 
about the format of the RTF document. I know that this is something I will 
have to change and make it more flexible to be in higher compliance with the 
specification.

I don't know what modifications you are making to the RtfParser class, but any 
modifications that fix some of these bugs, it would be nice if you could 
contribute them back.

I'm just swamped with work, so any help is gladly accepted. Thank you :-).

Greetings,
Mark

On Monday 07 May 2007, GAMBELLI Raffaele wrote:
> If it can be helpful for you, I'm modifying RtfParser class (and some other
> classes) to accomplish my needs. During the revisioning of RtfParser I've
> noticed that you turn to PARSER_IN_DOCUMENT state only if you have
> encountered {\info} control word and you were in PARSER_IN_INFO_GROUP, BUT
> the {\info} control word is not mandatory for RTF and so, all the rtf that
> they don't include that control word, they aren't correclty imported by
> importDocument(...) method of RtfWriter2 class.
>
> Another note is that RtfParser importDocument performs the font mapping
> assuming that a font table is in this form: {\fonttbl
> {\f0\fswiss\fcharset0\fprq2 Arial;}
> {\f1\fmodern\fcharset0\fprq1 Courier New;}
> {\f2\froman\fcharset2\fprq2 Symbol;}}
>
> But, from the rtf 1.6 specification you can see that the "font table"
> control word can be specified following this rule --> '{' \fonttbl
> (<fontinfo> | ('{' <fontinfo> '}'))+ '}', that is also a font table
> specified in this way: {\fonttbl
> \f0\fswiss\fcharset0\fprq2 Arial;
> \f1\fmodern\fcharset0\fprq1 Courier New;
> \f2\froman\fcharset2\fprq2 Symbol;}
> can be accepted, but the current RtfParser (and RtfFontTableParser) code
> accept only the first format for a font table control word.
>
> I hope these info will help you.
>
> Best regards,
>
> Raffaele
>
> -----Original Message-----
> From: Mark Hall [mailto:[EMAIL PROTECTED]
> Sent: venerdì 4 maggio 2007 12.40
> To: GAMBELLI Raffaele
> Cc: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Rtf inclusion inside another rtf
>
> On Friday 04 May 2007, GAMBELLI Raffaele wrote:
> > Ok, thank you very much Mark, but what about that rtf that I asked you to
> > try to import in a new generated rtf document? How can be that the rtf
> > inclusion fail without reporting error or warning? The resulting rtf(if
> > opened with ultraedit) doesn't contain the included rtf.
>
> The honest answer to that is that I don't know what the reason is. My best
> guess is that it is all caused by the simplistic approach to parsing the
> RTF document. When I find time I'll be looking into all the bugs associated
> with the importing mechanism.
>
> Greetings,
> Mark



-- 
Good night to spend with family, but avoid arguments with your mate's
new lover.

My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc

Attachment: pgpUiFrRZ29SG.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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/

Reply via email to