Skip to main content

Professional PDF Digital Signature SDK - Pure Python Implementation

Project description

AxPdfSigner

Professional PDF Digital Signature SDK for Python

License Python Platform

Product by Axonate Tech


Overview

AxPdfSigner is an enterprise-grade Python SDK for digitally signing PDF documents with X.509 certificates. Built with pure Python implementation, it provides a clean, intuitive interface for advanced PDF signing operations.

Features

Digital Signatures - Sign PDFs with X.509 certificates (PFX/P12)
Long-Term Validation (LTV) - Embed validation information for long-term verification
RFC 3161 Timestamping - Add trusted timestamps to signatures
Custom Appearance - Fully customizable signature appearance
Multi-Page Signing - Sign single or multiple pages
Invisible Signatures - Support for invisible digital signatures
PDF Metadata - Control document title, author, subject, keywords
Certificate Locking - Lock PDF after signing to prevent modifications
Batch Processing - Sign multiple documents efficiently
Pure Python - No external dependencies except pythonnet

Installation

pip install AxPdfSigner-1.0.0-py3-none-any.whl

Requirements

  • Python 3.7 or higher
  • Windows operating system
  • pythonnet package (installed automatically)

Quick Start

Basic Usage

from AxPdfSigner import PdfSigner, SignatureConfig

# Create signer instance
signer = PdfSigner()

# Configure signature
config = SignatureConfig(
    input_pdf="document.pdf",
    output_pdf="signed_document.pdf",
    pfx_path="certificate.pfx",
    pfx_password="your_password"
)

# Sign the document
signer.sign(config)

Advanced Usage

from AxPdfSigner import PdfSigner, SignatureConfig

# Advanced configuration
config = SignatureConfig(
    input_pdf="contract.pdf",
    output_pdf="signed_contract.pdf",
    pfx_path="company_cert.pfx",
    pfx_password="secure_password",
    
    # Signature details
    reason="Contract Approval",
    location="New York, USA",
    custom_text="Approved by Legal Department",
    signer_name="John Doe",
    
    # Position and appearance
    coordinates="100,100,300,150",  # x1,y1,x2,y2
    pages="1,3,5",  # Sign specific pages
    
    # Security features
    enable_ltv=True,
    enable_timestamp=True,
    lock_pdf=True,
    
    # PDF metadata
    title="Employment Contract",
    author="HR Department",
    subject="Contract Signing",
    keywords="contract,employment,legal"
)

signer = PdfSigner()
signer.sign(config)

Batch Signing

from AxPdfSigner import PdfSigner, SignatureConfig

configs = []
for i in range(1, 11):
    config = SignatureConfig(
        input_pdf=f"document_{i}.pdf",
        output_pdf=f"signed_{i}.pdf",
        pfx_path="certificate.pfx",
        pfx_password="password"
    )
    configs.append(config)

signer = PdfSigner()
results = signer.sign_batch(configs)

print(f"Success: {len(results['success'])}")
print(f"Failed: {len(results['failed'])}")

Configuration Parameters

Required Parameters

Parameter Type Description
input_pdf str Path to input PDF file
output_pdf str Path to output signed PDF
pfx_path str Path to PFX/P12 certificate
pfx_password str Certificate password

Optional Parameters

Parameter Type Default Description
pages str "1" Pages to sign: "1", "1,3,5", "1-5", "all"
field_name str "Signature1" Signature field name
reason str "Document Signing" Reason for signing
location str "" Location of signing
custom_text str "" Custom text in signature
signer_name str "" Override signer name (from cert CN)
coordinates str "100,100,300,150" Position: "x1,y1,x2,y2"
enable_ltv bool True Enable Long-Term Validation
enable_timestamp bool True Enable RFC 3161 timestamp
disable_green_tick bool False Disable green tick in Adobe
lock_pdf bool True Lock PDF after signing
include_subject bool False Include certificate subject DN
invisible_signature bool False Make signature invisible
fast_method bool True Use fast signing method
title str "" PDF document title
author str "" PDF document author
subject str "" PDF document subject
keywords str "" PDF document keywords

Error Handling

from AxPdfSigner import PdfSigner, SignatureConfig, SignatureException

try:
    signer = PdfSigner()
    config = SignatureConfig(...)
    signer.sign(config)
    print("✓ Document signed successfully")
    
except SignatureException as e:
    print(f"✗ Signature error: {e}")
    
except Exception as e:
    print(f"✗ Unexpected error: {e}")

API Reference

PdfSigner Class

Methods

  • sign(config: SignatureConfig) -> bool
    Sign a single PDF document

  • sign_batch(configs: List[SignatureConfig]) -> dict
    Sign multiple PDF documents in batch

  • get_version() -> str (static)
    Get SDK version

  • validate_certificate(pfx_path: str, pfx_password: str) -> dict (static)
    Validate a PFX certificate

SignatureConfig Class

Dataclass containing all signature configuration parameters.

SignatureException Class

Exception raised for signature-related errors.

System Requirements

  • OS: Windows 7/8/10/11, Windows Server 2012+
  • Python: 3.7, 3.8, 3.9, 3.10, 3.11, 3.12
  • RAM: 512 MB minimum
  • Disk: 50 MB for installation

License

This is commercial software. See LICENSE file for details.

Support

For technical support, bug reports, or feature requests:

About

Product by Axonate Tech
Website: https://axonatetech.com/

AxPdfSigner is a professional PDF digital signature solution designed for enterprise applications. Built with pure Python implementation, it provides reliable and secure PDF signing capabilities.


© 2025 Axonate Tech. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axpdfsigner-1.0.4.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axpdfsigner-1.0.4-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file axpdfsigner-1.0.4.tar.gz.

File metadata

  • Download URL: axpdfsigner-1.0.4.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for axpdfsigner-1.0.4.tar.gz
Algorithm Hash digest
SHA256 df71a70044f981deebbc5f79eacae52ec90f7c46963c7bd9402f18857fba96b8
MD5 d4c588d20a03267448c5bafa1b1eb56d
BLAKE2b-256 a65efff6ded07dce349b3bd2286e3c47500a8488020a9e21aa1f184722ebe40d

See more details on using hashes here.

File details

Details for the file axpdfsigner-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: axpdfsigner-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for axpdfsigner-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d9998eba4e9d72e3bf5ceaa2ce2da377c4651e82435837c50a7e17b8c002a0fc
MD5 e304e3627d980deed2da140712e67b93
BLAKE2b-256 4f975a406f998febcd2a7831491972b6f220401b7c75a00864113e1f01668b03

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page