Skip to Content
Author's profile photo Ben Patterson

Adobe Forms: Fancy Footwork – Footer floating at the bottom of the page


Adobe Forms: Fancy Footwork – Footer floating at the bottom of the page

Sometimes a simple concept is not so simple to implement. This is what I found out when looking at doing floating footers in an Adobe Form (SAP IFbA).

The problem:

To display a footer that is always shown at the bottom of the last page on a dynamic form.

Floating footer

    

Figure 1: Conceptual examples of     floating footer

 

Like I said, it sounds simple enough. On first thought I went straight to master pages and created a master page with the footer on it – but wait, If I make a ‘normal’ master page and a ‘last’ page with the footer, how do I tell LiveCycle Designer to use the ‘last’ page on the last page? And what if the first page is the last page as well (i.e. only 1 page)? Of course the little devil on my shoulder is saying “just script it”, but surely there is a better way. Googling this I found some Adobe blogs giving a solution that involves a spacer element, but this also requires scripting to determine it’s height at runtime. Once again I am thinking, surely not…

The solution:

I did end up finding a solution that involved no scripting. Essentially using a separate content area on a single master page to hold the footer where I wanted it to go. And just a little trick to make sure that the body of the output doesn’t end up going underneath it. In the method section below I will go through an example that will give you the details.

The benefits are the fact that we have zero scripting (helps with performance and reduces overall complexity of the solution by reducing development components – especially for output (non-interactive) scenarios where we can generally get away without scripting (usually).

The method:

For the sake of expediency I will use the standard test Adobe Form scenario FP_TEST_03:

 

  1. Go to transaction SFP and create a copy of Form FP_TEST_03_TABLE to ZFP_TEST_03_FOOTER

    copy

  2. Select edit for the new form and go to the Layout tab.
  3. Go to the Master Pages tab of the Designer       
    1. Delete      the ‘Page2’ Master Page Set – this will just complicate things (see      considerations section below)
    2.      

           

    3. Drag      and create a new Content Area from the Standard Object Library
    4.      

    5. Change      the name of the content area you created to ‘footer’, and position it at the      bottom of the page. You must also make sure the height and width are big enough      to include the Greeting subform. 2.5cm height and 17cm width should do it.
    6.      

                 

         

  4. Go to the Design View tab        
    1. Select ‘Greetings’ in the hierarchy
    2.      

    3. (optional)      change formatting of StaticText7 – I did this just to make the change more      obvious
    4.      

    5. Select      the Object palette and the Pagination tab within it
    6.      

    7. On      the ‘Place:’ attribute select ‘In content area’ -> ‘footer’ which is the      content area we just created
    8.      

  5. Select ‘Main’ page subform in the hierarchy      
           

    1. In the Object palette choose the Pagination tab and set the ‘If Dataset Must Be      Paginated: Overflow:’ to ‘Go to Content area “Titelseite”’. This will make sure      that the main content doesn’t flow into the footer content area.
    2.      

  6. Add a subform that is the same height as the footer content area. In this case 2.5cm. This will make sure that the main flowed content does not go behind the footer content area. 

  7. Activate the form
  8. Test the form (These tests require the flight data set up in your system. You can use report SAPBC_DATA_GENERATOR for that)       
           

    1. Execute standard ABAP report FP_TEST_03 with the following parameters:            
      • To test for 1 page           
        Customer Number        1610

                  

        Airline Carrier             AA          to            FJ

                  

        Form                         ZFP_TEST_03_FOOTER

                  

        [Others                        Default / or whatever you like]

                  

        ADS Connection            Your ADS RFC Destination

                  

           

      • To test for 2 pages            
        Customer Number          1610
        Airline Carrier               AA          to            ZZ
        Form                           ZFP_TEST_03_FOOTER
        [Others                         Default / or whatever you like]
        ADS Connection             Your ADS RFC Destination
    2.      

Considerations:

The main limitation of this solution is if you need more than one master page. In this case it is easier to concede to using a simple script that will show your footer only on the last page.

Conclusion

Hopefully this solution may be useful to you in your dealings with Adobe Forms. In the end it should also help to improve your understanding of working with flowed layout and Master Pages in LiveCycle Designer.

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo abilash n
      abilash n
      Nice blog to avoid java script.
      Author's profile photo Former Member
      Former Member
      tq so much, with this info i managed to display out total amount at the bottom of last page in my form.
      Author's profile photo Gerald Lyle
      Gerald Lyle
      This is a wicked solve.

      It's so easy and simple to implement I'm disappointed in myself for not figuring it out myself.
      The best part is it avoids scripting.

      Author's profile photo Subeesh Kannottil
      Subeesh Kannottil

      Hi,

      Thanks , Can you pls tell me what we need to do if there are more than one master page

      .If the data is less it will display only page and will not use the next master page .The requirement is I want the master page in only one page .(last page of the pdf)

      Kindly suggest me the way to do that.

      Thanks and Regards,

      Subeesh Kannottil

      Author's profile photo Former Member
      Former Member

      Wow, thank you Ben - very creative.

      Shai

      Author's profile photo ravi varma
      ravi varma

      Hi ,

      it will work to display  footer in last page only, But my scenario is main window data should be  print  in  first  page till end of page. In this case it will over lap the data .

      Ravivarma..

      Author's profile photo Mahtab ALAM
      Mahtab ALAM

      Thanks a lot, i was stuck in this issue for last two days.

      finally i solved it.

      only one thing i need mention here, footer content area should be in main content area.

      again thanks

       

      Author's profile photo Luis Esteban Moreno Ruiz
      Luis Esteban Moreno Ruiz

      Thank you so much. It works!!!