net.sf.jasperreports.engine.export
Class JRHtmlExporterParameter

java.lang.Object
  extended by net.sf.jasperreports.engine.JRExporterParameter
      extended by net.sf.jasperreports.engine.export.JRHtmlExporterParameter

public class JRHtmlExporterParameter
extends JRExporterParameter

Contains parameters useful for export in HTML format.

The HTML exporter can send data to a string buffer, output stream, character stream or file on disk. The engine looks among the export parameters in order to find the selected output type in this order: OUTPUT_STRING_BUFFER, OUTPUT_WRITER, OUTPUT_STREAM, OUTPUT_FILE, OUTPUT_FILE_NAME.

An important issue is images. The HTML format stores images as separate files, so the exporter needs to know where these images will be stored. If they are stored on disk, the IMAGES_URI parameter will be initialized with a string containing the file name on disk. If they remain in memory, IMAGES_URI must point to a resource that is able to send the images to the browser (such as an image servlet, as shown in the webapp example).

Version:
$Id: JRHtmlExporterParameter.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static JRHtmlExporterParameter BETWEEN_PAGES_HTML
          A string representing HTML code that will be inserted between pages of the generated report.
static JRHtmlExporterParameter FLUSH_OUTPUT
          A parameter that determines whether the HTML exporter should flush the output stream after writing the HTML content to it.
static JRHtmlExporterParameter FRAMES_AS_NESTED_TABLES
          Indicates whether frames are to be exported as nested HTML tables.
static JRHtmlExporterParameter HTML_FOOTER
          A string representing HTML code that will be inserted after the generated report.
static JRHtmlExporterParameter HTML_HEADER
          A string representing HTML code that will be inserted in front of the generated report.
static JRHtmlExporterParameter IMAGES_DIR
          A java.io.File instance representing an absolute path to a folder on a local disk, where all the images are stored.
static JRHtmlExporterParameter IMAGES_DIR_NAME
          An absolute path to a folder on a local disk, where all the images are stored.
static JRHtmlExporterParameter IMAGES_MAP
          A map containing all the images that were used for generating the report.
static JRHtmlExporterParameter IMAGES_URI
          An URI to the folder where all the images are stored.
static JRHtmlExporterParameter IS_OUTPUT_IMAGES_TO_DIR
          A boolean value specifying whether the images should be stored on disk.
static JRHtmlExporterParameter IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS
          A boolean value specifying whether the blank lines, that sometimes appear between rows, should be deleted.
static JRHtmlExporterParameter IS_USING_IMAGES_TO_ALIGN
          A boolean value specifying whether the export engine should use small images for aligning.
static JRHtmlExporterParameter IS_WHITE_PAGE_BACKGROUND
          A boolean value specifying whether the report background should be white.
static JRHtmlExporterParameter IS_WRAP_BREAK_WORD
          A boolean value specifying whether the export engine should use force wrapping by breaking words (CSS word-wrap: break-word).
static java.lang.String PROPERTY_FLUSH_OUTPUT
          Property that provides the default value for the FLUSH_OUTPUT parameter.
static java.lang.String PROPERTY_FRAMES_AS_NESTED_TABLES
          This property serves as default value for the FRAMES_AS_NESTED_TABLES export parameter.
static java.lang.String PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS
          Property whose value is used as default state of the IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS export flag.
static java.lang.String PROPERTY_SIZE_UNIT
          Property whose value is used as default for the SIZE_UNIT export parameter.
static java.lang.String PROPERTY_USING_IMAGES_TO_ALIGN
          Property whose value is used as default state of the IS_USING_IMAGES_TO_ALIGN export flag.
static java.lang.String PROPERTY_WHITE_PAGE_BACKGROUND
          Property whose value is used as default state of the IS_WHITE_PAGE_BACKGROUND export flag.
static java.lang.String PROPERTY_WRAP_BREAK_WORD
          Property whose value is used as default state of the IS_WRAP_BREAK_WORD export flag.
static JRHtmlExporterParameter SIZE_UNIT
          A String value specifying the unit to use when measuring lengths or font size.
static java.lang.String SIZE_UNIT_PIXEL
          Possible value for the SIZE_UNIT parameter indicated that measurements are made in pixels.
