SignDoc SDK (.NET without exceptions)  5.0.0
SignDocRenderParameters Class Reference

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

Public Member Functions

 SignDocRenderParameters ()
 Constructor. More...
 
 SignDocRenderParameters (SignDocRenderParameters aSource)
 Copy constructor. More...
 
 ~SignDocRenderParameters ()
 Destructor. More...
 
 !SignDocRenderParameters ()
 Finalizer. More...
 
void clear ()
 Reset all parameters to their initial values. More...
 
void setBoolean (out ReturnCode aReturnCode, string aName, bool aValue)
 Set a boolean parameter. More...
 
void setInteger (out ReturnCode aReturnCode, string aName, int aValue)
 Set an integer parameter. More...
 
void setNumber (out ReturnCode aReturnCode, string aName, double aValue)
 Set a floating-point number parameter. More...
 
void setString (out ReturnCode aReturnCode, string aName, string aValue)
 Set a string parameter. More...
 
void setString2 (out ReturnCode aReturnCode, string aName, string aName2, string aValue)
 Set a string parameter with two parameter names. More...
 
bool? getBoolean (string aName)
 Get the value of a boolean parameter. More...
 
int? getInteger (string aName)
 Get the value of an integer parameter. More...
 
double? getNumber (string aName)
 Get the value of a floating-point number parameter. More...
 
string getString (string aName)
 Get the value of a string parameter. More...
 
string getString2 (string aName, string aName2)
 Get the value of a string parameter with two parameter names. More...
 
string getErrorMessage ()
 Get an error message for the last function call. More...
 
bool equals (SignDocRenderParameters aRHS)
 Compare against another SignDocRenderParameters object. More...
 

Static Public Member Functions

static RenderParameterType getType (string aName)
 Get the type of a parameter. More...
 

Detailed Description

Constructor & Destructor Documentation

Constructor.

Copy constructor.

Parameters
[in]aSourceThe object to be copied.
Returns
The new object.

Destructor.

Finalizer.

Member Function Documentation

void clear ( )

Reset all parameters to their initial values.

bool equals ( SignDocRenderParameters  aRHS)

Compare against another SignDocRenderParameters object.

Parameters
[in]aRHSThe object to compare against.
Returns
true iff this object compares equal to aRHS.
bool? getBoolean ( string  aName)

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()
string getErrorMessage ( )

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.
int? getInteger ( string  aName)

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()
double? getNumber ( string  aName)

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()
string getString ( string  aName)

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()
string getString2 ( string  aName,
string  aName2 
)

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 RenderParameterType getType ( string  aName)
static

Get the type of a parameter.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
Returns
The type of the parameter.
void setBoolean ( out ReturnCode  aReturnCode,
string  aName,
bool  aValue 
)

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.
Parameters
[out]aReturnCodeThe return code, ReturnCode.OK if successful, ReturnCode.UnknownParameter if aName is not the name of a boolean parameter.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
See also
getBoolean(), setInteger(), setNumber(), setString()
void setInteger ( out ReturnCode  aReturnCode,
string  aName,
int  aValue 
)

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.
Parameters
[out]aReturnCodeThe return code, ReturnCode.OK if successful, ReturnCode.UnknownParameter if aName is not the name of an integer parameter, ReturnCode.InvalidValue if aValue is invalid.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
See also
getInteger(), setBoolean(), setNumber(), setString()
void setNumber ( out ReturnCode  aReturnCode,
string  aName,
double  aValue 
)

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".
Parameters
[out]aReturnCodeThe return code, ReturnCode.OK if successful, ReturnCode.UnknownParameter if aName is not the name of a floating-point number parameter, ReturnCode.InvalidValue if aValue is invalid.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
See also
getNumber(), setBoolean(), setInteger(), setString()
void setString ( out ReturnCode  aReturnCode,
string  aName,
string  aValue 
)

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.
Parameters
[out]aReturnCodeThe return code, ReturnCode.OK if successful, ReturnCode.UnknownParameter if aName is not the name of a string parameter, ReturnCode.InvalidValue if aValue is invalid.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
See also
getString(), setBoolean(), setInteger(), setNumber(), setString2()
void setString2 ( out ReturnCode  aReturnCode,
string  aName,
string  aName2,
string  aValue 
)

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.
Parameters
[out]aReturnCodeThe return code, ReturnCode.OK if successful, ReturnCode.UnknownParameter if aName is not the name of a string parameter with two parameter names, ReturnCode.InvalidValue if aValue is invalid.
[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()

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