AEM Document Services on OSGi
The AEM Document Services on OSGi provide a range of services from document generation to document security. Although they are relatively new to OSGi, AEM Document Services have provided important business benefits to Adobe clients for over 15 years. You can use the AEM Document ServicesAEM Document Services to enhance your AEM applications with all of the following capabilities.
- Generate a Document of Record (DoR) for your AEM forms.
- Dynamically Assemble PDF files and packages.
- Secure, Certify, and Digitally Sign PDFs
- Reader Extend PDF forms for users of the free Adobe Acrobat Reader program.
Originating in the Adobe LiveCycle product line, AEM Document Services are also supported on the JEE platform in Adobe’s AEM Forms on JEE product. However, if you use Adobe Experience Manager 6.3 or AEM 6.4 on OSGi, you can include these services in your applications. This article provides an introduction to AEM Document Services on OSGi. You will learn how AEM Document Services can be used to accomplish all of the following.
- Generate PDFs based on templates and data.
- Dynamically assemble PDFs.
- Encrypt PDFs with passwords.
- Encrypt PDFs with certificates.
- Reader Extend PDFs with Reader Extensions.
Generate PDFs based on templates and data
AEM Document Services includes the Output service which merges XML data with an XDP file to generate flat documents in many different PDF formats. You can access this service with the Generate Non Interactive PDF AEM workflow step in AEM. One use case is to automatically generate a Document of Record for a completed AEM Forms transaction. You can create an AEM workflow with the Generate Non Interactive PDF workflow step that emails a PDF receipt of the completed form after an adaptive form submission has been received.
Dynamically assemble PDFs
AEM Document Services also includes the Assembler service in the commons category. You can use the Assembler Service at runtime to combine multiple PDFs (or XDPs) into one resultant PDF or to split one PDF into multiple PDFs. Assembler can also add additional content to the combined PDF, including page numbers, headers and footers, and even a table of contents. Here are some additional use cases for the Assembler Service.
- Convert PDF documents to the PDF/A standard.
- Transform PDF forms (created in AEM Forms Designer or Acrobat) to PDF/A-1b, PDF/A-2b, and PDFA/A-3b.
- Convert signed or unsigned PDF documents.
- Validate the compliance of a PDF/A file.
A call to Assembler includes a DDX document (Document Description XML), source documents, and external resources. DDX provides instructions on how to use the source documents to produce the resultant document. For example, this illustration shows the Invoke DDX AEM workflow step specifying a DDX file and a map to the input documents.
Assembler relies on a DDX (Document Description XML) file for the specific instructions on how PDFs should be combined together and what the resultant document should look like. DDX is a declarative markup language, and you can use DDX to manipulate documents while you assemble or disassemble them. DDX can be used to create all of the following.
- Headers and footers.
- Watermarks or backgrounds.
- Page numbering.
- File attachments, bookmarks, comments, and links.
- A PDF document that is assembled from multiple PDF documents.
- Multiple PDF documents that are broken apart from a single PDF document.
- An XDP document that is assembled from multiple XDP documents.
Encrypt PDFs with passwords
AEM Document Services also includes the Secure Document service to encrypt and decrypt documents. When a document is encrypted, its contents become unreadable to everyone without the encryption key. The PDF becomes encoded and only users with the key are able to access the contents. You can encrypt the following aspects of a PDF document.
- The entire PDF document including content, metadata, and attachments.
- The PDF document except the metadata.
- Only the attachments.
An authorized user can access the encrypted contents by decrypting the document. In most cases, the authorized user provides one of the following keys.
- A password.
- A private key certificate that corresponds to the public key that was used to encrypt it.
Reader Extend PDFs for users of the free Reader program
And finally, AEM Document Services includes the Reader Extensions service. This service adds usage rights to a PDF form so users can interactively work with the document using the free Adobe Reader program. Many interactive and dynamic features in PDF forms will not work in Reader until the form has been Reader extended. The Reader Extensions service works to transform PDF forms for users of Adobe Reader 7.0 or later. The service enables users of the free Reader software to perform all of the following functions.
Saving data with the form
Believe it or not, Reader users will not be able to save a copy of your PDF form with their data until the form has been extended. When a nonextended PDF is opened, Reader displays a message in the document message bar that says; Please fill out the following form. You cannot save data typed into this form. Please print your completed form if you would like a copy for your records. Once the PDF is Reader extended, the user can save the form data with the form. You will also need to Reader extend a form if you want to use Reader to import or export XML data into PDF forms at runtime.
Using digital signatures
Adobe Acrobat digital signatures play an important role in secure paperless workflows. Just think about the many times you have had to sign paper documents. These signatures will replace the tasks in your workflow that previously required a handwritten signature on paper. In many ways, digital signatures are more trustworthy than traditional signatures. If you want to use a digital signature in the Reader application, your PDF form must be Reader extended.
Connecting to data in real time
If your PDF form needs to connect to web services to retrieve data, it must be Reader extended.
Submitting PDF forms
Some types of PDF form submission will not work in Reader until the file has been extended. Reader enables you to submit XML data from a nonextended form, but if you want to submit the form and the data, the form must be Reader extended.
There is often a need to integrate some paper-based tasks in a digital workflow. Barcodes can help you do this. For instance, if you send an interactive PDF form to users and they fill it out with Reader, they may not necessarily submit the form to you electronically. For various reasons, your users may decide to print out the form and submit it via fax or the U.S. mail. In these cases, barcodes can encode the users’ form data as they enter it into Reader provided the PDF has been Reader extended. These bar codes on the paper forms can be scanned, and the data they contain will be automatically read into your back-end system.
Acrobat enables users to attach other files to a PDF. This is useful in cases when a user wants to include supporting documents with a form. These files appear at the bottom of the Acrobat interface in the Attachments panel. You will not see this option in Reader until the file has been Reader extended.
Using the Comment and Markup tools
The Acrobat Comment and Markup tools are not normally a feature of Adobe Reader. However, these tools are dormant in the program and can be activated when a Reader extended PDF form is opened.
The Reader Extensions service is now available on the AEM Forms on OSGi platform as part of the AEM Document Services.