static java.lang.String SIZE_UNIT_POINT
          Possible value for the SIZE_UNIT parameter indicated that measurements are made in points.
static JRHtmlExporterParameter ZOOM_RATIO
          The zoom ratio used for the export.
 
Fields inherited from class net.sf.jasperreports.engine.JRExporterParameter
CHARACTER_ENCODING, CLASS_LOADER, END_PAGE_INDEX, FILE_RESOLVER, FILTER, FONT_MAP, HYPERLINK_PRODUCER_FACTORY, IGNORE_PAGE_MARGINS, INPUT_FILE, INPUT_FILE_NAME, INPUT_STREAM, INPUT_URL, JASPER_PRINT, JASPER_PRINT_LIST, OFFSET_X, OFFSET_Y, OUTPUT_FILE, OUTPUT_FILE_NAME, OUTPUT_STREAM, OUTPUT_STRING_BUFFER, OUTPUT_WRITER, PAGE_INDEX, PARAMETERS_OVERRIDE_REPORT_HINTS, PROGRESS_MONITOR, PROPERTY_CHARACTER_ENCODING, PROPERTY_EXPORT_PARAMETERS_OVERRIDE_REPORT_HINTS, PROPERTY_IGNORE_PAGE_MARGINS, START_PAGE_INDEX, URL_HANDLER_FACTORY
 
Constructor Summary
JRHtmlExporterParameter(java.lang.String name)
           
 
Method Summary
 
Methods inherited from class net.sf.jasperreports.engine.JRExporterParameter
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IMAGES_MAP

public static final JRHtmlExporterParameter IMAGES_MAP
A map containing all the images that were used for generating the report. The JasperReports engine stores all the images in this map, and uses the map keys for referencing images throughout the export process.


IMAGES_DIR

public static final JRHtmlExporterParameter IMAGES_DIR
A java.io.File instance representing an absolute path to a folder on a local disk, where all the images are stored.


IMAGES_DIR_NAME

public static final JRHtmlExporterParameter IMAGES_DIR_NAME
An absolute path to a folder on a local disk, where all the images are stored. This is an alternative to IMAGES_DIR


IS_OUTPUT_IMAGES_TO_DIR

public static final JRHtmlExporterParameter IS_OUTPUT_IMAGES_TO_DIR
A boolean value specifying whether the images should be stored on disk. The default value is true. If this parameter is specified, IMAGES_DIR or IMAGES_DIR_NAME must also be specified and point to a valid directory.


IMAGES_URI

public static final JRHtmlExporterParameter IMAGES_URI
An URI to the folder where all the images are stored. It could also point to a different resource, such as an image servlet. It is used in the generated HTML to point to the actual location of the image in the tag (as a file on disk or a web resource).


HTML_HEADER

public static final JRHtmlExporterParameter HTML_HEADER
A string representing HTML code that will be inserted in front of the generated report. The JasperReports engine places a piece of HTML code at the top of the page but users can define their own headers and stylesheet links.


BETWEEN_PAGES_HTML

public static final JRHtmlExporterParameter BETWEEN_PAGES_HTML
A string representing HTML code that will be inserted between pages of the generated report. By default, JasperReports separates pages by two empty lines, but this behavior can be overridden by this parameter.


HTML_FOOTER

public static final JRHtmlExporterParameter HTML_FOOTER
A string representing HTML code that will be inserted after the generated report. By default, JasperReports closes the usual HTML tags that were opened in HTML_HEADER. If the default HTML_HEADER was overridden, it is recommended that this parameter is overridden too, in order to ensure proper construction of HTML page.


IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS

public static final JRHtmlExporterParameter IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS
A boolean value specifying whether the blank lines, that sometimes appear between rows, should be deleted. Sometimes page break occurs before the entire page is filled with data (i.e. having a group with the isStartNewPage attribute set to true). All the remaining empty space could be removed by setting this parameter to true.


PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS

public static final java.lang.String PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS
Property whose value is used as default state of the IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS export flag.

This property is by default not set (false).

See Also:
JRPropertiesUtil, Constant Field Values

IS_WHITE_PAGE_BACKGROUND

public static final JRHtmlExporterParameter IS_WHITE_PAGE_BACKGROUND
A boolean value specifying whether the report background should be white. If this parameter is not set, the default background will appear, depending on the selected CSS styles.


