Document Generation API issue

New Here ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

When running the document generation API to generate a PDF, we need to pass:

  • a document template, 
  • a JSON structure with the metadata, 
  • and credentials.

 

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

TOPICS
PDF Services API

Views

158

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 27, 2022 Apr 27, 2022

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 03, 2022 May 03, 2022

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 04, 2022 May 04, 2022

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?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 05, 2022 May 05, 2022

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

LATEST

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. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources