AEM Forms as a Cloud Service - Communications (0.0.1)

Adobe Experience Manager Forms as a Cloud Service - Communications.

Introduction

Communications APIs help you combine XFA-based XDP or PDF templates and Acrobat Forms (AcroForm) with XML data to generate print documents in various formats. It enable you to create applications that let you:

  • Generate documents by populating template files with XML data. For example, receipts, bills, and statements.
  • Generate forms in various formats, including non-interactive PDF print streams.
  • Generate print PDFs from XFA form PDFs.
  • Generate PDF, PostScript, PCL, and ZPL documents in bulk by merging multiple sets of data with source templates. You can find out more about document generation at Introduction to Communication APIs

Before you start

Make user account of your developer or techincal account member of forms-user group. If you do not have a technical account, make a call to Adobe Experience Manager as a Cloud Service. When you use service credential a techincal account is created on the first call.

Set up Communicaions APIs

These APIs help generate documents in bulk. To setup you environment to use the APIs, see Use batch processing. Also, set up a local development environment to test and develop the functionality using Communication APIs locally.

Download the definition file

The API reference documentation is also available in the .yaml format. You can download the .yaml for synchronous APIs and upload it to postman to check functionality of the APIs.

Token-based authentication

In token-based authentication, an access token (Bearer authentication token) is required to make requests to AEM as a Cloud Service. AEM Forms as a Cloud Service provides APIs to securely retrieve the access token. The end-to-end workflow for retrieving and using the token to authenticate a request is:

Security Scheme Type: https

Basic authentication

Basic authentication is a simple authentication scheme built into the HTTP protocol. The client sends HTTP requests with the Authorization header that contains the word Basic followed by a space and a base64-encoded string username:password. For example, to authorize as admin / admin the client sends Basic [base64-encoded string username]: [base64-encoded string password]. For information about retrieving and using token, see Token-based authentication to AEM as a Cloud Service

Security Scheme Type: https

Communications Services

Communications Services Capabilities

Generates a PDF Document from a template and merge data to it.

Authorizations:
Token-based authenticationBasic authentication
header Parameters
Accept
string
Example: multipart/mixed

This optional header indicates which content types the client is able to understand. If set to 'multipart/mixed', the service response contains two parts - generated document and additional metadata.

Request Body schema: multipart/form-data
required
string or string

The template defines appearance and behavior of the PDF document. The API supports templates of format: XDP and PDF document. You can specify a fully qualified path, reference path of your AEM Repository, or path of a binary file.

string or string

An XML file containing the data to be merged with template. You can specify a fully qualified HTTP location or path of a binary file.

string or string

The service uses an XCI configuration file to configure various properties of the PDF document. The XCI parameter has an effect only when the template is of type XDP or an XDP-based PDF document.

object (PDFOutputOptions)

Various options for the API

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "code": "string",
  • "message": "string"
}

Generate a PostScript (PS), Printer Command Language (PCL), Zebra Printing Language (ZPL) document from an XDP file or PDF document.

Authorizations:
Token-based authenticationBasic authentication
header Parameters
Accept
string
Example: multipart/mixed

This optional header indicates which content types the client is able to understand. If set to 'multipart/mixed', the service response contains two parts - generated document and additional metadata.

Request Body schema: multipart/form-data
required
string or string

The template defines appearance and behavior of the PDF document. The API supports templates of format: XDP and PDF document. You can specify a fully qualified path, reference path of your AEM Repository, or path of a binary file.

string or string

An XML file containing the data to be merged with template. You can specify a fully qualified HTTP location or path of a binary file.

string or string

The service uses an XCI configuration file to configure various properties of the PDF document. The XCI parameter has an effect only when the template is of type XDP or an XDP-based PDF document.

required
object (PrintedOutputOptions)

Various options for the API

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "code": "string",
  • "message": "string"
}

PDFOutput

required
string or string

The template defines appearance and behavior of the PDF document. The API supports templates of format: XDP and PDF document. You can specify a fully qualified path, reference path of your AEM Repository, or path of a binary file.

string or string

An XML file containing the data to be merged with template. You can specify a fully qualified HTTP location or path of a binary file.

string or string

The service uses an XCI configuration file to configure various properties of the PDF document. The XCI parameter has an effect only when the template is of type XDP or an XDP-based PDF document.

object (PDFOutputOptions)

Various options for the API

{
  • "template": "string",
  • "data": "string",
  • "xci": "string",
  • "options": {
    }
}

PDFOutputOptions

locale
string
Default: "en"

Locale in which pdf should be rendered.

contentRoot
string

Location of template resources (images, fragments, etc.).

isTagged
boolean
Default: false

Specify if the PDF document can be tagged.

embedFonts
boolean
Default: false

Enable the option to embed fonts to the PDF document.

linearizedPDF
boolean
Default: false

Enable the option to optimize the PDF for web viewing.

retainFormState
boolean
Default: false

Set true to retain PDF Form state while flattening PDF. This parameter has effect only when source template is an XFA-based PDF Form and no input data is provided.

retainUnsignedSignatureFields
boolean
Default: false

Set true to retain interactive unsigned signature fields in generated Flat PDF. It allows you to use PDF for gathering signatures.

acrobatVersion
string
Enum: "Acrobat_10" "Acrobat_10_1" "Acrobat_11"

Set the minimum version of Acrobat Reader required to open the PDF document.

{
  • "locale": "en",
  • "isTagged": false,
  • "embedFonts": false,
  • "linearizedPDF": false,
  • "retainFormState": false,
  • "retainUnsignedSignatureFields": false,
  • "acrobatVersion": "Acrobat_11"
}

PrintedOutput

required
string or string

The template defines appearance and behavior of the PDF document. The API supports templates of format: XDP and PDF document. You can specify a fully qualified path, reference path of your AEM Repository, or path of a binary file.

string or string

An XML file containing the data to be merged with template. You can specify a fully qualified HTTP location or path of a binary file.

string or string

The service uses an XCI configuration file to configure various properties of the PDF document. The XCI parameter has an effect only when the template is of type XDP or an XDP-based PDF document.

required
object (PrintedOutputOptions)

Various options for the API

{
  • "template": "string",
  • "data": "string",
  • "xci": "string",
  • "options": {
    }
}

PrintedOutputOptions

locale
string
Default: "en"

Specify locale/language for the output document.

contentRoot
string

Location of template resources (images, fragments, etc.).

copies
integer
Default: 1

Sets the number of copies to print. The default number is 1.

paginationOverride
string
Enum: "simplex" "duplexShortEdge" "duplexLongEdge"

Set the option to print on one side or both the sides of a page.

required
object (PrintConfig)

print configuration.

{
  • "locale": "en",
  • "copies": 1,
  • "paginationOverride": "simplex",
  • "printConfig": {
    }
}

PrintConfig

xdcUri
string
Enum: "hppcl5e.xdc" "hppcl5c.xdc" "ps_plain.xdc" "ps_plain_level3.xdc" "zpl300.xdc" "zpl600.xdc" "ipl300.xdc" "ipl400.xdc" "tpcl600.xdc" "dpl300.xdc" "dpl406.xdc" "dpl600.xdc"
renderType
string
Enum: "PostScript" "PCL" "ZPL" "DPL" "IPL" "TPCL"
{
  • "xdcUri": "hppcl5e.xdc",
  • "renderType": "PostScript"
}