SignDoc SDK (Java)  5.0.0
SignDocRenderParameters Class Reference

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

Inheritance diagram for SignDocRenderParameters:

Public Member Functions

 SignDocRenderParameters () throws SignDocException
 Constructor. More...
 
synchronized void clear () throws SignDocException
 Reset all parameters to their initial values. More...
 
synchronized void setBoolean (String aName, boolean aValue) throws SignDocException
 Set a boolean parameter. More...
 
synchronized void setInteger (String aName, int aValue) throws SignDocException
 Set an integer parameter. More...
 
synchronized void setNumber (String aName, double aValue) throws SignDocException
 Set a floating-point number parameter. More...
 
synchronized void setString (String aName, String aValue) throws SignDocException
 Set a string parameter. More...
 
synchronized void setString2 (String aName, String aName2, String aValue) throws SignDocException
 Set a string parameter with two parameter names. More...
 
synchronized Boolean getBoolean (String aName) throws SignDocException
 Get the value of a boolean parameter. More...
 
synchronized Integer getInteger (String aName) throws SignDocException
 Get the value of an integer parameter. More...
 
synchronized Double getNumber (String aName) throws SignDocException
 Get the value of a floating-point number parameter. More...
 
synchronized String getString (String aName) throws SignDocException
 Get the value of a string parameter. More...
 
synchronized String getString2 (String aName, String aName2) throws SignDocException
 Get the value of a string parameter with two parameter names. More...
 
synchronized String getErrorMessage () throws SignDocException
 Get an error message for the last function call. More...
 
synchronized boolean equals (SignDocRenderParameters aRHS) throws SignDocException
 Compare against another SignDocRenderParameters object. More...
 
synchronized void close ()
 Destroy the underlying native object (for java.lang.AutoCloseable). More...
 

Static Public Member Functions

static int getType (String aName) throws SignDocException
 Get the type of a parameter. More...
 

Static Public Attributes

static final int t_undefined = 0
 Return value of getType(): The specified parameter is not defined. More...
 
static final int t_boolean = 1
 Return value of getType(): Boolean. More...
 
static final int t_integer = 2
 Return value of getType(): Integer. More...
 
static final int t_number = 3
 Return value of getType(): Floating-point number. More...
 
static final int t_string = 4
 Return value of getType(): String. More...
 
static final int t_string2 = 6
 Return value of getType(): String (two parameter names). More...
 

Protected Member Functions

void finalize () throws Throwable
 Finalize this object. More...
 

Detailed Description

Constructor & Destructor Documentation

Constructor.

No parameters will be set.

Member Function Documentation

synchronized void clear ( ) throws SignDocException

Reset all parameters to their initial values.

synchronized void close ( )

Destroy the underlying native object (for java.lang.AutoCloseable).

After calling this method, all methods but close() will throw SignDocUnexpectedErrorException.

synchronized boolean 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 finalize ( ) throws Throwable
protected

Finalize this object.

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

synchronized Boolean getBoolean ( String  aName) throws SignDocException

Get the value of a boolean parameter.

This function does not set an error message.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
Returns
The value of the parameter or null if the parameter is not set or is not a boolean parameter.
See also
setBoolean()
synchronized String getErrorMessage ( ) throws SignDocException

Get an error message for the last function call.

Returns
A string describing the reason for the failure of the last function call. The string is empty if the last call succeeded.
synchronized Integer getInteger ( String  aName) throws SignDocException

Get the value of an integer parameter.

This function does not set an error message.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
Returns
The value of the parameter or null if the parameter is not set or is not an integer parameter.
See also
setInteger()
synchronized Double getNumber ( String  aName) throws SignDocException

Get the value of a floating-point number parameter.

This function does not set an error message.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
Returns
The value of the parameter or null if the parameter is not set or is not a floating-point number parameter.
See also
setNumber()
synchronized String getString ( String  aName) throws SignDocException

Get the value of a string parameter.

This function does not set an error message.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
Returns
The value of the parameter or null if the parameter is not set or is not a string parameter.
See also
setString()
synchronized String getString2 ( String  aName,
String  aName2 
) throws SignDocException

Get the value of a string parameter with two parameter names.

This function does not set an error message.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
[in]aName2The second name of the parameter (case-sensitive).
Returns
The value of the parameter or null if the parameter is not set or is not a string parameter.
See also
setString2()
static int getType ( String  aName) throws SignDocException
static

Get the type of a parameter.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
Returns
The type of the parameter: t_undefined, t_boolean, t_integer, t_number, t_string, or t_string2.
synchronized void setBoolean ( String  aName,
boolean  aValue 
) throws SignDocException

Set a boolean parameter.

The following boolean parameters are available:

  • AddDecorations: Enable rendering of decorations of signature fields of PDF documents. If true, 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 set boolean parameter "UseModificationState" to true to compute the signature state more thoroughly.

    Enabling rendering of decorations can slow down SignDocDocument.renderPageAsImage() and SignDocDocument.renderPageAsSignDocImage() 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() and SignDocDocument.renderPageAsSignDocImage(). Setting string parameter (with two parameter names) "DecorationState" might solve these problems.

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

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

  • BlackAndWhite: true to force black and white output (1 bit per pixel), false to use RGB for PDF documents or to keep the pixel format of TIFF documents. The default value is false.
  • ForPrinting: true to enable rendering for printing, false to enable rendering for displaying. This may affect rendering of annotations in PDF documents.
  • HighQualityScaling: Quality for scaling pages of TIFF documents. true for high quality (slow), false for low quality (fast). The default value is false.
  • Interlaced: true to create an interlaced image (progressive encoding). The default value is false.
  • UseModificationState: true to check the modification state for signature fields of PDF documents (expensive), false to ignore the modification state. The default value is false. This parameter has an effect only if boolean parameter "Decorations" is true.

