ImageSignOptions class

ImageSignOptions class

Represents the Image signature options.

Learn more:

The ImageSignOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the ImageSignOptions class with default values.
init Initializes ImageSignOptions with an image file.
init Initializes a new ImageSignOptions instance with an image stream.

Methods

Method Description
dispose Clears internal resources.
from_base64 Creates a new ImageSignOptions instance with a predefined image from a Base64 string.

Properties

Property Description
border The border settings for the image signature.
height The height of the signature on the document page in measure values (pixels, percents, or millimeters; see MeasureType SizeMeasureType).
horizontal_alignment The horizontal alignment of the signature on the document page.
image_file_path The file path of the signature image, used only if image_stream is not specified.
image_stream The signature image stream. If specified, it is always used instead of ImageFilePath.
left The left X position of the signature on the document page in measure values (pixels, percents, or millimeters). Works if horizontal alignment is not specified. See MeasureType for location measure type.
location_measure_type The measure type (pixels, percents or millimeters) for left and top properties.
margin The space between the signature and the document edges. Works only if horizontal or vertical alignment are specified.
margin_measure_type The measure type (pixels, percents or millimeters) for the margin.
rectangle The rectangle of area to put the image on document.
rotation_angle The rotation angle of the signature on the document page (clockwise).
shape_position The shape position defines where the shape should be presented in the document layout. Available only for Word documents.
size_measure_type The measure type (pixels, percents or millimeters) for Width and Height properties.
stretch The stretch mode on the document page.
top The top Y position of the signature on the document page in measure values (pixels, percents, or millimeters) as defined by MeasureType LocationMeasureType. Works if vertical alignment is not specified.
transparency The signature transparency, ranging from 0.0 (opaque) to 1.0 (clear), defaults to 0 (opaque).
vertical_alignment The vertical alignment of the signature on the document page.
width The width of the signature on the document page in measure values (pixels, percents, or millimeters MeasureType size measure type).
all_pages The signature will be placed on all document pages. (inherited from SignOptions)
appearance The additional signature appearance. (inherited from SignOptions)
document_type The document type of the signature options (DocumentType). (inherited from SignOptions)
extensions The signature extensions. (inherited from SignOptions)
hash_algorithm The hash algorithm to be used for cryptographic operations. Supported exclusively for digital signatures in PDF files. (inherited from SignOptions)
page_number The document page number for signing. (inherited from SignOptions)
pages_setup The options to specify pages to be signed. (inherited from SignOptions)
signature_type The signature type (SignatureType). (inherited from SignOptions)
zorder The Z-order position of the text signature, which determines the display order of overlapping signatures. (inherited from SignOptions)

Example

from groupdocs.signature import Signature
from groupdocs.signature.options import ImageSignOptions

def sign_with_image_signature():
    with Signature("sample.pdf") as signature:
        # Create image signature options with the image file
        options = ImageSignOptions("signature.jpg")
        # Set signature position and size
        options.left = 100
        options.top = 400
        options.width = 120
        options.height = 100

        result = signature.sign("signed_image.pdf", options)
        print(f"Signed with {len(result.succeeded)} image signature(s)")

Guides

Task guides that use ImageSignOptions:

See Also