I am not a new programmer but this has been a surpisingly difficult issue.
I hope that someone can help me to do what should be quite straight forward.
Can I be missing something ?
What i am trying to do is :
Develop a C# program which runs on a client computer to:
1. Read through a number of internal source files. (format variable)
2 - read an Adobe Acrobat 9.0 PDF form which is authored and supplied by a state or federal governmental agency.
3. locate uniquely named text fields in the PDF file specification or document tree that can be programmatically updated with the specific information needed for each field as records are processed.
4. Print out each form after it is updated.
It is my understanding that this might be able to be accomlished using
XFA and XDP but that there may be some unique processing requirements on my part .... requirements not clear ... this is anecdotal information as I have no written information except the XFA specification doc doesnt necessarily help me with accessing the PDF information directly until I read more
I am hoping that my requirement is clearly stated so that I can be told if I am close to the correct approach using Adobe SDk's or utilities - Since I do not know what is available
I am quite versed using XSD and XML and feel comfortable with the possibility that I might be able to do this... but i need to have a bit more information and i am hoping that this is the place to get it .
I use XSD to help automate application development and I can see where this would be useful for PDF forms but the information is very sprarse on usage issues.
This is as far as I have gotten and it has taken me far longer than I would have ever imagined to learn only this much information
Would it be possible for me to create my own XML output - both schema and data to be used by a locally edited PDF file ????
basically - I am wondering if I can create my own schema and the associated xml data from the various and variable sources that are necessary to fill out the form. Then edit the PDF file locally with filed names to match the newly derived schema and then print the forms as required.
You can create your own schema and by importing it into the form design you can bind whatever fields you want to differnet nodes in the schema. Now when you export data the xml will follow the format of the schema. So this allows you to have a field on your form of a specific name but when exported it would be in a node in the xml with a completly different name.
basically - I am wondering if I can create my own schema and the associated xml data from the various and variable sources that are necessary to fill out the form. Then edit the PDF file locally with matching field names to match the newly derived XML schema and then print the forms as required.
The schema must be created ahead of time. You cannot create the schema on the fly. Once it is created you can bind individual nodes in the schema to fields on the form. Printing has nothing to do with this process ....and yes you can print at anytinme.
Ok Now I get it ...I assume that you have a sample data file that you want to bring in to the form. You can open the file in Acrobat/Reader and Under the Forms menu choose Manage Form Data/Import Data. You can pick the file and then the merge will happen.
You can also add a button to your form and in the click event you can add this code:
When the user hits the button a dialog will come up and allow the user to choose a file to import.
Note that in both cases the file must be XML and needs to follow the schema you mentioned.
If you want to serve up the form and have data in it you will need to do this from LiveCycle Forms on the server side.
The schema merely describes the structure for the data ...it does not have data in it. A separate XML file that conforms to th eschema is required. If you want to see this work, you can look at the Preview tab under the File/Form Properties tab and you can enter a path to your data file. When you preview in Designer it will merge the data on to the template and show you in the rendered PDF.
Or you could save your form as a PDF and use the Advanced/Form/Import Data menu item to select the file and bring the data into the form after it is loaded in Acrobat.
After designing the form - I cannot access another data connection The manage form data dialog grays out both XML form data and XML schema once I have created the form . So - if I delete the connection after generating the form fields - then it won't load correctly stating that there is no mention of a data file.
The ShipOrder example supplied with the Designer appears to work properly - And this is precisely the behavior I am trying to emulate but I cannot get my own form to do anything like it -
I am studying this problem using the documentation available but I must be missing something.
Wuld it be possible for you to do a basic - walk through - of the process - so I can see If I am missing anything ?