API Reference
Contents:
- Authentication
- Config
- Exceptions
- IO
- PDF Jobs
- Jobs
- AutotagPDFJob
- CombinePDFJob
- CompressPDFJob
- CreatePDFJob
- DeletePagesJob
- DocumentMergeJob
- PDFElectronicSealJob
- ExportPDFJob
- ExportPDFtoImagesJob
- ExtractPDFJob
- HTMLtoPDFJob
- InsertPagesJob
- LinearizePDFJob
- OCRPDFJob
- PDFPropertiesJob
- ProtectPDFJob
- RemoveProtectionJob
- ReorderPagesJob
- ReplacePagesJob
- RotatePagesJob
- SplitPDFJob
- PDFWatermarkJob
- PDFAccessibilityCheckerJob
- ImportPDFFormDataJob
- ExportPDFFormDataJob
- Params
- AutotagPDFParams
- CombinePDFParams
- CompressPDFParams
- CompressionLevel
- CreatePDFParams
- CreatePDFFromExcelParams
- DocumentLanguage
- CreatePDFFromPPTParams
- DocumentLanguage
- CreatePDFFromWordParams
- DocumentLanguage
- DeletePagesParams
- DocumentMergeParams
- Fragments
- OutputFormat
- PDFElectronicSealParams
- RFC3161TSAOptions
- AppearanceItem
- AppearanceOptions
- CSCAuthContext
- CSCCredentials
- DocumentLevelPermission
- FieldLocation
- FieldOptions
- SignatureFormat
- TSABasicAuthCredentials
- ImportPDFFormDataParams
- ExportPDFFormDataParams
- TSAOptions
- ExportPDFParams
- ExportOCRLocale
- ExportPDFTargetFormat
- ExtractPDFParams
- ExtractElementType
- ExtractRenditionsElementType
- TableStructureType
- HTMLtoPDFParams
- PageLayout
- InsertPagesParams
- OCRParams
- OCRSupportedLocale
- OCRSupportedType
- PDFPropertiesParams
- ExportPDFtoImagesParams
- ExportPDFToImagesOutputType
- ExportPDFToImagesTargetFormat
- ProtectPDFParams
- ContentEncryption
- EncryptionAlgorithm
- PasswordProtectParams
- Permission
- Permissions
- RemoveProtectionParams
- ReorderPagesParams
- ReplacePagesParams
- RotatePagesParams
- Angle
- SplitPDFParams
- PageRanges
- PDFServicesJobParams
- PDFWatermarkParams
- WatermarkAppearance
- PDFAccessibilityCheckerParams
- Result
- AutotagPDFResult
- CombinePDFResult
- CompressPDFResult
- CreatePDFResult
- DeletePagesResult
- DocumentMergeResult
- ESealPDFResult
- ExportPDFResult
- ExportPDFtoImagesResult
- ExtractPDFResult
- HTMLtoPDFResult
- InsertPagesResult
- LinearizePDFResult
- OCRPDFResult
- PDFPropertiesResult
- ProtectPDFResult
- RemoveProtectionResult
- ReorderPagesResult
- ReplacePagesResult
- RotatePagesResult
- SplitPDFResult
- PDFServicesJobResult
- PDFWatermarkResult
- PDFAccessibilityCheckerResult
- ImportPDFFormDataResult
- ExportPDFFormDataResult
- Jobs
PDFServices
- class adobe.pdfservices.operation.pdf_services.PDFServices(credentials: Credentials, *, client_config: ClientConfig | None = None)
Bases:
objectThis class is the entry point for all the PDF Service utilities. These utilities can be used to perform various functions such as submitting
PDFServicesJob, getting status of aPDFServicesJob, getting result of aPDFServicesJob, uploadingAsset, getting content of anAsset, deleting anAssetand refreshing anAsset.Constructs a new
PDFServicesinstance with the given Credentials and ClientConfig.- Parameters:
credentials (Credentials) – Credentials to be used for authentication; can not be None.
client_config (ClientConfig) – Client configuration for PDFServices. (Optional, use key-value)
- delete_asset(asset: Asset)
Deletes asset from PDF Services storage.
- Parameters:
asset (Asset) – Asset to be deleted; can not be None.
- Raises:
ServiceApiException – If an error is encountered while submitting the job.
SdkException – Is thrown for client-side or network errors.
- get_content(asset: Asset) StreamAsset
- Parameters:
asset (Asset) – Asset to the content; can not be None.
- Raises:
ServiceApiException – If an error is encountered while submitting the job.
SdkException – Is thrown for client-side or network errors.
- Returns:
Returns the content of the asset.
- Return type:
- get_job_result(polling_url: str, result_type: ABCMeta) PDFServicesResponse
Returns PDFServicesResponse for the submitted
PDFServicesJobresult.- Parameters:
polling_url (str) – URL to be polled to get the job result; can not be None.
result_type (PDFServicesJobResult.__class__) – result class for
PDFServicesJob, it will be an implementation of PDFServicesJobResult; can not be None.
- Raises:
ServiceApiException – If an error is encountered while submitting the job.
SdkException – Is thrown for client-side or network errors.
- Returns:
PDFServicesResponse for the submitted job.
- Return type:
- get_job_status(polling_url: str) PDFServicesJobStatusResponse
- Parameters:
polling_url (str) – URL to be polled to get the job status; can not be None.
- Raises:
ServiceApiException – If an error is encountered while submitting the job.
SdkException – Is thrown for client-side or network errors.
ServiceUsageException – If service usage limits have been reached or credentials quota has been exhausted.
- Returns:
Returns PDFServicesJobStatusResponse for the submitted
PDFServicesJob.- Return type:
- submit(pdf_services_job: PDFServicesJob, *, notify_config_list: List | None = None) str
Creates the
PDFServicesJoband returns the polling URL.- Parameters:
pdf_services_job (PDFServicesJob) – PDFServicesJob} to be submitted; can not be None.
notify_config_list (list) – List of
NotifierConfigto be used for notification. (Optional, use key-value)
- Raises:
ServiceApiException – If an error is encountered while submitting the job.
SdkException – Is thrown for client-side or network errors.
ServiceUsageException – If service usage limits have been reached or credentials quota has been exhausted.
- Returns:
the polling URL.
- Return type:
str
- upload(input_stream: Any, mime_type: str) Asset
Upload content from input stream and returns an
Assetto be used in PDF Services SDK.Method will not close the input stream, responsibility of closing the input stream lies with the client.
- Parameters:
input_stream – input stream that is to be uploaded; can not be None.
mime_type (str) – mime type of the input stream; can not be None.
- Raises:
ServiceApiException – If an error is encountered while submitting the job.
SdkException – Is thrown for client-side or network errors.
ServiceUsageException – If service usage limits have been reached or credentials quota has been exhausted.
- Returns:
asset containing the uploaded content
- Return type:
- upload_assets(upload_asset_list: List) []
Upload content from list of
StreamAssetand returns a list ofAssetto be used in PDF Services SDK.Method will not close the input stream of the Stream Asset, responsibility of closing the input stream lies with the client.
- Parameters:
upload_asset_list (list) –
StreamAssetlist that is to be uploaded; can not be None.- Raises:
ServiceApiException – If an error is encountered while submitting the job.
SdkException – Is thrown for client-side or network errors.
- Returns:
returns a list of
Assetto be used in PDF Services SDK.- Return type:
list
PDFServicesJob
- class adobe.pdfservices.operation.pdf_services_job.PDFServicesJob
Bases:
ABCThis abstract class represents the basic contract for all the PDF Services Jobs. It imposes no restrictions or particular details on the job execution process and leaves the specifics of setting up the jobs to their individual implementations.
PDFServicesJobStatus
- class adobe.pdfservices.operation.pdf_services_job_status.PDFServicesJobStatus(value)
Bases:
EnumStatus types for
PDFServicesJob.Constructs PDF Services job status using its string representation.
- Parameters:
value (str) – string representation of PDF services job status.
- DONE = 'done'
Represents completed status
- FAILED = 'failed'
Represents failed status
- IN_PROGRESS = 'in progress'
Represents in progress status
- get_value()
- Returns:
string representation of
PDFServicesJobStatus.- Return type:
str
PDFServicesJobStatusResponse
- class adobe.pdfservices.operation.pdf_services_job_status_response.PDFServicesJobStatusResponse(status: str, headers: {})
Bases:
objectResponse object encapsulating
PDFServicesJobstatus and retry interval.Constructs
PDFServicesJobstatus response with its status, headers.- Parameters:
status (str) – Status of the
PDFServicesJob.headers (dict) – Headers of the
PDFServicesResponse.
- get_retry_interval() int
- Returns:
retry interval for status polling of the
PDFServicesJobin seconds.- Return type:
int
- get_status()
- Returns:
string representation of
PDFServicesJobStatusfor thePDFServicesJob.- Return type:
str
PDFServicesMediaType
- class adobe.pdfservices.operation.pdf_services_media_type.PDFServicesMediaType(value)
Bases:
str,EnumAn enumeration.
- AI = 'application/illustrator'
Represents ai mime type.
- BMP = 'image/bmp'
Represents bmp mime type.
- CSV = 'text/csv'
Represents csv mime type.
- DOC = 'application/msword'
Represents msword mime type.
- DOCX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
Represents docx mime type.
- GIF = 'image/gif'
Represents gif mime type.
- HTML = 'text/html'
Represents html mime type.
- INDD = 'application/x-indesign'
Represents indd mime type.
- JPEG = 'image/jpeg'
Represents jpeg mime type.
- JPG = 'image/jpeg'
Represents jpg mime type.
- JSON = 'application/json'
Represents json mime type.
- PDF = 'application/pdf'
Represents pdf mime type.
- PNG = 'image/png'
Represents png mime type.
- PPT = 'application/vnd.ms-powerpoint'
Represents ppt mime type.
- PPTX = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
Represents pptx mime type.
- PSD = 'image/vnd.adobe.photoshop'
Represents psd mime type.
- RTF = 'text/rtf'
Represents rtf mime type.
- SVG = 'image/svg+xml'
Represents svg mime type.
- TIF = 'image/tiff'
Represents tif mime type.
- TIFF = 'image/tiff'
Represents tiff mime type.
- TXT = 'text/plain'
Represents txt mime type.
- XLS = 'application/vnd.ms-excel'
Represents xls mime type.
- XLSX = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
Represents xlsx mime type.
- ZIP = 'application/zip'
Represents zip mime type.
- property extension
- Returns:
Extension of PDFServicesMediaType.
- static get_from_extension(extension: str)
- Returns:
PDFServicesMediaType for the given extension.
- property mime_type
- Returns:
Media type of PDFServicesMediaType.
PDFServicesResponse
- class adobe.pdfservices.operation.pdf_services_response.PDFServicesResponse(status: str, headers: {<class 'str'>: <class 'str'>}, result)
Bases:
PDFServicesJobStatusResponseResponse object for
PDFServicesJob.Constructs
PDFServicesJobresponse with its status, headers and result.- Parameters:
status (str) – Status of the
PDFServicesJob.headers (dict) – Headers of the
PDFServicesResponse.result – result for the
PDFServicesJob, it will be an extension ofPDFServicesJobResult.
- get_result()
- Returns:
Returns instance of result of
PDFServicesJob.
Region
- class adobe.pdfservices.operation.region.Region(value)
Bases:
str,EnumSupported regions to be used with
ClientConfig.- EU = 'eu'
Represents “Europe” region
- US = 'us'
Represents “US” region