PROPERTY_WHITE_PAGE_BACKGROUND

public static final java.lang.String PROPERTY_WHITE_PAGE_BACKGROUND
Property whose value is used as default state of the IS_WHITE_PAGE_BACKGROUND export flag.

This property is set by default (true).

See Also:
JRPropertiesUtil, Constant Field Values

IS_USING_IMAGES_TO_ALIGN

public static final JRHtmlExporterParameter IS_USING_IMAGES_TO_ALIGN
A boolean value specifying whether the export engine should use small images for aligning. This is useful when you don't have images in your report anyway and you don't want to have to handle images at all.


PROPERTY_USING_IMAGES_TO_ALIGN

public static final java.lang.String PROPERTY_USING_IMAGES_TO_ALIGN
Property whose value is used as default state of the IS_USING_IMAGES_TO_ALIGN export flag.

This property is set by default (true).

See Also:
JRPropertiesUtil, Constant Field Values

IS_WRAP_BREAK_WORD

public static final JRHtmlExporterParameter IS_WRAP_BREAK_WORD
A boolean value specifying whether the export engine should use force wrapping by breaking words (CSS word-wrap: break-word).

Note that this CSS property is not currently supported by all browsers. An alternative approach for forcing word breaks in HTML is to save the line breaks at fill time via the JRTextElement.PROPERTY_SAVE_LINE_BREAKS property.


PROPERTY_WRAP_BREAK_WORD

public static final java.lang.String PROPERTY_WRAP_BREAK_WORD
Property whose value is used as default state of the IS_WRAP_BREAK_WORD export flag.

This property is by default not set (false).

See Also:
JRPropertiesUtil, Constant Field Values

SIZE_UNIT

public static final JRHtmlExporterParameter SIZE_UNIT
A String value specifying the unit to use when measuring lengths or font size. This can be one of the supported size units from the CSS specifications like "px" for pixels or "pt" for points. The default value is "px", meaning that lengths and font sizes are specified in pixels.


PROPERTY_SIZE_UNIT

public static final java.lang.String PROPERTY_SIZE_UNIT
Property whose value is used as default for the SIZE_UNIT export parameter.

See Also:
JRPropertiesUtil, Constant Field Values

SIZE_UNIT_PIXEL

public static final java.lang.String SIZE_UNIT_PIXEL
Possible value for the SIZE_UNIT parameter indicated that measurements are made in pixels.

See Also:
Constant Field Values

SIZE_UNIT_POINT

public static final java.lang.String SIZE_UNIT_POINT
Possible value for the SIZE_UNIT parameter indicated that measurements are made in points.

See Also:
Constant Field Values

ZOOM_RATIO

public static final JRHtmlExporterParameter ZOOM_RATIO
The zoom ratio used for the export. The default value is 1.


FRAMES_AS_NESTED_TABLES

public static final JRHtmlExporterParameter FRAMES_AS_NESTED_TABLES
Indicates whether frames are to be exported as nested HTML tables.

The type of the parameter is java.lang.Boolean.

Is set to false, the frame contents will be integrated into the master/page HTML table. This can be useful when exporting frames as nested tables causes output misalignments.

See Also:
PROPERTY_FRAMES_AS_NESTED_TABLES

PROPERTY_FRAMES_AS_NESTED_TABLES

public static final java.lang.String PROPERTY_FRAMES_AS_NESTED_TABLES
This property serves as default value for the FRAMES_AS_NESTED_TABLES export parameter.

The propery itself defaults to true.

See Also:
JRPropertiesUtil, Constant Field Values

FLUSH_OUTPUT

public static final JRHtmlExporterParameter FLUSH_OUTPUT
A parameter that determines whether the HTML exporter should flush the output stream after writing the HTML content to it.

The default value is given by the PROPERTY_FLUSH_OUTPUT property.


PROPERTY_FLUSH_OUTPUT

public static final java.lang.String PROPERTY_FLUSH_OUTPUT
Property that provides the default value for the FLUSH_OUTPUT parameter.

The property can be set at report level or globally. By default, the HTML exporter performs a flush on the output stream after export.

See Also:
Constant Field Values
Constructor Detail

JRHtmlExporterParameter

public JRHtmlExporterParameter(java.lang.String name)


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com