Professional PDF Digital Signature SDK - Pure Python Implementation
Project description
AxPdfSigner
Professional PDF Digital Signature SDK for Python
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:
- Website: https://axonatetech.com/
- Email: support@axonatetech.com
- Documentation: https://axonatetech.com/docs
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axpdfsigner-1.0.1.tar.gz.
File metadata
- Download URL: axpdfsigner-1.0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe043a2563cd75fe113ffe1618189cf7b0182e60d2bc3491a45967247f1469b9
|
|
| MD5 |
da8345200e6587f09ed692d8c11b666b
|
|
| BLAKE2b-256 |
20069cd23110508a47b6acec55049c1444992b363056eb94d35d5bcfff5769c1
|
File details
Details for the file axpdfsigner-1.0.1-py3-none-any.whl.
File metadata
- Download URL: axpdfsigner-1.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e9509772e226cf4fbd27140365211c6830970c973b357b74f40ee5d6ac4e85a
|
|
| MD5 |
6d06ca5d7bf3e6582ce3e7e854cc4c5a
|
|
| BLAKE2b-256 |
00114faaf3797b856427ac8a91cb6ff1c63c05a7569da56991fc73004ad42738
|