Skip to Content
avatar image
Former Member

How to write a subform @ bottom of last page without reserving space for it

Hello gurus,

I have a small challenge for you guys :-):

Iu2019m developing an adobe print form for an invoice and have to write a subform at the bottom of the page but only if it is the last page. Said like this the requirement doesnu2019t seem so special at all which I agree with you but, if add to the problem that I must not reserve a place (on master page) to it so I can minimize the paper loss and use the maximum space of the page for the invoice items/taxes etc (for the container) and only write the subform at bottom if it is available space left it turns the problem a little bit more complex, isnu2019t? If case there isnu2019t available space in the u201Ccurrentu201D last page to write it I should provoke a page-break to write it at bottom of the u201Crealu201D last page.

Iu2019ve tried to put the subform on the master pages (FIRST and NEXT) overlapping the end of the correspondent containers and hide it for all the pages that werenu2019t the last one but in some cases the subform content is overlapping the invoice items.

Do you have any suggestions how to achieve this?

Thanks in advance.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Apr 21, 2010 at 02:26 PM


    I don´t understand your problem. Master page doesn´t help here, that is obvious (or you would have to use at least 2 masters, one for the document and second for the last page only). But you must work with the content: flowed, there is a sequence of your forms/ subforms in the hierarchy and one of the subforms is the last one, placed on the last page.

    Maybe I have missed something important but why this is not enough? iF it would not be enough, you can always ask the field or a subform "on which page am I?" and "how many pages does the document have in total" and compute is first = second (that means last in total).

    Regards Otto

    Add comment
    10|10000 characters needed characters exceeded

    • I wonder why didn´t you use the two master pages approach? It didn´t work? Can you please explain why?

      Just in case that really doesn´t work, you can always count the number of rows, compute (when you know the height of the row and of the content area) how many blank rows you need to add, what will force the footer to stay at the bottom.


  • Apr 22, 2010 at 11:35 AM

    The best shot would be to have 2 master pages, one for the last page only, and find out, how to force to use of this master for the end of the form content. I am not usre if that could be done trhough some scripting or if there is a trick with pagination of some kind. But with these two options you should play a little. At least I would do it this way (try to do that). Otto

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 28, 2010 at 06:44 AM


    take u r subform at the last in the body bage and make the bodypage as flowed..i think this will work.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi guys.

      I have exactly the same problem than Alexandre. I didnt find here any solution to do this. The customer doesnt want to lose space in previous pages then I couldn't reduce my content area.

      Otto, can you explain how to work with 2 master pages? How do I control the second one to be only the last one?

      Or what can I do to know how many blank space I must insert to "force" my subform(footer) go to the bottom of page?

      Should I open a new thread about this question?

      Thanks all in advance.


  • May 31, 2010 at 08:28 AM

    I don´t have a working demo of that two master pages approach. Was just an idea and I wanted to know if it works.

    But I have one more, less experimental idea, which I have implemented some time back and am sure, it works.

    Follow me:

    - fill the data into the table (done automatically, of course, but a must for the event to work = pick event after you got the data into the table...) (not a real work)

    - count the number of lines (easy, piece of cake)

    - get the height of one row (easy, piece of cake)

    - compute how many pages are occupied by the table lines

    - compute how many lines are present on the last page

    - compute how many lines are needed to make the last page "full"

    - use the last number to compute a height of a blank subform (no content but has size), set the height, which will make the "footer" (the one we are talking about here) go to the bottom of the page

    Every needed reference is here:

    Especially the last chapter of the JS reference.

    Regards Otto

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Javeed, thanks for your suggestion.

      I have this code in my footer subform, it makes the subform to appear only on the last page. Ok, but I have another problem.

      If I make this way(putting the subform in Master page), in my last page if the data reach the bottom of my content page, I will have an overflow with the footer.

      And if I put my subform in my body page, I will gonna have my footer after the last data in the form. I'm trying to find how much blank space I have in last page and then force the footer to go to the bottom of page.

      But I had no sucess yet.