[xep-support] Next Installment of Cool Tools - Using PDF Forms as input for Dynamic Publishing

From: Kevin Brown <kevin@renderx.com>
Date: Sun Sep 06 2009 - 14:25:20 PDT

We recently released the capability to create fillable forms using 100%
RenderX technology. When that was posted, we had some discussions back and
forth about identifying application areas for such technology. We thought we
would show a demonstration of one of those.

We developed a simple form letter using our product VisualXSL. This letter
had both dynamic areas brought in from XML content (like names, address
information) but we also decided to create a few form fields that would
allow a recipient to enter in some data. The use case would be your
marketing department creating a standard communication letter for the sales
staff. This letter has some "corporate" information but allows the sales
person to customize some of the information in the letter specifically for
their contacts.

The form itself contains some hidden fields that carry data back to the
server as well as the custom information desired by the sales person. This
form submittal (in Adobe's FDF format) is parsed server side and an XML
memorystream of the form data is created. This memorystream is passed to the
same XSL as a parameter with an additional parameter to indicate that we
want to format the "document" version and not the "form" version
(essentially putting the actual data down in the document and not creating
form fields).

We also took steps to make as generic as possible. The server-side code
expects a few hidden fields in the form. The "appname" equates to a specific
directory structure on the web site and the XSL name to use is also in a
hidden field submitted back with the form data. Thus, the server-side code
has all the information to find what XML and XSL to use to generate the
document. To deploy a new form, all one needs is to create the XSL and
deploy this in a new directory on the web site.

So ...

1) Sample XML + VisualXSL -> Sample XSL for form
2) Minor edits performed on the XSL to add some parameters passed into the
document and some decisions made to format fields or actual data based on
these parameters
3) Sample datasets, the XSL and any associated resources (like images or
includes) are deployed to a web site
4) A form with fields is generated to post the data to a server program
which:
        a) Parses the FDF form data
        b) Calls an XSL Transform using this form data (XSLT parameter
nodeset) as well as a dataset to return FO as memorystream
        c) Sends the resulting FO to RenderX to generate a PDF memorystream
        d) Sends the PDF memorystream back to the browser as the response

Take a look at http://www.foactive.com/Forms/ValuedCustomer.pdf

You can fill in this form with custom information, pick a dataset and
"publish" 100 copies of the letter from that dataset with the custom form
information. And because you are not simply filling and flattening a form
(you are composing a new document), the text flows right along as you would
desire.

Of course, a full blown application would likely allow the user to pick from
sets of data that are database queries and likely not generate a single
file, but maybe generate individual PDFs and e-mail. We implemented this way
to show the speed of RenderX -- 100 custom letters generated in about 2
seconds.

Kevin Brown
RenderX, Inc.

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Sun Sep 6 15:03:45 2009

This archive was generated by hypermail 2.1.8 : Sun Sep 06 2009 - 15:03:52 PDT