What’s new in GroupDocs.Signature for Python 26.1 (January 2026)

ID Category Summary
SIGNATURENET‑5528 Feature Image digital signature support and validation (steganographic LSB embedding for PNG & JPG).
SIGNATURENET‑5445 Feature Adaptive rendering for Barcode and QR Code signature previews – explicit width/height control.
SIGNATURENET‑5479 Feature Rotation support for Barcode and QR Code preview images.
SIGNATURENET‑5478 Feature Added APNG and TGA image format handling for image‑based signatures.
SIGNATURENET‑5500 Enhancement LINQ‑style query optimization for signature search & verification (predicate filtering).
SIGNATURENET‑5480 Enhancement Background transparency support for Barcode/QR previews.
SIGNATURENET‑5477 Enhancement Overlay image support for digital signatures with background color (foreground‑image flag).
SIGNATURENET‑5422 Enhancement Removal of insecure encryption algorithms (RC2, DES, TripleDES and weak AES modes).
SIGNATURENET‑5555 🐞 Bug Fix Fixed GeneratePreview() type‑initializer exception for DOC files on Linux.

Below is a short technical walk‑through of the most impactful changes.

1. Image digital signature (steganography)

  • Signatures are hidden in the least‑significant bits of PNG/JPG pixels.
  • Password‑protected, stream‑compatible, and works with any image size ≥ 8 × 8 px.

Signing an image

import groupdocs.signature as gs
import groupdocs.signature.options as gso

input_file  = "image.png"
output_file = "signed_image.png"
password    = "MySecurePassword123"

# Sign the image
with gs.Signature(input_file) as signature:
    sign_options = gso.ImageDigitalSignOptions()
    sign_options.password = password

    sign_result = signature.sign(output_file, sign_options)

    if sign_result.succeeded and len(sign_result.succeeded) > 0:
        print("Image signed successfully!")
        print(f"Signatures added: {len(sign_result.succeeded)}")

Verifying a signed image

import groupdocs.signature as gs
import groupdocs.signature.options as gso

signed_file = "signed_image.png"
password    = "MySecurePassword123"

with gs.Signature(signed_file) as signature:
    verify_options = gso.ImageDigitalVerifyOptions()
    verify_options.password = password
    verify_options.detection_threshold_percent = 75  # optional 0‑100%

    verify_result = signature.verify(verify_options)

    if verify_result.is_valid:
        print("Digital signature is valid!")
        print(f"Verified signatures: {len(verify_result.succeeded)}")
    else:
        print("Digital signature is invalid or not found.")

Advanced validation (full data extraction)

with gs.Signature("signed_image.png") as signature:
    verify_options = gso.ImageDigitalVerifyOptions()
    verify_options.password = "MySecurePassword123"
    verify_options.use_full_data_extraction = True
    verify_options.detection_threshold_percent = 85

    verify_result = signature.verify(verify_options)

    if verify_result.is_valid and verify_options.detected_probability is not None:
        print(f"Signature detected with {verify_options.detected_probability}% probability")

2. Adaptive rendering for Barcode & QR Code previews

Developers can now specify exact width and height for preview generation, eliminating the previous “auto‑size” inconsistencies.

import groupdocs.signature as gs
import groupdocs.signature.options as gso
import uuid

# QR code options
qr_sign_options = gso.QrCodeSignOptions("GROUP DOCS", gs.QrCodeTypes.QR)
qr_sign_options.width  = 250
qr_sign_options.height = 270
qr_sign_options.fore_color = gs.Color.red
qr_sign_options.code_text_alignment = gs.CodeTextAlignment.BELOW
qr_sign_options.text = "GROUP DOCS"

# Preview generation
preview_options = gso.PreviewSignatureOptions(
    qr_sign_options,
    create_signature_stream,   # user‑provided delegate
    release_signature_stream   # user‑provided delegate
)
preview_options.signature_id   = str(uuid.uuid4())
preview_options.preview_format = gso.PreviewSignatureOptions.PreviewFormats.PNG

gs.Signature.generate_signature_preview(preview_options)

Adaptive QR preview

3. Rotation support for Barcode & QR previews

Set rotation_angle (degrees) on barcode/QR options to render rotated previews.

import groupdocs.signature as gs
import groupdocs.signature.options as gso
import uuid

barcode_sign_options = gso.BarcodeSignOptions("GROUP DOCS", gs.BarcodeTypes.MaxiCode)
barcode_sign_options.width          = 400
barcode_sign_options.height         = 400
barcode_sign_options.fore_color     = gs.Color.red
barcode_sign_options.code_text_alignment = gs.CodeTextAlignment.BELOW
barcode_sign_options.text           = "GROUP DOCS"
barcode_sign_options.rotation_angle = 45   # rotate 45°

