I have been trying
to add a table to an RtfHeaderFooter. I add the table to the phrase that
already has other phrases in there. The file processed fine but when I want to open the
rtf file, Words just freezes. I close the frozen file which comes up and
says "Program is not responding". Then I try to reopen the same file, it
comes up and says: "The document 'xxx.rtf' caused a serious error the last time
it was opened. Would you like to continue opening it?" I click
Yes. The file comes up and it has a 4 item list of Show Repairs as
follows:
Table End-of-Cell
Markers 1
Table End-of-Cell
Markers 2
Table End-of-Cell
Markers 3
Table Properties
1
I close this
list. The file looks ok except a little weird box below the left hand side
the table. I stripped off all the unnecessary part of the code except the
header and footer with a table. Attachments are the file and the
output. The output may have to be opened twice like I described above to
repair itself. Any help is greatly appreciated.
Table l_table = new Table(2,
1);
l_table.addCell(new Cell("String 1"));
l_table.addCell(new Cell("String 2"));
l_table.addCell(new Cell("String 1"));
l_table.addCell(new Cell("String 2"));
Phrase phraseHeader = new Phrase(10,
"Some Text",
c_courierBold));
phraseHeader.add(l_table);
RTFHeaderFooter rtfHeader = new RtfHeaderFooter (phraseHeader, false);
document.setHeader(phraseHeader);
phraseHeader.add(l_table);
RTFHeaderFooter rtfHeader = new RtfHeaderFooter (phraseHeader, false);
document.setHeader(phraseHeader);
Thanks,
Flora
