Interactive Livecycle form loses its functionality when saved as PDF

I have created a form in LiveCycle and saved it as a pdf but the functionality no longer works in the form.  When opened in LiveCycle in "PDF Preview" everything works perfectly.  I have saved it as an extended pdf and still no functionality.
yoducatiAsked:
Who is Participating?
 
Karl Heinz KremerCommented:
Maybe I don't know what I am looking for :) I just also moved the line that prints the form (xfa.host.print) to the end of the script. This will update the letter first and then print it. I think what I was looking at was the data from the last time I clicked on the "Print" button.

I've attached my modified version of the demo file.

One more thought: Your letter will only be generated correctly if the user clicks the print button on the form, but this will not work if you use Acrobat's or Reader's print function (Ctrl-P or the print button on the toolbar or menu). You can make this work as well by using the "PrePrint" action that you can attach to the form. This way, it would not matter how one starts to print the field would always be handled correctly. You would move all code but the xfa.host.print() to the prePrint handler.
InvoiceLetterDEMO.pdf
0
 
Karl Heinz KremerCommented:
How do you open the saved form? Only Adobe's PDF viewers will give you the correct interactive experience.
0
 
yoducatiAuthor Commented:
I understand that.  When the form is opened both in the reader, and in Acrobat professional the functionality seemed to be lost.  I was thinking it was a software bug somewhere.  When I open the form in either one the print preview window shows me what the form will look like when printed which is how I know its not working correctly.  Late friday a co worker discovered that when she clicks the print button on my form and the preview window opens showing the preview with the missing information, if she closes the window and hits the print button again the preview displays with the correct information.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Karl Heinz KremerCommented:
That is very weird, and definitely not what's supposed to happen. Is this something that happens with all your LiveCycle Designer forms, or just with this one? If you've started with a PDF file and then modified that to add your form fields, it is possible that the PDF file has a problem and is not compatible with LiveCycle Designer.

Which version of Designer are you using? Which version of Acrobat and Reader shows the problem?
0
 
yoducatiAuthor Commented:
I'm pretty sure I started with a blank form but I can't remember.  I was just upgraded to Acrobat XI and LiveCycle ES3.  The other weird thing is that when I am in LiveCycle working on the form, if I click on the PDF preview tab everything works perfectly.  It displays, functions, and prints as it should.  When I save it as a pdf the user can click on the form and fill out fields, but the form generation does not work correctly until the user clicks print, closes the preview window, and clicks print again.  I am in the process of having our IT department give me back Acrobat X pro, but while they were doing that we discovered that the system will not allow them to uninstall LiveCycle ES3 for some reason.  They are trying to figure that out now, so I am hoping there is some sort of software conflict somewhere that is causing weird things to happen.  This is the only form I've done with the new version of LiveCycle.
0
 
Karl Heinz KremerCommented:
If they cannot uninstall Designer, then there is something else wrong on your system, and you may be able to get a working Designer by just removing it and then re-installing.
0
 
yoducatiAuthor Commented:
Its still not working.  I discovered that if I use the "Print" button I added to the form it prints the form but does not do any of the automatic generation, but if I use "File, Print" from the top menu it works correctly.
0
 
Karl Heinz KremerCommented:
Are you getting any error messages on the JavaScript console?
0
 
yoducatiAuthor Commented:
Not that I see.  That's whats weird.  Everything works perfectly in livecycle when I use the pdf preview.  In acrobat however, it doesn't work.  Its not a complicated form either.  Basically its a form letter that changes slightly based upon the users input in a couple fields and checkboxes.
0
 
Karl Heinz KremerCommented:
Can you share the form?
0
 
yoducatiAuthor Commented:
I'll have to make a "fake" one.  Give me a bit to do so and I'll upload it.
0
 
yoducatiAuthor Commented:
0
 
yoducatiAuthor Commented:
This is the form Im working on.  The address and salutation fields, as well as the fields at the bottom and a few in the body change depending upon the selections the user makes.  It works fine when I open it in livecycle, but none of it works when I open in Acrobat.
0
 
Karl Heinz KremerCommented:
Give me a little bit of time to look at the job, I am in the middle of something right now that I cannot put aside.
0
 
yoducatiAuthor Commented:
Ok thanks! No rush, so am I.
0
 
Karl Heinz KremerCommented:
I got an error on the Javascript console when I used the form in Acrobat. It was complaining about not being able to find either fltDearSal or fltDearLN (don't remember which one). When I looked at your form structure, I noticed that these two fields were under "mySubForm", and not under "Main" as the script expected. When I moved these two field elements to "Main" (just drag&drop to the end of the list after Text6 and Text7), things started to work.
0
 
yoducatiAuthor Commented:
I made that change but it still doesn't work for me in Acrobat.  The address block and data for the fields at the bottom don't show up.  I think the fields in the body have always worked but the rest doesn't show up when I use the form in acrobat.  Its been a while since I've done any forms in livecycle so I probably didn't do something right but I've always used the pdf preview as a way to test my work and Ive never had it work there and not in Acrobat. So for future projects how do I check the code in acrobat?  I have pro but I usually do all my work in livecycle and don't even bother with acrobat until Im done with the development.
0
 
yoducatiAuthor Commented:
Thanks for all the help!  I looks like its working as it should now.  Could you tell me how to change the three checkboxes to radio buttons?  Only one should be available at a time but when I tried to use radio buttons I couldn't get them to work at all.  With the checkboxes the form works but the user could select more than one at a time.  Not the end of the world but if its easy enough Id like to change it.
0
 
Karl Heinz KremerCommented:
There is a "Radio Button" form element that you can add to your document. When you change your checkboxes to radio buttons, you will end up with three different radio button groups, which you will have to consolidate under one group (which you an name e.g. "rbRecipient"). The radio button export value is your original checkbox name, which you should also change to just the base name (e.g. "Colliers", "MMR, "ISN". You also need to change the export value on the Object Tool on the "Binding" tab.

You will then have to change your code so that you no longer get the state of three different checkboxes, but from one radio button group:

if (rbRecipient.rawValue == "Colliers") {
    // ...
}
else if (rbRecipient.rawValue == "MMR") {
    // ...
}
else if (rbRecipient.rawValue == "ISN") {
    // ...
}

Open in new window

0
 
yoducatiAuthor Commented:
Ok I might need to post another question.  I tried changing it but now the code has a whole bunch of garbage inserted in it and the print button no longer works.  I changed the buttons, gave them independent values and added them to one group.  Twice Ive had the form lock up in design view so I think I am making things worse.
0
 
Karl Heinz KremerCommented:
Post a new question, and a link here so that I know where to look (otherwise it may take a few days until I get around to check out the new questions).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.