I am not sure that I follow ...can you post a copy of your form so we can see what you are trying to do?
I would love to post the form but it's a official police form and I can't. The problem is the document is in a corel wordperfect 8 wpt file with macros. Our unit is still on corel but the rest of the department is using MS word. Dot file in word that us marcos will not work from a web server. So I'm trying to convert them to PDF forms. Livecycle can't convert the corel files so I need to open the files with Word and then bring the file into Livecycle. The Wordperfect file has a footer at the bottom of the page and a narrative above it. If the text is more then the page can handle, it moves the footer to the next page at the bottom and the text starts at the top of the second page.
1 person found this helpful
I believe that it can be done but it will involve some scripting to determine how much white space there is then placing the footer at the right spot. Also the form must be setup correctly to allow for the fields to grow etc. How you import the word file will make a big difference on whether you will be able to do this or not.
If you feel better about sending the form to a single person I can take a look at it.
You can send it to LiveCycle8@gmail.com if that suits you.
Sorry, but I double checked the form and found that it doesn't move the footer but adds a second page with a different footer entry table at the bottom of the second page. I'm sorry to take up your time.
Organized Crime Division
Sent from my Blackberry Device
That's fortunate, because I had to do this once and it was a major PITA. The script ended up being pretty simple, but coming up with a scheme that worked took a lot of trial and error.
Paul, I'd like to hear how you would attack this. I wonder if there's a simpler way than what I did.
I would put the code on the layout ready event and ensure that the footer is in a subform. I woudl also have a spacer subform that had nothing in it. This is the subform height that I woudl change whenever the growing subform chnages. Then I can calculate the appropriate height (based on the Content Area height) subtract the height of the footer and subtract the height of the growable subform. The amount left over is the height that the spacer needs to be. The key is getting the height after layout has occured. If you just get the h parameter you are getting it at design time. So if you use the command
xfa.layout.h("Name of object you are trying to get", "units that you want the height in")
Here is an example:
oH = xfa.layout.h(txtDescription, "in");
= oH + "in";
Does that help?
Have anyone worked with Workbench. I was going to download the trial version and install it on one of the windows servers in are unit. I saw a video on it and looked better then using adobe pro for the forms
If you are designing a form to be used with a LiveCycle process then it makes sense otherwise you are better off using the stand alone designer.
That's sort of the scheme I used. Instead of using a spacer subform I changed the margin.topInset of the footer section to push it down.
However, for reasons that I can't recall right now, there was a need to do an xfa.layout.relayout() after changing the footer parameters. Unfortunately this will cause another layout event and an infinite loop. The calculation and relayout() needed to be conditioned with a flag that only allows it to happen once. The flag is set on the change event of the field that's being filled in. When the layout occurs, the calculation is performed, the flag reset and a relayout() done. The next time through the calculation and relayout() will not be executed. It only happens when the text above changes.
I also needed to use:
lastPage = xfa.layout.absPageCount();
xfa.layout.h("Name of object you are trying to get", "units that you want the height in", lastPage-1)
This will get the height of the part of the fill-in field that is on the last page when the fill-in field spans multiple pages. Without the page parameter I was getting the height of the object on the first page, which was incorrect.
It was an interesting form to design.