I have an app that creates an rtf file. The app inserts an extra pgf symbol
on two occasions:
-- When I insert a paragraph with a certain style
-- When I insert a table.
The extra pgf symbols are inserted directly above the paragraph and table.
Following are the declarations and code i use to insert the paragraph with
the problem style:
RtfParagraphStyle tableTitleStyle = new RtfParagraphStyle("TableTitle",
"Normal");
tableTitleStyle.setSpacingBefore(12);
tableTitleStyle.setSpacingAfter(3);
tableTitleStyle.setFontName("Arial");
tableTitleStyle.setSize(10f);
tableTitleStyle.setStyle(RtfParagraphStyle.BOLD);
writer2.getDocumentSettings().registerParagraphStyle(tableTitleStyle);
rtfDocument.add(new Paragraph(srcClass.getName() + " Fields",
tableTitleStyle));
Following are declarations/code for inserting the problem table:
Paragraph pgf = null;
Cell cell = null;
Table fieldsTable = new Table(3);
fieldsTable.setAlignment(Table.ALIGN_LEFT);
fieldsTable.setBorderWidth(1);
fieldsTable.setPadding(5);
fieldsTable.setSpacing(1);
pgf = new Paragraph("Field Name", tableHeaderStyle);
cell = new Cell(pgf);
cell.setHeader(true);
fieldsTable.addCell(cell);
pgf = new Paragraph("Field Type", tableHeaderStyle);
cell = new Cell(pgf);
cell.setHeader(true);
fieldsTable.addCell(cell);
pgf = new Paragraph("Field Description", tableHeaderStyle);
cell = new Cell(pgf);
cell.setHeader(true);
fieldsTable.addCell(cell);
fieldsTable.endHeaders();
rtfDocument.add(fieldsTable);
Has anyone experienced this problem?
Thanks,
Steve
--
View this message in context:
http://www.nabble.com/Extra-Paragraph-Symbols-Inserted-tf4203054.html#a11954909
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/