Public Types | Public Member Functions

de::softpro::doc::SignDocRenderParameters Class Reference

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

#include <SignDocSDK-cpp.h>

Public Types

enum  Interlacing { i_off, i_on }
 

Interlacing methods for setInterlacing().

More...
enum  Quality { q_low, q_high }
 

Quality of the rendered image.

More...
enum  PixelFormat { pf_default, pf_bw }
 

Pixel format for the rendered image.

More...
enum  Compression {
  c_default, c_none, c_group4, c_lzw,
  c_rle, c_zip
}
 

Compression for the rendered image.

More...

Public Member Functions

 SignDocRenderParameters ()
 Constructor.
 SignDocRenderParameters (const SignDocRenderParameters &aSource)
 Copy constructor.
 ~SignDocRenderParameters ()
 Destructor.
SignDocRenderParametersoperator= (const SignDocRenderParameters &aSource)
 Assignment operator.
bool setPage (int aPage)
 Select the page to be rendered.
bool getPage (int &aPage) const
 Get the number of the selected page.
bool setPages (int aFirst, int aLast)
 Select a range of pages to be rendered.
bool getPages (int &aFirst, int &aLast) const
 Get the selected range of page numbers.
bool setResolution (double aResX, double aResY)
 Set the resolution for rendering PDF documents.
bool getResolution (double &aResX, double &aResY) const
 Get the resolution set by setResolution().
bool setZoom (double aZoom)
 Set the zoom factor for rendering.
bool getZoom (double &aZoom) const
 Get the zoom factor set by setZoom().
bool fitWidth (int aWidth)
 Set the width for automatic computation of the zoom factor to make the rendered image fit the specified width.
bool getFitWidth (int &aWidth) const
 Get the width set by fitWidth().
bool fitHeight (int aHeight)
 Set the height for automatic computation of the zoom factor to make the rendered image fit the specified height.
bool getFitHeight (int &aHeight) const
 Get the height set by fitHeight().
bool fitRect (int aWidth, int aHeight)
 Set the width and height for automatic computation of the zoom factor to make the rendered image fit the specified width and height.
bool getFitRect (int &aWidth, int &aHeight) const
 Get the width and height set by fitRect().
bool setFormat (const std::string &aFormat)
 Set the image format.
bool getFormat (std::string &aFormat) const
 Get the image format.
bool setInterlacing (Interlacing aInterlacing)
 Set the interlacing method.
bool getInterlacing (Interlacing &aInterlacing) const
 Get the interlacing method.
bool setQuality (Quality aQuality)
 Set the desired quality.
bool getQuality (Quality &aQuality) const
 Get the desired quality.
bool setPixelFormat (PixelFormat aPixelFormat)
 Set the pixel format.
bool getPixelFormat (PixelFormat &aPixelFormat) const
 Get the pixel format.
bool setCompression (Compression aCompression)
 Set the compression compression.
bool getCompression (Compression &aCompression) const
 Get the compression method.
bool setDecorations (bool aDecorations)
 Enable rendering of decorations.
bool getDecorations (bool &aDecorations) const
 Get the value set by setDecorations().
bool setPrint (bool aPrint)
 Enable rendering for printing.
bool getPrint (bool &aPrint) const
 Get the value set by setPrint().
bool operator== (const SignDocRenderParameters &aRHS) const
 Compare against another SignDocRenderParameters object.
 SignDocRenderParameters (SIGNDOC_RenderParameters *aP)
 Internal function.
SIGNDOC_RenderParameters * getImpl ()
 Internal function.
const SIGNDOC_RenderParameters * getImpl () const
 Internal function.
void setImpl (SIGNDOC_RenderParameters *aP)
 Internal function.

Detailed Description

Parameters for SignDocDocument::renderPageAsImage().


Member Enumeration Documentation

Compression for the rendered image.

Not all compressions are available for all formats. In fact, all these compressions are available for TIFF only.

Enumerator:
c_default 

no compression for PDF documents, same as document for TIFF documents

c_none 

no compression

c_group4 

CCITT Group 4.

c_lzw 

LZW.

c_rle 

RLE.

c_zip 

ZIP.

Interlacing methods for setInterlacing().

Enumerator:
i_off 

No interlacing.

i_on 

Enable Interlacing.

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

Pixel format for the rendered image.

Enumerator:
pf_default 

RGB for PDF documents, same as document for TIFF documents.

pf_bw 

Black and white (1 bit per pixel).

Quality of the rendered image.

Enumerator:
q_low 

Low quality, fast.

q_high 

High quality, slow.


Constructor & Destructor Documentation

de::softpro::doc::SignDocRenderParameters::SignDocRenderParameters (  ) [inline]

Constructor.

de::softpro::doc::SignDocRenderParameters::SignDocRenderParameters ( const SignDocRenderParameters aSource ) [inline]

Copy constructor.

