Registry / data / pdfservices-sdk

pdfservices-sdk

JSON →
library4.2.0pypypiunverified

Adobe PDF Services SDK for Python provides client libraries to interact with Adobe Document Cloud PDF Services APIs. It enables developers to programmatically perform operations like PDF creation, export, compression, OCR, document generation, and more. The current version is 4.2.0. Releases are typically infrequent, corresponding to updates in the underlying Adobe API services.

pip install pdfservices-sdk
INSTALL
IMPORT
SIG · PDFSERVICES-SDK
P
pdfservices-sdk
datapythonv4.2.0
Install
5.7s avg
Import
Disk
100MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 5.55s
py 3.11
✓ —
✓ 5.75s
py 3.12
✓ —
✓ 5.55s
py 3.13
✓ —
✓ 5.55s
py 3.9
✕ build_error
✓ 5.85s
100MB installed
● package 100MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PdfServiceClient
from adobe.pdfservices.operation.pdf_services_client import PdfServiceClient
from adobe.pdfservices.operation.pdf_services_client import PdfServiceClient

This quickstart demonstrates how to initialize the PDF Services client, authenticate using file-based credentials, and convert a simple HTML string to a PDF document. It highlights the use of `AdobeAuthCredentials` and `PdfServicesConfig` for setup, and `FileRef` for handling input/output files.

import os from pdfservices_sdk.pdf_services_client import PdfServiceClient from pdfservices_sdk.pdf_services_config import PdfServicesConfig from pdfservices_sdk.auth.credentials import AdobeAuthCredentials from pdfservices_sdk.io.file_ref import FileRef from pdfservices_sdk.jobs.createpdf.create_pdf_from_html_job import CreatePdfFromHtmlJob # Ensure you have your credentials.json file path set as an environment variable # Or provide the path directly: credentials_path = "./pdfservices-api-credentials.json" credentials_path = os.environ.get("PDF_SERVICES_SDK_CLIENT_CREDENTIALS_PATH", "./pdfservices-api-credentials.json") # Create a dummy HTML file for conversion dummy_html_content = "<h1>Hello from Adobe PDF Services!</h1><p>This is a test.</p>" with open("input.html", "w") as f: f.write(dummy_html_content) try: # 1. Build AdobeAuthCredentials using a file-based builder. # Ensure credentials.json has 'client_id', 'client_secret', and 'organization_id'. credentials = AdobeAuthCredentials.file_based_credentials_builder()\ .with_credentials_path(credentials_path).build() # 2. Build PdfServicesConfig with the created credentials. pdf_services_config = PdfServicesConfig.builder().with_credentials(credentials).build() # 3. Create a PdfServiceClient. pdf_service_client = PdfServiceClient.builder().with_pdf_services_config(pdf_services_config).build() # 4. Create an input FileRef from the HTML file. input_file_ref = FileRef.from_local_file("input.html") # 5. Create a CreatePdfFromHtmlJob instance. create_pdf_from_html_job = CreatePdfFromHtmlJob(input_file_ref) # 6. Execute the job and get the output FileRef. result_file_ref = pdf_service_client.execute(create_pdf_from_html_job) # 7. Save the result to a local file. output_path = "output.pdf" result_file_ref.save_as_file(output_path) print(f"Successfully created PDF: {output_path}") except Exception as e: print(f"An error occurred: {e}") finally: # Clean up dummy files if os.path.exists("input.html"): os.remove("input.html") # if os.path.exists("output.pdf"): # os.remove("output.pdf") # Uncomment to remove generated PDF after successful run
Debug
Known issues
breakingMajor API changes in version 4.0.0 related to SDK configuration. The `SDKConfig` class has been replaced by `PdfServicesConfig`.
fix
Update all instances of `SDKConfig` to `PdfServicesConfig` and ensure `PdfServiceClient` is built with `with_pdf_services_config` instead of `with_sdk_config`.
affects: >=4.0.0
breakingFile-based authentication for `ServicePrincipalCredentials` was refactored in v4.x. You must now use `AdobeAuthCredentials.file_based_credentials_builder()` instead of `ServicePrincipalCredentials.file_based_credentials_builder()`.
fix
Replace `ServicePrincipalCredentials` with `AdobeAuthCredentials` for file-based authentication setup. The `credentials.json` file structure remains the same.
affects: >=4.0.0
gotchaAll API calls require valid `credentials.json` with `client_id`, `client_secret`, and `organization_id`.
fix
Ensure your `credentials.json` file is correctly formatted and accessible via the specified path (or environment variable). Obtain credentials from the Adobe Developer Console.
affects: All
gotchaInput and output files are handled using `FileRef` objects. For local files, ensure the paths are correct and the SDK has read/write permissions.
fix
Always use `FileRef.from_local_file()` for inputs and `FileRef.save_as_file()` for outputs. Ensure proper error handling for file operations.
affects: All
Upgrade
Version history
4.2.0latest on PyPI · released Jul 10, 2025
Audit
Dependencies
pythonrequiredRequires Python 3.10 or higher.
Agent activity
29 hits · last 30 days
node
24
OpenAI (training)
1
Resources