PaperlogicSDK-1.0.9


توضیحات

A Python SDK for digital document signing
ویژگی مقدار
سیستم عامل -
نام فایل PaperlogicSDK-1.0.9
نام PaperlogicSDK
نسخه کتابخانه 1.0.9
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده -
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/PaperlogicSDK/
مجوز -
# Python SDK for Document Signing This Python SDK provides a CLI tool to sign PDF documents securely using various authentication mechanisms and environments. ## Installation You can install the SDK using `pip`: ```bash pip install PaperlogicSDK ``` PaperlogicSDK requires Python 3.8 or later ## Features - Digital document signing with multiple certificate types (PKI). - Local digital signature processing - no need to upload files to server. - Support for password-protected PDF files. - Multiple environment support (Development, Staging, Production). - AWS CloudHSM integration for secure key management and signing operations. - Customizable signature imprint position. ## Quick Start Once installed, you can use the CLI tool as follows: ```bash pplg sign -i test_file.pdf -o test-signed.pdf -tk YOUR_API_TOKEN -t YOUR_TENANT_ID ``` ### CLI Options | Option | Description | Required | Default | |-------------------|-----------------------------------------------------|----------|---------| | `-i`, `--input_file` | Input file path | Yes | - | | `-o`, `--output_file` | Output file path | Yes | - | | `-tk`, `--api_token` | API token for authentication | Yes | - | | `-t`, `--tenant_id` | Tenant ID | Yes | - | | `-pki`, `--pki` | Certificate type (0, 1, 2, 3, 4) | No | 0 | | `-env`, `--environment` | Environment to run the SDK (`dev`, `stg`, `prod`) | No | `stg` | | `-uid`, `--user_id` | User ID | No | - | | `-e`, `--email` | Email address | No | - | | `-pwd`, `--pdf_password` | Password for encrypted PDF files | No | - | | `-pos`, `--position` | Signature imprint position as JSON | No | - | ### Example To sign a document, provide the required options: ```bash pplg sign -i input.pdf -o signed.pdf -tk YOUR_API_TOKEN -t YOUR_TENANT_ID -pki CERT_TYPE ``` If the PDF is password-protected, include the password: ```bash pplg sign -i input.pdf -o signed.pdf -tk YOUR_API_TOKEN -t YOUR_TENANT_ID -pki CERT_TYPE -pwd PDF_PASSWORD ``` To specify custom signature position: ```bash pplg sign -i input.pdf -o signed.pdf -tk YOUR_API_TOKEN -t YOUR_TENANT_ID -pki CERT_TYPE -pos '{"page": 0, "left": 200, "bottom": 200, "height": 60, "width": 60}' ``` To use a custom stamp image: ```bash pplg sign -i input.pdf -o signed.pdf -tk YOUR_API_TOKEN -t YOUR_TENANT_ID -pki CERT_TYPE -pos '{"page": 0, "left": 200, "bottom": 200, "height": 60, "width": 60, "custom_imprint": "/path/to/stamp.png"}' ``` ### Error Handling The SDK provides detailed error messages for various scenarios: - **Password Required**: If the PDF file is encrypted but no password is provided. - **User ID Required**: When signing with a company seal and no `user_id` is provided. - **Other Errors**: Displays specific error codes for troubleshooting.


نیازمندی

مقدار نام
- asn1crypto==1.5.1
- uritools==4.0.3
- oscrypto==1.3.0
- tzlocal==5.2
- pycryptodome==3.15.0
- click==8.1.7
- requests==2.32.3
- cryptography==43.0.3
- pytz==2023.3
- python-pkcs11==0.7.0
- pyhanko-certvalidator==0.29.0
- Pillow==10.4.0
- reportlab==4.0.4
- PyPDF2==3.0.1


زبان مورد نیاز

مقدار نام
>=3.8 Python


نحوه نصب


نصب پکیج whl PaperlogicSDK-1.0.9:

    pip install PaperlogicSDK-1.0.9.whl


نصب پکیج tar.gz PaperlogicSDK-1.0.9:

    pip install PaperlogicSDK-1.0.9.tar.gz