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... | |
enum | DecorationState { ds_auto, ds_empty, ds_ok, ds_problem, ds_broken } |
Decoration state to be used for a signature. More... | |
Public Member Functions | |
SignDocRenderParameters () | |
Constructor. | |
SignDocRenderParameters (const SignDocRenderParameters &aSource) | |
Copy constructor. | |
~SignDocRenderParameters () | |
Destructor. | |
SignDocRenderParameters & | operator= (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 | setDecorationState (Encoding aEncoding, const std::string &aName, DecorationState aDecorationState) |
Set the decoration state for a single signature in a PDF document. | |
bool | setDecorationState (const wchar_t *aName, DecorationState aDecorationState) |
Set the decoration state for a single signature in a PDF document. | |
bool | getDecorationState (Encoding aEncoding, const std::string &aName, DecorationState &aDecorationState) const |
Get a value set by setDecorationState(). | |
bool | getDecorationState (const wchar_t *aName, DecorationState &aDecorationState) const |
Get a value set by setDecorationState(). | |
bool | setPrint (bool aPrint) |
Enable rendering for printing. | |
bool | getPrint (bool &aPrint) const |
Get the value set by setPrint(). | |
bool | setModificationState (bool aCheck) |
Enable getting the modification state. | |
bool | getModificationState (bool &aCheck) const |
Get the value set by setModificationState(). | |
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. |
Parameters for SignDocDocument::renderPageAsImage().
Compression for the rendered image.
Not all compressions are available for all formats. In fact, all these compressions are available for TIFF only.
Decoration state to be used for a signature.
Interlacing methods for setInterlacing().
de::softpro::doc::SignDocRenderParameters::SignDocRenderParameters | ( | ) | [inline] |
Constructor.
de::softpro::doc::SignDocRenderParameters::SignDocRenderParameters | ( | const SignDocRenderParameters & | aSource ) | [inline] |
Copy constructor.
[in] | aSource | The object to be copied. |
de::softpro::doc::SignDocRenderParameters::~SignDocRenderParameters | ( | ) | [inline] |
Destructor.
de::softpro::doc::SignDocRenderParameters::SignDocRenderParameters | ( | SIGNDOC_RenderParameters * | aP ) | [inline] |
Internal function.
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().
[in] | aHeight | The desired height (in pixels) of the rendered image. |
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().
[in] | aWidth | The desired width (in pixels) of the rendered image. |
[in] | aHeight | The desired height (in pixels) of the rendered image. |
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().
[in] | aWidth | The desired width (in pixels) of the rendered image. |
bool de::softpro::doc::SignDocRenderParameters::getCompression | ( | Compression & | aCompression ) | const [inline] |
Get the compression method.
[out] | aCompression | The compression method will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getDecorations | ( | bool & | aDecorations ) | const [inline] |
Get the value set by setDecorations().
[out] | aDecorations | The flag will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getDecorationState | ( | Encoding | aEncoding, |
const std::string & | aName, | ||
DecorationState & | aDecorationState | ||
) | const [inline] |
Get a value set by setDecorationState().
[in] | aEncoding | The encoding of aName. |
[in] | aName | The name of the field. |
[in] | aDecorationState | The value will be stored here. For fields for which setDecorationState() has not been called, ds_auto will be stored. |
bool de::softpro::doc::SignDocRenderParameters::getDecorationState | ( | const wchar_t * | aName, |
DecorationState & | aDecorationState | ||
) | const [inline] |
Get a value set by setDecorationState().
[in] | aName | The name of the field. |
[in] | aDecorationState | The value will be stored here. For fields for which setDecorationState() has not been called, ds_auto will be stored. |
bool de::softpro::doc::SignDocRenderParameters::getFitHeight | ( | int & | aHeight ) | const [inline] |
Get the height set by fitHeight().
[out] | aHeight | The height will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getFitRect | ( | int & | aWidth, |
int & | aHeight | ||
) | const [inline] |
bool de::softpro::doc::SignDocRenderParameters::getFitWidth | ( | int & | aWidth ) | const [inline] |
Get the width set by fitWidth().
[out] | aWidth | The width will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getFormat | ( | std::string & | aFormat ) | const [inline] |
Get the image format.
[out] | aFormat | The image format will be stored here. |
SIGNDOC_RenderParameters* de::softpro::doc::SignDocRenderParameters::getImpl | ( | ) | [inline] |
Internal function.
const SIGNDOC_RenderParameters* de::softpro::doc::SignDocRenderParameters::getImpl | ( | ) | const [inline] |
Internal function.
bool de::softpro::doc::SignDocRenderParameters::getInterlacing | ( | Interlacing & | aInterlacing ) | const [inline] |
Get the interlacing method.
[out] | aInterlacing | The interlacing mode will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getModificationState | ( | bool & | aCheck ) | const [inline] |
Get the value set by setModificationState().
[out] | aCheck | The flag will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getPage | ( | int & | aPage ) | const [inline] |
Get the number of the selected page.
[out] | aPage | The page number (1 for the first page) will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getPages | ( | int & | aFirst, |
int & | aLast | ||
) | const [inline] |
Get the selected range of page numbers.
[out] | aFirst | The first page number of the range (1 for the first page of the document) will be stored here. |
[out] | aLast | The last page number of the range (1 for the first page of the document) will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getPixelFormat | ( | PixelFormat & | aPixelFormat ) | const [inline] |
Get the pixel format.
[out] | aPixelFormat | The pixel format will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getPrint | ( | bool & | aPrint ) | const [inline] |
Get the value set by setPrint().
[out] | aPrint | The flag will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getQuality | ( | Quality & | aQuality ) | const [inline] |
Get the desired quality.
[out] | aQuality | The quality setting will be stored here. |
bool de::softpro::doc::SignDocRenderParameters::getResolution | ( | double & | aResX, |
double & | aResY | ||
) | const [inline] |
Get the resolution set by setResolution().
[out] | aResX | Horizontal resolution in DPI. |
[out] | aResY | Vertical resolution in DPI. |
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.
[out] | aZoom | The zoom factor will be stored here. |
SignDocRenderParameters& de::softpro::doc::SignDocRenderParameters::operator= | ( | const SignDocRenderParameters & | aSource ) | [inline] |
Assignment operator.
[in] | aSource | The source object. |
bool de::softpro::doc::SignDocRenderParameters::operator== | ( | const SignDocRenderParameters & | aRHS ) | const [inline] |
Compare against another SignDocRenderParameters object.
[in] | aRHS | The object to compare against. |
bool de::softpro::doc::SignDocRenderParameters::setCompression | ( | Compression | aCompression ) | [inline] |
Set the compression compression.
The initial value is c_default.
[in] | aCompression | The compression method. |
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:
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.
[in] | aDecorations | true to render decorations. |
bool de::softpro::doc::SignDocRenderParameters::setDecorationState | ( | const wchar_t * | aName, |
DecorationState | aDecorationState | ||
) | [inline] |
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 setFieldDecoration() has not been called.
Any values set with this function will be ignored for rendering TIFF documents.
[in] | aName | The name of the field. |
[in] | aDecorationState | The decoration state. |
bool de::softpro::doc::SignDocRenderParameters::setDecorationState | ( | Encoding | aEncoding, |
const std::string & | aName, | ||
DecorationState | aDecorationState | ||
) | [inline] |
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.
[in] | aEncoding | The encoding of aName. |
[in] | aName | The name of the field. |
[in] | aDecorationState | The decoration state. |
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.
[in] | aFormat | The desired format of the image ("jpg", "png", "tiff", or "bmp"). |
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.
[in] | aInterlacing | The interlacing method. |
bool de::softpro::doc::SignDocRenderParameters::setModificationState | ( | bool | aCheck ) | [inline] |
Enable getting the modification state.
The default value is false.
[in] | aCheck | true to check the modification state for PDF documents, false to ignore the modification state. |
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.
[in] | aPage | The page number (1 for the first page). |
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.
[in] | aFirst | The first page number of the range (1 for the first page of the document). |
[in] | aLast | The last page number of the range (1 for the first page of the document). |
bool de::softpro::doc::SignDocRenderParameters::setPixelFormat | ( | PixelFormat | aPixelFormat ) | [inline] |
Set the pixel format.
The initial value is pf_default.
[in] | aPixelFormat | The pixel format. |
bool de::softpro::doc::SignDocRenderParameters::setPrint | ( | bool | aPrint ) | [inline] |
Enable rendering for printing.
The default value is false (render for displaying).
[in] | aPrint | true to render for printing, false to render for displaying. |
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.
[in] | aQuality | The desired quality. |
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.
[in] | aResX | Horizontal resolution in DPI. |
[in] | aResY | Vertical resolution in DPI. |
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().
[in] | aZoom | The zoom factor. |