Public Member Functions | Static Public Attributes | Protected Member Functions

de.softpro.doc.SignDocRenderParameters Class Reference

Parameters for SignDocDocument.renderPageAsImage(). More...

List of all members.

Public Member Functions

 SignDocRenderParameters () throws SignDocException
 Constructor.
synchronized void setPage (int aPage) throws SignDocException
 Select the page to be rendered.
synchronized int getPage () throws SignDocException
 Get the number of the selected page.
synchronized void setPages (int aFirst, int aLast) throws SignDocException
 Select a range of pages to be rendered.
synchronized int getFirstPage () throws SignDocException
 Get the first page number of the selected range of pages.
synchronized int getLastPage () throws SignDocException
 Get the last page number of the selected range of pages.
synchronized void setResolution (double aResX, double aResY) throws SignDocException
 Set the resolution for rendering PDF documents.
synchronized double getResolutionX () throws SignDocException
 Get the horizontal resolution set by setResolution().
synchronized double getResolutionY () throws SignDocException
 Get the vertical resolution set by setResolution().
synchronized void setZoom (double aZoom) throws SignDocException
 Set the zoom factor for rendering.
synchronized double getZoom () throws SignDocException
 Get the zoom factor set by setZoom().
synchronized void fitWidth (int aWidth) throws SignDocException
 Set the width for automatic computation of the zoom factor to make the rendered image fit the specified width.
synchronized int getFitWidth () throws SignDocException
 Get the width set by fitWidth().
synchronized void fitHeight (int aHeight) throws SignDocException
 Set the height for automatic computation of the zoom factor to make the rendered image fit the specified height.
synchronized int getFitHeight () throws SignDocException
 Get the height set by fitHeight().
synchronized void fitRect (int aWidth, int aHeight) throws SignDocException
 Set the width and height for automatic computation of the zoom factor to make the rendered image fit the specified width and height.
synchronized int getFitRectWidth () throws SignDocException
 Get the width set by fitRect().
synchronized int getFitRectHeight () throws SignDocException
 Get the height set by fitRect().
synchronized void setFormat (String aFormat) throws SignDocException
 Set the image format.
synchronized String getFormat () throws SignDocException
 Get the image format.
synchronized void setInterlacing (int aInterlacing) throws SignDocException
 Set the interlacing method.
synchronized int getInterlacing () throws SignDocException
 Get the interlacing method.
synchronized void setQuality (int aQuality) throws SignDocException
 Set the desired quality.
synchronized int getQuality () throws SignDocException
 Get the desired quality.
synchronized void setPixelFormat (int aPixelFormat) throws SignDocException
 Set the pixel format.
synchronized int getPixelFormat () throws SignDocException
 Get the pixel format.
synchronized void setCompression (int aCompression) throws SignDocException
 Set the compression method.
synchronized int getCompression () throws SignDocException
 Get the compression method.
synchronized void setDecorations (boolean aDecorations) throws SignDocException
 Enable rendering of decorations.
synchronized boolean getDecorations () throws SignDocException
 Get the value set by setDecorations().
synchronized boolean setDecorationState (String aName, int aDecorationState) throws SignDocException
 Set the decoration state for a single signature in a PDF document.
synchronized int getDecorationState (String aName) throws SignDocException
 Get a value set by setDecorationState().
synchronized void setPrint (boolean aPrint) throws SignDocException
 Enable rendering for printing.
synchronized boolean getPrint () throws SignDocException
 Get the value set by setPrint().
synchronized void setModificationState (boolean aCheck) throws SignDocException
 Enable getting the modification state.
synchronized boolean getModificationState () throws SignDocException
 Get the value set by setModificationState().
synchronized boolean equals (SignDocRenderParameters aRHS) throws SignDocException
 Compare against another SignDocRenderParameters object.

Static Public Attributes

static final int i_off = 0
 Interlacing method for setInterlacing(): No interlacing.
static final int i_on = 1
 Interlacing method for setInterlacing(): Enable interlaving.
static final int q_low = 0
 Quality setting for setQuality(): low quality, fast.
static final int q_high = 1
 Quality setting for setQuality(): high quality, slow.
static final int pf_default = 0
 Pixel format for setPixelFormat(): RGB for PDF documents, same as document for TIFF documents.