This function throws SignDocUnkownParameterException if aName is not the name of a boolean parameter.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
See also
getBoolean(), setInteger(), setNumber(), setString()
synchronized void setInteger ( String  aName,
int  aValue 
) throws SignDocException

Set an integer parameter.

The following integer parameters are available:

  • FirstPage: Render a range of pages. The value is the 1-based page number of the first page. "LastPage" must also be set. If both parameter are set to the same value, getInteger() will return that value for parameter "Page". Rendering ranges of pages is not yet implemented for TIFF documents.
  • Height: The height for automatic computation of the scaling factor to make the rendered image fit the specified height in pixels. If this parameter is set, floating-point number parameter "Scale" will be ignored.
  • LastPage: Render a range of pages. The value is the 1-based page number of the last page. "FirstPage" must also be set. If both parameter are set to the same value, getInteger() will return that value for parameter "Page". Rendering ranges of pages is not yet implemented for TIFF documents.
  • Page: Render a single page. The value is the 1-based page number of that page. Setting this parameter will set both "FirstPage" and "LastPage".
  • Width: The width for automatic computation of the scaling factor to make the rendered image fit the specified width in pixels. If this parameter is set, floating-point number parameter "Scale" will be ignored.

This function throws SignDocUnkownParameterException if aName is not the name of an integer parameter, SignDocInvalidValueException if aValue is invalid.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
See also
getInteger(), setBoolean(), setNumber(), setString()
synchronized void setNumber ( String  aName,
double  aValue 
) throws SignDocException

Set a floating-point number parameter.

The following floating-point number parameters are available:

  • Resolution: The resolution for rendering PDF documents. Setting this parameter is equivalent to setting both "ResolutionX" and "ResolutionY". See also floating-point number parameter "Scale".
  • ResolutionX: The horizontal resolution for rendering PDF documents. The value of this parameter will be ignored for TIFF documents as the resolution is computed automatically from the scaling factor and the document's resolution. If this parameter is not set, but "ResolutionY" is set, the value of parameter "ResolutionY" will be used for both the horizontal and the vertical resolution. If neither parameter is set, 96 DPI (subject to change) will be used for rendering PDF documents. See also floating-point number parameter "Scale".
  • ResolutionY: The vertical resolution for rendering PDF documents. The value of this parameter will be ignored for TIFF documents as the resolution is computed automatically from the scaling factor and the document's resolution. If this parameter is not set, but "ResolutionX" is set, the value of parameter "ResolutionX" will be used for both the horizontal and the vertical resolution. If neither parameter is set, 96 DPI (subject to change) will be used for rendering PDF documents. See also floating-point number parameter "Scale".
  • Scale: Scaling factor. There is no default value, ie, either this parameter or at least one of integer parameters "Height" and "Width" must be set. This parameter will be ignored if integer parameter "Height" or "Width" is set. See also floating-point number parameters "Resolution", "ResolutionX", and "ResolutionY".

This function throws SignDocUnkownParameterException if aName is not the name of a floating-point number parameter, SignDocInvalidValueException if aValue is invalid.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
See also
getNumber(), setBoolean(), setInteger(), setString()
synchronized void setString ( String  aName,
String  aValue 
) throws SignDocException

Set a string parameter.

The following string parameters are available:

  • Compression: Compression method. The following values are available:
    • "default": no compression for PDF documents, same compression as the source document for TIFF documents.
    • "none": no compression
    • "ccitt4": CCITT Group 4
    • "lzw": LZW
    • "rle": RLE
    • "zip": ZIP
    The default value is "default".
  • Format: The image format, "jpg", "png", "tiff", "gif", or "bmp". For SignDocDocument.renderPageAsImage(), this parameter must be set, there is no default value. For SignDocDocument.renderPageAsSignDocImage(), this parameter is ignored.

This function throws SignDocUnkownParameterException if aName is not the name of a string parameter, SignDocInvalidValueException if aValue is invalid.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
See also
getString(), setBoolean(), setInteger(), setNumber(), setString2()
synchronized void setString2 ( String  aName,
String  aName2,
String  aValue 
) throws SignDocException

Set a string parameter with two parameter names.

The following string parameters with two parameter names are available:

  • DecorationState: Set the decoration state for a single signature in a PDF document. aName2 is the name of the field (not checked by this function). The decorations set by this parameter are ignored unless boolean parameter "AddDecorations" is set to true. This parameter is ignored for rendering TIFF documents. The following values are available:
    • "auto": validate signature and choose appropriate decoration.
    • "empty": the signature field is not signed.
    • "ok": signature validated successfully.
    • "problem": signature validated mostly successfully, there is at least one problem.
    • "broken": signature is broken.
    Value "auto" will be assumed for all fields for which this parameter is set.

This function throws SignDocUnkownParameterException if aName is not the name of a string parameter with two parameter names, SignDocInvalidValueException if aValue is invalid.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
[in]aName2The second name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
See also
getString(), setBoolean(), setInteger(), setNumber(), setString()

Member Data Documentation

final int t_boolean = 1
static

Return value of getType(): Boolean.

See also
getBoolean(), setBoolean()
final int t_integer = 2
static

Return value of getType(): Integer.

See also
getInteger(), setInteger()
final int t_number = 3
static

Return value of getType(): Floating-point number.

See also
getNumber(), setNumber()
final int t_string = 4
static

Return value of getType(): String.

See also
getString(), setString()
final int t_string2 = 6
static

Return value of getType(): String (two parameter names).

See also
getString2(), setString2()
final int t_undefined = 0
static

Return value of getType(): The specified parameter is not defined.


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