Parameters:
[in]aSourceThe object to be copied.
de::softpro::doc::SignDocRenderParameters::~SignDocRenderParameters (  ) [inline]

Destructor.

de::softpro::doc::SignDocRenderParameters::SignDocRenderParameters ( SIGNDOC_RenderParameters *  aP ) [inline]

Internal function.


Member Function Documentation

bool de::softpro::doc::SignDocRenderParameters::fitHeight ( int  aHeight ) [inline]

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

Parameters:
[in]aHeightThe desired height (in pixels) of the rendered image.
Returns:
true if successful, false if the specified height is invalid.
See also:
fitRect(), fitWidth(), getFitHeight(), setZoom(), SignDocDocument::computeZoom()
bool de::softpro::doc::SignDocRenderParameters::fitRect ( int  aWidth,
int  aHeight 
) [inline]

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

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(), getFitRect(), setZoom(), SignDocDocument::computeZoom()
bool de::softpro::doc::SignDocRenderParameters::fitWidth ( int  aWidth ) [inline]

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

Parameters:
[in]aWidthThe desired width (in pixels) of the rendered image.
Returns:
true if successful, false if the specified width is invalid.
See also:
fitHeight(), fitRect(), getFitWidth(), setZoom(), SignDocDocument::computeZoom()
bool de::softpro::doc::SignDocRenderParameters::getCompression ( Compression aCompression ) const [inline]

Get the compression method.

Parameters:
[out]aCompressionThe compression method will be stored here.
Returns:
true if successful. This function never fails.
See also:
setCompression()
bool de::softpro::doc::SignDocRenderParameters::getDecorations ( bool &  aDecorations ) const [inline]

Get the value set by setDecorations().

Parameters:
[out]aDecorationsThe flag will be stored here.
Returns:
true if successful. This function never fails.
See also:
getPrint(), setDecorations()
bool de::softpro::doc::SignDocRenderParameters::getFitHeight ( int &  aHeight ) const [inline]

Get the height set by fitHeight().

Parameters:
[out]aHeightThe height will be stored here.
Returns:
true if successful, false if fitHeight() has not been called successfully or has been overridden.
See also:
fitHeight()
bool de::softpro::doc::SignDocRenderParameters::getFitRect ( int &  aWidth,
int &  aHeight 
) const [inline]

Get the width and height set by fitRect().

Parameters:
[out]aWidthThe width will be stored here.
[out]aHeightThe height will be stored here.
Returns:
true if successful, false if fitRect() has not been called successfully or has been overridden.
See also:
fitRect()
bool de::softpro::doc::SignDocRenderParameters::getFitWidth ( int &  aWidth ) const [inline]

Get the width set by fitWidth().

Parameters:
[out]aWidthThe width will be stored here.
Returns:
true if successful, false if fitWidth() has not been called successfully or has been overridden.
See also:
fitWidth()
bool de::softpro::doc::SignDocRenderParameters::getFormat ( std::string &  aFormat ) const [inline]

Get the image format.

Parameters:
[out]aFormatThe image format will be stored here.
Returns:
true if successful, false if setFormat() has not been called successfully.
See also:
setFormat()
const SIGNDOC_RenderParameters* de::softpro::doc::SignDocRenderParameters::getImpl (  ) const [inline]

Internal function.

SIGNDOC_RenderParameters* de::softpro::doc::SignDocRenderParameters::getImpl (  ) [inline]

Internal function.

bool de::softpro::doc::SignDocRenderParameters::getInterlacing ( Interlacing aInterlacing ) const [inline]

Get the interlacing method.

Parameters:
[out]aInterlacingThe interlacing mode will be stored here.
Returns:
true if successful. This function never fails.
See also:
setInterlacing()
bool de::softpro::doc::SignDocRenderParameters::getPage ( int &  aPage ) const [inline]

Get the number of the selected page.

Parameters:
[out]aPageThe page number (1 for the first page) will be stored here.
Returns:
true if successful, false if setPage() has not been called successfully or if multiple pages have been selected with setPages()
See also:
getPages(), setPage()
bool de::softpro::doc::SignDocRenderParameters::getPages ( int &  aFirst,
int &  aLast 
) const [inline]

Get the selected range of page numbers.

Parameters:
[out]aFirstThe first page number of the range (1 for the first page of the document) will be stored here.
[out]aLastThe last page number of the range (1 for the first page of the document) will be stored here.
Returns:
true if successful, false if setPage() and setPages() have not been called.
See also:
getPage(), setPages()
bool de::softpro::doc::SignDocRenderParameters::getPixelFormat ( PixelFormat aPixelFormat ) const [inline]

Get the pixel format.

Parameters:
[out]aPixelFormatThe pixel format will be stored here.
Returns:
true if successful. This function never fails.
See also:
setPixelFormat()
bool de::softpro::doc::SignDocRenderParameters::getPrint ( bool &  aPrint ) const [inline]

Get the value set by setPrint().

