Oct 2, 2017

Building Dynamic Documents and Letters for Printing and Archiving with ColdFusion

I was recently on a LiveCycle project that involved created financial documents which were of legal significance.  Every sentence needed legal approval as each state would have different legal requirements on many different conditions.

The process worked well, but I kept thinking if the same process could be done using ColdFusion as well.  The below breaks down the workflow using LiveCycle and how I can see it done with ColdFusion.

In the end the result of the process was a PDF that was then printed and mailed.

LiveCycle Dynamic Letter Process ending in a PDF

  1. Business Analyst creates the letter in Word, using colors and tracking comments to describe all the conditions.
  2. The letter is sent to Legal for approval, once approved move to step 3.
  3. The letter is then created in LC Designer or AEM Designer, using an LC Designer developer
    1. The LC PDF uses embedded Javascript to handle the conditions based on XML values passed into the document.
    2. Conditions maybe things like state and different program types as well as numeric values.
  4. Another team of developers would create the server side scripts to create the input xml used in the LiveCycle Process
  5. Once the letter was completed it is placed in the LiveCycle Repositiry
  6. To create the letter a REST call would be made to LC Process Endpoint, passing in the XML created in step 4 along with what template needs to be created, and the process produces a PDF 
  7. The letter was then returned for printing and archiving.

So how could we do this with ColdFusion assuming the keeping the process close to the above.  It is likely you will need to adapt to your needs.

This could all be done in CF using AEM Designer.
  1. Business Analyst creates the letter in Word, using colors and tracking comments to describe all the conditions.
  2. The letter is sent to Legal for approval, once approved move to step 3.
  3. The letter is then created in LC Designer or AEM Designer, using an LC Designer developer
    1. The LC PDF uses embedded Javascript to handle the conditions based on XML values passed into the document.
    2. Conditions maybe things like state and different program types as well as numeric values.
  4. A CF developer creates the script to create the xml to be included when the pdf is requested.
  5. Once complete the letter would be placed into a resource folder.
  6. To create the letter a REST call, or any cf call, would be requested, which would cfinclude the script in generate the XMLValues.
  7. The letter was then returned for printing and archiving.
The CF code to replace LC and step 6 wold look similar to the below.

I found that you need to save the LiveCycle PDF inside AEM Designer as STATIC as opposed to Dynamic in order for cfpdfform to be able to work with the PDF.

In the below example I am reading straight from the LiveCycle Repository.

<cfif isdefined("form.generatepdf")>
    <cfpdfform action="populate"
        source="#rootdir#\Resources\XDP\#form.templatefilename#"
        XMLdata="#rootdir#\Resources\XML\#form.xmlfilename#"
        destination="#rootdir#\letters\#form.templatefilename#"  overwrite="true"
    />
File: #rootdire#\letters\#form.templatefilename# was generated!

Right now you can download AEM Designer using the below link:

AEM Designer can be downloaded here:

Adobe seems to be posting the license number in this blog:

I'd recommend talking to Adobe on what their intentions are with licensing.

Summary of Using ColdFusion to Create Dynamic Financial Documents and Letters
Banks and Financial institutions invest heavily with enterprise solutions for creating dynamic documents and letters. Perhaps you have a scenario where this use case could apply.

The unique aspects with this use case are with the planning, legal approvals, and having the PDF use Javascript to manage all the conditions of each PDF. 

I think a high percentage of LiveCycle Forms processes can fit into a use case described above.  

Output service
You still may need to purchase LiveCycle Output for flattening and archival depending on your needs.  It all depends on your archive procedures.


3 comments:


  1. hi was just seeing if you minded a comment. i like your website and the thme you picked is super. I will be back.
    posters and banners

    ReplyDelete
  2. There are many designs of roller banners that you can choose from as a marketing tool. You will able to achieve your desired result and you can attract more customers. Roll up Stands

    ReplyDelete
  3. This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!
    Vehicle Graphics Wolverhampton

    ReplyDelete