SignDoc SDK (C++)  5.0.2.22
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Friends Pages
The signdocsdk tool

The signdocsdk tool is a command-line wrapper for SignDoc SDK.

Running the signdocsdk tool

The signdocsdk tool is invoked either with the -i option to run commands interactively or with commands and their arguments specified on the command line. Commands on the command line are separated with a command-line argument consisting of just a ";" (which must be escaped in Unix shells).

Additionally, variables can be defined with -d NAME=VALUE. Examples:

signdocsdk -i
signdocsdk dl.load -f test.pdf \; d.f.list
signdocsdk -d file=test.pdf run -v test.sdk

To enable editing and history on Linux, use rlwrap:

rlwrap signdocsdk -i

Contexts

SignDoc SDK objects are stored in "contexts". For instance, a SignDocDocument context holds a SignDocDocument object. Contexts are named, each type of context (ie, each SignDoc SDK class) has its own namespace. There is a "current context" for each type of context, most commands work on the current context.

Splitting lines

The run command reads commands from a file, interactive mode reads from standard input. In both cases, lines are split into a command and its arguments at white space (space and tab). The double quote character (") is used for quoting, the backslash for escaping. The following characters are available after a backslash:

n
newline
r
carriage return
"
double quote
\
backslash

An unquoted argument starting with a dollar sign is a reference to a variable. The name of the variable consists of the characters following the dollar sign. Use the set command to set and concatenate variables. Variable references cannot be used on the command line.

Output

Most commands that show values quote them such that the printed values can be used as input according to Splitting lines.

Commands that show a single value store that value in variable r (which can be used as $r).

Commands

All commands for a certain type of context start with the same prefix:

a.
SignDocAnnotation
b.
blob
c.
SignDocCertificate
clp.
SignDocCleanParameters
csp.
SignDocCheckSignatureParameters
d.
SignDocDocument
dl.
SignDocDocumentLoader
f.
SignDocField
i.
SignDocImage
ip.
SignDocImageParameters
mp.
SignDocMatchParameters
mr.
SignDocMatchResult
rp.
SignDocRenderParameters
sd.
SignDocSignatureData
sig.
SignDocSignature
sp.
SignDocSignatureParameters
tfa.
SignDocTextFieldAttributes
vp.
SignDocVerificationParameters
vr.
SignDocVerificationResult

You can also use the class name followed by a dot as prefix.

Some commands have another prefix for grouping:

d.a.
SignDocDocument: annotations
d.f.
SignDocDocument: fields
d.p.
SignDocDocument: properties
f.csv.
SignDocField: certificate seed values
f.sv.
SignDocField: seed values
f.w.
SignDocField: widget selected by f.widget

Commands containing dashes can also be given using CamelCase, a sequence of upper-case letters (except after a dot) will be translated to a dash followed by the lower-case version of those letters:

  • a.BorderLineWidth => a.border-line-width
  • f.csv.SubjectDN => f.csv.subject-dn
  • f.sv.AddRevInfo => f.sv.add-rev-info

SignDocAnnotation

a.bbox

a.bbox

Show the bounding box of the current SignDocAnnotation context.

a.bg-color

a.bg-color COLOR

Set the background color of the current SignDocAnnotation context to COLOR.

COLOR is either a single integer (0 through 255) or a tuple of three integers (0 through 255) RED,GREEN,BLUE.

a.border-color

a.border-color COLOR

Set the border color of the current SignDocAnnotation context to COLOR.

COLOR is either a single integer (0 through 255) or a tuple of three integers (0 through 255) RED,GREEN,BLUE.

a.border-line-width

a.border-line-width WIDTH

Set the border line width of the current SignDocAnnotation context to WIDTH points.

a.color

a.color COLOR

Set the foreground color of the current SignDocAnnotation context to COLOR.

COLOR is either a single integer (0 through 255) or a tuple of three integers (0 through 255) RED,GREEN,BLUE.

a.description

a.description TEXT LANG

Set the description of the current SignDocAnnotation context to TEXT with language identifier LANG (RFC 3066).

a.flags

a.flags FLAGS

Set the annotation flags of the current SignDocAnnotation context to FLAGS (a hexadecimal number, TODO).

a.font

a.font

Show the font name and the font size of the current SignDocAnnotation context.

a.image

a.image [FLAGS] [-b BLOB]

Set the image of the current SignDocAnnotation context from blob context BLOB or the current blob context if -b is not used. The following flags are available:

-keep-aspect-ratio
Keep the aspect ratio of the image
-brightest-transparent
White or the brightest color of the palette will be made transparent

a.line-ending

a.line-ending LE

Set the line ending style of the current SignDocAnnotation context to LE (none or arrow).

a.line-width

a.line-width WIDTH

Set the line width of the current SignDocAnnotation context to WIDTH points.

a.list

a.list

List all SignDocAnnotation contexts.

a.name

a.name [NAME]

Show the annotation name of the current SignDocAnnotation context or set it to NAME.

a.opacity

a.opacity OPACITY

Set the opacity of the current SignDocAnnotation context to OPACITY (0.0 through 1.0).

a.page

a.page

Show the page number of the current SignDocAnnotation context.

a.point

a.point X Y

Add a point to the current stroke of the current SignDocAnnotation context.

a.show

a.show

Show these values of the current SignDocAnnotation context:

  • annotation name
  • page number
  • bounding box (if available)
  • plain text (if available)
  • font name and size (if available)

a.select

a.select [NAME]

Select a SignDocAnnotation context. Initially, no SignDocAnnotation context is selected. Without argument, show which SignDocAnnotation context is selected.

a.stroke

a.stroke

Start a new stroke in the current SignDocAnnotation context.

a.text

a.text [PLAIN_TEXT FONT_NAME FONT_SIZE [HALIGNMENT]]

Show the plain text of the current SignDocAnnotation context or set it to PLAIN_TEXT with font name FONT_NAME, font size FONT_SIZE, and horizontal alignment HALIGNMENT (left, center, right, the default value is left).

Blob

b.clone

b.clone NAME

Clone the current blob context and store the clone in blob context NAME.

b.list

b.list

List all blob contexts.

b.load

b.load FILE
b.load -f FILE

Load file FILE into the current blob context.

b.load-blobs

b.load-blobs BLOB FILE.SUFFIX

Load blob context BLOB-0 from file FILE-0.SUFFIX (if that file exists), load blob context BLOB-1 from file FILE-1.SUFFIX, and so on, until reaching a non-existing file. The sequence starts at 0 or 1, depending on the existence of file FILE-0.SUFFIX.

b.save

b.save FILE

Save the current blob context into file FILE.

b.save-blobs

b.save-blobs BLOB FILE.SUFFIX

Save blob context BLOB-0 into file FILE-0.SUFFIX (if blob context BLOB-0 exists), save blob context BLOB-1 into file FILE-1.SUFFIX, and so on, until reaching a non-existing blob context name. The sequence starts at 0 or 1, depending on the existence of BLOB-0.

b.select

b.select [NAME]

Select blob context. The initial value is "default". Without argument, show which blob context is selected. New blobs are initially empty.

b.show

b.show [FLAGS] [BLOB]

Show blob context BLOB or the blob in the current blob context if BLOB is missing. If no flag is used, the output format will depend on the contents (hexadecimal or text).

The following flags are available:

-cert
Show as certificate like c.show
-hex
Show as hexadecimal dump
-text
Show as text

SignDocCertificate

c.cert

c.cert [INDEX]

Select certicate INDEX (0-based) of the current SignDocCertificate context. Without argument, show which certificate is selected (0-based index or -1 for all certificates).

c.clear

c.clear

Remove any certificates from the current SignDocCertificate context.

c.clone

c.clone NAME

Clone the current SignDocCertificate context and store the clone in SignDocCertificate context NAME.

c.count

c.count

Show the number of certificates in the current SignDocCertificate context.

c.encoded-issuer

c.encoded-issuer -b [BLOB]
c.encoded-issuer -f FILE

Store the encoded issuer of the current SignDocCertificate context into blob BLOB or into file FILE. If -b is used without argument the current blob context will be used.

c.encoded-subject

c.encoded-subject -b [BLOB]
c.encoded-subject -f FILE

Store the encoded subject of the current SignDocCertificate context into blob BLOB or into file FILE. If -b is used without argument the current blob context will be used.

c.error

c.error

Show the error message for the most recent operation on the current SignDocCertificate context.

c.is-ca

c.is-ca

Show the CA bit of the currently selected certificate of the current SignDocCertificate context (true or false).

c.is-self-signed

c.is-self-signed

Show whether the currently selected certificate of the current SignDocCertificate context is self-signed (true or false).

c.is-valid-for-signing

c.is-valid-for-signing [-sp [SP]]

Show whether the currently selected certificate of the current SignDocCertificate context is time-valid and has suitable key usage (true or false).

SP is the name of a SignDocSignatureParameters context. If -sp is used without SP, the current SignDocSignatureParameters context will be used. If -sp is not specified, no SignDocSignatureParameters context will be used.

See also c.error.

c.issuer-cn

c.issuer-cn

Show the issuer's common name of the currently selected certificate of the current SignDocCertificate context.

c.key-algo

c.key-algo

Show the key algorithm (in human-readable form) of the currently selected certificate of the current SignDocCertificate context.

c.key-algo-oid

c.key-algo-oid

Show the key algorithm (as object identifier) of the currently selected certificate of the current SignDocCertificate context.

c.label

c.label

Show the PEM label of the currently selected certificate of the current SignDocCertificate context.

c.list

c.list

List all SignDocCertificate contexts.

c.load

c.load [FLAGS] -b [BLOB]
c.load [FLAGS] -f FILE

Load blob context BLOB or file FILE into the current SignDocCertificate context. If -b is used without argument the current blob context will be used.

The following flags are available:

-add
Do not remove certificates before loading

c.not-after

c.not-after

Show the notAfter value of the currently selected certificate of the current SignDocCertificate context.

c.not-before

c.not-before

Show the notBefore value of the currently selected certificate of the current SignDocCertificate context.

c.save

c.save FLAGS -b [BLOB]
c.save FLAGS -f FILE

Save the current SignDocCertificate context into blob BLOB or into file FILE. If -b is used without argument the current blob context will be used.

The following flags are available:

-crlf
Use CRLF instead of LF for ending lines
-der
Use DER encoding
-pem
Use PEM encoding

c.select

c.select [NAME]

Select SignDocCertificate context. The initial value is "default". Without argument, show which SignDocCertificate context is selected.

c.show

c.show [CERT]

Show SignDocCertificate context CERT or the current SignDocCertificate context if CERT is missing. The following values will be shown:

  • PEM label
  • CA bit
  • self-signed
  • valid-for-signing
  • issuer common name
  • subject common name
  • notBefore
  • notAfter
  • key algorithm in human-readable form
  • key algorithm object identifier
  • serial number

c.signing-certs

c.signing-certs [-sp [SP]]

Get all certificates suitable for signing, filtered by a SignDocSignatureParameters object. That object may also specify a PKCS #11 module. Store the certificates in certificate contexts CERT-0, CERT-1, and so on. Existing certificate contexts with unused numbers will be removed. The number of certificates found will be displayed.

SP is the name of a SignDocSignatureParameters context. If -sp is used without SP, the current SignDocSignatureParameters context will be used. If -sp is not specified, no SignDocSignatureParameters context will be used.

c.sn

c.sn

Show the serial number of the currently selected certifcate in the current SignDocCertificate context as hexadecimal numbers (most significant octet first).

c.subject-cn

c.subject-cn

Show the subject's common name of the currently selected certificate of the current SignDocCertificate context.

c.subject-email

c.subject-email

Show the subject's email address of the currently selected certificate of the current SignDocCertificate context.

SignDocCleanParameters

clp.bool

clp.bool NAME VALUE

Add action NAME with boolean parameter VALUE (true or false) to current SignDocCleanParameters context.

clp.clear

clp.clear

Remove all actions from the current SignDocCleanParameters context.

clp.clone

clp.clone NAME

Clone the current SignDocCleanParameters context and store the clone in SignDocCleanParameters context NAME.

clp.int

clp.int NAME VALUE

Add action NAME with integer parameter VALUE to current SignDocCleanParameters context.

clp.list

clp.list

List all SignDocCleanParameters contexts.

clp.load

clp.load -b [BLOB] [-name NAME]
clp.load -f FILE [-name NAME]

Load SignDocCleanParameters from blob context BLOB or from file FILE into the current SignDocCleanParameters context or into SignDocCleanParameters NAME.

clp.num

clp.num NAME VALUE

Add action NAME with floating-point number parameter VALUE to current SignDocCleanParameters context.

clp.save

clp.save [OPTIONS] -b [BLOB]
clp.save [OPTIONS] -f FILE

Save the current SignDocCleanParameters context to blob context BLOB or file FILE. The following options are available:

-debug
Include dummy secret values for debugging
-secret
Include secret values
-symbolic
Use symbolic values for integers
-xml
XML instead of binary

clp.select

clp.select [NAME]

Select a SignDocCleanParameters context. The initial value is "default". Without argument, show which SignDocCleanParameters context is selected.

clp.show

clp.show

Show all actions of the current SignDocCleanParameters context.

clp.type

clp.type NAME

Show the type of action NAME of SignDocCleanParameters.

clp.void

clp.void NAME

Add action NAME without parameter to the current SignDocCleanParameters context.

SignDocCheckSignatureParameters

csp.bool

csp.bool NAME [VALUE]

Show the value of boolean parameter NAME of the current SignDocCheckSignatureParameters context or set it to VALUE (true or false).

csp.clear

csp.clear

Unset all parameters of the current SignDocCheckSignatureParameters context.

csp.clone

csp.clone NAME

Clone the current SignDocCheckSignatureParameters context and store the clone in SignDocCheckSignatureParameters context NAME.

csp.int

csp.int NAME [VALUE]

Show the value of integer parameter NAME of the current SignDocCheckSignatureParameters context or set it to VALUE.

csp.list

csp.list

List all SignDocCheckSignatureParameters contexts.

csp.load

csp.load -b [BLOB] [-name NAME]
csp.load -f FILE [-name NAME]

Load SignDocCheckSignatureParameters from blob contextx BLOB or from file FILE into the current SignDocCheckSignatureParameters context or into SignDocCheckSignatureParameters context NAME.

csp.save

csp.save [OPTIONS] -b [BLOB]
csp.save [OPTIONS] -f FILE

Save the current SignDocCheckSignatureParameters context to blob context BLOB or file FILE. The following options are available:

-debug
Include dummy secret values for debugging
-secret
Include secret values
-symbolic
Use symbolic values for integers
-xml
XML instead of binary

csp.select

csp.select [NAME]

Select a SignDocCheckSignatureParameters context. The initial value is "default". Without argument, show which SignDocCheckSignatureParameters context is selected.

csp.type

csp.type NAME

Show the type of parameter NAME of SignDocCheckSignatureParameters.

SignDocDocument

d.a.add

d.a.add [-a NAME] [-page PAGE]

Add SignDocAnnotation context NAME to the current SignDocDocument context. If -a is not used, the current SignDocAnnotation context will be used. PAGE specifies the 1-based page number, the default value is 1.

d.a.create

d.a.create -a NAME -line X1 Y1 X2 Y2
d.a.create -a NAME -scribble
d.a.create -a NAME -stamp X1 Y1 X2 Y2
d.a.create -a NAME -text X1 Y1 X2 Y2

Create an annotation of the specified type for the current SignDocDocument context and store it in SignDocAnnotation context NAME. That SignDocAnnotation context will be selected.

d.a.get

d.a.get [-a NAME] [-page PAGE] -annotation ANNOTATION_NAME

Get annotation ANNOTATION_NAME of page PAGE (default value: 1) of the current SignDocDocument context and store it in SignDocAnnotation context NAME or, if -a is not used, in SignDocAnnotation context ANNOTATION_NAME. In both cases, the SignDocAnnotation context will be selected.

d.a.list

d.a.list [-first FIRST] [-last LAST] [-page PAGE]

List the names of named annotations of the current SignDocDocument context.

FIRST is the first page number, the default value is 1. LAST is last page number. The default value is the last page of the document.

-page PAGE is equivalent to -first PAGE -last PAGE.

d.a.remove

d.a.remove [-page PAGE] -annotation ANNOTATION_NAME

Remove annotation ANNOTATION_NAME of page PAGE (default value: 1) from the current SignDocDocument context.

d.add-image

d.add-image [FLAGS] [-page PAGE] [-b [BLOB] | -f FILE] [-at X Y]
            [-width WIDTH -height HEIGHT | -zoom ZOOM]
            [-description DESCRIPTION LANG]

Add an image as new page to the current SignDocDocument context or to an existing page of the current SignDocDocument context.

If -at is used, the image will be added to page PAGE (1-based) with its lower left corner at document coordinates (X,Y). The default value for PAGE is 1.

Without -at, the new page will be inserted before page PAGE (1-based) or will be appended if PAGE is zero. The default value for PAGE is 1.

The image will be taken from blob context BLOB (using the current blob context if -b is used without argument) or from file FILE. If neither -b nor -f is used, the image will be taken from the current blob context.

The size of the page is specified either by WIDTH and HEIGHT (document coordinates) or by scaling the image by factor ZOOM according to its specified resolution (which is rarely correct) and size.

DESCRIPTION is an alternate description for the image and LANG specifies the language code (RFC 3066) of DESCRIPTION.

The following flags are available:

-keep-aspect-ratio
Keep the aspect ratio of the image
-brightest-transparent
White or the brightest color of the palette will be made transparent

d.add-page

d.add-page PAGE WIDTH HEIGHT

Add a page before page PAGE (1-based) of the current SignDocDocument context. WIDTH and HEIGHT are the width and height of the page in 1/72 inches.

d.add-text

d.add-text [FLAGS] [-page PAGE] [-font FONT_NAME FONT_SIZE]
           [-color COLOR] [-opacity OPACITY] [-lang LANG]
           -b [BLOB] | -f FILE | -text TEXT
           -at X Y
d.add-text [FLAGS] [-page PAGE] [-font FONT_NAME FONT_SIZE]
           [-color COLOR] [-opacity OPACITY] [-lang LANG]
           [-ls LINE_SKIP] [-ha HALIGNMENT] [-va VALIGNMENT]
           -b [BLOB] | -f FILE | -text TEXT
           -rect X1 Y1 X2 Y2

Add text to a page of the current SignDocDocument context.

The text will be taken from blob context BLOB (using the current blob context if -b is used without argument), from file FILE, or TEXT will be used as text.

If -at is used, the lower left corner of the text will be placed at coordinates (X,Y) of page PAGE.

If -rect is used, the text will be placed in the specified rectangle on page PAGE.

PAGE is 1-based, the default value is 1.

FONT_NAME is the name of the font to be used, FONT_SIZE is the font size to be used. The default value for FONT_NAME is Helvetica, the default value for FONT_SIZE is 10.

COLOR is either an index into the palette or an RGB color of form "#rrggbb" (hexadecimal). It specifies the text color, the default value is black.

OPACITY is the opacity (0.0 through 1.0), the default value is 1.0.

LANG is a language identifier (RFC 3066). The default value is empty.

LINE_SKIP is the vertical distance between the baselines of successive lines, the default value is FONT_SIZE multiplied by 1.2.

HALIGNMENT specifies the horizontal alignment (left, center, right, auto), VALIGNMENT specifies the vertical alignment (top, center, bottom). The default value for HALIGNMENT is auto, the default value for VALUE is center.

The following flags are available if -rect is used:

-compat
Behave like SignDoc SDK 4.2.0.8 and earlier
-default-ltr
Choose direction automatically, default to LTR
-default-rtr
Choose direction automatically, default to RTL
-ltr
Paragraph direction: LTR
-rtl
Paragraph direction: RTL

d.add-watermark

d.add-watermark [FLAGS] [-first FIRST] [-last LAST] [-page PAGE] [-incr INCR]
                [-font FONT_NAME FONT_SIZE] [-color COLOR]
                [-justification JUSTIFICATION] [-rotation ROTATION]
                [-opacity OPACITY] [-scale SCALE] [-location LOCATION]
                [-hpos HA HDIST] [-vpos VA VDIST]
                -b [BLOB] | -f FILE | -text TEXT

Add a watermark to the current SignDocDocument context.

The text will be taken from blob context BLOB (using the current blob context if -b is used without argument), from file FILE, or TEXT will be used as text.

FIRST is the first page number, the default value is 1. LAST is last page number. The default value is the last page of the document. -page PAGE is equivalent to -first PAGE -last PAGE. INCR is the page number increment, the default value is 1.

FONT_NAME is the name of the font to be used, FONT_SIZE is the font size to be used. The default value for FONT_NAME is Helvetica, the default value for FONT_SIZE is 24.

COLOR is either an index into the palette or an RGB color of form "#rrggbb" (hexadecimal). It specifies the text color, the default value is black.

JUSTIFICATION is the justification for multi-line text (left, center, right). The default value is "left".

ROTATION is the rotation in degrees (-180 through 180). 0 is horizontal (left to right), 45 is bottom left to upper right. The default value is 0.

OPACITY is the opacity (0.0 through 1.0), the default value is 1.0.

SCALE defines the scaling relative to the page. Scaling will be disabled if SCALE is 0. The default value is 0.5.

LOCATION specifies whether the watermark will appear behind the page (underlay) or on top of the page (overlay). The default value is "overlay".

HA (left, center, right) and HDIST specify set horizontal position of the watermark. The default values are "center" and 0.

VA (top, center, bottom) and VDIST specify set vertical position of the watermark. The default values are "center" and 0.

The following flags are available:

-default-ltr
Choose direction automatically, default to LTR
-default-rtr
Choose direction automatically, default to RTL
-ltr
Paragraph direction: LTR
-rtl
Paragraph direction: RTL

d.apply-fdf

d.apply-fdf [FLAGS] -f FILE

Apply the FDF file FILE to the current SignDocDocument context.

The following flags are available:

-add
Add a field instead of replacing an existing field
-auto-alignment
Align left if the text begins with an LTR run, Align right if the text begins with an RTL run
-default-ltr
Choose direction automatically, default to LTR
-default-rtr
Choose direction automatically, default to RTL
-dont-break-lines
Do not break lines in multiline text fields
-fit-height-only
Compute the default font size such that the field contents fit the height of the field
-font-fail
Fail if no suitable font is found (default)
-force-border-width
Use the border width specified by the field
-keep-ap
Keep appearance streams
-ltr
Paragraph direction: LTR
-move
Move or resize field
-rtl
Paragraph direction: RTL
-update-ap
Update appearance streams

d.bpp

d.bpp PAGE

Show the number of bits per pixel of page PAGE (1-based) of the current SignDocDocument context.

d.clear

d.clear -field FIELD
d.clear -all
d.clear -approval

Remove the signature from field FIELD of the current SignDocDocument context. With -all, remove all signatures. With -approval, remove all approval signatures.

d.copy

d.copy [FLAGS] -b [BLOB]
d.copy [FLAGS] -f FILE

Copy the current state of the document (or its backing file or backing blob or state as signed) in the current SignDocDocument context to file FILE or blob context BLOB (default: current blob context).

The following flags are available:

-field FIELD
Copy the document as signed
-unsaved
Include unsaved changes

d.create-ap

d.create-ap

Create appearance streams for widget annotations if needed for the current SignDocDocument context.

d.create-sp

d.create-sp -field FIELD_NAME [-profile PROFILE] [-sp SP]
d.create-sp -field FIELD_NAME -profiles

Create SignDocSignatureParameters for field FIELD_NAME of the current SignDocDocument context and name them SP. If SP is missing, they will be named NAME. In both cases, they will be selected as current SignDocSignatureParamters context. PROFILE defaults to "".

With -profiles, just list the available profiles for field FIELD_NAME.

d.create-sp-ts

d.create-sp-ts -sp SP

Create SignDocSignatureParameters for a time stamp in the current SignDocDocument context and name them NAME. Those SignDocSignatureParrameters will be selected as current SignDocSignatureParrameters context.

d.doc-mdp

d.pathname

Show the DocMDP P value of the certification signature of the current SignDocDocument context.

d.f.export

d.f.export [-b BLOB|-f FILE]

Export the fields of the current SignDocDocument context as XML. If -f is given, store the result in file FILE. If -b is given, store the result in blob context BLOB. If neither -b nor -f is given, store the result in the current blob context.

d.f.get

d.f.get [-f NAME] -field FIELD_NAME

Get field FIELD_NAME of the current SignDocDocument context and store it in SignDocField context NAME or in the current SignDocField context (if -f is not used).

d.f.list

d.f.list [-v] [-page PAGE] [-t TYPE]...

Show the fields of the current SignDOcDocument context. Use -v for more output.

With -page show only the fields on page PAGE (1-based) of the document.

TYPE, if given, restricts the fields to the specified field types: check_box, combo_box, list_box, pushbutton, radio_button, signature_digsig, text.

d.f.flatten

d.f.flatten -field FIELD_NAME [-widget INDEX]
d.f.flatten [FLAGS] [-first FIRST] [-last LAST] [-page PAGE]

Flatten field FIELD_NAME of the current SignDocDocument context. If -widget is given, only the widget at 0-based index INDEX will be flattened. Otherwise, all widgets of the field will be flattened.

Flatten fields of the current SignDocDocument context. Only fields on pages FIRST (default: 1) through LAST (default: last page) will be flattened.

-page PAGE is equivalent to -first PAGE -last PAGE.

The following flags are available:

-include-hidden
Include hiden and invisible widgets
-include-signature-signed
Include signed signature fields
-include-signature-unsigned
Include unsigned signature fields
-keep-structure
Do not modify logical structure

d.f.remove

d.f.remove -field FIELD_NAME

Remove field FIELD_NAME of the current SignDocDocument context.

d.f.set

d.f.set [FLAGS] [-f FIELD]

Set (update) a field of the current SignDocDocument context. FIELD specifies the SignDocField context to be used. If -f is not given, use the current SignDocField context.

The following flags are available:

-add
Add a field instead of replacing an existing field
-auto-alignment
Align left if the text begins with an LTR run, align right if the text begins with an RTL run
-default-ltr
Choose direction automatically, default to LTR
-default-rtr
Choose direction automatically, default to RTL
-dont-break-lines
Do not break lines in multiline text fields
-fit-height-only
Compute the default font size such that the field contents fit the height of the field
-font-fail
Fail if no suitable font is found (default)
-force-border-width
Use the border width specified by the field
-keep-ap
Keep appearance streams
-ltr
Paragraph direction: LTR
-move
Move or resize field
-rtl
Paragraph direction: RTL
-update-ap
Update appearance streams

d.find-text

d.find-text [FLAGS] [-first FIRST] [-last LAST] [-page PAGE]
           -b [BLOB] | -f FILE | -text TEXT

Find text on the specified pages of the current SignDocDocument context.

The text will be taken from blob context BLOB (using the current blob context if -b is used without argument), from file FILE, or TEXT will be used as text.

FIRST is the first page number, the default value is 1. LAST is last page number. The default value is the last page of the document. -page PAGE is equivalent to -first PAGE -last PAGE.

The following flags are available:

-ignore-hspace
Ignore horizontal whitespace
-ignore-hyphenation
Ignore hyphenation
-ignore-sequence
Use character positions instead of searching the characters in the document in the sequence they are encountered

d.import-pages

d.import-pages [FLAGS] [-d DOCUMENT] [-target TARGET_PAGE]
               [-source SOURCE_PAGE] [-count COUNT]

Import pages from SignDocDocument context DOCUMENT into the current SignDocDocument context. If -d is omitted, the pages will be imported from the current SignDocDocument context.

The pages will be inserted before page TARGET_PAGE (1-based) of the target document. The default value is 1.

COUNT pages will be copied starting with page SOURCE_PAGE (1-based). The default value for COUNT and SOURCE_PAGE is 1.

The following flags are available:

-copy-page-labels
Copy page labels

d.last-ts

d.last-ts

Show the timestamp used by the last successful d.sign command for the current SignDocDocument context.

d.list

d.list

List all SignDocDocument contexts.

d.lock-mdp

d.pathname

Show the lowest lock MDP value of the signed signature fields of the current SignDocDocument context.

d.methods

d.methods

Show the signing methods available for the current SignDocDocument context.

d.modified

d.modified

Show if the current SignDocDocument context has unsaved changes (true) or not (false).

d.p.bool

d.p.bool [-c COLLECTION] NAME [VALUE]

Show the value of boolean property NAME in collection COLLECTION of the current SignDocDocument context or set it to VALUE (false or true). The default value for COLLECTION is "public".

d.p.export

d.p.export [-c COLLECTION] [-b BLOB|-f FILE]

Export properties from collection COLLECTION of the current SignDocDocument context as XML. If -c is not used or COLLECTION is an empty string, all properties of the "public" and "encrypted" collections will be exported.

If -f is given, store the result in file FILE. If -b is given, store the result in blob context BLOB. If neither -b nor -f is given, store the result in the current blob context.

d.p.import

d.p.import [FLAGS] [-c COLLECTION] [-b BLOB|-f FILE]

Import properties from XML into collection COLLECTION of the current SignDocDocument context. If -c is not used or COLLECTION is an empty string, properties will be imported into all collections.

If -f is given, the properties are read from file FILE. If -b is given, the properties are read from blob context BLOB. If neither -b nor -f is given, the properties are read from the current blob context.

The following flags are available:

- atomic
Modify all properties from XML or none (on error)

d.p.int

d.p.int [-c COLLECTION] NAME [VALUE]

Show the value of integer property NAME in collection COLLECTION of the current SignDocDocument context or set it to VALUE. The default value for COLLECTION is "public".

d.p.list

d.p.list [-c COLLECTION]

List all properties of the current SignDocDocument context. If -c is used, list only properties in collection COLLECTION (encrypted, pdfa, pdfua, public). For each property, the following values are shown:

  • the collection (unless -c is used)
  • the name of the property
  • the type of the property

d.p.remove

d.p.remove [-c COLLECTION] NAME

Remove property NAME from collection COLLECTION of the current SignDocDocument context. The default value for COLLECTION is "public".

d.p.str

d.p.str [-c COLLECTION] NAME [VALUE]

Show the value of string property NAME in collection COLLECTION of the current SignDocDocument context or set it to VALUE. The default value for COLLECTION is "public".

d.page-factors

d.page-factors PAGE

Show the horizontal and vertical conversion factors of page PAGE (1-based) of the current SignDocDocument context.

d.page-res

d.page-res PAGE

Show the horizontal and vertical resolution (in DPI) of page PAGE (1-based) of the current SignDocDocument context.

d.page-size

d.page-size PAGE

Show the width and the height of page PAGE (1-based) of the current SignDocDocument context.

d.pages

d.pages

Show the number of pages of the current SignDocDocument context.

d.pathname

d.pathname

Show the pathname of the current SignDocDocument context.

d.remove-doc-mdp

d.remove-doc-mdp

Remove any certification signature from the current SignDocDocument context.

d.remove-page-labels

d.remove-page-labels

Remove all page labels from the current SignDocDocument context.

d.remove-pages

d.remove-pages [FLAGS] PAGE...

Remove pages from the current SignDocDocument context. You can specify any number of page numbers (1-based).

The following flags are available:

-adjust-page-labels
Adjust page labels
-keep
Keep the specified pages rather than removing them
-renumber-page-labels
Renumber subsequent page labels

d.remove-pdfa

d.remove-pdfa

Remove PDF/A conformance from the current SignDocDocument context.

d.remove-pdfua

d.remove-pdfua

Remove PDF/UA conformance from the current SignDocDocument context.

d.remove-permissions

d.remove-permissions

Remove signatures that grant permissions from the current SignDocDocument context.

d.render-page

d.render-page [-clip X Y X Y] [-b [BLOB]|-im [IM]] [-rp [RP]]
              [-vp [VP]] [-clip X1 Y1 X2 Y2]
d.render-page -compute-zoom [-rp [RP]]
d.render-page -get-size [-rp [RP]]

Render a page of the current SignDocDocument context, storing the resulting image blob in the blob context specified by -b or in the SignDocImage context specified by -im. If neither -b nor -im is specified, the image will be stored in the current blob context.

RP specifies the name of the SignDocRenderParameters context to be used. If -rp is used without argument, the current SignDocRenderParameters context will be used.

VP specifies the name of the SignDocVerificationParameters context to be used. If -vp is used without argument, the current SignDocVerificationParameters context will be used.

-clip specifies a clipping rectangle.

If -compute-zoom is used, the zoom factor used for rendering will be computed and displayed.

If -get-size is used, the size of the rendered page in pixels will be shown without actually rendering the page.

d.remove-structure

d.remove-structure

Remove the logical structure from the current SignDocDocument context.

d.remove-xfa

d.remove-xfa

Remove XFA content from the current SignDocDocument context.

d.save

d.save [FLAGS] [-f [FILE] | -b [BLOB]

Save the current SignDocDocument context to file FILE or blob context BLOB (default: current blob context) or, if both -f is used without argument, to the file it was loaded from. The following flags are available:

-incr
Save incrementally (instead of fully)
-auto-incr
Set -incr automatically if needed
-pdfa-buttons
(Obsolete)
-stream
Save to stream (backed by memory or file)

d.select

d.select [-NAME]

Select SignDocDocument context. The initial value is "default". Without argument, show which SignDocDocument context is selected.

d.set-tfa

d.set-tfa [-tfa NAME]

Set the text field attributes of the current SignDocDocument context from SignDocTextFieldAttributes context NAME or from the current SignDocTextFieldAttributes context (if -tfa is not used).

d.sig

d.sig -list [-changes]
d.sig -index INDEX -sig SIG

With -list, show the signatures of the current SignDocDocument context. Also show the changes made after the signatures with -changes.

With -index, store signature number INDEX (0-based) in SignDocSignature context SIG. That SignDocSignature context will be selected.

d.sign

d.sign [-sp SP] [-vp [VP]]

Sign the current SignDocDocument context.

SP is the name of a SignDocSignatureParameters context. If not specified, the default SignDocSignatureParameters context will be used.

VP specifies the name of the SignDocVerificationParameters context to be used. If -vp is used without argument, the current SignDocVerificationParameters context will be used.

d.tagged

d.tagged

Show if the current SignDocDocument context is Tagged PDF (true) or not (false).

d.text

d.text [OPTIONS] [-first FIRST] [-last LAST] [-page PAGE]
       [-b [BLOB] | -f FILE]

Extract text from the specified pages of the current SignDocDocument context using a text iterator. Write the text to blob BLOB (default: current blob context) or to file FILE. Write the text to standard output if neither -b nor -f is specified. In all cases, the text encoding is UTF-8. (TODO: use I/O encoding)

FIRST is the first page number, the default value is 1. LAST is last page number. The default value is the last page of the document. -page PAGE is equivalent to -first PAGE -last PAGE.

The following options are available:

-lines
Attempt to insert newlines where appropriate
-pages
Attempt to insert form feed characters where appropriate

d.tfa

d.tfa [-tfa NAME]

Get the text field attributes of the current SignDocDocument context and store them in SignDocTextFieldAttributes context NAME or in the current SignDocTextFieldAttributes context (if -tfa is not used).

d.type

d.type

Show the type of the current SignDocDocument context.

d.update-dss

d.update-dss [FLAGS] [-field FIELD] [-vp [VP]]

Update the DSS of the current SignDocDocument context. If -field is given, the DSS will be updated only for field FIELD. Without -field, the DSS will be updated for all approval signatures. Show the number of fields for which the DSS has been updated.

VP specifies the name of the SignDocVerificationParameters context to be used. If -vp is used without argument, the current SignDocVerificationParameters context will be used.

The following flags are available:

-simulate
Perform all the checks but do not modify the document
-vri
Create VRI dictionaries (discouraged)

d.verify

d.verify -field FIELD_NAME [-vr [VR]]

Verify the signature of field FIELD_NAME of the current SignDocDocument context.

If VR is specified, the verification result will be stored in SignDocVerificationResult context VR. If -vr is used without argument, the verification result will be stored in the current SignDocVerificationResult context. If -vr is not used, the verification result will be stored in SignDocVerificationResult context FIELD_NAME.

TODO: -sig SIG

SignDocDocumentLoader

dl.create

dl.create [-pdf] [-tiff]

Create a SignDocDocumentLoader object with the specified handlers and store it in the current SignDocDocumentLoader context. For your convenience, a SignDocDocumentLoader object will be created (for PDF and TIFF) automatically as needed if this command has not been used.

dl.create-pdf

dl.create-pdf MAJOR.MINOR

Create a PDF document having the specified PDF version and store it in the current SignDocDocument context. The current SignDocDocumentLoader context will be used.

dl.create-pdfa

dl.create-pdfa MAJOR.MINOR CONFORMANCE [ICC_FILE]

Create a PDF/A document having PDF version MAJOR.MINOR, PDF/A conformance level CONFORMANCE (e.g., 2B), and the ICC profile from file ICC_FILE (if specified) and store it in the current SignDocDocument context. The current SignDocDocumentLoader context will be used.

dl.dcc.clear

dl.dcc.clear

Clear the cache of downloaded certificates.

dl.dcc.load

dl.dcc.load -b [BLOB]

Load the cache of downloaded certificates from the specified blob.

dl.dcc.save

dl.dcc.clear -b [BLOB]

Save the cache of downloaded certificates to the specified blob.

dl.font-config

dl.font-config -b BLOB [-dir DIR]
dl.font-config -f FILE

Load font configuration from blob context BLOB or file FILE into the current SignDocDocumentLoader context.

Relative font pathnames are relative to directory DIR.

dl.init-logging

dl.init-logging LEVEL FILE

Initialize logging to FILE for messages having level LEVEL (0 through 5) or below.

dl.license-text

dl.license-text [N]

Show the number of license texts (if N is not specifified) or the Nth (zero-based) license text.

dl.list

dl.list

List all SignDocDocumentLoader contexts.

dl.load

dl.load [-ro] -f FILE
dl.load -b [BLOB]

Use the current SignDocDocumentLoader context to load a document from file FILE or blob context BLOB into the current SignDocDocument context. The document will be made read-only if -ro is used. If -b is used without argument, the current blob context will be used.

dl.pdf-font-config

dl.pdf-font-config -b BLOB [-dir DIR]
dl.pdf-font-config -f FILE

Load font configuration from blob context BLOB or file FILE into the current SignDocDocumentLoader context for rendering PDF documents.

Relative font pathnames are relative to directory DIR.

dl.ping

dl.ping -b [BLOB]
dl.ping -f FILE

Determine and show the type of a document in blob context BLOB or file FILE. If -b is used without argument, the current blob context will be used.

dl.select

dl.select [NAME]

Select a SignDocDocumentLoader context. The initial value is "default". Without argument, show which SignDocDocumentLoader context is selected.

dl.trusted-certs

dl.trusted-certs [-b BLOB]
dl.trusted-certs [-f FILE]

Load certificates to be trusted from blob context BLOB or from file FILE into the current SignDocDocumentLoader context.

dl.version

dl.version [COMPONENT...]

Show the version number of SignDoc SDK or components thereof.

SignDocField

f.alt-name

f.alt-name [NAME]

Show the alternate name of the current SignDocField context or set it to NAME.

f.choice

f.choice INDEX [VALUE [EXPORT]]
f.choice -export INDEX
f.choice -add VALUE [EXPORT]
f.choice -remove INDEX
f.choice -clear

Show the choice value at index INDEX (0-based) of the current SignDocField context or set it to VALUE. Without arguments, show the number of choices. With -add, add choice value VALUE. Export value EXPORT defaults to VALUE.

-export shows the choice export value.

-remove removes the choice value at index INDEX.

-clear removes all choice values.

f.click

f.click INDEX

Simulate clicking on the INDEXth (0-based) widget of the current SignDocField context. Show true or false depending on whether something has been changed or not.

f.clone

f.clone NAME

Clone the current SignDocField context and store the clone in SignDocField context NAME.

f.csv.issuer

f.csv.issuer [-list]
f.csv.issuer -required|-optional
f.csv.issuer -add -b BLOB
f.csv.issuer -add -f FILE
f.csv.issuer -set [INDEX] -b BLOB
f.csv.issuer -set [INDEX] -f FILE
f.csv.issuer -remove INDEX
f.csv.issuer -clear

With -list, show the Issuer certificate seed values in the current SignDocField context. Without argument, show the number of Issuer certificate seed values.

-required makes the Issuer certificate seed value required, optional -makes it optional.

Use -add to add a certificate from blob context BLOB or from file FILE to the Issuer certificate seed values.

Use -set to replace the Issuer certificate seed value at 0-based index INDEX with data from blob context BLOB or from file FILE. If INDEX is omitted, the specified certificate will be the only value after this operation.

Use -remove to remove the Issuer certificate seed value at 0-based index INDEX.

Use -clear to remove all Issuerq certificate seed values from the current SignDocField context.

f.csv.policy

f.csv.policy [-list]
f.csv.policy -required|-optional
f.csv.policy -add VALUE
f.csv.policy -set [INDEX] VALUE
f.csv.policy -remove INDEX
f.csv.policy -clear

With -list, show the OID certificate seed values in the current SignDocField context. Without argument, show the number of OID certificate seed values.

-required makes the OID certificate seed value required, optional -makes it optional.

Use -add to add VALUE to the OID certificate seed values. VALUE must be an object identifier.

Use -set to replace the OID certificate seed value at 0-based index INDEX with VALUE. If INDEX is omitted, VALUE will be the only value after this operation.

Use -remove to remove the OID certificate seed value at 0-based index INDEX.

Use -clear to remove all OID certificate seed values from the current SignDocField context.

f.csv.subject

f.csv.subject [-list]
f.csv.subject -required|-optional
f.csv.subject -add -b BLOB
f.csv.subject -add -f FILE
f.csv.subject -set [INDEX] -b BLOB
f.csv.subject -set [INDEX] -f FILE
f.csv.subject -remove INDEX
f.csv.subject -clear

With -list, show the Subject certificate seed values in the current SignDocField context. Without argument, show the number of Subject certificate seed values.

-required makes the Subject certificate seed value required, -optional makes it optional.

Use -add to add a certificate from blob context BLOB or from file FILE to the Subject certificate seed values.

Use -set to replace the Subject certificate seed value at 0-based index INDEX with data from blob context BLOB or from file FILE. If INDEX is omitted, the specified certificate will be the only value after this operation.

Use -remove to remove the Subject certificate seed value at 0-based index INDEX.

Use -clear to remove all Subject certificate seed values from the current SignDocField context.

f.csv.subject-dn

f.csv.subject-dn [-list]
f.csv.subject-dn -required|-optional
f.csv.subject-dn -add VALUE
f.csv.subject-dn -set [INDEX] VALUE
f.csv.subject-dn -remove INDEX
f.csv.subject-dn -clear

With -list, show the SubjectDN certificate seed values in the current SignDocField context. Without argument, show the number of SubjectDN certificate seed values.

-required makes the SubjectDN certificate seed value required, -optional makes it optional.

Use -add to add VALUE to the SubjectDN certificate seed values. VALUE must be formatted according to RFC 4514.

Use -set to replace the SubjectDN certificate seed value at 0-based index INDEX with VALUE. If INDEX is omitted, VALUE will be the only value after this operation.

Use -remove to remove the SubjectDN certificate seed value at 0-based index INDEX.

Use -clear to remove all SubjectDN certificate seed values from the current SignDocField context.

f.doc-mdp

f.doc-mdp

Show the DocMDP P value of the current SignDocField context.

f.empty-color

f.empty-color [COLOR]

Show the empty field color of the current SignDocField context or set it to COLOR. This color is used for empty signature fields in TIFF documents.

COLOR is either a single integer (0 through 255) or a tuple of three integers (0 through 255) RED,GREEN,BLUE.

f.flags

f.flags [FLAG...]

Show the field flags of the current SignDocField context or set them according to FLAG.

FLAG can be either a hexadecimal number (to set the flags to that value) or an individual flag to be set (if preceded by +) or cleared (if preceded by -):

  • Comb
  • Combo
  • CommitOnSelChange
  • DoNotScroll
  • DoNotSpellCheck
  • Edit
  • EnableAddAfterSigning
  • FileSelect
  • Invisible
  • MultiLine
  • MultiSelect
  • NoExport
  • NoToggleToOff
  • Password
  • Pushbutton
  • Radio
  • RadiosInUnison
  • ReadOnly
  • Required
  • RichText
  • SinglePage
  • Sort

f.is-clearable

f.is-clearable

Show whether the signature in the current SignDocField context can currently be cleared (true) or not (false).

f.is-signed

f.is-signed

Show whether the current SignDocField context is signed (true) or not (false).

f.list

f.list

List all SignDocField contexts.

f.lock-field

f.lock-field [-list]
f.lock-field -clear
f.lock-field -add FIELD
f.lock-field -remove INDEX
f.lock-field -set INDEX FIELD

Without argument, show the number of lock fields of the current SignDocField context. With -list, show the lock fields of the current SignDocField context.

With -clear, remove all lock fields from the current SignDocField context.

With -add, add a lock field to the current SignDocField context.

With -remove, remove the lock field at 0-based index INDEX of the current SignDocField context.

With -set, replace the lock field at 0-based index INDEX of the current SignDocField context with FIELD.

f.lock-mdp

f.lock-mdp [MDP]

Show the lock MDP value of the current SignDocField context or set it to MDP.

f.lock-type

f.lock-type [TYPE]

Show the lock type of the current SignDocField context or set it to TYPE (none, all, include, exclude).

f.map-name

f.map-name [NAME]

Show the mapping name of the current SignDocField context or set it to NAME.

f.max-len

f.max-len [LENGTH]

Show the maximum text length of the current SignDocField context or set it to LENGTH.

f.name

f.name [NAME]

Show the field name of the current SignDocField context or set it to NAME.

f.select

f.select [NAME]

Select a SignDocField context. The initial value is "default". Without argument, show which SignDocField context is selected.

f.show

f.show [-all]

Show these values of the current SignDocField context:

  • field name
  • field type
  • alternate name
  • mapping name
  • number of values
  • the values
  • the value index
  • the top index
  • the choice values and their export values
  • the field flags
  • the signature type
  • the DocMDP P value
  • the lock MDP value
  • whether the field is signed or not
  • whether the signature can be cleared or not
  • the lock type
  • the maximum text length
  • the empty field color
  • the number of widgets
  • the current widget index

For the current widget or all widgets (-all is given) show these values:

  • the widget flags (hexadecimal)
  • the page number
  • the rectangle coordinates
  • the button value
  • the justification
  • the rotation
  • the background color
  • the border color
  • the border width
  • the border style
  • the button style

f.sig-type

f.sig-type

Show the signature type of the current SignDocField context.

f.sv.add-rev-info

f.sv.add-rev-info
f.sv.add-rev-info VALUE

Show the AddRevInfo signature seed value of the current SignDocField context or set it to VALUE (true or false).

f.sv.digest-method

f.sv.digest-method
f.sv.digest-method -required|-optional
f.sv.digest-method -add VALUE
f.sv.digest-method -set [INDEX] VALUE
f.sv.digest-method -clear
f.sv.digest-method -remove INDEX

Without arguments, show the DigestMethod signature seed values of the current SignDocField context. Otherwise, modify them.

-required makes the DigestMethod contraint required, -optional makes it optional.

-add adds VALUE.

-set replaces the value at 0-based index INDEX with VALUE. If INDEX is omitted, VALUE will be the only value present after this operation.

-clear removes all values.

-remove removes the value at 0-based index INDEX.

f.sv.filter

f.sv.filter
f.sv.filter -required|-optional VALUE
f.sv.filter -remove

Show the Filter signature seed value of the current SignDocField context or set it to VALUE, making it a required or optional constraint depending on presence of -required or -optional, respectively.

Remove the Filter signature seed value if -remove is given.

f.sv.mdp

f.sv.mdp
f.sv.mdp VALUE
f.sv.mdp -remove

Show the MDP signature seed value of the current SignDocField context (-1 if not set) or set it to VALUE (0 through 3).

Remove the MDP signature seed value with -remove.

f.sv.sub-filter

f.sv.sub-filter
f.sv.sub-filter -required|-optional
f.sv.sub-filter -add VALUE
f.sv.sub-filter -set [INDEX] VALUE
f.sv.sub-filter -clear
f.sv.sub-filter -remove INDEX

Without arguments, show the SubFilter signature seed values of the current SignDocField context. Otherwise, modify them.

-required makes the SubFilter contraint required, -optional makes it optional.

-add adds VALUE.

-set replaces the value at 0-based index INDEX with VALUE. If INDEX is omitted, VALUE will be the only value present after this operation.

-clear removes all values.

-remove removes the value at 0-based index INDEX.

f.sv.time-stamp

f.sv.time-stamp
f.sv.time-stamp -url URL -required|-optional
f.sv.time-stamp -remove

Show the TimeStamp signature seed value of the current SignDocField context or set its URL value to URL, making it a required or optional constraint depending on presence of -required or -optional, respectively.

Remove the TimeStamp signature seed value if -remove is given.

f.top-index

f.top-index [INDEX]

Show the top index of the current SignDocField context or set it to INDEX.

f.type

f.type [TYPE]

Show the field type of the current SignDocField context or set it to TYPE: check_box, combo_box, list_box, pushbutton, radio_button, signature_digsig, text.

f.value

f.value INDEX [VALUE]
f.value -add VALUE
f.value -remove INDEX
f.value -clear

Show the value at index INDEX (0-based) of the current SignDocField context or set it to VALUE. Without arguments, show the number of values. With -add, add value VALUE.

-remove removes the value at index INDEX.

-clear removes all values.

f.value-index

f.value-index [INDEX]

Show the value index of the current SignDocField context or set it to INDEX.

f.w.bg-color

f.w.bg-color [COLOR]

Show the background color of the currently selected widget of the current SignDocField context or set it to COLOR.

COLOR is either a single integer (0 through 255) or a tuple of three integers (0 through 255) RED,GREEN,BLUE.

f.w.border-color

f.w.border-color [COLOR]

Show the border color of the currently selected widget of the current SignDocField context or set it to COLOR.

COLOR is either a single integer (0 through 255) or a tuple of three integers (0 through 255) RED,GREEN,BLUE.

f.w.border-style

f.w.border-style [STYLE]

Show the border style of the currently selected widget of the current SignDocField context or set it to STYLE (solid, dashed, beveled, inset, underline).

f.w.border-width

f.w.border-width [WIDTH]

Show the border width of the currently selected widget of the current SignDocField context or set it to WIDTH.

f.w.button

f.w.button [VALUE]

Show the button value of the currently selected widget of the current SignDocField context or set it to VALUE.

f.w.button-style

f.w.button-style [STYLE]

Show the button style of the currently selected widget of the current SignDocField context or set it to STYLE (default, check_mark, cross, star, circle, square, diamond).

f.w.flags

f.w.flags [FLAG...]

Show the widget flags of the currently selected widget of the current SignDocField context or set them according to FLAG.

FLAG can be either a hexadecimal number (to set the flags to that value) or an individual flag to be set (if preceded by +) or cleared (if preceded by -):

  • Hidden
  • Invisible
  • Locked
  • LockedContents
  • NoRotate
  • NoView
  • NoZoom
  • Print
  • ReadOnly
  • ToggleNoView

This example sets the Locked flag and clears all other flags:

f.w.flags 0 +Locked

f.w.justification

f.w.justification [JUSTIFICATION]

Show the justification of the currently selected widget of the current SignDocField context or set it to JUSTIFICATION (left, center, right, none).

f.w.page

f.w.page [PAGE]

Show the page number of the currently selected widget of the current SignDocField context or set it to PAGE.

f.w.rect

f.w.rect [X1 Y1 X2 Y2]

Show the rectangle coordinates of the currently selected widget of the current SignDocField context or set them to X1, Y1, X2, and Y2.

f.w.rotation

f.w.rotation [ROTATION]

Show the rotation of the currently selected widget of the current SignDocField context or set it to ROTATION (0, 90, 180, 270).

f.w.set-tfa

f.w.set-tfa [-tfa NAME]

Set the text field attributes of the currently selected widget of the current SignDocField context from SignDocTextFieldAttributes context NAME or from the current SignDocTextFieldAttributes context (if -tfa is not used).

f.w.tfa

f.w.tfa [-tfa NAME]

Get the text field attributes of the currently selected widget of the current SignDocField context and store them in SignDocTextFieldAttributes context NAME or in the current SignDocTextFieldAttributes context (if -tfa is not used).

f.widget

f.widget [INDEX]
f.widget -add
f.widget -insert INDEX
f.widget -remove INDEX

Show the widget index of the current SignDocField context or select widget INDEX.

With -add, add a widget and select it.

With -insert, insert a widget before widget INDEX and select it.

With -remove, remove widget INDEX.

f.widgets

f.widgets

Show the number of widgets of the current SignDocField context.

SignDocImage

i.bi-level

i.bilevel [-ip [IP]]

Convert the image in the current SignDocImage context to bi-level black and white.

If IP is specified, use SignDocImageParameters context IP, if -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.bpc

i.bpc

Show the number of bits per component of the current SignDocImage context.

i.bpp

i.bpp

Show the number of bits per pixel of the current SignDocImage context.

i.check-height

i.check-height

Check if the height of the current SignDocImage context is in the supported range for cleaning and matching. Result 0 means the height is supported, -1 means the height is too small, 1 means the height is too big.

i.check-width

i.check-width

Check if the width of the current SignDocImage context is in the supported range for cleaning and matching. Result 0 means the width is supported, -1 means the width is too small, 1 means the width is too big.

i.clean

i.clean [-clp CLP] [-ip [IP]]

Clean the image in the current SignDocImage context.

If CLP is specified, use that SignDocCleanParameters context, otherwise use the current SignDocCleanParameters context.

If IP is specified, use SignDocImageParameters context IP, if -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.clean-date

i.clean-date [-ip [IP]]

Clean the image in the current SignDocImage context by removing handwritten text.

If IP is specified, use that SignDocImageParameters context, if -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.clean-frames

i.clean-frames [-ip [IP]] -trust TRUST

Clean the image in the current SignDocImage context by removing frames with weight less than TRUST (0.0 to 1.0).

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.clean-lines

i.clean-lines [-ip [IP]]

Clean the image in the current SignDOcImage context by removing horizontal and vertical lines.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.clean-signature

i.clean-signature [-ip [IP]]

Clean the image in the current SignDocImage context by removing horizontal and vertical lines, printed text, and dirt not being part of a signature.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.clone

i.clone NAME

Clone the current SignDocImage context and store the clone in SignDocImage context NAME.

i.complexity

i.complexity [-ip [IP]]

Show the complexity of the current SignDocImage context. Use SignDocImageParameters IP rather than default values if IP is specified.

If IP is specified, use SignDocImageParameters context IP, if -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.components

i.components

Show the number of components of the current SignDocImage context.

i.crop

i.crop X Y WIDTH HEIGHT

Crop the current SignDocImage context. X and Y are the coordinates of the upper left corner of the rectangle to be preserved, WIDTH and HEIGHT are the width and the height of that rectangle.

i.empty

i.empty WIDTH HEIGHT BPP COLOR

Replace the image in the current SignDocImage context with an empty image with width WIDTH pixels, height HEIGHT pixels, BPP bits per pixel. All pixels will have color COLOR which is either an index into the palette or an RGB color of form "#rrggbb" (hexadecimal), depending on BPP.

i.frames

i.frames [-ip [IP]]

Show the frames of the current SignDocImage context and their weights.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.grayscale

i.grayscale

Convert the image in the current SignDocImage context to grayscale.

i.height

i.height

Show the height in pixels of the current SignDocImage context.

i.int

i.int NAME

Show the value of integer parameter NAME of the current SignDocImage context.

i.histogram

i.histogram

Show a histogram of indexed colors of the current SignDocImage context.

i.invert

i.invert [-auto]

Invert the image in the current SignDocImage context. If -auto is specified, the image will be inverted only if more than half the pixels have brightness less than 128 (the maximum brightness is 255).

i.line

i.line X1 Y1 X2 Y2 STROKE_WIDTH COLOR

Draw a line in the current SignDocImage context from point (X1,Y1) to point (X2,Y2). STROKE_WIDTH is a floating-point number and specifies the stroke width. COLOR is either an index into the palette or an RGB color of form "#rrggbb" (hexadecimal).

i.list

i.list

List all SignDocImage contexts.

i.load

i.load -b [BLOB] [-page PAGE]
i.load -f FILE [-page PAGE]

Load an image from blob context BLOB or from FILE into the current SignDocImage context. Load page PAGE (0-based) or the first page if -page is not used.

i.match-im

i.match-im [-mp MP] [-ip [IP]] [-mr MR] -im IM

Match the current SignDocImage context against another image.

If MP is specified, use those SignDocMatchParameters, otherwise use the current SignDocMatchParameters context.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

Store the result in SignDocMatchResult context MR or in the current SignDocMatchResult context if -mr is not used.

IM specifies the SignDocImage context to match against.

i.match-ref

i.match-sig [-mp MP] [-ip [IP]] [-mr MR] -sd SD

Match the current SignDocImage context against a reference.

If MP is specified, use those SignDocMatchParameters, otherwise use the current SignDocMatchParameters context.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

Store the result in SignDocMatchResult context MR or in the current SignDocMatchResult context if -mr is not used.

SD specifies the SignDocSignatureData context to match against.

i.match-sig

i.match-sig [-mp MP] [-ip [IP]] [-mr MR] -sd SD

Match the current SignDocImage context against a signature.

If MP is specified, use those SignDocMatchParameters, otherwise use the current SignDocMatchParameters context.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

Store the result in SignDocMatchResult context MR or in the current SignDocMatchResult context if -mr is not used.

SD specifies the SignDocSignatureData context to match against.

i.mirror-x

i.mirror-x

Mirror the current SignDocImage context along the vertical axis (flip horizontally).

i.mirror-y

i.mirror-y

Mirror the current SignDocImage context along the horizontal axis (flip vertically).

i.pages

i.pages -b [BLOB]
i.pages -f FILE

Show the number of pages in the image in blob context BLOB or file FILE.

i.palette

i.palette [INDEX COLOR]

Show the palette of the current SignDocImage context or set a palette entry if INDEX and COLOR are specified. COLOR which is an RGB color of form "#rrggbb" (hexadecimal).

i.pixel

i.pixel X Y [COLOR]

Show the value of the pixel at coordinates (X,Y) of the current SignDocImage context or set it to color COLOR if COLOR is specified. COLOR is either an index into the palette or an RGB color of form "#rrggbb" (hexadecimal).

i.pixel-rgb

i.pixel-rgb X Y [COLOR]

Show the value of the pixel at coordinates (X,Y) of the current SignDocImage context or set it to color COLOR if COLOR is specified. COLOR is an RGB ("#rrggbb" hexadecimal) color for all types of images.

i.rect

i.rect [-fill] X1 Y1 X2 Y2 RADIUS_X RADIUS_Y STROKE_WIDTH COLOR

Draw a rectangle in the current SignDocImage context. (X1,Y1) and (X2,Y2) are the corners of the rectangle (inclusive).

RADIUS_X and RADIUS_Y are floating-point numbers specifying the horizontal and vertical radius, respectively, of the quarter ellipses making up the corners.

STROKE_WIDTH is a floating-point number and specifies the stroke width.

COLOR is either an index into the palette or an RGB color of form "#rrggbb" (hexadecimal).

i.remove-margins

i.remove-margins [-ip [IP]]

Clean the current SignDocImage context by removing white margins ignoring single black pixels.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.resize-to-res

i.resize-to-res X Y FILTER

Resize the current SignDocImage context to resolution X DPI (horizontal) and resolution Y DPI (vertical). FILTER is one of these: box, bilinear, b-spline, bicubic, catmull-rom, and lanczos.

i.res

i.res X Y

Set the resolution of the current SignDocImage context to X DPI (horizontal) and Y DPI (vertical).

i.res-x

i.res-x

Show the horizontal resolution in DPI of the current SignDocImage context.

i.res-y

i.res-y

Show the vertical resolution in DPI of the current SignDocImage context.

i.rotate

i.rotate ANGLE COLOR

Rotate the current SignDocImage context by ANGLE degrees (positive for counter-clockwise). Fill areas that are not mapped from the source image with color COLOR.

COLOR is either an index into the palette or an RGB color of form "#rrggbb" (hexadecimal).

i.save

i.save -b [BLOB] [-ip [IP]|-format FORMAT]
i.save -f FILE [-ip [IP]|-format FORMAT]

Save the image in the current SignDocImage context to blob context BLOB or to file FILE.

If -format is used, the image will be saved in format FORMAT (png etc.). Without -format, SignDocImageParameters are required.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.select

i.select [NAME]

Select a SignDocImage context. The initial value is "default". Without argument, show which SignDocImage context is selected.

i.split-positions

i.split-positions [-ip [IP]]

Show the vertical split positions of the image.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

i.true-color

i.true-color

Convert image in the current SignDocImage context to 24-bit RGB.

i.width

i.width

Show the width in pixels of the current SignDocImage context.

SignDocImageParameters

ip.bool

ip.bool NAME [VALUE]

Show the value of boolean parameter NAME of the current SignDocImageParameters context or set it to VALUE (true or false).

ip.clear

ip.clear

Unset all parameters of the current SignDocImageParameters object.

ip.clone

ip.clone NAME

Clone the current SignDocImageParameters context and store the clone in SignDocImageParameters context NAME.

ip.color

ip.color NAME [VALUE]

Show the value of color parameter NAME of the current SignDocImageParameters context or set it to VALUE.

VALUE is either a single integer (0 through 255) or a tuple of three integers (0 through 255) RED,GREEN,BLUE.

ip.int

ip.int NAME [VALUE]

Show the value of integer parameter NAME of the current SignDocImageParameters context or set it to VALUE.

ip.list

ip.list

List all SignDocImageParameters contexts.

ip.load

ip.load -b [BLOB] [-name NAME]
ip.load -f FILE [-name NAME]

Load SignDocImageParameters from blob context BLOB or from file FILE into the current SignDocImageParameters context or into SignDocImageParameters context NAME.

ip.num

ip.num NAME [VALUE]

Show the value of floating-point number parameter NAME of the current SignDocImageParameters context or set it to VALUE.

ip.save

ip.save [OPTIONS] -b [BLOB]
ip.save [OPTIONS] -f FILE

Save the current SignDocImageParameters context to blob context BLOB or file FILE. The following options are available:

-debug
Include dummy secret values for debugging
-secret
Include secret values
-symbolic
Use symbolic values for integers
-xml
XML instead of binary

ip.select

ip.select [NAME]

Select a SignDocImageParameters context. The initial value is "default". Without argument, show which SignDocImageParameters context is selected.

ip.str

ip.str NAME [VALUE]

Show the value of string parameter NAME of the current SignDocImageParameters context or set it to VALUE.

ip.type

ip.type NAME

Show the type of parameter NAME of SignDocImageParameters.

SignDocMatchParameters

mp.bool

mp.bool NAME [VALUE]

Show the value of boolean parameter NAME of the current SignDocMatchParameters context or set it to VALUE (true or false).

mp.clear

mp.clear

Unset all parameters of the current SignDocMatchParameters context.

mp.clone

mp.clone NAME

Clone the current SignDocMatchParameters context and store the clone in SignDocMatchParameters context NAME.

mp.int

mp.int NAME [VALUE]

Show the value of integer parameter NAME of the current SignDocMatchParameters context or set it to VALUE.

mp.list

mp.list

List all SignDocMatchParameters contexts.

mp.load

mp.load -b [BLOB] [-name NAME]
mp.load -f FILE [-name NAME]

Load SignDocMatchParameters from blob context BLOB or from file FILE into the current SignDocMatchParameters context or into SignDocMatchParameters context NAME.

mp.save

mp.save [OPTIONS] -b [BLOB]
mp.save [OPTIONS] -f FILE

Save the current SignDocMatchParameters context to blob context BLOB or file FILE. The following options are available:

-debug
Include dummy secret values for debugging
-secret
Include secret values
-symbolic
Use symbolic values for integers
-xml
XML instead of binary

mp.select

mp.select [NAME]

Select a SignDocMatchParameters context. The initial value is "default". Without argument, show which SignDocMatchParameters context is selected.

mp.type

mp.type NAME

Show the type of parameter NAME of SignDocMatchParameters.

SignDocMatchResult

mr.dstat-quality

mr.dstat-quality

Show the DStat match quality (percent) of the current SignDocMatchResult context.

mr.dstat-result

mr.dstat-result

Show the DStat result (true or false) of the current SignDocMatchResult context.

mr.dynamic-quality

mr.dynamic-quality

Show the dynamic match quality (percent) of the current SignDocMatchResult context.

mr.dynamic-result

mr.dynamic-result

Show the dynamic result (true or false) of the current SignDocMatchResult context.

mr.list

mr.list

List all SignDocMatchResult contexts.

mr.result

mr.result

Show the overall result (true or false) of the current SignDocMatchResult context.

mr.select

mr.select [NAME]

Select a SignDocMatchResult context. Initially, no SignDocMatchResult context is selected. Without argument, show which SignDocMatchResult context is selected.

mr.show

mr.show

Show all quality values and results of the current SignDocMatchResult context.

mr.static-quality

mr.static-quality [INDEX]

Show the static match qualities (percent) of the current SignDocMatchResult context. Show a single match quality if INDEX is specified.

mr.static-result

mr.static-result [INDEX]

Show the static results (true or false) of the current SignDocMatchResult context. Show a single result if INDEX is specified.

SignDocRenderParameters

rp.bool

rp.bool NAME [VALUE]

Show the value of boolean parameter NAME of the current SignDocRenderParameters context or set it to VALUE (true or false).

rp.clear

rp.clear

Unset all parameters of the current SignDocRenderParameters context.

rp.clone

rp.clone NAME

Clone the current SignDocRenderParameters context and store the clone in SignDocRenderParameters context NAME.

rp.int

rp.int NAME [VALUE]

Show the value of integer parameter NAME of the current SignDocRenderParameters context or set it to VALUE.

rp.list

rp.list

List all SignDocRenderParameters contexts.

rp.load

rp.load -b [BLOB] [-name NAME]
rp.load -f FILE [-name NAME]

Load SignDocRenderParameters from blob context BLOB or from file FILE into the current SignDocRenderParameters context or into SignDocRenderParameters context NAME.

rp.num

rp.num NAME [VALUE]

Show the value of floating-point number parameter NAME of the current SignDocRenderParameters context or set it to VALUE.

rp.save

rp.save [OPTIONS] -b [BLOB]
rp.save [OPTIONS] -f FILE

Save the current SignDocRenderParameters context to blob context BLOB or file FILE. The following options are available:

-debug
Include dummy secret values for debugging
-secret
Include secret values
-symbolic
Use symbolic values for integers
-xml
XML instead of binary

rp.select

rp.select [NAME]

Select a SignDocRenderParameters context. The initial value is "default". Without argument, show which SignDocRenderParameters context is selected.

rp.str

rp.str NAME [VALUE]

Show the value of string parameter NAME of the current SignDocRenderParameters context or set it to VALUE.

rp.str2

rp.str2 NAME NAME2 [VALUE]

Show the value of string parameter NAME/NAME2 of the current SignDocRenderParameters context or set it to VALUE.

rp.type

rp.type NAME

Show the type of parameter NAME of SignDocRenderParameters.

SignDocSignatureData

sd.add

sd.add [FLAGS] -b [BLOB]
sd.add [FLAGS] -f FILE
sd.add -sd SD

Add a signature from SignDocSignatureData context SD, from blob context BLOB, or from file FILE to the current SignDocSignatureData context. The following flags are available:

-meters
ISO/IEC 19794-7:2007 before Technical Corrigendum
-no-ext-data
Ignore extended data
-no-fix
Do not attempt to automatically fix ISO-format signatures

sd.add-empty

sd.add-empty

Add an empty signature to the current SignDocSignatureData context.

sd.check-ref

sd.check-ref [-csp [CSP]] [-ip [IP]]

Check the reference in the current SignDocSignatureData context for plausibility.

If CSP is specified, use that SignDocCheckSignatureParameters context. If -csp is used without argument, use the current SignDocCheckSignatureParameters context. Use default values if -csp is not specified.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

sd.check-sig

sd.check-sig [-csp CSP] [-ip [IP]]

Check the currently selected signature in the current SignDocSignatureData context for plausibility.

If CSP is specified, use that SignDocCheckSignatureParameters context. If -csp is used without argument, use the current SignDocCheckSignatureParameters context. Use default values if -csp is not specified.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

sd.clear

sd.clear

Remove all signatures from the current SignDocSignatureData context.

sd.clone

sd.clone NAME

Clone the current SignDocSignatureData context and store the clone in SignDocSignatureData context NAME.

sd.clone-sig

sd.clone-sig INDEX NAME

Clone signature INDEX in the current SignDocSignatureData context and store the clone in SignDocSignatureData context NAME.

sd.count

sd.count

Show the number of signatures in the current SignDocSignatureData context.

sd.dev-id

sd.dev-id [ID]

Show the device identifier of the currently selected signature in the current SignDocSignatureData contextor set it to ID.

sd.dev-max-p

sd.dev-max-p [MAX_P]

Show the maximum pressure of the device of the currently selected signature in the current SignDocSignatureData context or set it to MAX_P.

sd.dev-name

sd.dev-name [NAME]

Show the device name of the currently selected signature in the current SignDocSignatureData context or set it to NAME.

sd.dev-p-levels

sd.dev-p-levels

Show the number of pressure levels of the device of the currently selected signature in the current SignDocSignatureData context.

sd.dev-res

sd.dev-res [R]

Show the spatial resolution (1/inch) of the device of the currently selected signature in the current SignDocSignatureData context or set it to R.

sd.dev-size

sd.dev-size [MIN_X MIN_Y MAX_X MAX_Y]
sd.dev-size -unset

Show the device size of the currently selected signature in the current SignDocSignatureData context or set it to MIN_X, MIN_Y, MAX_X, and MAX_Y. Unset the device size with -unset.

sd.dev-sn

sd.dev-sn [TYPE] [SN]

Show the device serial number of the currently selected signature in the current SignDocSignatureData context or set it to SN. TYPE selects the serial number to show or set: -ascii, -binary, -e-serial, -legacy, -pnp-id, -uid, or -uid2.

If TYPE is not given, all available serial numbers will be shown. TYPE is mandatory for setting the serial number.

sd.dev-sr

sd.dev-sr [SPS]

Show the sample rate (samples per second) of the device of the currently selected signature in the current SignDocSignatureData context or set it to SPS.

sd.dynamic-quality

sd.dynamic-quality

Show the dynamic quality (percent) of the current SignDocSignatureData context.

sd.height

sd.height

Show the height of the currently selected signature in the current SignDocSignatureData context.

sd.list

sd.list

List all SignDocSignatureData contexts.

sd.load

sd.load [FLAGS] -b [BLOB]
sd.load [FLAGS] -f FILE

Load blob context BLOB (default: current blob context) or file FILE into the current SignDocSignatureData context. The following flags are available:

-meters
ISO/IEC 19794-7:2007 before Technical Corrigendum
-no-ext-data
Ignore extended data
-no-fix
Do not attempt to automatically fix ISO-format signatures

sd.match-ref

sd.match-sig [-mp MP] [-ip [IP]] [-mr MR] -sd SD

Match the current reference against a signature.

If MP is specified, use those SignDocMatchParameters, otherwise use the current SignDocMatchParameters context.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

Store the result in SignDocMatchResult context MR or in the current SignDocMatchResult context if -mr is not used.

SD specifies the SignDocSignatureData context to match against.

sd.match-sig

sd.match-sig [-mp MP] [-ip [IP]] [-mr MR] -sd SD

Match the current signature against another signature.

If MP is specified, use those SignDocMatchParameters, otherwise use the current SignDocMatchParameters context.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

Store the result in SignDocMatchResult context MR or in the current SignDocMatchResult context if -mr is not used.

SD specifies the SignDocSignatureData context to match against.

sd.max-p

sd.max-p

Show the maximum pressure in the currently selected signature in the current SignDocSignatureData context.

sd.max-x

sd.max-x

Show the maximum X value in the currently selected signature in the current SignDocSignatureData context.

sd.max-y

sd.max-y

Show the maximum Y value in the currently selected signature in the current SignDocSignatureData context.

sd.min-x

sd.min-x

Show the minimum X value in the currently selected signature in the current SignDocSignatureData context.

sd.min-y

sd.min-y

Show the minimum Y value in the currently selected signature in the current SignDocSignatureData context.

sd.mirror-y

sd.mirror-y

Flip vertically the currently selected signature in the current SignDocSignatureData context.

sd.render

sd.render -ip [IP] [-b [BLOB]|-im [IM]]

Render the currently selected signature in the current SignDocSignatureData context as image.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context.

Store the result in blob context BLOB (or the current blob context) or in SignDocImage context IM (or the current SignDocImage context). If neither -b nor -im is specified, the image will be stored in the current blob context.

sd.sample

sd.sample X Y P [T]
sd.sample -clear

Add sample (X,Y,P) or (X,Y,P,T) to the currently selected signaturein the current SignDocSignatureData context. -clear removes all samples.

sd.samples

sd.samples [-v]

Show the number of samples in the currently selected signature in the current SignDocSignatureData context. With -v, also show the samples.

sd.save

sd.save FORMAT [FLAGS] -b [BLOB]
sd.save FORMAT [FLAGS] -f FILE

Save the current SignDocSignatureData context. FORMAT specifies the format to use:

-iso-19794-7-2007tc1
ISO 19794-7:2007 (with Technical Corrigendum 1
-iso-19794-7-2014
ISO 19794-7:2014
-iso-19794-7-2021
ISO 19794-7:2021
-softpro
legacy SOFTPRO format

and the wrapper to use:

-iso-19785-3-none
n0 ISO 19785-3 wrapper
-iso-19785-3-format2
ISO 19785-3 format 2 wrapper
-iso-19785-3-format3
ISO 19785-3 format 3 wrapper
-iso-19785-3-format6
ISO 19785-3 format 6 wrapper

The following flags are available:

-compat1
Bug compatibility with SignWare before 3.2.9.0
-meters
ISO/IEC 19794-7:2007 before Technical Corrigendum
-no-ext-data
Omit extended data
-no-fix
Do not attempt to automatically fix ISO-format signatures

sd.select

sd.select [NAME]

Select a SignDocSignatureData context. The initial value is "default". Without argument, show which SignDocSignatureData context is selected.

sd.show

sd.show

Show information about of the currently selected signature in the current SignDocSignatureData context:

  • device identifier
  • device maximum pressure
  • device pressure levels
  • device resolution
  • device sample rate
  • device size
  • device name
  • device serial numbers
  • time stamp
  • number of samples
  • presence of time channel
  • maximum pressure
  • minimum and maximum coordinates
  • width and height

sd.sig

sd.sig [INDEX]

Select a signature in the current SignDocSignatureData context. INDEX is 0-based. Without INDEX, show the current index.

sd.static-quality

sd.static-quality [-ip [IP]]

Show the static quality (percent) of the current SignDocSignatureData context.

If IP is specified, use that SignDocImageParameters context. If -ip is used without argument, use the current SignDocImageParameters context. Use default values if -ip is not specified.

sd.tc

sd.tc

Show presence of time channel (true or false) in the currently selected signature in the current SignDocSignatureData context.

sd.ts

sd.ts [TS]

Show the time stamp of the currently selected signature in the current SignDocSignatureData context or set it to TS. Currently, the time stamp is shown or specified as seconds since 1970-01-01T12:00:00.

sd.type

sd.type

Show the type (empty, signature, or reference) of the current SignDocSignatureData context.

sd.width

sd.width

Show the width of the currently selected signature in the current SignDocSignatureData context.

SignDocSignature

sig.cert

sig.cert [-b [BLOB] | -f FILE]

Store the signing certificate of the current SignDocSignature context in blob context BLOB or in file FILE. If neither BLOB nor FILE is specified, store the signing certificate in the current blob context.

sig.changes

sig.changes [-list]

Show the number of changes made to the document after the signature in the current SignDocSignature context.

Use -list to show the individual changes.

sig.cn

sig.cn

Show the common name of the signer of the current SignDocSignature context.

sig.cleared

sig.cleared

Show the index of the signature at which the signature has been removed for the current SignDocSignature context.

sig.doc-mdp

sig.doc-mdp

Show the DocMDP P value of the current SignDocSignature context.

sig.email

sig.email

Show the email address of the signer of the current SignDocSignature context.

sig.field

sig.name

Show the signature name of the current SignDocSignature context.

sig.list

sig.list

List all SignDocSignature contexts.

sig.lock-mdp

sig.lock-mdp

Show the lock MDP value of the current SignDocSignature context.

sig.method

sig.method

Show the signing method of the current SignDocSignature context.

sig.page

sig.page

Show the page number of the signature field of the current SignDocSignature context.

sig.select

sig.select [NAME]

Select a SignDocSignature context. Initially, no SignDocSignature context is selected. Without argument, show which SignDocSignature context is selected.

sig.show

sig.show [-changes]

Show the following values of the current SignDocSignature context:

  • field name
  • field page
  • signature type
  • signing method
  • cleared index
  • DocMDP P value
  • Lock MDP value
  • common name of the signer
  • email address of the signer
  • time stamp
  • biometric encryption method

If -changes is used, the changes made tro the document after this signature will be listed.

sig.ts

sig.ts

Show the time stamp of the current SignDocSignature context.

sig.type

sig.type

Show the signature type (approval, certification, or document_time_stamp) of the current SignDocSignature context.

SignDocSignatureParameters

sp.blob

sp.blob NAME [-b [BLOB]]
sp.blob NAME [-f FILE]

Show the value of blob parameter NAME of the current SignDocSignatureParameters context or set it to blob context BLOB or the contents of file FILE. If -b is used without argument, the current blob context will be used.

sp.blobs

sp.blobs NAME [-b BLOB]
sp.blobs NAME [-f FILE.SUFFIX]

Set blob parameter NAME of the current SignDocSignatureParameters context to blobs BLOB-0, BLOB-1, and so on. If BLOB-0 is missing, the sequence will start at BLOB-1. Alternatively, load blobs from file FILE-0.SUFFIX and so on. Show the values of the blobs if both -b and -f are omitted.

sp.clear-ti

sp.clear-ti

Remove all strings of the current SignDocSignatureParameters context that were to be displayed.

sp.clone

sp.clone NAME

Clone the current SignDocSignatureParameters context and store the clone in SignDocSignatureParameters context NAME.

sp.color

sp.color NAME [VALUE]

Show the value of color parameter NAME of the current SignDocSignatureParameters context or set it to VALUE.

VALUE is either a single integer (0 through 255) or a tuple of three integers (0 through 255) RED,GREEN,BLUE.

sp.int

sp.int NAME [VALUE]

Show the value of integer parameter NAME of the current SignDocSignatureParameters context or set it to VALUE.

sp.len

sp.len NAME [VALUE]

Show the value of length parameter NAME of the current SignDocSignatureParameters context or set it to VALUE. By default, VALUE is absolute. Appending h makes it relative to the field height, appending w makes it relative to the field width.

sp.list

sp.list

List all SignDocSignatureParameters contexts.

sp.load

sp.load -b [BLOB] -name NAME
sp.load -f FILE -name NAME

Load SignDocSignatureParameters from blob context BLOB or from file FILE into SignDocSignatureParameters context NAME.

sp.save

sp.save [OPTIONS] -b [BLOB]
sp.save [OPTIONS] -f FILE

Save the current SignDocSignatureParameters context to blob context BLOB or file FILE. The following options are available:

-debug
Include dummy secret values for debugging
-secret
Include secret values
-symbolic
Use symbolic values for integers
-xml
XML instead of binary

sp.select

sp.select [NAME]

Select a SignDocSignatureParameters context. The initial value is "default". Without argument, show which SignDocSignatureParameters context is selected.

sp.str

sp.str NAME [VALUE]

Show the value of string parameter NAME of the current SignDocSignatureParameters context or set it to VALUE.

sp.ti

sp.ti [ITEM GROUP [ALIGNMENT] [DIR]]

Show all text items of the current SignDocSignatureParameters context or add a text item.

ITEM is the name of the text item (Signer, SignTime, Comment, Adviser, ContactInfo, Location, Reason, Text1, Text2, Text3, Text4, Text5, Text6, Text7, Text8, Text9).

GROUP is the group of the text item (primary, secondary).

ALIGNMENT is the horizontal alignment (left, center, right, justify, auto). The default value is "left".

DIR is the paragraph direction of the text item (ltr, rtl, default-ltr, default-rtl). The default value is "ltr".

sp.type

sp.type NAME

Show the type of parameter NAME of SignDocSignatureParameters.

SignDocTextFieldAttributes

tfa.clear

tfa.clear

Unset all attributes of the current SignDocTextFieldAttributes context.

tfa.clone

tfa.clone NAME

Clone the current SignDocTextFieldAttributes context and store the clone in SignDocTextFieldAttributes context NAME.

tfa.font-name

tfa.font-name [FONT_NAME]

Show the font name of the current SignDocTextFieldAttributes context or set it to FONT_NAME.

tfa.font-size

tfa.font-size [FONT_SIZE]

Show the font size of the current SignDocTextFieldAttributes context or set it to FONT_SIZE.

tfa.is-set

tfa.is-set

Show whether any attributes of the current SignDocTextFieldAttributes context are set (true) or not (false).

tfa.is-valid

tfa.is-valid

Show whether the attributes of the current SignDocTextFieldAttributes context are valid (true) or not (false).

tfa.list

tfa.list

List all SignDocTextFieldAttributes contexts.

tfa.resource

tfa.resource

Show the font resource name of the current SignDocTextFieldAttributes context.

tfa.select

tfa.select [NAME]

Select a SignDocTextFieldAttributes context. The initial value is "default". Without argument, show which SignDocTextFieldAttributes context is selected.

tfa.show

tfa.show

Show all values of the current SignDocTextFieldAttributes context.

tfa.text-color

tfa.text-color [COLOR]

Show the text color of the current SignDocTextFieldAttributes context or set it to COLOR.

COLOR is either a single integer (0 through 255) or a tuple of three integers (0 through 255) RED,GREEN,BLUE.

tfa.unparsed

tfa.unparsed [UNPARSED]

Show the unparsed parts of the current SignDocTextFieldAttributes context or set them to UNPARSED.

SignDocVerificationParameters

vp.blob

vp.blob NAME [-b [BLOB]]
vp.blob NAME [-f FILE]

Show the value of blob parameter NAME of the current SignDocVerificationParameters context or set it to the contents of blob context BLOB or file FILE. If -b is used without argument, the current blob context will be used.

vp.blobs

vp.blobs NAME [-b BLOB]
vp.blobs NAME [-f FILE.SUFFIX]

Set blob parameter NAME of the current SignDocVerificationParameters context to blobs BLOB-0, BLOB-1, and so on. If BLOB-0 is missing, the sequence will start at BLOB-1. Alternatively, load blobs from file FILE-0.SUFFIX and so on. Show the values of the blobs if both -b and -f are omitted.

vp.clear

vp.clear

Unset all parameters of the current SignDocVerificationParameters context.

vp.clone

vp.clone NAME

Clone the current SignDocVerificationParameters context and store the clone in SignDocVerificationParameters context NAME.

vp.int

vp.int NAME [VALUE]

Show the value of integer parameter NAME of the current SignDocVerificationParameters context or set it to VALUE.

vp.list

vp.list

List all SignDocVerificationParameters contexts.

vp.load

vp.load -b [BLOB] [-name NAME]
vp.load -f FILE [-name NAME]

Load SignDocVerificationParameters from blob context BLOB or from file FILE into the current SignDocVerificationParameters context or into SignDocVerificationParameters context NAME.

vp.save

vp.save [OPTIONS] -b [BLOB]
vp.save [OPTIONS] -f FILE

Save the current SignDocVerificationParameters context to blob context BLOB or file FILE. The following options are available:

-debug
Include dummy secret values for debugging
-secret
Include secret values
-symbolic
Use symbolic values for integers
-xml
XML instead of binary

vp.select

vp.select [NAME]

Select a SignDocVerificationParameters context. The initial value is "default". Without argument, show which SignDocVerificationParameters context is selected.

vp.str

vp.str NAME [VALUE]

Show the value of string parameter NAME of the current SignDocVerificationParameters context or set it to VALUE.

vp.type

vp.type NAME

Show the type of parameter NAME of SignDocVerificationParameters.

vp.update-dss

vp.update-dss

Set suitable values for d.update-dss.

SignDocVerificationResult

vr.bio

vr.bio KEY PASSPHRASE BLOB

Store the biometric data of the current SignDocVerificationResult context in blob context BLOB. KEY is the pathname of the file containing the private key, PASSPHRASE is the passphrase.

vr.bio-encr

vr.bio-encr

Show the encryption method used for the biometric data of the current SignDocVerificationResult context.

vr.bio-hash

vr.bio-hash [-b [BLOB]]

Check the biometric hash for the current SignDocVerificationResult context.

BLOB specifies the blob context containing the unencrypted biometric data. If BLOB is not given, the current blob context will be used.

vr.blob

vr.blob NAME -b [BLOB]

Store the signature blob NAME of the current SignDocVerificationResult context in blob context BLOB. If BLOB is not specified, the current blob context will be used.

vr.certs

vr.certs BLOB

Copy the certificates of certificate chain of the current SignDocVerificationResult context into blobs BLOB-0, BLOB-1, and so on. Existing blobs with unused numbers will be removed.

vr.digest-alg

vr.digest-alg

Show the message digest algorithm of the current SignDocVerificationResult context.

vr.doc-mdp

vr.doc-mdp

Show the DocMDP P value of the current SignDocVerificationResult context.

vr.encr_bio

vr.encr_bio -b BLOB

Store the encrypted biometric data of the current SignDocVerificationResult context in blob context BLOB.

vr.list

vr.list

List all SignDocVerificationResult contexts.

vr.lock-mdp

vr.lock-mdp

Show the lock MDP value of the current SignDocVerificationResult context.

vr.method

vr.method

Show the signing method of the current SignDocVerificationResult context.

vr.mod

vr.mod

Show the modification state of the current SignDocVerificationResult context.

vr.not-after

vr.not-after

Show the latest time after which verification with the shell model will fail for the current SignDocVerificationResult context.

vr.revocation

vr.revocation

Show the revocation state of the certificate chain of the current SignDocVerificationResult context.

vr.select

vr.select [NAME]

Select a SignDocVerificationResult context. Initially, no SignDocVerificationResult context is selected. Without argument, show which SignDocVerificationResult context is selected.

vr.show

vr.show

Show these values of the current SignDocVerificationResult context:

  • signature state
  • modification state
  • revocation state
  • signing method
  • DocMDP
  • lock MDP
  • message digest algorithm
  • time stamp state
  • time stamp
  • time stamp revocation state
  • time stamp message digest algorithm
  • biometric encryption
  • not-after
  • predefined signature strings Some values are omitted if the certificate chains have not been validated.

vr.state

vr.state

Show the signature state of the current SignDocVerificationResult context.

vr.string

vr.string NAME

Show the signature string NAME of the current SignDocVerificationResult context.

vr.ts

vr.ts

Show the time stamp of the current SignDocVerificationResult context.

vr.ts-certs

vr.ts-certs BLOB

Copy the certificates of the time-stamp certificate chain of the current SignDocVerificationResult context into blobs BLOB-0, BLOB-1, and so on. Existing blobs with unused numbers will be removed.

vr.ts-digest-alg

vr.ts-digest-alg

Show the message digest algorithm of the time stamp of the current SignDocVerificationResult context.

vr.ts-revocation

vr.ts-revocation

Show the revocation state of the time-stamp certificate chain of the current SignDocVerificationResult context. .

vr.ts-state

vr.ts-state

Show the state of the time stamp of the current SignDocVerificationResult context.

vr.ts-verify

vr.ts-verify [-vp [VP]]

Verify the time-stamp certificate chain of the current SignDocVerificationResult context.

VP specifies the name of the SignDocVerificationParameters context to be used. If -vp is used without argument, the current SignDocVerificationParameters context will be used.

vr.ts-verify-simplified

vr.ts-verify-simplified [-vp [VP]]

Simplified verification of the time-stamp certificate chain of the current SignDocVerificationResult context.

VP specifies the name of the SignDocVerificationParameters context to be used. If -vp is used without argument, the current SignDocVerificationParameters context will be used.

vr.verify

vr.verify [-vp [VP]]

Verify the certificate chain of the current SignDocVerificationResult context.

VP specifies the name of the SignDocVerificationParameters context to be used. If -vp is used without argument, the current SignDocVerificationParameters context will be used.

vr.verify-simplified

vr.verify-simplified [-vp [VP]]

Simplified verification of the certificate chain of the current SignDocVerificationResult context.

VP specifies the name of the SignDocVerificationParameters context to be used. If -vp is used without argument, the current SignDocVerificationParameters context will be used.

Other commands

encoding

encoding [ENCODING]

Show the current I/O encoding or set it to ENCODING (native, utf-8, latin-1). The initial value is "native" for Windows and "utf-8" for all other operating systems.

exit

exit [STATUS]

Exit with status STATUS (default: 0).

expect

expect OPERAND1 OPERATOR OPERAND2

Check if the expression "OPERAND1 OPERATOR OPERAND2" evaluates to true. Exit with status 4 if it doesn't. One of the operators is usually "$r". The following values are available for OPERATOR:

=
Check for equality
!=
Check for inequality

expect-fail

expect-fail [-code CODE] [-message MESSAGE] COMMAND [ARGUMENT...]

Expect COMMAND to fail. Exit with status 4 if that command doesn't fail or fails with a SignDoc SDK return code other than CODE or if the error message does not contain MESSAGE.

Ignore failure of COMMAND if neither -code nor -message is given.

help

help [COMMAND]
help PREFIX.

Show available commands or help on the specified command or group of commands.

info

info

Show the currently selected contexts.

print

print [TEXT...]

Print text. The values will be separated by single spaces.

run

run [-v] FILE
run [-v] -f FILE

Execute commands from file FILE, one command per line. Use -v to echo lines before executing them.

Empty lines are ignored. Comments are started with "#".

set

set NAME VALUE...
set NAME=VALUE

Set variable NAME to value VALUE. If multiple values are given in the first form, they will be concatenated without intervening whitespace.

Variables can be used in interactive mode and in lines read by the run command. An unquoted argument of the form $x will be expanded to the value of variable x. Note that no characters are allowed before and after $x.