3.8.4 Exporting to RTF Programmatically

The Rich Text Format (RTF) export format has more limited layout options that Style Intelligence. Therefore, the generated RTF file will not always capture the complete formatting of a report. However, all report data, including text, table and image (painters), is saved in the RTF file. Because RTF exports are most often used for purposes of data manipulation rather than for presentation, the loss of formatting information is not critical in most instances. If you require the exported file to preserve formatting with high fidelity, use the PDF or Postscript export formats.

To create an RTF file, obtain a Builder object for the RTF export and then write the report to the output file:

FileOutputStream os = new FileOutputStream(filename);

Builder builder = Builder.getBuilder(Builder.RTF, os);

builder.write(sheet);

os.close();

You can also use Builder.RTF_LAYOUT to get the Builder object. This format conforms more precisely to the layout of the report. However, since elements are placed in blocks in the generated file, they may be harder to edit in some instances.

<< Setting the DHTML Meta-Data Information © 1996-2013 InetSoft Technology Corporation (v11.4) 3.8.5 Exporting to Text File (CSV) Programmatically >>