I'm working on a form that needs to display or hide continutation pages based on the number of occurrences of data in the XFA data DOM. I guess this is what the dynamic subforms in XFA 2.2 do, but the problem is that I'm targeting users with Reader 6 and above (they're currently 20% of our user base).
First, you require reader 6.02 or later to work with LiveCycle forms.
We are doing the same thing with our dynamic pdf's. We ended up upgrading all of our user base to Reader 7.0.3 because of different problems around expanding fields and hiding / displaying subforms (pages).
There are many other posts on this forum with good examples of hiding/displaying subforms. Search for 'hiding'.
Many thanks for your replies. One final question before we decide to either mandate the use of Acrobat 7, or fall back to FDF: is there any kind of processing that can be done on the server to achieve the same results, i.e. continuation pages added to the primary form based on data? I have a certain amount of experience with PDF APIs, so I was wondering if something like this would work:
1. Create each continuation page as a separate PDF document in LiveCycle Designer.
2. At the time of delivery, modify the template DOM and add as many continuation page entries as necessary (from the XFA template for each of those PDF documents)
3. After modifying the template, "stitch" or "merge" the continuation pages with the primary form.
The ability to stitch together templates dynamically is a feature that has been talked about and should be available in the future for the LiveCycle Forms products, but I have no information for timelines or anything like that.
This is achievable right now though. It involves a lot of DOM manipulation to take multiple .xdp files, load them all into a seperate DOM's and then merge them all into a single DOM and a single XDP template. Adobe Consulting has implemented this for other clients. It could be done on your own, but would require a very good understanding of the XFA spec to do properly.
Btw, I just reread your first post more carefully. What you are trying to do is not necessarily impossible without dynamic PDFs. LiveCycle Forms can do this. It would take the XDP template along with XML data. If the template is design in such a way that it can grow/shrink, then you would wind up with a data driven PDF like you want and without the requirement for 7.x. It's is the runtime dynamism (is that a word?) that requires a dynamic PDF (ie: 7.x). So what I mean be this is the ability to do something like click a button and have a new section get created (or anything like that get create after the PDF has been rendered from the template). However, anything with XFA requires at least Acrobat 6.0.2, there will always be a requirement that the client be at least that high.
At the server side, I think you could use LiceCycle FormServer (Live Cycle Forms) to achieve the dynamic functionality. You would send to the client a pdf already with the merged data and so, with as many pages as it should have. However, this software is expensive.