Parameters:
[out]aPrintThe flag will be stored here.
Returns:
true if successful. This function never fails.
See also:
getDecorations(), setPrint()
bool de::softpro::doc::SignDocRenderParameters::getQuality ( Quality aQuality ) const [inline]

Get the desired quality.

Parameters:
[out]aQualityThe quality setting will be stored here.
Returns:
true if successful. This function never fails.
See also:
setQuality()
bool de::softpro::doc::SignDocRenderParameters::getResolution ( double &  aResX,
double &  aResY 
) const [inline]

Get the resolution set by setResolution().

Parameters:
[out]aResXHorizontal resolution in DPI.
[out]aResYVertical resolution in DPI.
Returns:
true if successful, false if setResolution() has not been called successfully.
See also:
setResolution()
bool de::softpro::doc::SignDocRenderParameters::getZoom ( double &  aZoom ) const [inline]

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.

Parameters:
[out]aZoomThe zoom factor will be stored here.
Returns:
true if successful, false if setZoom() has not been called successfully or has been overridden.
See also:
fitHeight(), fitRect(), fitWidth(), setZoom(), SignDocDocument::computeZoom()
SignDocRenderParameters& de::softpro::doc::SignDocRenderParameters::operator= ( const SignDocRenderParameters aSource ) [inline]

Assignment operator.

Parameters:
[in]aSourceThe source object.
bool de::softpro::doc::SignDocRenderParameters::operator== ( const SignDocRenderParameters aRHS ) const [inline]

Compare against another SignDocRenderParameters object.

Parameters:
[in]aRHSThe object to compare against.
Returns:
true iff this object compares equal to aRHS.
bool de::softpro::doc::SignDocRenderParameters::setCompression ( Compression  aCompression ) [inline]

Set the compression compression.

The initial value is c_default.

Parameters:
[in]aCompressionThe compression method.
Returns:
true if successful, false if the argument is invalid.
See also:
getCompression()
bool de::softpro::doc::SignDocRenderParameters::setDecorations ( bool  aDecorations ) [inline]

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)

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.
Returns:
true if successful. This function never fails.
See also:
getDecorations(), setPrint()
bool de::softpro::doc::SignDocRenderParameters::setFormat ( const std::string &  aFormat ) [inline]

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", or "bmp").
Returns:
true if successful, false if the image format is invalid.
See also:
getFormat(), setInterlacing()
void de::softpro::doc::SignDocRenderParameters::setImpl ( SIGNDOC_RenderParameters *  aP ) [inline]

Internal function.

bool de::softpro::doc::SignDocRenderParameters::setInterlacing ( Interlacing  aInterlacing ) [inline]

Set the interlacing method.

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

Parameters:
[in]aInterlacingThe interlacing method.
Returns:
true if successful, false if the interlacing mode is invalid.
See also:
getInterlacing(), setFormat()
bool de::softpro::doc::SignDocRenderParameters::setPage ( int  aPage ) [inline]

Select the page to be rendered.

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

Parameters:
[in]aPageThe page number (1 for the first page).
Returns:
true if successful, false if the page number is invalid.
See also:
getPage(), setPages()
bool de::softpro::doc::SignDocRenderParameters::setPages ( int  aFirst,
int  aLast 
) [inline]

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".
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).
Returns:
true if successful, false if the page numbers are invalid.
See also:
getPages(), setFormat(), setPage()
Todo:
implement for TIFF documents
bool de::softpro::doc::SignDocRenderParameters::setPixelFormat ( PixelFormat  aPixelFormat ) [inline]

Set the pixel format.

The initial value is pf_default.

Parameters:
[in]aPixelFormatThe pixel format.
Returns:
true if successful, false if the argument is invalid.
See also:
getPixelFormat()
bool de::softpro::doc::SignDocRenderParameters::setPrint ( bool  aPrint ) [inline]

Enable rendering for printing.

The default value is false (render for displaying).

Parameters:
[in]aPrinttrue to render for printing, false to render for displaying.
Returns:
true if successful. This function never fails.
See also:
getPrint(), setDecorations()
bool de::softpro::doc::SignDocRenderParameters::setQuality ( Quality  aQuality ) [inline]

Set the desired quality.

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

Parameters:
[in]aQualityThe desired quality.
Returns:
true if successful, false if the argument is invalid.
See also:
getQuality()
bool de::softpro::doc::SignDocRenderParameters::setResolution ( double  aResX,
double  aResY 
) [inline]

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.

Parameters:
[in]aResXHorizontal resolution in DPI.
[in]aResYVertical resolution in DPI.
Returns:
true if successful, false if the resolution is invalid.
See also:
getResolution(), setZoom()
bool de::softpro::doc::SignDocRenderParameters::setZoom ( double  aZoom ) [inline]

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

Parameters:
[in]aZoomThe zoom factor.
Returns:
true if successful, false if the zoom factor is invalid.
See also:
fitHeight(), fitRect(), fitWidth(), getZoom()

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