Re: re: Reading RTF table in Word

Phil Chu <[email protected]> Mon, 13 Sep 2004 23:31:39 -0700
Newsgroups gmane.text.xml.jfor.general
Message-ID <[email protected]>
This may not have anything to do with what you're seeing, but I'm sure 
the table cell spacing produced by JFOR is not always correct, because I 
introduced some code last year that is not always correct (my code to 
handle proportional-column-width for table columns uses a hard-coded 
total table width, because I couldn't figure out how to derive the real 
width easily).

I seem to remember that the there is a spanning-column case in the test 
suite included in the jfor distribution, so you could check if that 
example works for you.

If you can pin down what jfor should and shouldn't be generating in your 
test case, then a motivated individual (perhaps you!) might dive into 
the code and fix it. Good luck!

-Phil

[email protected] wrote:

> For reference, I did find a workaround for my problem. Word does not
> always like rtf output from jfor when using <fo:table-cell
> number-columns-spanned="n"> The workaround is to create a new table
> whenever columns need to be spanned.
> 
> I also found a rtf specification and tried to read the rtf file produced
> by jfor and what word does when it reads it. I only looked at the code
> briefly so I am not sure I understood everything correctly. JFOR uses an
> rtf code that specifies the offset of the left edge of each cell. There is
> also an rtf code that specifies when one cell should be merged to with the
> next whenever jfor finds a number-columns-spanned attribute.
> 
> Word keeps the rtf code that jfor produces but it also seems to put in
> redundant code that specifies the length of each cell (redundant because
> you can find the size of the cell by subtracting offsets). When columns
> are spanned Word does not seem to put in the correct cell size so although
> the offsets are still specified correctly cell size is not.
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM. 
> Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> jfor-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jfor-users
> 


-- 
Phil Chu
[email protected]
http://www.technicat.com/


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php