Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Converting a dynamic xml form into a static pdf form... dynamically

Avatar

Level 4

Hello everyone,

A part of my job is to create .pdf forms that mirror the current reports and documents that are used in the organization. The idea is to have people transition to the new .pdf forms as seamlessly as possible. The new forms are more user-friendly, can have their data exported as xml, and allow for dynamic content (i.e. subforms with a number of visibility configurations.)

All of this is going well, and people seem to really like the new forms. The users fill out the form, click a button (which sets all fields to read-only) and a copy of the .pdf form is email to both the managerial members who require the forms for their business purposes,as well as to a collection center where the data is to be extracted into a database. The problem is that the .pdf files must be readable on the managerial staff's Blackberries. This is imperative. I've done a number of tests and have found that their Blackberrys can only view static pdf forms, not dynamic xml forms.

My first thought was to purchase software for their Blackberries that would allow them to read the dynamic forms, but that proposal was denied.

Business needs cannot be properly met by a series of static forms, but the dynamic forms cannot be viewed on Blackberries (which is a must). I am hoping that someone out there can point me and the right direction. So now to the real question:

Is there someway to convert a dynamic xml form into a static pdf form... dynamically? Ideally, how this would work would be to have a dynamic xml form that users fill out then send via the 'email' button. Currently, a copy of the form is being emailed... I would like to programmatically convert the dynamic form into a static form, and then send the converted form to the managerial team.

If that is not possible, is it possible to programmatically save a copy of the dynamic xml form AS the static pdf form. The users would then be responsible for emailing the newly saved copy themselves. This isn't an ideal solution, but I think it is more likely to be possible.

Thanks for all of your help, in advance. I'm more than open to solutions that I had not considered.

Have a good one,

- Scott

4 Replies

Avatar

Former Community Member

You cannot do this on the client side ...there is server based software that will do this (it is called flattening of the form). The product is called LiveCycle Ouput server.

Hope that  helps

Paul

Avatar

Level 4

I've read up on this service, and I don't beleive that it is a viable solution (with repect to the costs). That being said, thank you for confirming my suspicions that this could not be done client-side. It looks like we will be changing our business procedures to fit with this limitation.

If someone else has faced a similar situation, I would be interested in hearing how you solved it. Aside from that, I consider this question quasi-answered.

Again, thanks for your time.

- Scott

Avatar

Level 4

Hello again,

I know that I'm making a minor lazarus post here, but I found a solution that we have adopted. I'm just posting it in the hopes of helping someone else in the future.

There is no way to dynamically flatten .pdf files, but you can make use of a third part tool to do so easily enough. All you need is a virtual printer (I used cutePDF Writer, and I've been happy wit it so far.) The virtual printer will 'print' the document to a new pdf. This new pdf has none of the code or functionality, is readonly and cannot be edited or refilled. It is 'flattened' in other words. You can even add a button with some javascript that prints to the virtual printer.

It's not as good a solution as using the adobe server-side products, but it works, and it's free.

Best of luck to you all.

- Scott

Avatar

Level 1

Hi Scott,

I'm currious on how you got the form to print to a pdf using javascript?  How did you write the script and can you rename and change the directory you wish to save the file? I'm trying to do something similar.