Solved

Interactive Livecycle form loses its functionality when saved as PDF

Posted on 2015-02-20
22
182 Views
Last Modified: 2015-03-10
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.
0
Comment
Question by:yoducati
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 12
  • 10
22 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40622962
How do you open the saved form? Only Adobe's PDF viewers will give you the correct interactive experience.
0
 

Author Comment

by:yoducati
ID: 40625611
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
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40625653
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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 

Author Comment

by:yoducati
ID: 40625768
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
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40625929
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
 

Author Comment

by:yoducati
ID: 40654528
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
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40654693
Are you getting any error messages on the JavaScript console?
0
 

Author Comment

by:yoducati
ID: 40656159
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
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40656199
Can you share the form?
0
 

Author Comment

by:yoducati
ID: 40656262
I'll have to make a "fake" one.  Give me a bit to do so and I'll upload it.
0
 

Author Comment

by:yoducati
ID: 40656375
0
 

Author Comment

by:yoducati
ID: 40656378
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
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40656383
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
 

Author Comment

by:yoducati
ID: 40656392
Ok thanks! No rush, so am I.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40656782
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
 

Author Comment

by:yoducati
ID: 40656830
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
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 40656869
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
 

Author Comment

by:yoducati
ID: 40656943
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
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40657053
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
 

Author Comment

by:yoducati
ID: 40657224
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
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40657290
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

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a previous article published here at Experts Exchange, Signature Image with Transparent Background (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_12380-Signature-Image-with-Transparent-Background.html), I explained how to cre…
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question