adobe-acrobat-services
Service icon

Adobe Acrobat Services

Stable version 3.1.0 (Compatible with OutSystems 11)
Uploaded
 on 04 October 2023
 by 
5.0
 (2 ratings)
adobe-acrobat-services

Adobe Acrobat Services

Documentation
3.1.0

A how-to get started with this component is available on my blog

https://medium.com/itnext/starting-out-with-outsystems-and-adobe-acrobat-services-dd3410ff920e

Specific documentation for Document Generation

Read the how-to get started article first before proceeding with Document Generation

Install Adobe Document Generation Word AddIn

https://developer.adobe.com/document-services/docs/overview/document-generation-api/wordaddin/

This AddIn helps you to turn static Word Documents into templates suitable for Adobe Document Generation.

Please note: The source Word documents must be document in docx format. Do not use a Word template in dotx format.

Define a JSON structure for your data

Document Generation merges a JSON data document with the template. I recommend that you start by defining a JSON data sample in an editor like Visual Studio Code first. You can then import this sample into the Adobe Document Generation Word AddIn.

A sample could look like this

{

"title": "Terminator 2: Judgment Day",

"plot": "A cyborg, identical to the one who failed to kill Sarah Connor, must now protect her ten year old son John from an even more advanced and powerful cyborg.",

"director": {

"name": "James Cameron"

},

"writers": [

{

"name": "James Cameron"

},

{

"name": "William Wisher"

}

],

"stars": [

{

"name": "Arnold Schwarzenegger"

},

{

"name": "Linda Hamilton"

},

{

"name": "Edward Furlong"

}

],

"genres": [

"Action",

"Sci-Fi"

]

}

Create an OutSystems Structure

Next create a data structure. Make sure to specify the name in JSON attribute correctly to ensure proper serialization.

Create the Word Document template

  • Open Microsoft Word with a blank document
  • In the Ribbon bar click on the Document Generation action button
  • In the task are that appears click on Get Started
  • Click on Upload JSON and select the sample JSON data you created, then click Generate Tags.

Now you can go ahead and design your Word document. Select placeholders for single data elements like title from the Basic tab. Add List oder Table elements from the Advanced tab.

When you are finished save the document.


Build your application that a user can either upload the document template or put it into static resources. Then create the document generation flow

  • Upload the document template using the Adobe_DocumentUpload action
  • Fill the created data structure with your data
  • Serialize the data structure using JSONSerialize
  • Use Adobe_DocumentGenerate. Set AssetId to the resulting AssetId of Adobe_DocumentUpload, Select the OutputFormat (<- Static entity). Set JsonDataForMerge to the serialized data you created.


If the operation is successful you receive a result AssetId. Use this AssetId with Adobe_DocumentDownload server action to download the result document.






3.0.0

For a complete walkthrough on how to use this component please visit https://stefan-weber.medium.com/starting-out-with-outsystems-and-adobe-acrobat-services-dd3410ff920e