static final int pf_bw = 1
 Pixel format for setPixelFormat(): black and white (1 bit per pixel).
static final int c_default = 0
 Compression method for setCompression(): no compression for PDF documents, same as document for TIFF documents.
static final int c_none = 1
 Compression method for setCompression(): no compression.
static final int c_group4 = 2
 Compression method for setCompression(): CCITT Group 4.
static final int c_lzw = 3
 Compression method for setCompression(): LZW.
static final int c_rle = 4
 Compression method for setCompression(): RLE.
static final int c_zip = 5
 Compression method for setCompression(): ZIP.
static final int ds_auto = 0
 Decoration state to be used for a signature: Validate signature and choose appropriate decoration.
static final int ds_empty = 1
 Decoration state to be used for a signature: Not signed.
static final int ds_ok = 2
 Decoration state to be used for a signature: Signature validated successfully.
static final int ds_problem = 3
 Decoration state to be used for a signature: Signature has at least one problem.
static final int ds_broken = 4
 Decoration state to be used for a signature: Signature is broken.

Protected Member Functions

void finalize () throws Throwable
 Finalize this object.

Detailed Description

Parameters for SignDocDocument.renderPageAsImage().

Todo:
add hashCode()

Constructor & Destructor Documentation

de.softpro.doc.SignDocRenderParameters.SignDocRenderParameters (  ) throws SignDocException

Constructor.


Member Function Documentation

synchronized boolean de.softpro.doc.SignDocRenderParameters.equals ( SignDocRenderParameters  aRHS ) throws SignDocException

Compare against another SignDocRenderParameters object.

Parameters:
[in]aRHSThe object to compare against.
Returns:
true iff this object compares equal to aRHS.
void de.softpro.doc.SignDocRenderParameters.finalize (  ) throws Throwable [protected]

Finalize this object.

Do not call this method unless you know what you are doing.

synchronized void de.softpro.doc.SignDocRenderParameters.fitHeight ( int  aHeight ) throws SignDocException

Set the height for automatic computation of the zoom factor to make the rendered image fit the specified height.

This function overrides the zoom factor set by fitWidth(), fitRect(), and setZoom().

Throws SignDocInvalidArgumentException if the height is invalid.

Parameters:
[in]aHeightThe desired height (in pixels) of the rendered image.
See also:
fitRect(), fitWidth(), getFitHeight(), setZoom(), SignDocDocument.computeZoom()
synchronized void de.softpro.doc.SignDocRenderParameters.fitRect ( int  aWidth,
int  aHeight 
) throws SignDocException

Set the width and height for automatic computation of the zoom factor to make the rendered image fit the specified width and height.

This function overrides the zoom factor set by fitWidth(), fitHeight(), and setZoom().

Throws SignDocInvalidArgumentException if the width or the height is invalid.

Parameters:
[in]aWidthThe desired width (in pixels) of the rendered image.
[in]aHeightThe desired height (in pixels) of the rendered image.
Returns:
true if successful, false if the specified width or height is invalid.
See also:
fitHeight(), fitWidth(), getFitRectHeight(), getFitRectWidth(), setZoom(), SignDocDocument.computeZoom()
synchronized void de.softpro.doc.SignDocRenderParameters.fitWidth ( int  aWidth ) throws SignDocException

Set the width for automatic computation of the zoom factor to make the rendered image fit the specified width.

This function overrides the zoom factor set by fitHeight(), fitRect(), and setZoom().

Throws SignDocInvalidArgumentException if the width is invalid.

Parameters:
[in]aWidthThe desired width (in pixels) of the rendered image.
See also:
fitHeight(), fitRect(), getFitWidth(), setZoom(), SignDocDocument.computeZoom()
synchronized int de.softpro.doc.SignDocRenderParameters.getCompression (  ) throws SignDocException

Get the compression method.

Returns:
The compression method set by setCompression().
See also:
setCompression()
synchronized boolean de.softpro.doc.SignDocRenderParameters.getDecorations (  ) throws SignDocException

Get the value set by setDecorations().

Returns:
the value set by setDecorations().
See also:
getPrint(), setDecorations()
synchronized int de.softpro.doc.SignDocRenderParameters.getDecorationState ( String  aName ) throws SignDocException

