Parameters for SignDocDocument.renderPageAsImage(). More...
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. |
Parameters for SignDocDocument.renderPageAsImage().
de.softpro.doc.SignDocRenderParameters.SignDocRenderParameters | ( | ) | throws SignDocException |
Constructor.
synchronized boolean de.softpro.doc.SignDocRenderParameters.equals | ( | SignDocRenderParameters | aRHS ) | throws SignDocException |
Compare against another SignDocRenderParameters object.
[in] | aRHS | The object to compare against. |
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.
[in] | aHeight | The desired height (in pixels) of the rendered image. |
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.
[in] | aWidth | The desired width (in pixels) of the rendered image. |
[in] | aHeight | The desired height (in pixels) of the rendered image. |
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.
[in] | aWidth | The desired width (in pixels) of the rendered image. |
synchronized int de.softpro.doc.SignDocRenderParameters.getCompression | ( | ) | throws SignDocException |
Get the compression method.
synchronized boolean de.softpro.doc.SignDocRenderParameters.getDecorations | ( | ) | throws SignDocException |
Get the value set by setDecorations().
synchronized int de.softpro.doc.SignDocRenderParameters.getDecorationState | ( | String | aName ) | throws SignDocException |
Get a value set by setDecorationState().
[in] | aName | The name of the field. |
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.
synchronized int de.softpro.doc.SignDocRenderParameters.getFitHeight | ( | ) | throws SignDocException |
Get the height set by fitHeight().
Throws SignDocParameterNotSetException if setFitHeight() has not been called successfully.
synchronized int de.softpro.doc.SignDocRenderParameters.getFitRectHeight | ( | ) | throws SignDocException |
Get the height set by fitRect().
Throws SignDocParameterNotSetException if setFitRect() has not been called successfully.
synchronized int de.softpro.doc.SignDocRenderParameters.getFitRectWidth | ( | ) | throws SignDocException |
Get the width set by fitRect().
Throws SignDocParameterNotSetException if setFitRect() has not been called successfully.
synchronized int de.softpro.doc.SignDocRenderParameters.getFitWidth | ( | ) | throws SignDocException |
Get the width set by fitWidth().
Throws SignDocParameterNotSetException if getFitWidth() has not been called successfully.
synchronized String de.softpro.doc.SignDocRenderParameters.getFormat | ( | ) | throws SignDocException |
synchronized int de.softpro.doc.SignDocRenderParameters.getInterlacing | ( | ) | throws SignDocException |
Get the interlacing method.
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.
synchronized boolean de.softpro.doc.SignDocRenderParameters.getModificationState | ( | ) | throws SignDocException |
Get the value set by 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().
synchronized int de.softpro.doc.SignDocRenderParameters.getPixelFormat | ( | ) | throws SignDocException |
synchronized boolean de.softpro.doc.SignDocRenderParameters.getPrint | ( | ) | throws SignDocException |
Get the value set by setPrint().
synchronized int de.softpro.doc.SignDocRenderParameters.getQuality | ( | ) | throws SignDocException |
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.
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.
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.
synchronized void de.softpro.doc.SignDocRenderParameters.setCompression | ( | int | aCompression ) | throws SignDocException |
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:
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. |
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.
[in] | aName | The name of the field. |
[in] | aDecorationState | The decoration state: ds_auto, ds_empty, ds_ok, ds_problem, or ds_broken. |
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.
[in] | aFormat | The desired format of the image ("jpg", "png", "tiff", "gif", "bmp", or "bmp3"). |
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.
synchronized void de.softpro.doc.SignDocRenderParameters.setModificationState | ( | boolean | aCheck ) | throws SignDocException |
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. |
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.
[in] | aPage | The page number (1 for the first page). |
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.
Throws SignDocInvalidArgumentException if the page numbers are invalid.
[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). |
synchronized void de.softpro.doc.SignDocRenderParameters.setPixelFormat | ( | int | aPixelFormat ) | throws SignDocException |
Set the pixel format.
The initial value is pf_default.
[in] | aPixelFormat | The pixel format (pf_default or pf_bw). |
synchronized void de.softpro.doc.SignDocRenderParameters.setPrint | ( | boolean | aPrint ) | throws SignDocException |
Enable rendering for printing.
The default value is false (render for displaying).
[in] | aPrint | true to render for printing, false to render for displaying. |
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.
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.
[in] | aResX | Horizontal resolution in DPI. |
[in] | aResY | Vertical resolution in DPI. |
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.
[in] | aZoom | The zoom factor. |
final int de.softpro.doc.SignDocRenderParameters.c_default = 0 [static] |
Compression method for setCompression(): no compression for PDF documents, same as document for TIFF documents.
final int de.softpro.doc.SignDocRenderParameters.c_group4 = 2 [static] |
Compression method for setCompression(): CCITT Group 4.
final int de.softpro.doc.SignDocRenderParameters.c_lzw = 3 [static] |
Compression method for setCompression(): LZW.
final int de.softpro.doc.SignDocRenderParameters.c_none = 1 [static] |
Compression method for setCompression(): no compression.
final int de.softpro.doc.SignDocRenderParameters.c_rle = 4 [static] |
Compression method for setCompression(): RLE.
final int de.softpro.doc.SignDocRenderParameters.c_zip = 5 [static] |
Compression method for setCompression(): ZIP.
final int de.softpro.doc.SignDocRenderParameters.ds_auto = 0 [static] |
Decoration state to be used for a signature: Validate signature and choose appropriate decoration.
final int de.softpro.doc.SignDocRenderParameters.ds_broken = 4 [static] |
Decoration state to be used for a signature: Signature is broken.
final int de.softpro.doc.SignDocRenderParameters.ds_empty = 1 [static] |
Decoration state to be used for a signature: Not signed.
final int de.softpro.doc.SignDocRenderParameters.ds_ok = 2 [static] |
Decoration state to be used for a signature: Signature validated successfully.
final int de.softpro.doc.SignDocRenderParameters.ds_problem = 3 [static] |
Decoration state to be used for a signature: Signature has at least one problem.
final int de.softpro.doc.SignDocRenderParameters.i_off = 0 [static] |
Interlacing method for setInterlacing(): No interlacing.
final int de.softpro.doc.SignDocRenderParameters.i_on = 1 [static] |
Interlacing method for setInterlacing(): Enable interlaving.
A suitable interlacing method for the chosen image format will be used.
final int de.softpro.doc.SignDocRenderParameters.pf_bw = 1 [static] |
Pixel format for setPixelFormat(): black and white (1 bit per pixel).
final int de.softpro.doc.SignDocRenderParameters.pf_default = 0 [static] |
Pixel format for setPixelFormat(): RGB for PDF documents, same as document for TIFF documents.
final int de.softpro.doc.SignDocRenderParameters.q_high = 1 [static] |
Quality setting for setQuality(): high quality, slow.
final int de.softpro.doc.SignDocRenderParameters.q_low = 0 [static] |
Quality setting for setQuality(): low quality, fast.