Hey everyone,
I've been making Dynamic PDFs with Livecycle for years now, and I've never come across this before. I have made a form that seems to randomly become corrupted, on a fairly frequent basis.
It's nothing overly complex, and most of the functionality in the form is stuff I've used 100 times before. That being said, three different users within days of release have reported that they could not open a filled out copy of this form, as they get a message saying that their pdf is corrupted and could not be repaired.
Thinking that I might have done something wrong when designing it, I started from scratch and remade the form... only for the same corruption to occur in the new form. I was very careful about not editing the XML of the form, as I know that this can cause similar issues.
Unfortunately, as the form has sensitive information, I cannot attach it for review. The only thing that is different between this form and all the other forms that I've made is that this one plays with fill colors.
My users wanted to have the same form, but just with different color schemes. I made a drop down list with the change event:
var s = xfa.event.newText;
if (s=="Blue")
{
this.fontColor = "0,160,227";
Subject.fillColor = "0,160,227";
var details = xfa.resolveNodes("<RandomSOM>.Header[*]");
for (var i = 0; i < details.length; i++) {
details.item(i).Field1.fillColor = "227,245,253";
details.item(i).Field2.fillColor = "227,245,253";
}
<RandomSOM>.People.fillColor = "199,235,252";
<RandomSOM>.Places.fillColor = "199,235,252";
<RandomSOM>.Things.fillColor = "199,235,252";
}
if (s=="Purple")
{
this.fontColor = "0,160,227";
Subject.fillColor = "0,160,227";
var details = xfa.resolveNodes("<RandomSOM>.Header[*]");
for (var i = 0; i < details.length; i++) {
details.item(i).Field1.fillColor = "227,245,253";
details.item(i).Field2.fillColor = "227,245,253";
}
<RandomSOM>.People.fillColor = "199,235,252";
<RandomSOM>.Places.fillColor = "199,235,252";
<RandomSOM>.Things.fillColor = "199,235,252";
}
if (s=="etc.")
{
etc.
}
I do something similar on the initialize event of certain fields to change the colors of things like table headers that repeat on page breaks.
The only other things in the form is a repeatable subform and some multi-line expandable text fields. I don't see where I'm going wrong.
I'm using LiveCycle Version 9.0.0.2.20101008.1.734229... Does anyone know how I can troubleshoot this issue?
- Scott