Configuring default export formats
You can export a BIRT report to various formats from the BIRT viewer. These formats include doc, docx, pptx, pdf, postscript, ppt, pptx, xls, and xlsx. The Actuate Java Component platform provides a sample .xml file for each format, which you can use to configure the default export options for that format. For example, you can configure the sample .xml file for the XLSX format to set Enable pivot table if it fits on one page to false by default in Export Content, the dialog that appears when you choose to export a BIRT report to XLSX format, as shown in Figure 4‑3.
Figure 4‑3 Viewing default export property values on Export Content
The location of the folder containing the sample .xml files is:
<context root>\WEB-INF\platform\plugins
\com.actuate.birt.report.engine.emitter.config_<RELEASE_NUMBER>
.v<date_stamp>
Each .xml file has the following name:
org.eclipse.birt.report.engine.emitter.<FORMAT_TYPE>.xml
For example, Listing 4‑8 shows the XML you can modify in org.eclipse.birt.report.engine.emitter.xlsx.xml, to configure the export options for the XLSX output format.
Listing 4‑8 Sample .xml file content
<RenderOptions>
<!-- Enables the emitter. Set to "false" will hide this emitter in export content dialog. -->
<!--
<emitter enabled="true"/>
-->
<!--
<option name="excelRenderOption.wrappingText" default="true" enabled="true"/>
<option name="ChartDpi" default="192" enabled="true"/>
<option name="excelRenderOption.ExportChartsAsImages" default="false" enabled="true"/>
<option name="excelRenderOption.EnableLiveFormula" default="true" enabled="true"/>
<option name="excelRenderOption.hideGridlines" default="false" enabled="true"/>
<option name="excelRenderOption.multipleSheet" default="true" enabled="true"/>
<option name="excelRenderOption.AutoFitPivotTable" default="true" enabled="true"/>
<option name="excelRenderOption.EnablePivotTable" default="true" enabled="true"/>
-->
</RenderOptions>
The <RenderOptions> element contains the following child elements:
*<emitter>
Specifies whether the output format is a selectable option in Export Content—Export Format. Possible values are true or false. If this element is commented out in the .xml file, the value of <emitter> is true.
*<option>
Represents an export option in Export Content. Contains the following attributes, which support configuring the export option:
*name
Name of the export option. Required.
*default
Default value of the export option. The value of the export option if the user does not change it or if the export option on Export Content is hidden. Required.
*enable
Determines whether the export option appears on Export Content. If set to true, the option appears. If set to false, the option is hidden. Optional. The value of <enable> is true if this attribute is omitted in the <option> element.
How to configure default document export options
1 Stop the web or application server.
2 Modify the .xml file for the export format for which you want to configure default output export options. Table 4‑3 lists the default settings parameters for each output format.
3 Start the web or application server.
Table 4‑3 Configurable default settings for exporting content
Format
Option name
Permissible values
All formats
ChartDpi
Sets the chart resolution. Value can be any integer greater than 0.
AFP
afpRenderOption
.pageDPI
Permissible values are 240, 300, 600, 1440.
AFP
xifRenderOption
.plexMode
Permissible values are Simplex, Duplex, Tumble.
AFP
afpRenderOption
.allowBlackAndWhiteImg
Permissible values are true or false.
AFP
afpRenderOption
.allowSingleColorImg
Permissible values are true or false.
AFP
afpRenderOption
.allowGrayscaleImg
Permissible values are true or false.
AFP
afpRenderOption
.allowFullColorRGBImg
Permissible values are true or false.
AFP
afpRenderOption
.allowFullColorCMYKImg
Permissible values are true or false.
DOCX
EmbedHtml
Permissible values are true or false.
PDF, PostScript
pdfRenderOption
.bidiProcessing
Enables bidirectional text support. Permissible values are true or false.
PDF, PostScript
pdfRenderOption
.textWrapping
Enables text wrapping. Permissible values are true or false.
PDF
pdfRenderOption
.hyphenation
Enables splitting words with a hyphen at line breaks. Permissible values are true or false.
PDF, PostScript
pdfRenderOption
.fontSubstitution
Enables font substitution for unknown fonts. Permissible values are true or false.
PDF, PostScript
pdfRenderOption
.pageOverflow
Controls rendering content when the content exceeds the page size. Integer values indicate the following options:
*1: clips the content
*2: scales the content to fit the page
*4: (default) divides the content into multiple pages
*8: expands the page to fit content
PDF
pdfRenderOption
.embeddedFonts
Embeds fonts in the output document. Permissible values are true or false.
PDF
RenderChartInSVG
Renders charts as vector graphics. Permissible values are true or false.
PDF
repaginateForPDF
Permissible values are true or false.
PPT/PPTX
BIDIProcessing
Enables bidirectional text support. Permissible values are true or false..
PPT/PPTX
TextWrapping
Enables text wrapping. Permissible values are true or false.
PPT/PPTX
FontSubstitution
Sets font substitution for unknown fonts. Permissible values are true or false.
XLS/XLSX
excelRenderOption
.wrappingText
Enables text wrapping. Permissible values are true or false.
XLS/XLSX
excelRenderOption
.EnablePivotTable
Enables pivot tables. Permissible values are true or false.
XLS/XLSX
excelRenderOption
.AutoFitPivotTable
Enables BIRT Viewer to automatically adjust content for display in pivot tables. Permissible values are true or false.
XLS/XLSX
excelRenderOption
.ExportChartsAsImages
Renders charts as images only. Permissible values are true or false.
XLS/XLSX
excelRenderOption
.EnableLiveFormula
Enables formulas for derived values. Permissible values are true or false.
XLS/XLSX
excelRenderOption
.hideGridlines
Hides grid lines. Permissible values are true or false.
XLS/XLSX
excelRenderOption
.multipleSheet
Enables multiple worksheet output. Permissible values are true or false.
In earlier releases, you configured default export options for a particular output format by creating a RenderDefaults.cfg file, and placing it in the JAR file for that output format emitter. The main advantage of configuring export options using an XML file as described in this section is that you do not need to work with a JAR file.
For backward compatibility, the BIRT Hub 3 release of BIRT Java Components supports configuring default export options using a RenderDefaults.cfg file. BIRT Java Compnents use this file if the .xml file this section describes does not exist. If neither file exists, BIRT Java Components use the default export options specified in the RenderOptions.xml file the format emitter JAR file contains.