Get a value set by setDecorationState().

Parameters:
[in]aNameThe name of the field.
Returns:
ds_auto, ds_empty, ds_ok, ds_problem, or ds_broken. For fields for which setDecorationState() has not been called, ds_auto will be returned.
See also:
setDecorationState(), setDecorations()
synchronized int de.softpro.doc.SignDocRenderParameters.getFirstPage (  ) throws SignDocException

Get the first page number of the selected range of pages.

Throws SignDocParameterNotSetException if setPage() and setPages() have not been called.

Returns:
The first page number of the range (1 for the first page of the document).
See also:
getPage(), setPages()
synchronized int de.softpro.doc.SignDocRenderParameters.getFitHeight (  ) throws SignDocException

Get the height set by fitHeight().

Throws SignDocParameterNotSetException if setFitHeight() has not been called successfully.

Returns:
The height set by fitHeight().
true if successful, false if fitHeight() has not been called successfully or has been overridden.
See also:
fitHeight()
synchronized int de.softpro.doc.SignDocRenderParameters.getFitRectHeight (  ) throws SignDocException

Get the height set by fitRect().

Throws SignDocParameterNotSetException if setFitRect() has not been called successfully.

Returns:
The height set by fitRect().
See also:
fitRect(), getFitRectWidth()
synchronized int de.softpro.doc.SignDocRenderParameters.getFitRectWidth (  ) throws SignDocException

Get the width set by fitRect().

Throws SignDocParameterNotSetException if setFitRect() has not been called successfully.

Returns:
The width set by fitRect().
See also:
fitRect(), getFitRectHeight()
synchronized int de.softpro.doc.SignDocRenderParameters.getFitWidth (  ) throws SignDocException

Get the width set by fitWidth().

Throws SignDocParameterNotSetException if getFitWidth() has not been called successfully.

Returns:
The width set by fitWidth().
See also:
fitWidth()
synchronized String de.softpro.doc.SignDocRenderParameters.getFormat (  ) throws SignDocException

Get the image format.

Returns:
The image format set by setFormat().
See also:
setFormat()
synchronized int de.softpro.doc.SignDocRenderParameters.getInterlacing (  ) throws SignDocException

Get the interlacing method.

Returns:
The interlacing mode set by setInterlacing().
See also:
setInterlacing()
synchronized int de.softpro.doc.SignDocRenderParameters.getLastPage (  ) throws SignDocException

Get the last page number of the selected range of pages.

Throws SignDocParameterNotSetException if setPage() and setPages() have not been called.

Returns:
The last page number of the range (1 for the first page of the document).
See also:
getPage(), setPages()
synchronized boolean de.softpro.doc.SignDocRenderParameters.getModificationState (  ) throws SignDocException

Get the value set by setModificationState().

Returns:
the value set by setModificationState().
See also:
getDecorations(), setModificationState()
synchronized int de.softpro.doc.SignDocRenderParameters.getPage (  ) throws SignDocException

Get the number of the selected page.

Throws SignDocParameterNotSetException if setPage() has not been called successfully or if multiple pages have been selected with setPages().

Returns:
The page number (1 for the first page).
See also:
getPages(), setPage()
synchronized int de.softpro.doc.SignDocRenderParameters.getPixelFormat (  ) throws SignDocException

Get the pixel format.

Returns:
The pixel format set by setPixelFormat().
See also:
setPixelFormat()
synchronized boolean de.softpro.doc.SignDocRenderParameters.getPrint (  ) throws SignDocException

Get the value set by setPrint().

Returns:
the value set by setPrint().
See also:
getDecorations(), setPrint()
synchronized int de.softpro.doc.SignDocRenderParameters.getQuality (  ) throws SignDocException

Get the desired quality.

Returns:
The desired quality set by setQuality().
See also:
setQuality()
synchronized double de.softpro.doc.SignDocRenderParameters.getResolutionX (  ) throws SignDocException

Get the horizontal resolution set by setResolution().

Throws SignDocParameterNotSetException if setResolution() has not been called successfully.

Returns:
The horizontal resolution in DPI.
See also:
getResolutionY(), setResolution()
synchronized double de.softpro.doc.SignDocRenderParameters.getResolutionY (  ) throws SignDocException