preview_options = gso.PreviewSignatureOptions(
    barcode_sign_options,
    create_signature_stream,
    release_signature_stream
)
preview_options.signature_id   = str(uuid.uuid4())
preview_options.preview_format = gso.PreviewSignatureOptions.PreviewFormats.PNG

gs.Signature.generate_signature_preview(preview_options)

Rotated barcode

4. New image format support – APNG & TGA

APNG (animated PNG) and TGA (Targa) files can now be used as image signatures, inserted, previewed, and verified exactly like PNG/JPG.

5. Background transparency for Barcode/QR previews

Set the transparency property (0 – 1) on barcode/QR options to generate previews with a transparent canvas.

barcode_sign_options = gso.BarcodeSignOptions("GROUP DOCS", gs.BarcodeTypes.Codabar)
barcode_sign_options.width  = 400
barcode_sign_options.height = 400
barcode_sign_options.fore_color = gs.Color.red
barcode_sign_options.code_text_alignment = gs.CodeTextAlignment.BELOW
barcode_sign_options.text = "GROUP DOCS"
barcode_sign_options.transparency = 0.5   # 50 % transparent background

preview_options = gso.PreviewSignatureOptions(
    barcode_sign_options,
    create_signature_stream,
    release_signature_stream
)
preview_options.signature_id = str(uuid.uuid4())
preview_options.preview_format = gso.PreviewSignatureOptions.PreviewFormats.PNG

gs.Signature.generate_signature_preview(preview_options)

Transparent barcode

6. Overlay image support for digital signatures

PdfDigitalSignatureAppearance now honors an overlay image and a background color without obscuring the image. Control layering via SignatureCustomAppearance.IsForegroundImage.

import groupdocs.signature as gs
import groupdocs.signature.options as gso

signature_image_path = "signature.png"
certificate_path      = "JohnSmithCertificate.pfx"

input_pdf  = "SampleDocument.pdf"
output_pdf = "SignedDocument.pdf"

with gs.Signature(input_pdf) as signature:
    sign_options = gso.DigitalSignOptions(certificate_path)
    sign_options.password = "1234567890"
    sign_options.reason   = "Document approval"
    sign_options.contact  = "John Smith"
    sign_options.location = "Head Office"

    # Visible signature placement
    sign_options.visible = True
    sign_options.left    = 350
    sign_options.top     = 100
    sign_options.width   = 200
    sign_options.height  = 70
    sign_options.image_file_path = signature_image_path

    appearance = gso.PdfDigitalSignatureAppearance()
    appearance.foreground = gs.Color.from_argb(50, gs.Color.brown)
    appearance.font_family_name = "Times New Roman"
    appearance.font_size = 12
    appearance.background = gs.Color.from_argb(50, gs.Color.light_gray)
    appearance.is_foreground_image = True   # image on top of text

    sign_options.appearance = appearance

    sign_result = signature.sign(output_pdf, sign_options)

    print(f"\nDocument signed successfully with {len(sign_result.succeeded)} signature(s).")
    print(f"Signed file saved at: {output_pdf}")

Overlay image

7. Security hardening – removal of insecure algorithms

RC2, DES, TripleDES and weak AES modes have been removed from the cryptographic stack. Only modern, NIST‑approved algorithms are available, improving the default security posture of signed documents.

8. LINQ‑style query optimization

Signature search and verify now accept predicate functions that filter signatures before the heavy processing steps. This reduces memory usage and speeds up batch operations.

Search with a predicate

import groupdocs.signature as gs
import groupdocs.signature.options as gso
import groupdocs.signature.domain as gsd

with gs.Signature("document.pdf") as signature:
    search_options = [gso.TextSearchOptions()]

    # Keep only text signatures that contain the word "Approved"
    result = signature.search(search_options,
        lambda sig: isinstance(sig, gsd.TextSignature) and "Approved" in sig.text)

    for sig in result.signatures:
        print(f"Found: {sig.text}")

Verify with a predicate

with gs.Signature("signed_document.pdf") as signature:
    verify_options = gso.TextVerifyOptions("John Smith")

    # Verify only signatures on page 1
    result = signature.verify(verify_options,
        lambda sig: sig.page_number == 1)

    print(f"Found {len(result)} verified signatures on page 1")

9. Fixed Linux DOC preview crash

GeneratePreview() no longer throws a TypeInitializerException when processing Microsoft Word (.doc) files on Linux, restoring cross‑platform preview functionality.


Upgrade instructions

pip install --upgrade groupdocs-signature-net

Note: The package name groupdocs-signature-net is used for the Python‑via‑.NET wrapper.


Resources


Stay tuned for upcoming releases and keep an eye on the official blog for performance tips and best‑practice guides.