arazzo: 1.0.1 info: title: Adobe Create PDF From Source File summary: Upload a source document, convert it to PDF, poll the async job, and fetch the download URI. description: >- Drives the full Adobe PDF Services asynchronous create-PDF pipeline. The workflow first registers the source file by requesting a pre-signed upload URI and asset ID, then submits a createPDF job referencing that asset, polls the job until it reports done, and finally resolves a download URI for the generated PDF. Each step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. Because the submit response exposes only an opaque Location header rather than a parseable job identifier, the job identifier used for polling is supplied as a workflow input. version: 1.0.0 sourceDescriptions: - name: pdfServicesApi url: ../openapi/adobe-pdf-services-api-openapi.yml type: openapi workflows: - workflowId: create-pdf-from-source summary: Convert an uploaded Office, image, or HTML file into a PDF. description: >- Requests an upload slot for the source file, submits a createPDF job that references the uploaded asset, polls job status until the conversion finishes, and retrieves the download URI for the resulting PDF. inputs: type: object required: - accessToken - mediaType - jobID properties: accessToken: type: string description: OAuth 2.0 bearer access token from Adobe IMS. mediaType: type: string description: MIME type of the source file (e.g. application/vnd.openxmlformats-officedocument.wordprocessingml.document). documentLanguage: type: string description: Language of the source document for OCR processing (e.g. en-US). default: en-US jobID: type: string description: The job identifier taken from the createPDF response Location header, used to poll status. steps: - stepId: requestUpload description: >- Request a pre-signed upload URI and asset ID for the source file. The file content itself is then PUT to the returned uploadUri out of band. operationId: uploadAsset parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" requestBody: contentType: application/json payload: mediaType: $inputs.mediaType successCriteria: - condition: $statusCode == 200 outputs: assetID: $response.body#/assetID uploadUri: $response.body#/uploadUri - stepId: submitCreate description: >- Submit an asynchronous createPDF job that converts the uploaded asset into a PDF. Returns 201 with an in-progress job status. operationId: createPDF parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" requestBody: contentType: application/json payload: assetID: $steps.requestUpload.outputs.assetID documentLanguage: $inputs.documentLanguage successCriteria: - condition: $statusCode == 201 outputs: status: $response.body#/status - stepId: pollStatus description: >- Poll the createPDF job until it is no longer in progress. Loops back on itself while the status remains "in progress". operationId: getJobStatus parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: operationType in: path value: createpdf - name: jobID in: path value: $inputs.jobID successCriteria: - condition: $statusCode == 200 outputs: status: $response.body#/status outputAssetID: $response.body#/asset/assetID onSuccess: - name: stillRunning type: goto stepId: pollStatus criteria: - context: $response.body condition: $.status == "in progress" type: jsonpath - name: finished type: goto stepId: getOutput criteria: - context: $response.body condition: $.status == "done" type: jsonpath - stepId: getOutput description: >- Resolve a pre-signed download URI for the generated PDF output asset. operationId: getAsset parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: assetID in: path value: $steps.pollStatus.outputs.outputAssetID successCriteria: - condition: $statusCode == 200 outputs: downloadUri: $response.body#/downloadUri outputs: sourceAssetID: $steps.requestUpload.outputs.assetID outputAssetID: $steps.pollStatus.outputs.outputAssetID downloadUri: $steps.getOutput.outputs.downloadUri