9 Replies Latest reply on Apr 14, 2010 1:22 PM by Kevin Cavallo

    Moving footer to next page

    daveOCD

        Hi,

       

         I'm new to Livecycle and I have a form that has a textfield that needs to grow (narrative section) and move to a new page. It needs to move the footer also that has the data entry persons info.

        • 1. Re: Moving footer to next page
          pguerett Level 6

          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?

           

           

          Paul

          • 2. Re: Moving footer to next page
            daveOCD Level 1

              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.

            • 3. Re: Moving footer to next page
              pguerett Level 6

              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.

               

              paul

              1 person found this helpful
              • 4. Re: Moving footer to next page
                daveOCD Level 1

                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.

                David Dombkowski

                    Tech Lab

                    Organized Crime Division

                    312-446-7621

                 

                Sent from my Blackberry Device

                • 5. Re: Moving footer to next page
                  Kevin Cavallo Level 4

                  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.

                  • 6. Re: Moving footer to next page
                    pguerett Level 6

                    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:

                     

                    var

                     

                    oH = xfa.layout.h(txtDescription, "in");

                    txtDescription.h

                    = oH + "in";

                     

                    Does that help?

                     

                    Paul

                    • 7. Re: Moving footer to next page
                      daveOCD Level 1

                      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

                      • 8. Re: Moving footer to next page
                        pguerett Level 6

                        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.

                         

                        Paul

                        • 9. Re: Moving footer to next page
                          Kevin Cavallo Level 4

                          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:

                           

                          var

                           

                          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.