Copy link to clipboard
Copied
When running the document generation API to generate a PDF, we need to pass:
We currently retrieve the template from a document management repository using an API. The API response contains the document template as a character string representing the binary data of the word document.
How can we use this response representing the template file, and pass that to the Adobe Document generation API? Must we save this template to a physical drive before calling the Adobe API?
Any example welcome.
Regards,
Laurent LANDREAU
Integration Architect, Brisbane
Copy link to clipboard
Copied
You can either save it to the file system, or use a stream. Here's a Node specific doc link: https://opensource.adobe.com/pdfservices-node-sdk-samples/apidocs/latest/FileRef.html
Copy link to clipboard
Copied
We are trying to upload documents in Adobe but we have the following error when trying to load a multi-part file as a stream:
{"requestId":"eetdkUFpeI2XLTAW3v4y9vI4DXMXTt4b","type":"Internal Server Error","title":"There was an error processing your request.","status":500,"report":"{\"error_code\":\"INTERNAL_SERVER_ERROR\"}"}"
Is there any error log that is accessible that would provide additional explanation on what the error is?
Regards,
Laurent LANDREAU
Integration Architect, Brisbane
Copy link to clipboard
Copied
Honestly it's hard to know without more code. Could you share a bit about how you are doing it?
Copy link to clipboard
Copied
Hello Raymond.
We are building a multipart/form-data request (received from a precending API call to a document management system) to send to Adobe PDF Services API and create a PDF file.
The request works successfully through Postman but fails using the service we have build to call Adobe in our API platform. The call also fails when we try to use SoapUI.
The difference we have seen and proven is that Postman builds the request with a Boundary value
of "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" whereas both SoapUI and our API platform service create a boundary
containing the character "=" e.g. "Content-Type: multipart/form-data; boundary="----=_Part_2_25102003.1651646044535"
The Adobe throws the error shown when the character "=" is in the Boundary. A "=" appears to be a valid character according to According to RFC 2046, section 5.1.1.
Is there a workaround or setting that we are not aware of?
Thanks,
Laurent LANDREAU
Integration Architect, Brisbane, Australia
Copy link to clipboard
Copied
Not sure what to suggest here. As far as I know, if your multpart request is valid, the REST API should support it. If you can create a script that I can use to reproduce this, I can file a bug. So you would need to get a PDF you are ok sharing, read it in as a file stream, and try to reproduce the error. I could then take this to engineering.