Stefan Cameron on Forms
Building intelligent forms using Adobe LiveCycle Designer

Importing Data in Acrobat

Data is central to every form. Some forms simply collect data while others use pre-collected data to do various things to forms, such as pre-populate names, phone numbers, addresses, affect the layout of a form or various other things.

Using pre-collected data to affect a form as described above involves importing data into a form via the host application (assuming a server isn’t part of the picture). This time around, I want to talk specifically about importing data using Acrobat.

As you all know, Adobe distributes the Reader application for free. Because of this, you can save the forms you design in Designer as PDF and anyone with the free Reader application can fill your form and submit its data electronically.

The catch is when your PDF form requires data to be imported. Unless the host application is Acrobat Professional or Acrobat Standard, a regular PDF form cannot import data — no matter if it comes from an XML Data file or from a data connection to an ODBC or WSDL data source. Acrobat Pro/Std comes with all the tools you need to import data into a form and permits data to be automatically imported via an ODBC or WSDL connection. PDF forms opened in Reader (or Elements for that matter), on the other hand, aren’t privy to that functionality by default.

Side note: In Reader 7.0.5, there was a bug that resulted in Reader having the ability to import data into non-Reader-Extended (more on Reader Extensions below) forms. That bug was fixed in Reader 7.0.7 such that Reader can no longer, by default, import data into a PDF form.

The general rule is that PDF forms opened in Reader must be individually extended using Adobe LiveCycle Reader Extensions in order to enable the use of special hidden features such as Data Import, Digital Signatures, Local Save, Commenting and more. The only exception is if you own a licensed copy of Acrobat Pro 7.x which allows you to send a PDF out for review via email — which will enable Commenting capabilities in Reader for that PDF — or version 8.x in which you now have access to a new feature called “Enable Usage Rights in Adobe Reader“, available under the “Advanced“ menu. Using this new version 8.x command enables the Local Save and Digital Signature features in Reader for a particular PDF form. That said, before you start enabling all your forms, you should note that use of these Acrobat Pro features is subject to certain restrictions as detailed in your license agreement which you should be aware of.

Important: Local Save is not equivalent to Data Import. Local Save simply gives the user the ability to save a copy of a PDF form, along with any filled data, using the free Reader such that the form may be closed and re-opened at a later date in order to be completed. Therefore, you cannot use the “Enable Usage Rights in Adobe Reader“ feature in Acrobat Pro to enable Data Import features in the free Reader.

Another option is to use Adobe LiveCycle Forms to deploy your forms. Using this server product, you can pre-populate forms with data on the server prior to deploying them to the client application (on the user’s system). Using this option, you don’t need to reader-extend a PDF form which imports data because the data is imported and merged into the PDF form on the server and then deployed to the client application (any version of Acrobat/Reader on the user’s system), which, in turn, doesn’t need to import any data.

To summarize, here’s a little table that illustrates the conditions under which you can import data into a PDF form in Acrobat:

Version PDF Form With Reader Extensions With LiveCycle Forms
Reader no yes yes
Elements no yes yes
Standard yes yes yes
Professional yes yes yes

Sep 12, 2008 — Added information about “Enabling Usage Rights in Adobe Reader” feature


Posted by Stefan Cameron on August 12th, 2006
Filed under Acrobat
Both comments and pings are currently closed.

