Metadata-Version: 2.4
Name: groupdocs-signature-net
Version: 26.10.0
Summary: GroupDocs.Signature for Python via .NET - Electronic signatures for documents
Author-email: GroupDocs <support@groupdocs.com>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://products.groupdocs.com/signature/python-net/
Project-URL: Documentation, https://docs.groupdocs.com/signature/python-net/
Keywords: signature,sign,esign,digital-signature,barcode,qr-code,stamp,document,pdf,groupdocs,dotnet
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: <3.15,>=3.5
Description-Content-Type: text/markdown

[![banner](https://raw.githubusercontent.com/groupdocs/groupdocs.github.io/master/img/banners/groupdocs-signature-python-net-banner.png)](https://docs.groupdocs.com/signature/python-net/)

[![PyPI](https://img.shields.io/pypi/v/groupdocs-signature-net)](https://pypi.org/project/groupdocs-signature-net/)

[Product Page](https://products.groupdocs.com/signature/python-net/) | [Documentation](https://docs.groupdocs.com/signature/python-net/) | [Free Support](https://forum.groupdocs.com/c/signature) | [Temporary License](https://purchase.groupdocs.com/temporary-license)

Add electronic signatures to documents - text, image, barcode, QR code, digital and stamp signatures.

## Key Features

- Text, image, barcode, QR code, stamp, metadata, form-field and digital (certificate) signatures
- Search, verify, update and delete existing signatures
- Document page previews and signature previews, written through your own Python callbacks
- Custom encryption for QR code and metadata signatures, custom loggers, and external signing (HSM, Azure Key Vault) through a Python `custom_sign_hash`
- PDF, Word, Excel, PowerPoint, OpenDocument and image formats

## Installation

```bash
pip install groupdocs-signature-net
```

## Quick Start

```python
from groupdocs.signature import Signature
from groupdocs.signature.options import TextSignOptions

with Signature("document.pdf") as sig:
    options = TextSignOptions("Approved")
    sig.sign("signed.pdf", options)
```

## Previews and other callbacks

Wherever the engine takes a callback, pass a Python function or object:

```python
from groupdocs.signature import Signature
from groupdocs.signature.options import PreviewOptions

def create_page_stream(page_data):
    return open("page-%d.png" % page_data.page_number, "wb")

def release_page_stream(page_data, page_stream):
    page_stream.close()

with Signature("document.pdf") as sig:
    sig.generate_preview(PreviewOptions(create_page_stream, release_page_stream))
```

The same works for signature previews (`PreviewSignatureOptions`), loggers (`SignatureSettings(logger)`), `data_encryption` and `custom_sign_hash`; `AGENTS.md` in the package lists the shapes.

## Security defaults

The 26.9 engine rejects expired or not-yet-valid signing certificates (`DigitalSignOptions.allow_expired` / `allow_not_yet_valid` opt back in), does not load external resources (`LoadOptions.skip_external_resources`, `whitelisted_resources`), signs PDFs with SHA-256 and verifies PDF signatures cryptographically.

## System Requirements

- Python 3.5 - 3.14, pip 20.3 or newer
- Windows x64, Linux x64, macOS x64/ARM64 — 64-bit Python only; there is no 32-bit Windows wheel
- Linux: glibc 2.27 or newer (e.g. Ubuntu 18.04+, Debian 10+, RHEL 8+), plus ICU, fontconfig, libgdiplus and the Microsoft core fonts: `apt-get install libicu-dev libfontconfig1 libgdiplus ttf-mscorefonts-installer` (on Debian, enable the `contrib` component first). libgdiplus is needed for stamp and text-as-image signatures, for barcode, QR code and image signatures with a border or transparency, for any signature on PowerPoint and image files, and for text and stamp signature previews; the core fonts for PDF text and digital signatures, whose default fonts are Times New Roman and Arial.
- macOS 12 or newer, Intel or Apple Silicon: `brew install mono-libgdiplus` for the same features.

## Troubleshooting

| Error | Platform | Fix |
|---|---|---|
| `The type initializer for 'Gdip' threw an exception` / `DllNotFoundException: libgdiplus` | Linux/macOS | Install libgdiplus: `apt-get install libgdiplus` / `brew install mono-libgdiplus` |
| `Font Times New Roman was not found` / `Font Arial was not found` | Linux | Install the Microsoft core fonts: `apt-get install ttf-mscorefonts-installer` (Debian: enable `contrib`), then `fc-cache -f` |
| `Couldn't find a valid ICU package`, or the process aborts on first use | Linux | Install ICU: `apt-get install libicu-dev`; do NOT set `DOTNET_SYSTEM_GLOBALIZATION_INVARIANT` |
| `is not a supported wheel on this platform`, or `No matching distribution found` | Linux/macOS | The OS is older than the wheel needs (glibc 2.27, macOS 12), or pip is older than 20.3: `python -m pip install --upgrade pip`. On an Intel Mac, a Python built against an old SDK reports macOS 10.16 — use pip 24.1+ or `SYSTEM_VERSION_COMPAT=0 pip install groupdocs-signature-net` |
| `The signing certificate expired on ...` | all | Since 26.9 expired certificates are rejected; renew it, or set `allow_expired = True` on the `DigitalSignOptions` |
| `The number of pages cannot exceed 2 in a trial version`, or search returns an evaluation notice instead of the signature's text | all | No license is applied: set `GROUPDOCS_LIC_PATH` or call `License().set_license(path)`. A damaged or wrong license file is accepted without an error, so check a signed page for the evaluation line |

## Upgrading from 26.1

26.1 was built by an earlier toolchain; the modules are the same, but check these:

- A few names changed: `z_order` → `zorder`, `x_ad_es_type` → `xad_es_type`, `h_corner_radius` / `v_corner_radius` → `hcorner_radius` / `vcorner_radius`, `FileType.G_ZIP` → `GZIP`, and nine `BarcodeTypes` constants lost an underscore (`GS1_CODE_128` → `GS1_CODE128`).
- Assigning an attribute a class does not have now raises `AttributeError` with a suggestion; 26.1 accepted it silently, so a renamed property was simply ignored.
- Engine errors raise `GroupDocsSignatureException` (or `IncorrectPasswordException` / `PasswordRequiredException`) instead of `RuntimeError("Proxy error(...)")`, and they do not derive from `RuntimeError`.
- Preview page numbers are 0-based (`page_data.page_number` is 0 for the first page).
- `GROUPDOCS_LIC_PATH` is applied at import.

The [release notes](https://releases.groupdocs.com/signature/python-net/release-notes/) have the full list.

## AI Agent & LLM Friendly

This package is designed for seamless integration with AI agents, LLMs, and automated code generation tools.

- **`AGENTS.md` in the package** — AI coding assistants (Claude Code, Cursor, GitHub Copilot) auto-discover the API surface, usage patterns, and troubleshooting tips from the installed package
- **MCP server** — connect your AI tool to GroupDocs documentation for on-demand API lookups:
  ```json
  { "mcpServers": { "groupdocs-docs": { "url": "https://docs.groupdocs.com/mcp" } } }
  ```
- **Machine-readable docs** — full documentation available as plain text for RAG and LLM context:
  - Single file: `https://docs.groupdocs.com/signature/python-net/llms-full.txt`
  - Per page: append `.md` to any docs URL