Get the vertical resolution set by setResolution().

Throws SignDocParameterNotSetException if setResolution() has not been called successfully.

Returns:
The vertical resolution in DPI.
See also:
getResolutionY(), setResolution()
synchronized double de.softpro.doc.SignDocRenderParameters.getZoom (  ) throws SignDocException

Get the zoom factor set by setZoom().

This function does not retrieve the zoom factor to be computed for fitWidth(), fitHeight(), and fitRect(). Use SignDocDocument.computeZoom() for that.

Throws SignDocParameterNotSetException if setZoom() has not been called successfully.

Returns:
The zoom factor set by setZoom().
See also:
fitHeight(), fitRect(), fitWidth(), setZoom(), SignDocDocument.computeZoom()
synchronized void de.softpro.doc.SignDocRenderParameters.setCompression ( int  aCompression ) throws SignDocException

Set the compression method.

The initial value is c_default.

Parameters:
[in]aCompressionThe compression method (c_default, c_none, c_group4, c_lzw, c_rle, or c_zip).
See also:
getCompression()
synchronized void de.softpro.doc.SignDocRenderParameters.setDecorations ( boolean  aDecorations ) throws SignDocException

Enable rendering of decorations.

The default value is false.

For PDF documents, pages may optionally be rendered with decorations: An icon visualizing the signature status will be added to each signature field:

  • no icon (signature field not signed)
  • green check mark (signature is OK)
  • green check mark with yellow triangle (signature is OK but the certificate is not trusted or the document has been extended, ie, modified and saved incrementally after signing)
  • red cross (signature broken)

You might want to call setModificationState(true) to compute the signature state more thoroughly.

Enabling rendering of decorations can slow down SignDocDocument.renderPageAsImage() substantially for PDF documents as each call will validate all the signatures of the page. Moreover, long term validation (LTV) is currently not supported by SignDocDocument.renderPageAsImage(). Using setDecorationState() might solve these problems.

It is recommended to display the status of signatures off-page rather than using setDecorations(true), see SignDocDocument.getSignature().

For TIFF documents, this value is ignored; a red cross will be displayed in signature fields if the signature is broken.

Parameters:
[in]aDecorationstrue to render decorations.
See also:
getDecorations(), setModificationState(), setPrint()
synchronized boolean de.softpro.doc.SignDocRenderParameters.setDecorationState ( String  aName,
int  aDecorationState 
) throws SignDocException

Set the decoration state for a single signature in a PDF document.

This function does not check whether the field exists. The decorations set by this function are ignored unless setDecorations(true) is in effect. ds_auto will be assumed for all fields for which setDecorationState() has not been called.

Any values set with this function will be ignored for rendering TIFF documents.

Parameters:
[in]aNameThe name of the field.
[in]aDecorationStateThe decoration state: ds_auto, ds_empty, ds_ok, ds_problem, or ds_broken.
Returns:
true iff successful.
See also:
getDecorationState(), setDecorations()
synchronized void de.softpro.doc.SignDocRenderParameters.setFormat ( String  aFormat ) throws SignDocException

Set the image format.

There is no initial value, ie, this function must be called.

Currently, this function does not check the image format.

Parameters:
[in]aFormatThe desired format of the image ("jpg", "png", "tiff", "gif", "bmp", or "bmp3").
See also:
getFormat(), setInterlacing()
synchronized void de.softpro.doc.SignDocRenderParameters.setInterlacing ( int  aInterlacing ) throws SignDocException

Set the interlacing method.

Interlacing is used for progressive encoding. The initial value is i_off.

Parameters:
[in]aInterlacingThe interlacing method (i_off or i_on).
Returns:
true if successful, false if the interlacing mode is invalid.
See also:
getInterlacing(), setFormat()
synchronized void de.softpro.doc.SignDocRenderParameters.setModificationState ( boolean  aCheck ) throws SignDocException

Enable getting the modification state.

The default value is false.

Parameters:
[in]aChecktrue to check the modification state for PDF documents, false to ignore the modification state.
See also:
getModificationState(), setDecorations()
synchronized void de.softpro.doc.SignDocRenderParameters.setPage ( int  aPage ) throws SignDocException

Select the page to be rendered.