150 Responses to “Importing Data in Acrobat”

  1. Michael Joyce on August 14th, 2006

    What about using ADBC?

  2. Stefan Cameron on August 15th, 2006

    Michael,

    Thanks for pointing-out the use of ADBC for importing data.

    ADBC is specific to Acrobat Forms as opposed to XFA Forms. In this article, I was trying to address importing data in Acrobat within an XFA Form (saved as a PDF). ADBC isn’t an option in that case.

  3. Lan Pho on August 18th, 2006

    Ok, I am still not sure how to import data. What is the structure of data file with either tab or comma delimited file needs to look like to be able to import? Is there an automated way to populate the form with 50 names?

  4. Stefan Cameron on August 19th, 2006

    Lan,

    When importing data from a file into Acrobat, the data must be in an XML format.

    If your form is to consume the data that another application created and this data is comma-delimited, you would then have to write an XSL Transformation that, when applied to the data via a data connection created in your XFA form, would transform the comma-delimited data into an XML format that can be consumed by the form’s data model.

    For instance, you’re talking about populating a form with 50 names. Now I there are two obvious possibilities here: You either have 50 fields which each should get a name or you have a list field (such as a list box or a drop down list) and you would like the names to be automatically loaded into the list when the data is imported into the form in Acrobat.

    I’ll assume you’re talking about the latter option of populating a list field. This means that you data must have a repeating data node where each occurrence has a different value (a different name). This way, you can use the Dynamic Properties feature to create the kind of binding you’ll need to have the list field automatically populated with all the names when the data is imported into your form:

    <data>
        <name>Fred</name>
        <name>Wilma</name>
        <name>Barney</name>
        <name>Betty</name>
    </data>

    In this sample data, the repeating data node is <name>.

  5. Rikard Isoz on August 23rd, 2006

    Hi Stefan,

    We have been thinking of building a web app using LifeCycle forms and asp.net. Can you give some hints on the best way to prepopulate data on the server side, as well as extract data when client post data.

    Best regards,

    Rikard

  6. Stefan Cameron on August 25th, 2006

    Rikard,

    That sounds like an interesting project: LiveCycle and ASP.NET.

    As far as pre-populating a form with data, there are a few ways you can do that:

    1. You could have a server-side process generate data files that could then be merged into various forms using LiveCycle Forms in order to serve them out to the client application (e.g. Acrobat or a browser using HTML).
    2. You could create a data base and have your forms connect to it using an ODBC data connection.
    3. You could create an ASP.NET web service and have your forms connect to it using a WSDL data connection.

    I believe importing the data via an ASP.NET web service is your best option however, regardless of what you decide, you’ll unfortunately be faced with the required purchase of at least one other LiveCycle product (if you haven’t already purchased one of them): LiceCycle Reader Extensions (to enable Acrobat Reader to import data from an ODBC or WSDL data connection — unless you know users will always be using Acrobat Pro in which case you wouldn’t need Reader Extensions) or LiveCycle Forms (to import the data on the server and send the form, along with the data, in a single package to the client application).

    As far as extracting data submitted via a form, I strongly suggest you have a look at my colleague Steve Tibbett’s blog: SteveX. He has a few great articles on data submission via a LiveCycle form.

  7. Sérgio on September 6th, 2006

    Hi,

    I would just like to add some comments to this discussion.

    1 – To merge that with a pdf using, for instance, asp, one could use XFD or a XDP file (the latter one only with the data part). This file could be created on server side, and be given to the client. Because this files can point to a pdf file, the client would open and merge the data onto the pdf file.

    2 – ADBC is just for Professional, not for Reader… at least I think so.

    Regards,

    Sérgio

  8. Lala on September 13th, 2006

    I know there is a really easy answer to this, but, I need your help!

    I am the database administrator for my state. The state is still using Microsoft Access. We are now creating a static form using Adobe Professional. In the form, my boss wants me to link the database tables from Microsoft Access where when the processing assistants enter the info on the form, it automatically saves in the Microsoft Database. Is this possible. I know I can use OLEDB but what is the 1st step to get started.

  9. Stefan Cameron on September 13th, 2006

    Lala,

    In your comment, you said you “are now creating a static form using Adobe Professional.”

    Before I go any further, I just want to make sure you’re using the Adobe Designer to design this form. This means you probably opened Acrobat Pro, went to the “Advanced | Form | Create New Form…” menu item and opted to create a new form in Adobe Designer.

    Is that correct?

    If so, then we can talk about creating a data connection to an ODBC data source and then have fields on your form bind to the nodes in the data connection in order to update data in the database in real time.

  10. malik on September 17th, 2006

    Hello there,

    I am asking the same question about Microsoft Access and Adobe Designer and how to connect them to drop the fields from the table schema into the Designer.

    Greetings

  11. Stefan Cameron on September 18th, 2006

    malik,

    Please check-out the article I just posted on Connecting a Form to a Database. Hopefully this will answer your questions as well as Lala’s.

  12. Chris Maertz on September 29th, 2006

    Hello,

    I need to populate a drop-down list on a PDF form using the WSDL service. I can’t find any good information on how to bind the return data to the drop-down list, nor what I should use as a return type for the web method. Does anyone have some .NET code that show proper way to return the data. (Right now I’m returning XML as a String via a web method.) I can get the XML to show up in a form field, now I need to populate the drop-down list with the data.

    Thanks,

    Chris Maertz

  13. Stefan Cameron on October 4th, 2006

    How about modifying your WSDL to have calls that return individual values instead of one big call that returns all the info formatted in XML? That way you wouldn’t have to parse the XML in Designer.

    As far as binding the return data to the drop down list, you should be able to create a new data connection to your web service and then use the new Dynamic Properties feature in 7.1 to populate the drop down list automatically.

  14. Y Gautham on October 7th, 2006

    Hello,

    Im trying to retrieve data from MS-Access. While retrieving the table is not dynamically growing. Only one record is being fetched. Even if a new record is added with a button the data is duplicated. New data is not added. Can you help me with this?

    Thank you,
    Y.Gautham.

  15. Stefan Cameron on October 10th, 2006

    Y. Gautham,

    It sounds like you might not have placed the bound fields in a repeatable container (subform).

    Typically, you group your fields (bound to data nodes in a data connection) into a subform (let’s call it “DataSF”), bind the DataSF subform to the data connection itself (or a repeating section within the data), place the DataSF subform inside a flowed subform and then specify, using the Object palette’s Binding tab, that the DataSF subform should repeat for each data item.

    This would produce a form that would output all records from the database table to which your data connection is referring.

  16. Y. Gautham on October 11th, 2006

    Hi Stephen,

    Thanks for your reply.

    But unfortunately I am unscuccessful even after following your instructions.

    I have created a Data Connection to an Access Database. I placed 4 fields of it bound to the data connection in a subform. I placed the subform in a main subform with subform content property “flowed”.
    But when I go for PDF preview I could only see the first record from the table.

    A typical issue what I observed is when I am trying to bind the Data Connection to Subform I am not able to select DataConnection from the menu (shown when we click at the triangle beside Default Binding field in the Binding Property of the subform). I have entered “$record.DataConnection” manually in the field.

    Thanks for reading this patiently. Your response is heartfully appreciated.

  17. Stefan Cameron on October 12th, 2006

    Y. Gautham,

    I hope you’ll accept my appologies for not providing the “full answer” to your question in my first reply. I was under the impression that it was possible to load all records from an ODBC data connection much in the same way as one can for XML Schema (XML Data file) data connections. It seems I was mistaken, however, because the nature of ODBC data connections is to load a single record (single table row) at a time. You are therefore required (at this time) to write a script which iterates through the records using the first() and next() functions on the Data Connection object and for each record, use the DataSF’s Instance Manager (“_DataSF”) to insert instances populated with data from each record.

    Fortunately, most of the work is already done for you if you use the Initialize script from the Data List Box object found in the Library palette’s Custom tab. All you need to do is modify it a little in order to create instances of the DataSF subform.

    Since I figure the “full answer” was better explained in a blog post that everyone would notice, I wrote a little sample which details the steps to follow: “Displaying All Records from an ODBC Data Connection”:http://blogs.adobe.com/formbuilder/2006/10/displaying_all_records_odbc_dataconn.html

  18. Nathan on October 25th, 2006

    I hope that someone is able to help me. I have posted the same question on the forums at Adobe, so I will hopefully come up with an answer.

    I work for a registered charity in Manchester, at which we have recently redesigned our website. In order to generate more interest in job applications which we advertise, we have included online application forms. The XML data submitted is ok for me to read and understand, but I would like to know if there is a free, or very cheap way of importing the information the original PDF form without buying the full license for new Acrobat software, in turn making it easier for my colleagues to understand. We don’t mind using 3rd party plugins, or separate software, as long as they are free, or cheap.

    Many thanks

  19. Stefan Cameron on October 26th, 2006

    Nathan,

    In terms of Adobe solutions, the cheapest way to get you there would be to purchase one copy of Acrobat Standard. This would let you import the data you receive into the form and save it as one combined unit. The form and data could then be passed-around to those that need to process it.

    Otherwise, I would suggest writing a little JScript that uses the Microsoft XML Parser to parse the XML data and display it in legible form in a message box. Or you could write an XSL translation that formats the XML data into legible form and again use a little JScript to apply the XSLT to the XML and output a text file, for example. These solutions are free of cost and relatively simple to do if you’re knowledgeable in writing JScripts.

    I can provide pointers on my JScript suggestion if you’re interested. If you used the XSLT solution, you could process it on your system when you receive the data and only distribute the legible version of it.

  20. Atiq on November 13th, 2006

    Hi,

    I am working with insertInstance Object. But problem is my Designer 7.1 says its not a function. Can anyone help me out regarding this.

  21. Marleen on November 14th, 2006

    Can we populate one form with data from another form. I have one form that will take some user info and depending on user choice open up another form pre-filled with user info entered.

    We will be using Acrobat Pro.

    Thanks in advance for your help!!

  22. Stefan Cameron on November 15th, 2006

    Atiq,

    Unfortunately, the Instance Manager‘s insertInstance method is only available when running your form in Acrobat 8.0 or later. This means that you can still use Designer 7.1 to design a form that uses the insertInstance method however you’ll need to preview or run the form within Acrobat or Reader 8.0 or later.

    I appologize for the typo in my post on the Instance Manager a few days ago. I’ve made the correction.

    If you need to target versions of Acrobat prior to 8.0, I would suggest you use a combination of the addInstance and moveInstance methods instead of insertInstance.

  23. Stefan Cameron on November 15th, 2006

    Marleen,

    Aside from using LiveCycle Workflow (which was designed for this sort of thing), I believe the only way you could achieve this is by connecting the forms to a central data repository (i.e. a database). The first form would set values in the database and cause the second form to be loaded (opened). The second form would then retrieve those saved values from the database and pre-fill the form as needed.

  24. Raul on December 4th, 2006

    Can I merge two .xml files into a dynamic pdf form created in Adobe Pro? I need to import from two different .xml files into a form. Any suggestions?

  25. Stefan Cameron on December 5th, 2006

    Raul,

    When you merge XML data into a form, you’re really importing XML data which respects a certain schema. That schema is either implied from the form’s object hierarchy (via containers and the fields they contain) or it’s done according to a data connection to a schema. The latter lets you use explicit bindings such that you can map specific data nodes to specific fields regardless of hierarchy.

    While XFA supports multiple data connections in a form, only one can be to a schema.

    So where does that leave you with importing two XML files? Fortunately, schemas can be combined — that is, you can have one schema import another schema and then create a data connection to the (combined) resulting schema. This way, you can import the entire set of data (both XML data files) as one data file.

    If you’re not using schemas, then you might also be able to simply combine the two XML data files into one.

  26. Aaron on December 19th, 2006

    Folks I would like some simple instructions on creating a wsdl web service and binding form fields to it so that the fields are populated at runtime..

    In the end I would like to be able to create have a webservice that a user can go to then select an identifier (name etc..) and get a read-only form with their data in it..

    this saves us from havign to manually create the pdf etc..

    thanks in advance !!

  27. Stefan Cameron on December 20th, 2006

    Aaron,

    Designer provides a way to create a data connection to a web service (WSDL). Such connections can execute request and response methods on web services. Once you define the data connection using the Data View palette, you’ll be presented with a data node tree. You can then drag these nodes onto a form to create fields that are bound either to the request or response method.

    You could therefore hide all the request fields and populate them automatically with the identifier that the user selected and execute the data connection in the form’s Initialize event to get the response fields populated with data when the form is opened.

    To execute the data connection when the form is loaded, you could simply insert a button on a form, specify it to be an Execute button and set it to execute the data connection to the WSDL (using the Execute tab in the Object palette) and then specify

    this.execEvent(“click”);

    as its Initialize event script. This would have the effect of executing the data connection, submitting the pre-populated data, receiving the response and populating the response fields with the response data.

  28. mj on January 17th, 2007

    In LiveCycle Designer, how do you set up a field in a form that performs the following: When you chose an item from a dropdown list you created it prefills another field with different information. For exemple you chose a city in one dropdown field and the corrosponding state prefills automatically in another field.

  29. Stefan Cameron on January 18th, 2007

    mj,

    This is typically done by scripting the Change event of the drop down list or list box object.

    In the Change event, which is fired every time the selection is about to change, you can then use the xfa.event.newText object to determine the text property of the item that the user has selected. Using the text, you can then determine the item’s value, if need be, by using the boundItem method of the object (“this” in JavaScript or “$” in FormCalc).

    For example, if the drop down list contained items with their text set to the city name and their value set to an ID of some sort that would then use to determine the associated state, you would do something like this in its Change event (in JavaScript here but FormCalc is fine as well):

    var sNewText = xfa.event.newText;
    var sNewValue = this.boundItem(sNewText);

    if (sNewValue == “CA”)
        StateField.rawValue = “California”;

  30. Bonni W. on January 19th, 2007

    Please do me a huge favor and check out the form I created at http://www.onemain.com/~bonster/february.pdf (it’s not spam, I swear, I just need help). I just got Adobe 7.0 Pro and am learning as I go.

    I have had two drivers send in their forms via email with an attachment in .xml format. However, when I go to “save target as” it saves it as .html instead. So when I try to import the file to a blank form, it won’t accept it.

    I have to retrieve this kind of stuff via my laptop, as the big computer is not as advanced. Therefore, I go wireless and connect to earthlink.net to retrieve my email through the browser.

    What am I missing here? Sorry, I’m a total novice when it comes to using Adobe Pro. Thanks in advance,

    BW

  31. Stefan Cameron on January 20th, 2007

    Bonni W.,

    It sounds to me like the problem lies with the way you retrieve the form’s XML data that was submitted via email, not with Acrobat.

    You might be able to fix this either by forcing the extension to be “XML” in the “Save Target As” dialog or by manually changing the extension on the file once you’ve saved it.

    If Earthlink.net is somehow wrapping the XML file attachment in an HTML file (or, even worse, encoding the XML data for display as HTML), you’ll need to contact them in order to figure-out how to properly retrieve the XML data file that’s attached to an email.

  32. Alex on February 9th, 2007

    Hello

    Have a project coming up next week.

    Engineers scan their drawings into PDF. They use it as template for different jobs. On these PDF forms instead of actual dimensions eng. use variables. For each job then they would have Excel file with all dimensions for corresponding var.

    The question is how to automate this process, so the application will take PDF, excel sheet and substitute variables on the PDF with actual values from excel.
    Any suggestions would be greatly appreciated!

    Thank you

  33. Harrison on February 9th, 2007

    Hello. I’m trying to create a price list that is linked to an Excel sheet of part numbers, descriptions, and prices.

    I’d like the fields in my PDF for these to be linked directly to a cell (which is a calculation) so that when the database changes, so will the PDF.

    I can’t seem to find a way to associate the PDF fields with the Excel fields.

    Any help would be appreciated. Thanks!

  34. Stefan Cameron on February 12th, 2007

    Alex,

    I would suggest you use the Microsoft Excel Driver for ODBC connections to define a DSN to the Excel spreadsheet. Then, in Designer, create a new ODBC data connection (using the Data View palette) to this DSN. Note that you’ll need to specify an SQL statement for the connection: I found a tutorial on creating ODBC connections to Excel spreadsheets which gives a sample SQL statement that you can use (see step #3).

    This will get data from the Excel spreadsheet into your form.

    A word of caution: Unless you know how to properly reference a column with spaces in its heading name (in row #1), make sure that none of your column header labels/names have spaces in them or you’ll have a lot of grief trying to get this to work.

    Please let me know how it works-out!

  35. Alex on February 12th, 2007

    Hi Stefan
    Thanks a lot for the response. I got an idea where to start.
    Still a little confuse though. Creating DSN to the Excel shouldn’t be a problem. But everything regarding Adobe is new for me. Not sure how do I take a scanned PDF document (drawing) and extract variables from there for substitution? I’m working with Adobe Professional 6.0.
    Anyway, thanks again, I’ll definitely let you know how it goes. I would have to start working on it within day or two.
    Alex

  36. Stefan Cameron on February 12th, 2007

    Harrison,

    I think you also need to use the Microsoft Excel Driver for ODBC connections in order to get live data from an Excel spreadsheet.

    Please see the comment I just posted here to Alex on Feb 12, 2007, 02:18 PM: It has a link and some tips about Excel ODBC connections.

  37. Stefan Cameron on February 15th, 2007

    Alex,

    If you’re using Acrobat Pro 6.0, then I presume you’re using Designer 6.0 as well?

    You might be able to use an image object (found in the Library palette’s Standard tab) to include your drawing as a background to the form. (Note that I’m not talking about an image field in this case since it’ll have undesired side-effects when used as the background for a form.)

    Once you have that done, you should be able to position text or numeric fields above the image (if they disappear behind it, just use the “Bring to Front” command in the Layout menu) and bind those fields to data nodes in your Excel ODBC data connection.

  38. Chris Q on February 28th, 2007

    End users are completing an online form that generates an excel spreadsheet. We are trying to take that data from the excel spreadsheet and map the data to an existing Adobe PDF form, automatically updating the PDF form so end users can save / print the form. Can this be done? What additional tools are needed? Thanks.

  39. Stefan Cameron on March 8th, 2007

    Chris Q,

    You should be able to import data from an Excel spreadsheet by using Microsoft’s Excel ODBC driver.

    See my response to another comment on this article which provides a little more information on how to do this, along with some links.

  40. chris on March 21st, 2007

    Hi. I am having some difficulty working out a solution to a work flow.

    I have a form that is filled out that will insert a db record or change a db record. The workflow is as such:

    1. Author fills in form and locks the form data and sends to manager for approval.
    2. Manager reviews form data. Accepts – db is updated with form data. Rejects the form goes back to the author to amend.

    Here is the issue. How can I get the author to unlock the form to amend the data – how does the form know it’s the author.

    I thought may I could use a digital signature.

    Is there anyway someone that has signed a document can “unsign it” thereby removing the field locks. I may also run into trouble updating the db via script once the form has been digitally signed.

    If you have any other approaches I sure would like to hear about them.

    The data signature seems interesting, but I don’t actually want to submit the data anyway – just have the user say the information is correct.

    This blog has been a life saver to me so thanks for all your time and effort.

    Chris

  41. Stefan Cameron on March 23rd, 2007

    Chris,

    I’m delighted to hear that you find my blog useful!

    I don’t believe Digital Signatures will help you in this case. One of the principals behind Digital Signatures is that they must ensure “non-repudiation”, which means that an individual cannot deny a signature is theirs. If one could, it would essentially be the same as being able to remove one’s Digital Signature from a signed document (or signed data).

    In all honesty, what you’re wanting to achieve is really what the combination of Adobe’s LiveCycle Forms, Form Manager and Workflow was designed to do (and much more).

    Short of purchasing those products, there isn’t really anything that can do “proper” authentication the way you’re wanting to. There are certainly ways to build a basic form of authentication right into the form but it would only serve as a deterrent at best.

    For example, XFA supports password fields that mask their value. You could include two password fields on the form: The first one would be used by the author to set the password for that form and “lock” the fields while the second would be used to verify the password and “unlock” the fields.

    If there’s no value in the “initial” password field, then all fields are “unlocked” (i.e. writable) when the form is opened so that the author may enter values into the fields. Once the author is ready to submit the form to their manager, they enter a password and submit the form. (Note that the password is submitted in clear text.)

    When the manager opens the form, all fields become “locked” (that is, read-only) because there’s an initial password specified. If they disapprove of the form and send it back to the author, the author opens the form (which now has its fields locked, or set as read-only) and verifies the password in the second password field, which then unlocks the fields. (Note the second password field would be un-bound such that its value would not be transmitted with the data since it’s not necessary and you don’t get into a situation where the form is opened and the password is already confirmed…).

    When the manager finally approves the form, all the data — except for the initial password — gets submitted to the database.

    Makes sense? It’s a little difficult to explain in words — hopefully you understand what I’m trying to say.

  42. Dex on March 29th, 2007

    I am a form virgin creating a form in Adobe Designer. I have used HTML in the past but never Adobe so I thought I would give it a shot. I am the only technologically inclined person in my office and am wondering the best way to go about importing the data for viewing. If it was just me in the process I would just import it. Originally it will arrive by email into one box and be forwarded to someone else. Is there an easier way to do this without having to import to the original form to view the data? Can this be done server side and THEN emailed in the form? Perhaps a stupid question, but its the only way I know to explain it. Thanks!

  43. Jim on March 29th, 2007

    Hi Stefan,

    Do you know where I can find a sample PDF and sample web service to do import data from a web service? I failed to figure out how to make it work.

    Thanks

  44. Stefan Cameron on April 1st, 2007

    Dex,

    I’m glad to hear that you’re giving LiveCycle Designer a try!

    I think what you’re asking for is an alternative to form data being submitted/received as an XML Data File attached to an email. This is cumbersome because the recipient of the forwarded email must then know enough about Acrobat in order to import the XML Data into a blank copy of the form.

    The only way to get the data without having to import it into the form is to submit the form itself along with the data filled-in.

    You can do this in Designer 8.0 by using a regular submit button (use a button object from the Library palette and select “Submit” from the “Control Type” property on the Object palette’s Field tab) and specifying “PDF” in the “Submit As” property on the Object palette’s Submit tab.

    To submit the PDF to an email address, simply enter the following Submit

    mailto:email@address.com

    where “email@address.com” is the email address to which the PDF should be submitted.

    There’s one catch with this solution, unfortunately, and that’s the fact that by default, people using the Adobe Reader will still not be able to submit the PDF after filling the form (because this would technically be a way of saving the PDF which isn’t allowed in Reader). In order to get your submit button to work properly in Reader, you’ll have to extend your PDF form to enable usage rights in Adobe Reader. This will enable Reader to save data (and therefore submit the entire PDF) when your form is filled. You can extend your PDF form by using the “Enable Usage Rights in Adobe Reader” command under the Advanced menu in Acrobat Pro 8.0.

    The end-result will be that the complete PDF, including filled data, is submitted to the email address of your choice. This way, form data doesn’t have to be imported into a blank form, upon receipt, in order to be processed.

  45. Stefan Cameron on April 1st, 2007

    Jim,

    I was able to find a sample web service you can test with.

    It’s nothing complex: It provides a pair Request and Response methods which take information about an employee and return the same information back, respectively.

    First, create a new data connection to the web service and select the (one and only) “echoEmployee” Operation. That will produce a data connection with 3 items: “echoEmployee Request”, “echoEmployee Response” and “echoEmployeeBtn” in the Data View palette.

    To try this out quickly, simply drag the entire data connection item onto your form. This will automatically create the appropriate hierarchy of subforms and fields with the proper Import/Export Bindings (you can check them out on the Binding tab in the Object palette) along with a submit button which will execute the operation represented by the data connection.

    If you run the form in Acrobat, fill-in the top fields and click on the button, the information you filled-in will be submitted as a request to the web service’s “echoEmployee” operation and the response will automatically be displayed in the bottom fields.

  46. Kris on May 1st, 2007

    Stefan,

    I’ve designed an interactive PDF form using LiveCycle Designer that makes a web service call (with rights enabled using Adobe Reader Extensions). The web service invocation happens perfectly on the desktop Adobe Reader 8.0. However, the same doesn’t seem to work in a Pocket PC, with Adobe Reader for Pocket PC (PPC) 2002. Also, I’ve tried using FormCalc methods GET, POST, GOTOURL as well. None of these works at the PPC Adobe Reader. Even a servlet invocation on a HTTP button submit doesn’t work in a PPC.

    It would be great if you could let me know if these are really known limitations with PPC. Are there any work-arounds to solve this problem?

    Thanks for your time on this.
    Kris.

  47. Stefan Cameron on May 3rd, 2007

    Kris,

    I’m sorry for the delay. I’m working on finding the answer to your questions but this one’s going to take a little more time than usual.

  48. Stefan Cameron on May 4th, 2007

    Kris,

    Just when I thought it would take a little more time to get answers, I received confirmation that the Adobe Reader for Pocket PC 2002 only has very basic form support and as such web service data connections (and most likely any kind of data connection) aren’t supported at this time.

  49. Kris on May 4th, 2007

    Stefan,

    Thanks for the prompt response. I appreciate your efforts in this regard.

    Kris.

  50. Siddhartha Jain on June 12th, 2007

    Hi Stefan,
    I followed your excellant blogs on retrieving All records from an ODBC data source(SQL Server) and the one on Connecting a form to a Database and was able to create an Interactive form which displays all the records on the top in a table and in the bottom, the records are available, for editing one at a time,using the database navigation controls .This form was working fine when used with Adobe Acrobat Professional.
    I tried to use this form in SAP’s Web Dynpro Java Application, which uses the Adobe Document Services to generate the PDF form and enables Reader Rights so that the form can be used via Adobe reader as well.
    I render the form in the web application, after downloading, i open the form in Adobe Reader 7.0 and on the client PC i have the DSN created for the ODBC connection.
    I use two data connections, one for navigation of the database records and another one to load the records.The data binding for the connection works fine and i am able to navigate and edit the records, but the table showing all the records is not being displayed.
    I tried to debug this by using the xfa.host.MessageBox and found that the records are being fetched and the instance manager creates the instances with the data,but the same are not being rendered in the PDF.
    I am unable to understand the problem.
    Can you please guide or provide some help on this.

    Thanks,
    Regards,
    Siddhartha

  51. Stefan Cameron on June 14th, 2007

    Siddhartha,

    My first guess at the cause of the problem is that you’re attempting to use tables in Acrobat 7.0. Tables weren’t supported until Acrobat 7.0.5 (and authoring them wasn’t supported until Designer 7.1) which would explain why you don’t see the table.

    Tables are essentially subforms, though, so you could easily replicate the table behavior using simple subforms and use the “Subform Role” property on the Accessibility palette to specify the role that each subform plays in the table (to ensure that screen readers treat the subform structure as a table without actually using a table object).

    To create a basic table, you would need an outer subform with a role of “table” (set in the Accessibility palette) and a content type of “flowed” (set in the Subform tab of the Object palette) but don’t make it flowed until you insert some subforms into it to define the table rows. You would then give those subforms the correct role for a header row, body row or footer row. Finally, you would add some fields to the various rows (for the cells) and you could also make each row subform flowed to get a nice tight fit.

  52. Stefan BG on June 17th, 2007

    Hello Mr. Cameron, Hi to everybody,

    I am struggling lately with PDFs and document personalization, which easily could be done with PDF FORMS. The problem I am trying to solve is a part of BPM+CRM concept, and is as follows: I would like to achieve independence from BPM in setting layouts of documents(forms), since we are very picky about them. Hence, Iam trying to make possible designing structure and layout of a form and then uploading it to a server. Afterwards this form would be filled by the server, flattened and given to be download by a user.

    Would anybody tell me if for the part of filling and flattening of PDF FORM I shall need a special software or plug-in under Linux, could it be done by directly writing in the code of the PDF itself.

    So far We ve been using LaTeX, which is basically disgusting way.

    10x

  53. Stefan Cameron on June 18th, 2007

    Stefan BG,

    I’m afraid this is a little beyond me. The only part that sounds familiar to me is the following

    …uploading it to a server. Afterwards this form would be filled by the server, flattened and given to be download by a user

    which basically describes what LiveCycle Forms ES would do for you.

    Hopefully someone more knowledgeable will chime-in…

  54. Leticia on August 8th, 2007

    Stefan, thank you for this blog, it’s a good place to go when the help/documentation does not cover it.

    I can’t tell if this article is saying that I would need another LiveCycle product to accomplish the follwing so I’ll just ask you. I have a form that I am having a product supplier fill out in order to add their product to our catalog. Most of their input is text based and simple to set up. However, the form then gets looked over by a manager and the product gets assigned a number of categories before the data gets submitted to a database. The categories do not change often, but it is a long list of categories (Level 1 is 56, level 2 is about 10 each) .

    I have two problems.

    1) How do I get the list of categories in to drop down menus in the form. I can’t use a database connection and the list is too long to type in myself. This is because I don’t want it to produce an error for the supplier since I can’t connect the form to the DB at the supplier’s end, and they are not making the category selections anyway. If I provide an xml file as the data source, it sounds as though Reader won’t import the data and the supplier will get an error anyway. Is there a way to load a long list of data into the form to pre-populate it?

    2) How do I make the subcategory drop downs to depend on the category selection. for example if the category selected is Cat the second drop down options should be Collars, Food, and Toys.

    Cat
    Collars
    Food
    Toys
    Dog
    Collars
    Food
    Leashes
    Toys

    Thanks for your help Stefan!

  55. Bade I. on August 13th, 2007

    Hello Stefan,

    Dont know if I need to state this:
    System: Linux system running apache
    Database: MySql
    language: PHP5

    I have this issue with what I am currently working on. I have a pdf document that I am trying to populate with data. on the page I have form fields (all textboxes). There will be the need to have multiple pages with the same configuration of form fields (so to achieve this I went ahead and made a page template which I am hoping to duplicate with javascript). It turns out I can populate the form elements with fdf generated with php (I can also figure out how many copies of the pdf template that I require from the php page). It becomes difficult when I am trying to populate multiple pages with the data using fdf. So I think I am currently presented with 2 challenges:

    1. When I call the pdf page from the php page (this is done after the fdf has been created), I can call the pdf page with querystrings through which I can pass the number of additional pdf pages that I require. Then on the pdf side of things, I can, through javascript, harvest the querystring and figure out how many additional pdf pages to create; then I will just make duplicates of the template page (i.e. using the combination of getTemplate and .spawn functions).

    PROBLEM WITH 1: The only places I can put the javascript occur after the page is loaded (I think). It will be nice if there is a place where I can place the javascript to create multiple pages before the pdf document calls the event that populates the form fields with the variables from the fdf.

    NOTE: I have everything working except the creating multiple pages before fdf variable load event

    2. Just maybe I am thinking about this whole thing (Procedure 1 above that is) wrong. What should be my line of action in solving my issue

    PROBLEM 2 summary: I have a pdf page I have created with Acrobat 8 Pro that contains form fields. Based on the data I intend to populate the pdf file with. I will require several duplicates of that first page to populate with the additional data. I cannot connect to a database and pull records for security reasons, so I will have to pass all the data to the pdf file somehow.

  56. Stefan Cameron on August 22nd, 2007

    Leticia,

    Unfortunately, there’s no way of importing a list of items into a drop down list or list box in Designer. The only way to somewhat cut down on your work load would be to try to use a script to make the job easier.

    For instance, if your database could produce a comma-delimited string of the primary list items, you could then paste that string into the Script Editor as a string variable. If you did this in the drop down list’s Initialize event in JavaScript, you could then use the String object’s “split” method to automatically produce an array of string values based on the commas. Once you have an array, you could easily loop through it in order to populate the drop down list. This would give you a drop down list populated when the form is initialized without having to manually enter all the items into the list using the Object palette which would undoubtedly be very tedious work in your case.

    For the secondary lists, I would use the same concept but put them in a script object. You could define a function that initializes the secondary lists into arrays and call it from the primary drop down list’s Initialize event so that this happens on form initialization.

    Once the form is initialized and you have the primary drop down list populated and the secondary lists translated into array objects in a script object, you would then add script to the primary drop down list’s Change event and key on “xfa.event.newText” which will contain the item text data that the user selected (the name of the primary category). You would then determine which secondary list (array in the script object) should be used, populate a secondary drop down list using that array and, finally, make that secondary drop down list visible.

    While this may sound very complex, there just isn’t a nice way to handle lists with two+ levels in XFA nor in Designer.

  57. Stefan Cameron on August 26th, 2007

    Bade I.,

    It sounds like you’re trying to achieve all these things using AcroForms which isn’t my specialty. You could try posting your question to AcrobatUsers.com’s “Ask An Expert” Forum (it’s free) to see if one of the PDF experts would be able to help you out. Good luck and let me know if there are any Designer- or XFA(PDF)-related questions I can answer for you.

  58. Meng on August 28th, 2007

    Hi Stefan,

    Is it possible to add attachment to Adobe LiveCycle Forms?
    I am currently making an input data form and I plan to make it be able to give users a possibility to attach any external files if needs arise.
    Example if an user would like to attach a PowerPoint file with graphics as additional information for his/her data input.

    Thanks in advance.

  59. Leticia on August 28th, 2007

    Stefan,

    Thanks for the reply. It sounds like I have some work to do in order to populate my lists. If you could answer a couple of questions maybe there is anther answer.

    If I have the form connected to the DB on the manager’s end (using Acrobat Std ) and they select the from the lists that pull from the DB. Can the form be sent off to the form-filler with the selected data? Will the form filler get an error message because of the DB connection?

    Thanks for reply.

  60. Stefan Cameron on August 30th, 2007

    Meng,

    While it’s possible to add attachments to XFA-based PDF forms which you author in LiveCycle Designer, you can only do it using Acrobat after you’ve saved the form in Designer and beware that attachments are not supported on these types of PDF files and will be lost if you ever re-open the PDF in Designer and re-save your form.

    You would be best to create another PDF (which isn’t based on a form) which can act as the container for other files — a PDF Package, if you’re using the latest version of Acrobat Professional. You would then add your PDF form and its pertaining files as attachments to that PDF (or add them as items in the PDF Package).

  61. Stefan Cameron on August 30th, 2007

    Leticia,

    If the form is programmed such that it queries the database connection when it gets loaded and the recipient doesn’t have a DSN setup to point to the database, then yes, the recipient will get an error message about the connection not existing.

    In order to send the form to the recipient with the selected data, the manager would first have to save the PDF, after making the appropriate selection to get the data from the database, when the send the form to the recipient. Alternatively, you could provide a submit button on the form which submits the data and/or the entire PDF with data. The recipient would then either open the blank form and import the data that the manager sent them or they would receive a copy of the form with data already saved in it.

  62. temp25 on September 14th, 2007

    I’m trying to create the following process (using Acrobat Pro 7.0 on mac): (1) The user completes an online form and clicks the submit button. (2) The data is forwarded to me via email (without the user opening an email client). (3) I populate that data into the original pdf (on my computer) to be printed. I’ve been trying forever to get a pdf form to allow online submission. I’m to the point where the form can successfully be submitted as html but I can’t get it to submit using fdf. I’d like the user to submit data that is received by email to be repopulated on my computer so that I can print the pdf as it appeared on their screen when it was submitted.

    The problem is that the html information that’s emailed doesn’t allow me to feed it back into the pdf file and selecting fdf as the submission method (for the submit button) generates errors.

    The form is already created and the submission (as HTML) submits properly (but doesn’t meet my needs).

    I obviously don’t know much about scripts and just need something simple. I don’t need for the server to send any information to the user; I just need the fdf data to come back to me so that I can import it back into a .pdf–all generated simply by the user clicking the submit button.

    Any help? Is there a simple way to do this without a sophisticated knowledge of scripts?

  63. Stefan Cameron on September 22nd, 2007

    temp25,

    Is there a reason why you need the data to come back as FDF? It sounds like this would be easily accomplished by having the data submitted as XML via email. Using Acrobat Standard or Pro on the receiving end, you can easily import the data back into the PDF and print it just as it was filled on the user’s system.

    When you use an email submit button, the submit data format is XML by default. When you use a regular button and turn it into a submit button, you need to specify “XML Data” in the “Submit As” property on the button’s Submit tab.

  64. temp25 on September 23rd, 2007

    Stefan:

    Thanks for the response.

    I don’t have the option to use XML. The available options are: FDF, HTML, XFDF, and PDF. I’ve tried HTML (doesn’t work out), PDF (requires submission as an attachment via separate email client and doesn’t allow data to be “stripped” later into a database), and FDF (can’t get it to work without some new type of script).

    I’m using Acrobat Pro 7 on Mac OS X.

    From research, I’d thought FDF to be the best way to go but I’m open to anything that will get the job done. I’ve now invested a total of about three weeks into searching for a solution–and I’m still looking. Any help is appreciated.

  65. Charlie on October 1st, 2007

    Stefan
    Nice forum. Glad to see you still answer questions after a year of your original post. I have Adobe Acrobat 8 Professional and I am looking for a way to open a form and import data at the same time with Adobe Reader. I followed your instructions in the paragraph that starts with “The general rule” and went to the Advanced menu and selected Enable Usage Rights in Adobe Reader. I noticed the form size changed after I saved it and selected this option again to make sure and it said the form was already enabled. I opened the form in Adobe Reader but don’t see any menu for importing data. You said this was special hidden features, but how do you access it. The other thing I would like to do is have the form automatically load the data when it is opened (in Reader). Is there a way to do this from the command line? I don’t want to add any com add-ins, dll’s etc. because I’ don’t know for sure the location on each user’s machine.

  66. Stefan Cameron on October 8th, 2007

    temp25,

    Ah, you’re using Acrobat Pro only. I was assuming you were using Designer, which is why I suggested you have the data submitted in XML format. Since you’re using Acrobat on the Mac OS, you won’t have the option of using LiveCycle Designer since it’s only available on the Windows platform (and only comes with Acrobat Pro for Windows).

    At this point, I’m afraid I can’t offer much more direction. I only have Acrobat Pro 8.1 on my Mac as a reference point and I’m not familiar with any previous releases. I would suggest you take your question to the Acrobat Forums and see if someone there could answer your question.

  67. temp25 on October 8th, 2007

    Stefan:

    I seem to be running out of options with Acrobat 7 Pro on Mac and a UNIX server.

    Would I be able to get the job done the way I’d like if I upgraded to 8.1?

    I posted on the Forums (and a few other places) a few weeks ago as well; no luck there yet.

    Thanks again for your responses.

  68. Stefan Cameron on October 13th, 2007

    Charlie,

    Thanks. I’ve tried my best to answer every question that’s been asked on my blog.

    Unfortunately, I think you missed the “Important Note” that follows that paragraph which explains that what “Enable Usage Rights in Reader” does is simply enable “local save” which lets the user save their form with their data in Reader in order to re-open the form with the data at a later time. It does not actually enable data import. This means that without Reader-Extending your PDF form using LiveCycle Reader Extensions (or without serving the form out to the browser using LiveCycle Forms), you cannot import data into a PDF form loaded in Reader.

    If you were able to extend your form or use LC Forms to serve it out, then you would simply create a data connection and cause that data connection to be executed when the form is opened. If the data connection is to a schema and you’re importing XML data, then this usually gets executed when the form is opened automatically. For ODBC and web service data connections, you usually have to open or execute, respectively, the data connection for the data import to occur when the form is initialized (using the Initialize event).

  69. Stefan Cameron on October 18th, 2007

    temp25,

    Unfortunately, I really can’t say if Acrobat 8.1 would make things better or not.

    Another place to try posting your question is to the ask an expert tool on the Acrobat User Community site. Someone there might know the answer.

  70. Kumar on May 6th, 2008

    Stefan:

    First of all I am thankful to you to have published the article “displaying all records from an ODBC Data connection”. I understand the MOVIESF addInstance does the job of publishing all records of the ODBC data connection. The example works fine as is in my Adobe LC designer 8.0

    however I have a modified requirements of this issue. I have an access DB mapped to the PDF through LC designer where I need to show the master-detail ( header-detail) relationship on the form data ( more for reporting purpose – so no button or list or combo box will be used for the master text field controls). SO i planned to use your solution and created another subform ( header subform with header fileds of the 1 to n relationship of data) into the sample form you had created, by keeping the “all records subform” as the detail. “all records subform” would not even move from the top most position in the hierarchy.

    I am trying to combine both your solutions on – 1. all records solution and 2. selecting specific database records. My logic was to load teh detail based on the two data connections I have to ACCESS DB; On initialize of the header subform to give the data items that will form the where clause of the modified query to be run on the second data connection.

    Man! only you can help – no sample applications exist for this requirement anywhere and I am new to LC deisgner.

  71. Kumar on May 6th, 2008

    What I mean by Header-detail is an example of a PURCHASE ORDER; order no; order date; bill to address are all header items; order no is the primary key of that table The details table will have part no, part description, number of units, and other calcuatable columns for every order no. in teh header. There will be multiple rows to be shown at once on the “details” subform for every record of PO Number in the Header Subform. I spent many hours playing with both samples you have given; ON preview of the PDF, if Header data comes then the detail is not shown on the form and viceversa. Please help

  72. Stefan Cameron on May 14th, 2008

    Kumar,

    As I understand it, you have two tables: The first is the “header details” which includes the order number, order date and billing address. The second is an “order details” table which includes the order number, part number, part description, part quantity and other stuff. Your form has a data connection to each table.

    You say you want to show the header details for an order at the top of the form and then the order details in the form’s body but there will be no button, list or combo box used for the header details. That’s where I get confused: What is going to select an order to be viewed? Is that coming from yet a third table?

    So far, this scenario sounds very much like my tutorial on selecting specific database records but I don’t understand how the order is selected so that it’s details can be displayed.

  73. carol goslin on June 17th, 2008

    I’m tasked with creating a form (I am doing this in Professional 7.0 LC Designer. Placing the form then on the web for users (who are outside our network) to complete and email back to me. Couple issues with this: 1. Users have various versions of Acrobat and many users want to complete and save the completed form before hitting the email button.

    Issue 2: I need to find a way to take all these individual files being received via email, and import them into one microsoft access database table. So, basically one form equals one record in the table.

    How do I begin? At first I made a connection to my database, only to realize that won’t work as the users encounter errors because they do not have access to the database.

    Can you plese email me some suggestions or starter points?

    Thanks,
    Carol

  74. Stefan Cameron on June 22nd, 2008

    carol goslin,

    The first thing to consider is whether the free Adobe Reader will be used to fill the form. If that’s the case, the only thing Reader can do (without Reader-Extending the PDF form to enable special features in Reader like “local save”) is submit XML data via email (using an email submit button) or via HTTP (using an HTTP submit button).

    At this point, I believe there are two possibilities:

    The first is receiving the data via email. In that case, you’ll receive XML data files. Acrobat Pro 7 may have a feature that lets you compile those XML data files into something meaningful, I’m not certain. Look under options for “distributing forms” in the help topics. If there is, it will likely generate an Excel spreadsheet containing all the data, one record per row. You would then have to figure-out a way to import that data into your Access database. I’m sure Access has a way to import data from an Excel spreadsheet into a table.

    The second is to receive the data via HTTP. You could write a simple PHP page to which the form would post the data. In the PHP code, you would get the posted data via the $_REQUEST global variable. You could then connect to your database using PHP and insert the data into the correct table in your database right away (not manual processing needed). Of course this option requires the user to be connected at the point when they submit the form.

  75. Singh on June 23rd, 2008

    Stefan:
    We are thinking of generating multiple ‘pre-populated’ forms – send them out via email – get the data back into our DB. The problem I am facing is in the first leg of this process.
    We need to create multiple forms each one populated with one-record from the DB. So I am thinking that we need a process outside of an individual form and loop through all the records we retrieve from the DB and generate one form for each records.

    Any help would be really appreciated!

  76. Stefan Cameron on June 25th, 2008

    Singh,

    This is the sort of thing you would use other LiveCycle ES services to do. For example, you would create a workflow, using the Workflow Designer, that would have a loop that would iterate while there are records to be processed and for each record, it would generate an interim XML data file that would then be merged into an instance of the form. That form would then automatically be emailed to the appropriate recipients.

  77. Saran on September 18th, 2008

    hi stefan,
    I’ve deswigned PDF forms using Livecycle designer and i have created a table with 1 row & 7 columns. And i’ve used a button to increase the rows and the rows gets inreased correctly. But the thing is once is export that PDF or save the PDF with filled content only one row is getting saved. Why is that so? I filled in many rows and it seems like saving. But when i open that PDF it has just one row saved. Please help me Stefan. Am really in need.
    I should really thank you for sharing all ur knowledge. I used many of ur blogs and it was really useful

  78. Madhu on September 24th, 2008

    Hi,

    i want to know the procedure for filling the Table in Adobe form with the Table Data in webservice.

    my scenario is : i have created a Purchase Order Create where i am able to populate the DropDown List onfly and i am able to create a purchase order. thats fine.

    Now i have to design form for changing the Purchase Order, for this the user will enter the Purchase Order Number and click submit, we can call a webservice and can get
    get the data for a particular Purchase Order Number.
    The Header Data i am getting the values from webservice and i am able to see that data in the form
    but i am not able to see the Item Data which will be in a Table in webservice.
    i have done binding the Table Row in the Binding Tab in adobe form with dataconnection for a webservice.

    help me in this regard by giving the procedure how to get the solution done.

    thanking you in advance.
    madhu.

  79. Stefan Cameron on September 24th, 2008

    Saran,

    What version of Designer and Acrobat are you using?

  80. Madhu on September 25th, 2008

    Hi Stefan,

    i have one more issue,
    i have created a offline interactive form and i have put Text fields, Table, Dropdown list from library pallete,
    and i am able to fill the data and i am saving it.
    But when i am opening the PDF again which is saved i am not able to see the values i.e the values get refreshed.
    is there any properties that i need to set.
    This application i am developing in SAP.
    i am using Adobe Live Cycle Designer 8.1 to design the form and i am using Adobe Reader 8.0 to view the form.

  81. Stefan Cameron on September 27th, 2008

    Madhu,

    With regards to your second comment (comment #80), I’m curious how you’re saving your filled form using Reader since Reader cannot save form data without the PDF being extended to allow the “local save” feature. I’m thinking your form isn’t actually saved so when you re-open it, the data is lost. You’ll need to either use LiveCycle Reader Extensions to enable “local save”, use LiveCycle Forms to merge the data into the PDF on the server and then serve the PDF to the client or use Acrobat Pro to “Enable Usage Rights in Adobe Reader” to enable “local save” in Reader (just be aware of licensing restrictions with this feature — there’s a limit to the number of forms you can enable or the number of users who can use a form enabled with this feature).

  82. Stefan Cameron on October 4th, 2008

    Madhu,

    With regards to your first comment (comment #78), is the table row set to repeat for each data item in the data connection?

  83. Saran on October 5th, 2008

    Hi Stefan,

    Its so NICE of u spending much time in resolving out issues. Your replies were of great use to me.
    I have got an issue with exporting the XML data to database or CSV format. I have created a PDF form with submit button which moves from Employee – Customer -Admin.. Finally the Admin reviews and exports a XML file to his system. Actually the exporting button has to deliever a CSV file format or it can insert the PDF form content into Database. I have created a Web service for converting a XML into CSV format. Can that be linked with this PDF forms Export button. If so please help me in finding the solution. If not let me know the alternate way for exporting XML data to CSV format.

    I hope you could help in this issue…

  84. Madhu on October 6th, 2008

    Hi Stefan,

    With regards to my first comment (comment #78), i have set the table row to repeat for each data item even then i am not able to fill the table in adobe form with
    table data coming from webservice.

  85. Stefan Cameron on October 6th, 2008

    Madhu,

    Two other possible reasons why this isn’t working are the following:

    1. The “Object palette > Execute tab > Re-merge Form Data property” isn’t checked on the button that executes the web service data connection. This option should be checked so that the data returned from the web service can be merged into the form and the form can account for repeatable form data (i.e. your table row).
    2. The form isn’t saved or isn’t being previewed as a Dynamic PDF form. See my article on previewing a form as a Dynamic PDF for more information on this issue.
  86. Madhu on October 7th, 2008

    Hi stefan,

    i have already set the properties as you mentioned in the above comment.

    i am able to get the textfields values from webservice but not the table data.

    i have set for the table as Repeat Row for each Data Item,
    i am able to see the values in table in webservice in debugging,
    set the previewing form as Dynamic PDF and in Tools->options->document handling->file optins as Adobe XML Form File(XDP).
    i am calling the webservice using javascript for a button in click event.
    xfa.connectionset.mydataconnection.execute(1);

    still not getting…

  87. Stefan Cameron on October 8th, 2008

    Saran,

    I’m not sure what you mean by a “PDF forms Export button” but I think it’ll be difficult for you to get Acrobat to export form data in CSV from an XFA form. If the data ultimately needs to go into a database, why not build a web service that receives the form data and inserts it directly into the database?

  88. Saran on October 9th, 2008

    Hi stefan,

    I have a normal Button in the PDF form and i have written the script to export the form as a XML file which the Admin can save it his system. I have used xfa.host.ExportData(“”,0); But the client wants to get it exported as CSV format. I found that it cannot be done within LC designer. So i thought i could use web service to convert XML to CSV. I dont know how to pass the XML from PDF form to the web service.. I’ll try with the link you have given now.. If there is any other article for doing this let me know.. Thanks in Advance…

  89. Saran on October 10th, 2008

    Hi stefan,

    I got the things working.. I used a webservice and got converted to CSV..

  90. Stefan Cameron on October 14th, 2008

    Madhu,

    You’ve set the preview option for XDP files to be “Dynamic PDF” but is your form saved as an XDP file or as a PDF? If it’s saved as a PDF and you saved it as a Static PDF, setting this preview option will not have any effect. Your form will still be previewed as a Static PDF. A simple test would be to put a field and a button on your form and set the button’s Click event script to hide the field. If the field disappears when you preview the form and click on the button, then you have a Dynamic PDF.

    If that works, then what binding do you have set on the repeatable row and what does the data look like coming back from the web service call?

  91. Saran on October 15th, 2008

    Hi Stefan,

    I have the PDF forms with Digital signatures which does not work when the Reader extensions are enabled. How do i get it working. It works when i save a copy of the Form to my system but is there any option of Disabling Reader extensions from the Javascript?? If so let me know..

  92. Madhu on October 15th, 2008

    hi i have tested as u said and the text field is invisible when i click a button
    the script for button i wrote is
    data.body.textfield.presence = “invisible”; that means it is saved as dynamic pdf i think.

    now coming to table data from webservice
    table has 3 columns
    Name Id City
    madhu 101 hyderabad
    abc 102 chennai
    and so on..

    i have binded to the table designed in adobe form with 3 columns
    to the Row in Object Pallete i have checked Repeat Rows for each data item
    and in import/export binding field !connectionData.DataConnection.Body.TableResponse.ITable.item[*]

    and for the fields Name in import/export binding field !connectionData.DataConnection.Body.TableResponse.ITable.item[*].Name
    for Id !connectionData.DataConnection.Body.TableResponse.ITable.item[*].Id
    for City !connectionData.DataConnection.Body.TableResponse.ITable.item[*].City

    currently i am able to get the TextField data and string data from the same webservice, but not the table data.

    help me in this regard.
    Thanking You in Advance,
    Madhu.

  93. Stefan Cameron on October 21st, 2008

    Madhu,

    Perhaps looking at the XML returned from the web service call might expose what’s going wrong. You can do this by using the PostExecute event. Unfortunately, it’s not an event which you can pick from the Script Editor’s “Show” property so you’ll have to set it in the XML Source. Switch to the XML Source, select the root subform (the one at the top of the Hierarchy tree) and then add the following markup inside the selected root <subform> element:

    <event activity="postExecute" ref="$connectionSet.DataConnection" contentType="application/x-javascript">
        <script>console.println(xfa.datasets.connectionData.DataConnection.saveXML());</script>
    </event>

    Then switch to PDF Preview, applying the changes when prompted. Cause the web service call to take place and then press “Ctrl + J” to show the JavaScript Console. You should see the XML that was returned from the web service call in the console. Make sure it’s properly structured to match the data bindings you have set in the table.

  94. Lisa on October 22nd, 2008

    Hi Stefan!
    I have used Acrobat Designer LiveCycle to send a PDF forms by email to import the data and it was a GREAT SUCCESS for me, I have not any problems and I was very happy about this tool of Acrobat.
    But now I have a problem: I’m using another PDF form with a Data connection with Microsoft Access, and I connected the PDF form such as you explained in many responses and it seems everything is ok, but when I open PDF file, I can view data from Database, but when I modify them, I can see the new data in PDF, but when I close my PDF form and open the database, it has not imported the new data!
    I can’t understand why I can view data without problems so it means that the Data connection is OK, but I can write in database from the PDF forms! Please, only you can help me, I need to solve this problem as soon as pssible and now I’m very pries to understand what is my error!

    Thanks in Advance!

  95. Madhu on October 23rd, 2008

    hi stefan,

    now i am able to get the table data from webservice into adobe form
    what i have done is drag and drop the response subform of webservice in dataconnection into form layout
    we get the bindings automatically, thats fine.

    for a button i am calling a webservice for a click event
    xfa.connectionset.dataconnection.execute(1);

    i have put 1 as parameter otherwise we can check the property Remerge form data for a execute button.

    thanks a lot for your support.

    Madhu.

  96. Nitin on October 24th, 2008

    Dear Stefan,

    Good to see that u are solving the problems of thousand of people. Thanks for all the effort u r taking. :)
    I have a query regarding a form which i have developed in Adobe LiveCycle Designer 8.1. My task is to read the data from the form and fill this data in another similar form.
    Basically it is a conversion tool to covert the old form into new form and also the data from old form feilds should be transfferd to new form.
    My idea on this is to write a java application and to use the adobe API to read and write the data from/into form.
    I also have a purchased copy of Adobe Reader extesion.

    Please let me know your view on this, if u have any other better approach kindly suggest.

    Thanks,
    Nitin

  97. Nitin on October 30th, 2008

    Dear Stefan,

    I want to make PDF file programmatically rights-enable(export and import). Can i do this?
    I have the following jar files:

    adobe-forms-client.jar
    adobe-reader-extensions-client.jar
    adobe-signatures-client.jar
    adobe-usermanager-client.jar
    adobe-usermanager-util-client.jar
    Kindly provide your inputs on the same as soon as possible.

    Thanks,
    Nitin

  98. Stefan Cameron on October 30th, 2008

    Lisa,

    It sounds like the bindings on the fields for your data connection may not be properly setup. You said you build your form according to some responses but it sounds like what you want to do is more like I described in my tutorial on connecting a form to a database. Give that a try and see if it works better that way.

  99. Norbert D'Souza on November 3rd, 2008

    Hi Stefan,

    I’m hoping to achieve something which I think is something really simple but because of lack of proper documentation I am running around in circles.

    I have a very basic Excel file which three different columns.

    1. Name
    2. Course Name
    3. Signatory

    I will have three buttons on my PDF form

    How can I populate each field for different records from the Excel file?

    I hope I have been clear in my explanation.

    Thanks in advance

    Sincerely
    Norbert

  100. Nitin on November 3rd, 2008

    Please provide your inputs on my above query

  101. Stefan Cameron on November 3rd, 2008

    Nitin,

    It sounds like you have an old form, let’s call it “FormA”, and a new form, let’s call it “FormB”, and you want to programmatically transfer the data from FormA to FormB.

    The first thing that comes to mind is writing an XSLT to translate FormA’s data model into FormB’s data model. You would export the data from FormA, run it through the XSLT and then import the data into FormB. Bindings in both forms would automatically take care of exporting and importing the data out of and into the fields.

    If you’re using Acrobat to do this, then you shouldn’t have to worry about Reader Extensions but if you’re using Reader, then you’ll need it since Reader can’t import data without the PDF being extended.

  102. Nitin on November 5th, 2008

    Stefan,

    Thanks for ur reply, but how to achieve this task with XSLT?
    Could you please throw some more light on it.

    Is it possible to achieve the same using iText (java library) ?

  103. Nitin on November 5th, 2008

    Stefan,

    I want to achieve the task using Java, please suggest the best possible approach.

    Thanks,
    Nitin

  104. Nitin on November 7th, 2008

    Dear Stefan,

    Is it possible to read and write the data in dynamic XFA forms. Uing iText i m able to read the data from XFA form, but writing back data to the feilds is creating
    problem.

    Please suggest if any API is available to achieve this task.
    Please reply asap its urgent.

    Thanks,
    Nitin

  105. Stefan Cameron on November 10th, 2008

    Norbert D’Souza,

    To get data from your Excel spreadsheet into your PDF form, you’ll need to use Microsoft’s ODBC driver for Excel. Then you’ll need to setup an ODBC data connection in your form.

  106. Stefan Cameron on November 10th, 2008

    Nitin,

    Unfortunately, I’m not familiar with the iText library so I can’t be of any help there.

    If you used XSLT, you could even configure FormB to translate the data from FormA using the XSLT into a format that FormB would understand by creating a schema (or sample XML) data connection in FormB and setting the “Transform Incoming Data” property to the XSLT file that converts FormA’s data structure into FormB’s data structure.

  107. Nitin on November 12th, 2008

    Dear Stefan,

    After executing xfa.host.importData() function, code further does not get executed.
    My script is like that:

    xfa.host.importData();
    Form.txt1.rawValue=”";
    Form.txt2.rawValue=”";
    xfa.host.messageBox(“done”);

    My task is to fill the form amd then balnk few feilds.
    I am getting alert “done” which i have mentioned in above script.
    Tha javascript error is coiming that Form1 is not recognised.
    Although Form1 is a part of XFA from i have desinged in LC designer.
    Kindly advice.

    Thanks,
    Nitin.

  108. Stefan Cameron on November 17th, 2008

    Nitin,

    I’m confused: You’re saying something is complaining that “Form1 is not recognized” however I don’t see a reference to Form1 in the code you listed.

    And you say you see the alert. Are you seeing it before or after the Import Data dialog?

  109. Michelle on April 28th, 2009

    I have a working php script that works on windows and ie to import an xdp (xml) data file into a pdf file. (populates the fields).

    My problem is that on a mac the data is not imported.

    This is a livecycle form.

    I send the xdp with

    header(‘Content-Type: application/vnd.adobe.xdp’);
    header(‘Content-Disposition: attachement; filename= filename.xdp;’);

    and in the footer of the xdp I load the pdf.

    Works great on PC stuff, but on mac it loads the pdf fine just does not populate the fields.

    Thanks in advance,
    Michelle

  110. Stefan Cameron on May 4th, 2009

    Michelle,

    I have to admit I’m not quite sure how you’re doing this but I’m thinking it may have something to do with ‘xdp’ not being a registered extension on the Mac as well as with differences between the IE PDF plugin on Windows and the Safari PDF plugin on the Mac.

  111. Sandip Saini on July 7th, 2009

    Thanks for indication the use of ADBC for importing data. You have a very good knowledge about this matter. The way you wrote very nice. Thank you for this post.

  112. Said on September 2nd, 2009

    Hi,

    I try to populate a dropdown list in PDF with data coming from SAP in WebDynpro…
    Could you help me with this ? All the tests I did are not working… I’m not able to click the arrow to get datas…

  113. Stefan Cameron on September 11th, 2009

    Said,

    While I know of WebDynpro, I’m not very familiar with it. Is the data from WebDynpro access through a data connection in the form somehow or does the form just get XML Data (in which case you might have a binding problem)?

  114. Janet Debret on September 16th, 2009

    hi…I’ve created a form using Adobe Designer and am unable to import data into the form. I’ve done the following: emailed myself a test file, saved the file (xml extension was preserved), opened a blank form in Adobe 7.0 Pro, chose file, form data, import data…and….nothing happens. I’ve tried exporting the data to my desktop & importing it back to see if it was a problem with the email program or server, but that didn’t work either. What am I missing? I’ve seen others reporting a similar problem when searching for answers to this on the net, but have yet to find a solution. Thanks for any help you can offer.

  115. Stefan Cameron on September 18th, 2009

    Janet Debret,

    I’m not quite sure I follow…

    Was the test file you emailed yourself submitted from the form into which you are later importing this data?

    When you say you “opened a blank form in Adobe 7 Pro”, do you mean you opened a version of the form in which fields were not filled in Acrobat Pro 7?

  116. Aditya on September 25th, 2009

    Hi Stefan,

    I would like to import an XML programmatically. This XML is a result of a Web service call.

    How can i make this happen ? FYI… I am using LCES.

    Thanks
    Aditya

  117. Stefan Cameron on October 2nd, 2009

    Aditya,

    You will need to pre-process the web service response in order to load the XML into a new, temporary node. Once you have done that, you can access child nodes using E4X syntax and populate your form.

  118. Lisa on October 26th, 2009

    Hi Stephan,
    I have set Adobe Acrobat 9 Pro extended in my PC in order to create a form with LiveCycle Designer. I need your help as I have a serious problem with the submit button.
    In order to test the submission procedure, in the first form that I created I connected an e-mail address with the submit button. After the test, I wanted to change the e-mail address connected to the Submit button but I couldn’t change it anymore.
    I also created several forms for other kinds of use (different from the first form realized) but in all of them the problem still persists. When the file is used in any other PC and the user wants to submit the form, if the submit button is pressed the e-mail address displayed is always the one that I set in the first testing form. This situation is causing many problems because all the forms are submitted to the first testing address.
    Is it possible that there is a bug in the Adobe Acrobat 9 Pro extended version? I didn’t have this kind of problem with the Adobe Acrobat 8 Professional version.
    Thanks in advance for your kind and prompt reply.
    Lisa

  119. Stefan Cameron on November 2nd, 2009

    Lisa,

    I don’t follow: Are you saying that you cannot go into Designer and change the email address on the submit button? I’ve never seen this happen. Could your PDF/XDP file be read-only, preventing you from making any changes?

    If it’s an email submit button, you should be able to change it in the “Object palette > Field tab”. If it’s a regular button set to a submit type, then you should be able to change it on the “Object palette > Submit tab”.

  120. Richard on November 16th, 2009

    I am totally new to Adobe and don’t know ANYTHING. I have Acrobat 9 Pro on my PC. I have a .pdf form I was given that I need to import data into the appropriate fields. I created a test .txt file to use an data to import into the form. I went to Forms/Manage Form Data/Import Data and selected the test .txt file. I get the message “could not load the data from the text file”. The form I’m trying to populate is actually a U.S. Post Office form, PS Form 1583. Do I need to “undefine” the existing fields in the form and insert/create my own fields as it relates to the test .txt file? Thanks in advance.

  121. Tom on November 18th, 2009

    Hi Stefan,

    I enjoy your posts and I am learning a lot.

    I have a form that I would like people to “subscribe” to in order to use the form (while their subscription is active).The form has a password field that hides/unhides the last page where all the results appear.

    Currently, the user subnmits the form data as an XML file to me, which I import into a blank version of the form, enable the password, and then print to a PDF file and send that back to the person.

    To automate this, I want to make the form check against some type of database or list for a registered user. If the person is “active” the password field is enabled so that the last page becomes visible. However, if the PDF form is “saved”, the downloaded blank version would still require the password (not known to the user) to see the last page. This limits the form to an “online” usage to see results.

    Can a checking of a database or user list be done autmatically by the PDF form?

    I appreciate your advice,

    Tom

  122. Stefan Cameron on November 19th, 2009

    Richard,

    Acrobat expects to import data from an XML file, not a text file. Your data would have to be in XML format in order to import it and then you would set appropriate data bindings on each field in the form in order to get the right data element value in to the right field upon import.

    To help with setting bindings, you can create a schema data connection based on the XML file you have (create a data connection based on “sample XML file”). Once this is done, you’ll have a Data Connection tree in the Data View palette from which you can drag and drop elements onto fields in your form in order to establish the proper bindings.

    Before diving into the data connection, however, you might want to check if the form fields already have bindings by selecting a few and looking at the “Object palette > Binding tab > Normal Binding property”. If it’s set to something other than “None”, then the field is bound to data. These bindings can help you decipher the structure your XML data file needs to have in order to properly import the data into the fields.

  123. Stefan Cameron on November 19th, 2009

    Tom,

    Connecting a form to a database implies that the user has a DSN setup on their system which has database information. Since this sounds like a form that anyone can download, this likely wouldn’t be the scenario and it wouldn’t be very secure anyway.

    The better way to do it would be to connect the form to a web service since this can be accessed from anywhere (provided it can be outside your firewall if this is for anyone on the Internet).

    Note that in order to connect forms in these ways, users would either need Acrobat Standard/Pro or the PDF would have to be reader-extended to enable data import rights (as I indicate in this post).

    You could manually (i.e. via script) execute either connection on form initialization and check your records for their membership and take the appropriate action. If the form is offline, I don’t believe you’ll be able to tell for sure other than not getting a response from the web service or database…

    Another way to do it could be to use FormCalc’s Get() function which allows you to retrieve an XML file from a server. This post by John Brinkman explains how he uses it to check for fragment sample versions — pretty cool! Note that since this technically imports data into a form, I’m assuming you’ll need Acro Std/Pro or reader-extensions just like using a data connection.

  124. Richard on November 19th, 2009

    Stefan,

    I’ve been around long enough to know it’s better to ask a “stupid” question than to sit here and be embarrassed that I can’t even find square one to start from, SO……..

    I’m pretty sure I’ve selected a field(highlighted in royal blue), but I can’t seem to find anything anywhere about “Object palette > Binding tab > Normal Binding property”. I’ve right-clicked on the selected field, I’ve looked through each of the toolbar selections across the top. Nada. Can you point this newbie in the right direction? I’m not a total techno-dummy; I was a LAN/WAN technician for years before becoming a database administrator, using MS ACCESS to create queries/macros for data extraction/comparison/reporting, and run mail merges using the database tables as the source data. I’m not trying to impress you, per se, just let you know that I have worked in and with PC-based technical disciplines for years. Thanks in advance.

  125. Stefan Cameron on December 3rd, 2009

    Richard,

    It happens even to the best of us. I hope you aren’t still waiting on the answer for this but, in case you are, if you’re running Designer standalone (separate from Workbench), then you’ll find a “Window” menu at the very top of the application (to the left side of “Help”). In there, you’ll find a menu item called “Object”. If it has a check mark next to it, the Object palette is already visible; otherwise, it is hidden (either entirely or its tab isn’t active). Click on it to show the Object palette.

    If you’re running Designer within Workbench (8.x), the “Window” menu is replaced with a “Palettes” menu that contains items for each palette.

    From there, I assume you’ll be able to find the Binding tab and Default Binding property.

  126. Richard on December 3rd, 2009

    “Designer” and “Workbench” are new terms to me; THAT’S how much of a newbie I am. I searched the Adobe Acrobat 9 Pro “Help” section and found a reference to “LiveCycle Designer”…. is this the “Designer” you are referring to? I poked around through the Adobe menus and couldn’t find it there. Finally, I went to Start/All Programs and found “Adobe LiveCycle Desiger ES 8.2″… YAY! I click on it, it starts to open up and then I get an error popup saying LiveCycle Designer has encountered a problem and needs to shut down. I assume that I need to get my workstation support guys to reinstall LiveCycle, right? Should they re-install everything including Acrobat? Assuming that my guys reinstall everything and I can successfully start up LiveCycle, is the “Window” you talked about at the top of the LiveCycle screen? Thanks for being patient with me.

  127. Stefan Cameron on December 5th, 2009

    Richard,

    Yes, I would have someone re-install Designer, at least. You should be able to run it. You’ll find the “Window” menu in Designer once you get it to run and create a new form.

  128. Richard on January 20th, 2010

    Stefan,

    Long time, no see!

    I’m armed and dangerous! LOL

    I now have a working instance of Live Cycle and I have an XML file of data. Trying to just shoot from the hip, I “think” I inserted a data field from the XML file into the PDF I’m working with. I crank up Adobe Acrobat Pro, select the PDF, click on Forms/Manage Forms Data/Import Data and select the XML file to use. NOW what? Drawing on my experience with MS Word, I essentially want to perform a “merge”, inserting the data of 211 records into the PDF, creating 211 forms with data. Thanks in advance for your next advice/hints.

    Richard

  129. Richard on January 20th, 2010

    Stefan,

    Actually, besides persuing using the XML file to import into the PDF form(to create 211 printable forms), I’ve played around enough to discover that I can use an MS ACCESS table to be the source of the data for the PDF(I think). I created the data connection in Live Cycle and even tested the connection successfully. However, when I open up the PDF with Acrobat 9 Pro, I get the following error message: “Connection for Source Merged_Current_Residents_Mailbox_New failed because the environment is not trusted.” Any idea how I can overcome this hurdle?

    Richard

  130. qais on January 25th, 2010

    thank you so much sir i found the solution

  131. qais on January 25th, 2010

    Hi Sir
    How Can I add field password in my from and connect with
    database for users

  132. Stefan Cameron on January 29th, 2010

    Richard,

    Others have reported the “environment is not trusted” issue as well. All I know is that the problem was supposed to have been fixed with Acrobat 8.1. Others (as you can find elsewhere on my blog) seem to have solved the problem by setting their bindings to “Normal” (using normal data binding rather than explicit data binding).

    I’m unsure of what you’re trying to achieve. It sounds like you’re wanting to use Acrobat to create multiple forms based on a dataset. Where does LiveCycle Designer fit into your plans?

    With Designer, you could create a report-style form that displays all 211 records. If you wanted to generate 211 forms based on a dataset of some sort, then you would use a LiveCycle Orchestration (a process created with LiveCycle Workbench) but this is getting really complex…

  133. Richard on February 2nd, 2010

    Stefan,

    What I’m trying to achieve is this. I have one form. I have a file with 211 records of data. I want to ultimately print 211 copies of the form populated with the data from the 211 records.

    What you describe with “LiveCycle Orchestration” sounds like what I’m trying to accomplish. You say it’s created with LiveCycle Workbench. All I know is that I have Adobe LiveCycle Designer ES 8.2; is “Workbench” included somewhere in there?

    Richard

  134. Stefan Cameron on February 3rd, 2010

    qais,

    Please see my tutorial on connecting a form to a database.

  135. Stefan Cameron on February 11th, 2010

    Richard,

    Unfortunately, Workbench isn’t part of the Acrobat/Designer installation. It’s the orchestration design tool that is part of LiveCycle.

    Creating a single form that lists all 211 records can be done by importing that data (I’m assuming it’s in XML format) into your form and binding it to repeatable subforms.

    Generating 211 forms, one for each record, is a completely different story. You need something outside of Designer to do this (i.e. an orchestration that produces 211 PDFs, one for each record, and sends them to a printer to be printed).

  136. Richard on February 16th, 2010

    Ah well, we tried. We’ll probably just print 211 blank forms, load them back into the printer, and then do a mail merge in MS Word to populate the form with the data from the 211 database records. Thanks for the help and your patience.

  137. Robg264 on April 9th, 2010

    I followed this step in a 2 page form that I created with about 300 names that I needed to import which worked fine. I told LV to repeat Page 1 subform with a min of 1. However, I noticed that although I have 300 pages Page 2 only showed up once towards the end. I tried repeating Page 2 subform as well but nothing happens. I tried all sorts of combinations to have page 2 appear for each name but to no avail. Any other thoughts on how I can get page 2 to appear back to back for each person? Thank you.

    > Creating a single form that lists all 211 records can be done > by importing that data (I’m assuming it’s in XML format) into > your form and binding it to repeatable subforms.

    > Generating 211 forms, one for each record, is a completely > different story. You need something outside of Designer to
    > do this (i.e. an orchestration that produces 211 PDFs, one
    > for each record, and sends them to a printer to be printed).

  138. Stefan Cameron on April 14th, 2010

    @Robg264,

    I’m unclear as to the structure of your form, but you might be able to achieve what you want by selecting both Page1 and Page2 subforms and, assuming they following one another, wrapping them (“Right-click > Wrap Subform”) into a single subform (that contains both). Then set the outer subform to repeat instead of Page1. That should give you Page1 and Page2 for each name, assuming your bindings are setup correctly to generate an instance of the outer subform for each name.

  139. Alex K on May 5th, 2010

    Hello everybody,

    I have a security problem regarding export and import data option in Adobe.
    I have a digitally signed Pdf Form. The problem is that i can export the data filled in the form as xml file (Document -> Forms -> Export Data) then change the values in the exported xml. After this, I can import the values from the modified xml file into the original signed Pdf form (Document -> Forms -> Import Data). After this process the signature is not being invalidate meaning that the form values can be modified after signing.

    Is there any posibility to disable the import option into a dinamic pdf form? (from the LiveCycle Designer options or programatically from the javascript API).

    Thanks in advance for any idea.

    Alex

  140. Stefan Cameron on May 17th, 2010

    @Alex K,

    I believe the signature likely remains valid in and of itself however
    there must be an indication that the form has been altered, since it was first signed, once you import data into it post-signing.

    I don’t think there’s a way to programmatically prevent data import into a form via Acrobat, however, if you have the signed form, you should be able to flatten it by printing it to PDF. When you install Acrobat, you get a PDF Printer that lets you print anything to PDF. Printing a Dynamic PDF form using this printer will essentially flatten the form into a basic PDF. At this point, you would no longer be able to import data into it.

    That said, there may be a way to do this in XFA, I just don’t know for sure. You might try your question over on my colleague John Brinkman’s blog, FormFeed. He might have an answer for you. The XFA 2.8 spec talks of a <lockDocument> (in /field/event@activity=”click”/signData/filter/lockDocument@type=”required”) that sounds promising but that may be a red herring.

  141. hellary on August 12th, 2010

    Hi Stefan,

    The design of my pdf is initially open with only pageA (I do something to hide other pages on docReady event),
    then user will click on a button of pageA to go to pageB while hiding pageA from him.

    Now there is a button on pageB for user to import data from an xml file.
    I use xfa.host.importData(), but it seems that it fires the form’s initialize event again,
    therefore everything get reset and pageA re-appears again without pageB.
    I can’t set global variables to work on it, everything is reset after xfa.host.importData().

    Question 1:
    How can I remember the state on pageB after calling xfa.host.importData()?

    I do not directly bind the form fields with the xml data because my form layout is quite complicated,
    instead I loop through each record in the xml, then do some work before filling each record.
    I do this by using xfa.resolveNodes(“xfa.datasets.data.form1.entry[*]“) to loop through each entry for my work.
    (form1 is the root node and entry is the element name in my xml schema)
    but it seems that before I call xfa.host.importdata(), the length of xfa.datasets.data.form1.entry[*] is always 1.

    Question 2:
    Is there any other method to know the number of records in the xml and access the fields’ values?

    Best Regards.

  142. Chris on August 12th, 2010

    Hi Stefan,

    Old XFD data files created in Adobe Forms 5 (Formerly FormFlow99) can be imported into PDFs that were upgraded from old XFT templates. However, XFTs provided the ability to create multiple records within the XFDs. Is there a way to set up the PDF to read all records, instead of just the first one? Can it then be set up to save all of the records as an XDP file?

  143. Stefan Cameron on August 24th, 2010

    @hellary,

    Yes, xfa.host.importData() will cause the form to be re-initialized with the new data and script variable values are not retained. Since you don’t bind anything directly to the data, I would suggest adding a node to the data to remember the state. Once loaded, you can remove the special node so that it doesn’t remain in the form’s data (if you don’t want it there).

    As for the number of records, I don’t see anything wrong with what you’re doing. You could also try the following to see if you get better results:

    var entries = xfa.datasets.data.form1.entry.all;

    That will get all nodes with the name “entry”.

  144. Stefan Cameron on August 24th, 2010

    @Chris,

    I’m afraid that’s beyond what I know.

  145. Mayrinck on October 11th, 2010

    HI Stefan,

    I´m creating a interactive form and i´m getting a problem when save the pdf.
    Basically i have a subform which i can create new instances and populate their fields, but when I save it, the new instances not appear more… My question is: How to save the dynamic objects inside the PDF ?

    Best Regards.

  146. Jason on October 12th, 2010

    Hi Stefan,

    I’m having the same problem as Mayrinck, in that when saving or submitting a form, dynamic fields disappear.

    Once a user has completed the form, they have the option to save, print and/or submit by email (as a PDF). Each button uses JS code to first set all fields except the other buttons to “readonly” before executing the specific action. The print button works fine, but using the save or submit buttons results in the dynamic fields disappearing from the file that is saved or added to an email.

    I’m using “app.execMenuItem(“SaveAs”)” in the mouseup function of the save button, and “event.target.submitForm({cURL: cEmailURL, cSubmitAs:”PDF”, cCharSet:”utf-8″});” for the submit button.

    The form properties are set to Dynamc XML, not static PDF.

    Any suggestions as to what I’m doing wrong?

    Regards,
    Jason

  147. Stefan Cameron on October 18th, 2010

    @Mayrinck,

    See my article on restoring the state of your form.

  148. Stefan Cameron on October 18th, 2010

    @Jason,

    See my article on restoring the state of your form.

    Also, when submitting your form, you should be using a submit button from the “Object Library > Standard panel”. Insert a “Button” object and set its “Object palette > Field tab > Control Type property” to “Submit”. Then set the “Object palette > Submit tab > Submit As property” to “PDF” to submit the entire PDF.

    Note that submitting the entire PDF can only be done when running the form with Acrobat (as opposed to the free Reader) unless you extend the PDF to enable this functionality in Reader using Adobe LiveCycle Reader Extensions ES2.

  149. Erick on November 11th, 2010

    I have liveCycle Designer 8.0 and MSSQL 2005 and I’m using php.
    I’m traig to save the submit data in MSSQL ussing php but when view save data i will like to fill a pdf file what is my best option???

  150. Stefan Cameron on November 15th, 2010

    @Erick,

    Submitting data is easy and not generally impeded but importing data is only permitted under certain circumstances. Please see the table in this post for the configurations necessary to allow data import into a PDF (unless you’re manually generating the PDF using some PHP library that may exist somewhere).