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

Class for configuring image (bitmap) output. More...

Inheritance diagram for FourJs.Report.Runtime.ImageRenderer:
FourJs.Report.Runtime.LayoutedPagesConsumer

Public Types

enum  ImageFormat { jpg, png, bmp, gif }
 

Public Member Functions

 ImageRenderer ()
 Creates a ImageRenderer object. More...
 

Static Public Attributes

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 last page (inclusive) to be included in the document. toPage an integer greater than zero and less than or equal to fromPage More...
 
bool antialiasFonts [get, set]
 Sets whether text is drawn using antialiasing. The default value is true. More...
 
bool antialiasShapes [get, set]
 Sets whether shapes are drawn using antialiasing. The default value is true. More...
 
bool grayscale [get, set]
 Sets whether the images produced are gray scale or color bitmaps. The default value is false. More...
 
String fileType [get, set]
 Sets the output format as determined by the fileType argument. More...
 
ImageFormat fileTypeFormat [set]
 Sets the output format as determined by the fileType argument. More...
 
int resolution [get, set]
 Sets the resolution of the images produced. More...
 
bool shrinkImagesToPageContent [get, set]
 Sets whether the images produced are cropped to the page content (size of the page box) or have full page size. The default value is false. More...
 
String fileNamePrefix [get, set]
 Sets the file name prefix of the generated image files. The name of the files is constructed from a concatenation of this prefix and the page number as a four digit integer with leading zeros. A complementary method of file name generation can be activated calling usePageNamesAsFileNames. The default value is "img". More...
 
String generationDirectoryName [get, set]
 Sets the name of the directory in which the files are created. The default value is the current working directory. More...
 
bool usePageNamesAsFileNames [get, set]
 Sets whether the page names ("name" attribute) in the document should be used as file names. In the case that a name is not unique a disambiguation number is appended. In the case that a page does not set the "name" attribute the default naming scheme explained in fileNamePrefix is used. The default value is false. More...
 

Detailed Description

Class for configuring image (bitmap) output.

General

An individual image file is created for each page in the report while several option exist for the naming of the files.

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.ImageRenderer.ImageRenderer ( )

Creates a ImageRenderer object.

Property Documentation

bool FourJs.Report.Runtime.ImageRenderer.antialiasFonts
getset

Sets whether text is drawn using antialiasing. The default value is true.

bool FourJs.Report.Runtime.ImageRenderer.antialiasShapes
getset

Sets whether shapes are drawn using antialiasing. The default value is true.

String FourJs.Report.Runtime.ImageRenderer.fileNamePrefix
getset

Sets the file name prefix of the generated image files. The name of the files is constructed from a concatenation of this prefix and the page number as a four digit integer with leading zeros. A complementary method of file name generation can be activated calling usePageNamesAsFileNames. The default value is "img".

usePageNameAsFileNames

String FourJs.Report.Runtime.ImageRenderer.fileType
getset

Sets the output format as determined by the fileType argument.

Parameters
fileTypeone of the following values:

Other file types may be available depending on the JVM used. These can be selected using the method fileType(String).

fileType(String)

ImageFormat FourJs.Report.Runtime.ImageRenderer.fileTypeFormat
set

Sets the output format as determined by the fileType argument.

Parameters
fileTypeone of the following values:
  • jpg
  • png
  • bmp
  • gif

Other file types may be available depending on the JVM used. These can be selected using the method fileType(String).

fileType(String)

int FourJs.Report.Runtime.ImageRenderer.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.
String FourJs.Report.Runtime.ImageRenderer.generationDirectoryName
getset

Sets the name of the directory in which the files are created. The default value is the current working directory.

bool FourJs.Report.Runtime.ImageRenderer.grayscale
getset

Sets whether the images produced are gray scale or color bitmaps. The default value is false.

int FourJs.Report.Runtime.ImageRenderer.resolution
getset

Sets the resolution of the images produced.

Exceptions
ArgumentOutOfRangeExceptionif resolutionInDPI is not greater than 0.
bool FourJs.Report.Runtime.ImageRenderer.shrinkImagesToPageContent
getset

Sets whether the images produced are cropped to the page content (size of the page box) or have full page size. The default value is false.

int FourJs.Report.Runtime.ImageRenderer.toPage
getset

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

Exceptions
ArgumentOutOfRangeExceptionif the above condition is violated.
bool FourJs.Report.Runtime.ImageRenderer.usePageNamesAsFileNames
getset

Sets whether the page names ("name" attribute) in the document should be used as file names. In the case that a name is not unique a disambiguation number is appended. In the case that a page does not set the "name" attribute the default naming scheme explained in fileNamePrefix is used. The default value is false.