Four Js Genero Report Writer
FourJs.Report.Runtime.HTMLRenderer Class Reference

Class for configuring HTML output. More...

Inheritance diagram for FourJs.Report.Runtime.HTMLRenderer:
FourJs.Report.Runtime.FormatProducer FourJs.Report.Runtime.LayoutedPagesConsumer

Public Member Functions

 HTMLRenderer (FormatHandler handler)
 Creates a HTMLRenderer object that outputs to the given handler object. More...
 
- Public Member Functions inherited from FourJs.Report.Runtime.FormatProducer
 FormatProducer (FormatHandler handler)
 Creates a FormatProducer object that outputs to the given handler object. More...
 

Static Public Attributes

static String legalCopyright = Version.CLASS_COPYRIGHT
 
- Static Public Attributes inherited from FourJs.Report.Runtime.FormatProducer
static String legalCopyright = Version.CLASS_COPYRIGHT
 

Properties

int fromPage [get, set]
 Sets the first page to be included in the document. fromPage an integer greater than zero and less than or equal to toPage More...
 
int toPage [get, set]
 Sets the first page to be included in the document. fromPage an integer greater than zero and less than or equal to toPage More...
 
bool embedImages [get, set]
 Activates image embedding if true, external image file referencing if false. The default value is true. More...
 
String imageGenerationDirectory [get, set]
 Sets the directory where images files are to be created when image embedding has been unselected. More...
 
String imageURLPrefix [get, set]
 Sets the prefix for generated URLs that reference external images when image embedding has been unselected. More...
 
bool removeWhitespace [get, set]
 Activates whitespace removal if true, columns or rows containing whitespace only are preserved if false. The default value is false. More...
 
bool ignoreRowAlignment [get, set]
 Sets whether the row alignment of items can be ignored allowing a more compact representation. The default value is false. More...
 
bool ignoreColumnAlignment [get, set]
 Sets whether the column alignment of items can be ignored allowing a more compact representation. The default value is false. More...
 
bool removeBackgroundImages [get, set]
 Activates background image removal if true, partially obscured images are preserved if false. The default value is false. More...
 
- Properties inherited from FourJs.Report.Runtime.FormatProducer
FormatHandler handler [get]
 Sets the specified handler as the handler for the output produced by this processor. More...
 

Detailed Description

Class for configuring HTML output.

a name="fontEmbedding">

Font embedding

Fonts are not embedded in the output. Instead the font name is specified and a dynamic layout is used that can adapt in the case that the font is unavailable and a fall back font has to be used.

Layout method

A table layout is used for each page to reproduce the original layout as faithful as possible while catering for changing fonts at the same time.

Faithfulness of output

The focus for the HTML output is on the communication of content, size of the document and configurability via CSS. The grid layout doesn't cater for items that span several cells such as borders and background colors. For faithful reproduction consider using the PDFRenderer, SVGRenderer, PostscriptRenderer, Printer or ImageRenderer.

Handling of overlapping items

Since the tabular layout does no allow for items to overlap, any items that overlap are replaced by an image containing a painting of the overlapping items. In such a case a warning is issued. An exception of this rule are background images which can be removed from document by using the method removeBackgroundImages.

Processing large documents

For documents not containing "Page N of M" paginations the delay between input and output is one page and memory consumption is nearly constant. For documents containing "Page N of M" paginations the latency is M pages and the memory consumption is linear within a pagination block and hence can exhaust heap space if individual blocks are very large.

Constructor & Destructor Documentation

FourJs.Report.Runtime.HTMLRenderer.HTMLRenderer ( FormatHandler  handler)

Creates a HTMLRenderer object that outputs to the given handler object.

Parameters
handlerA FormatHandler

Property Documentation

bool FourJs.Report.Runtime.HTMLRenderer.embedImages
getset

Activates image embedding if true, external image file referencing if false. The default value is true.

int FourJs.Report.Runtime.HTMLRenderer.fromPage
getset

Sets the first page to be included in the document. fromPage an integer greater than zero and less than or equal to toPage

Exceptions
ArgumentOutOfRangeExceptionif the above condition is violated.
bool FourJs.Report.Runtime.HTMLRenderer.ignoreColumnAlignment
getset

Sets whether the column alignment of items can be ignored allowing a more compact representation. The default value is false.

When set, only those objects that are entirely to the left or entirely to the right each other will go in separate columns. The option reduces the amount of columns thereby loosing the vertical alignment. The topology is not changed so that visually adjacent items remain adjacent.

bool FourJs.Report.Runtime.HTMLRenderer.ignoreRowAlignment
getset

Sets whether the row alignment of items can be ignored allowing a more compact representation. The default value is false.

When set, only those objects that are entirely above or entirely below each other will go in separate rows. The option reduces the amount of rows thereby loosing the horizontal alignment. The topology is not changed so that visually stacked items remain stacked.

String FourJs.Report.Runtime.HTMLRenderer.imageGenerationDirectory
getset

Sets the directory where images files are to be created when image embedding has been unselected.

The directory needs to exist.

By default the images are generated in the same directory as the HTML document.

The specified directory has no impact on the URL generated to reference the image.

embedImages imageURLPrefix

String FourJs.Report.Runtime.HTMLRenderer.imageURLPrefix
getset

Sets the prefix for generated URLs that reference external images when image embedding has been unselected.

The default value is the empty string

Generated URLs are constructed by concatenation of of the prefix with the image file name. If for example the image file name is "1234.jpg" then the default url will be "1234.jpg" and a prefix of "images/" will result in "images/1234.jpg"

embedImages imageGenerationDirectory

bool FourJs.Report.Runtime.HTMLRenderer.removeBackgroundImages
getset

Activates background image removal if true, partially obscured images are preserved if false. The default value is false.

bool FourJs.Report.Runtime.HTMLRenderer.removeWhitespace
getset

Activates whitespace removal if true, columns or rows containing whitespace only are preserved if false. The default value is false.

int FourJs.Report.Runtime.HTMLRenderer.toPage
getset

Sets the first page to be included in the document. fromPage an integer greater than zero and less than or equal to toPage

Exceptions
ArgumentOutOfRangeExceptionif the above condition is violated.