Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Generating a PDF Document From an Adaptive Form Part 1

Avatar

Level 3

This question came up during a Forms training session last week. For people who have not worked with LiveCycle, grasping what the Document services are and what they do can be a challenge.  The idea was that a person submits and a PDF is sent back. We had a couple of ways to approach it, the easiest way would be to modify the custom submission and return a Thank You page with a link to the PDF that they could click. But we decided to build something from scratch with the thought that we could build upon and cleanup that solution later on. So here is a link to the package that we built. A couple of things:

1. This is a POC and not production ready. We put everything into the JSP which is a terrible idea, but okay (sort of) for this POC

2. You will need to set the Apache Sling Service User Mapper Service in the Console for this to work as we save the various files to the file system

3. We based our solution on the following link: This gives a good explanation of the submission process from a guide and creating a Custom Submit AEM 6.0 Forms Help | Writing custom Submit action for adaptive forms

4. While the solution works, there will be errors logged. The reason is that the response object is already committed. Plan on fixing that up later..like I said, POC

Here is a link to the Package to install: Dropbox - AFToPDF.zip

Try it out and let me know if you have any questions. Will start on part 2 when I am back from holidays.

3 Replies

Avatar

Level 1

Hi ,

Are part II and part III articles are released ?

I tried this but this is not working , i am not able to submit the form.

Avatar

Level 3

Hi,

That example is out of date. Try this one.

Dropbox - Return DOR Custom Submit.zip

Also, remember that you need to configure the  User Mapper service for this to work as it writes to the repository

This article talks about the Service Authentication (Adobe CQ Help | Querying Adobe Experience Manager 6 data using the Sling getServiceResourceResolver ... )

Avatar

Level 1

Hi The download link expired., Can you repost it ? Need to generate/download a pdf from AEM forms