There is no initial value, ie, either this function or setPages() must be called.

Throws SignDocInvalidArgumentException if the page number is invalid.

Parameters:
[in]aPageThe page number (1 for the first page).
See also:
getPage(), setPages()
synchronized void de.softpro.doc.SignDocRenderParameters.setPages ( int  aFirst,
int  aLast 
) throws SignDocException

Select a range of pages to be rendered.

There is no initial value, ie, either this function or setPage() must be called.

Note:
If multiple pages are selected, the image format must be "tiff" for SignDocDocument.renderPageAsImage().

Throws SignDocInvalidArgumentException if the page numbers are invalid.

Parameters:
[in]aFirstThe first page number of the range (1 for the first page of the document).
[in]aLastThe last page number of the range (1 for the first page of the document).
See also:
getPages(), setPage()
Todo:
implement for TIFF documents
synchronized void de.softpro.doc.SignDocRenderParameters.setPixelFormat ( int  aPixelFormat ) throws SignDocException

Set the pixel format.

The initial value is pf_default.

Parameters:
[in]aPixelFormatThe pixel format (pf_default or pf_bw).
Returns:
true if successful, false if the argument is invalid.
See also:
getPixelFormat()
synchronized void de.softpro.doc.SignDocRenderParameters.setPrint ( boolean  aPrint ) throws SignDocException

Enable rendering for printing.

The default value is false (render for displaying).

Parameters:
[in]aPrinttrue to render for printing, false to render for displaying.
See also:
getPrint(), setDecorations()
synchronized void de.softpro.doc.SignDocRenderParameters.setQuality ( int  aQuality ) throws SignDocException

Set the desired quality.

This setting affects scaling of pages of TIFF documents. The initial value is q_low.

Parameters:
[in]aQualityThe desired quality (q_low or q_high).
Returns:
true if successful, false if the argument is invalid.
See also:
getQuality()
synchronized void de.softpro.doc.SignDocRenderParameters.setResolution ( double  aResX,
double  aResY 
) throws SignDocException

Set the resolution for rendering PDF documents.

The values passed to this function will be ignored for TIFF documents as the resolution is computed automatically from the zoom factor and the document's resolution.

If this function is not called, 96 DPI (subject to change) will be used for rendering PDF documents.

Throws SignDocInvalidArgumentException if the resolution is invalid.

Parameters:
[in]aResXHorizontal resolution in DPI.
[in]aResYVertical resolution in DPI.
See also:
getResolutionX(), getResolutionY(), setZoom()
synchronized void de.softpro.doc.SignDocRenderParameters.setZoom ( double  aZoom ) throws SignDocException

Set the zoom factor for rendering.

There is no initial value, ie, this function or fitWidth() or fitHeight() or fitRect() must be called. This function overrides fitWidth(), fitHeight(), and fitRect().

Throws SignDocInvalidArgumentException if the zoom factor is invalid.

Parameters:
[in]aZoomThe zoom factor.
See also:
fitHeight(), fitRect(), fitWidth(), getZoom()

Member Data Documentation

Compression method for setCompression(): no compression for PDF documents, same as document for TIFF documents.

Compression method for setCompression(): CCITT Group 4.

Compression method for setCompression(): LZW.

Compression method for setCompression(): no compression.

Compression method for setCompression(): RLE.

Compression method for setCompression(): ZIP.

Decoration state to be used for a signature: Validate signature and choose appropriate decoration.

See also:
setDecorationState()

Decoration state to be used for a signature: Signature is broken.

See also:
setDecorationState()

Decoration state to be used for a signature: Not signed.

See also:
setDecorationState()

Decoration state to be used for a signature: Signature validated successfully.

See also:
setDecorationState()

Decoration state to be used for a signature: Signature has at least one problem.

See also:
setDecorationState()

Interlacing method for setInterlacing(): No interlacing.

Interlacing method for setInterlacing(): Enable interlaving.

A suitable interlacing method for the chosen image format will be used.

Pixel format for setPixelFormat(): black and white (1 bit per pixel).

Pixel format for setPixelFormat(): RGB for PDF documents, same as document for TIFF documents.

Quality setting for setQuality(): high quality, slow.

Quality setting for setQuality(): low quality, fast.


The documentation for this class was generated from the following file: