cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Required Script for Adobe Form

Piyushmatrixs
Participant
0 Likes
3,671

Hi experts,

    I required your urgent help for my development. I made a adobe form for customer ledger. Form is divided in 3 parts as shown in below image:


Header sub form will print on each page if form is more than one page. Then Body will grow to multiple page according data. Next is footer, it will print on last page (either last page is 1st or 4th page) positioned bottom. The problem is that in some situation. Like it prints Header, then prints body sub-form for open item. It grow according data. suppose that open item end on second page then footer should be placed on second page at bottom aligned. Footer sub-form is 2 inches( or 10-12 rows) in height. It should be checked that after end of body subform how much space is available. if there enough space for footer to be print then footer will print on same page other wise it will create one more page, at top of that page will print header sub-form and then at bottom aligned footer sub-form (there would be blank space between header and footer).

  How to do that. Your help would be appreciate.

Please reply asap.



Thanks and Regards

Piyush Kumar

View Entire Topic
nsikka
Active Participant
0 Likes

Hi Piyush,

Try out this way :

- Put the footer by adjusting the content area.

- Display footer only when it is last page or first page using this script

I will check if current page is last page then only it will display the footer.

Piyushmatrixs
Participant
0 Likes

Hi Nitin,

  I have done this(script) already. I want to know that is there any way by which I can do like this:

1).  I can count/calculate space in inches or in line(row) available  at bottom after printing sub-forms placed on design view.

2). If step 1 done, after that can I make a condition like below:

                 if rest_of_row(space)  < 5 then

                         create one more page and print footer subform with Header sub-form.

                 else.

                         print footer on same page.

See page structure and output for a better understanding.

structure:

Current Output :

Regards

Piyush

nsikka
Active Participant
0 Likes

I Think you can put the footer in the master page instead of keeping in design view. So reduce the content area and put the footer content in the bottom in a subform and write this script on that subform.

You need not calculate number of rows to print the subform

Piyushmatrixs
Participant
0 Likes

Hi,

    I have already done same (footer in master page).  But if I shall reduce the content area for footer, and if content (of table 2) overflows and data creates second or third page, then it will keep empty space on each previous pages (on first page, second page.....) equal to footer sub-form. I can not leave these empty space by reducing content area.

   Any other suggestion?

Regards

Piyush

nsikka
Active Participant
0 Likes

Ok, Do one thing. .. First check approx how many entries are coming on one page say for example 10.

Now in the print program check the total number of entries in the table which is getting printed on the form... for example it is 95

You can calculate the number of pages it will print i.e. 95/10 = 9.5. It means you have to print footer on 10th page.

So you can pass a variable as importing parameter and then check it in the script code to print the footer.

Piyushmatrixs
Participant
0 Likes

Hi,

     Suppose 10 entries can be print between header and footer sub-form. And  There is 12 entries for printing. At present when I run the program, It print header then print the all 12 entries at same page because content area has space upto bottom margin (I can't reduce content area for reserving space for footer ), and also print footer sub-form at same page, due to this footer sub-form overlap on two entries of table.

    Can you tell me that how shall I print the 12 entries at first page and break the page after 12 entries (because footer will not fit at same page) and will call next page (second page) & print footer sub-form at bottom margin?

Regards

Piyush

nsikka
Active Participant
0 Likes

Hi Piyush,

WHat you can you is, select that table and go to pagination tab as shown above.

Select the page where you want to go in case of overflow.

And in the traailer select the footer subform.

So, it will print the footer subform after table printing is finished.

Piyushmatrixs
Participant
0 Likes

Hi,

   Please have a look for all three condition.

--------------------------------------------------------------------------------------------------------------------------------------------

(Note : For footer, we can not reserve space.  If header and footer are on same page,then It means table have only 10 rows. if table have less or more than 10 rows then:

---------------------------------------------------------------------------------------------------------------------------------------------

1).  If table has only 2 or 3 entry then Page would be like this:

------------------------------------------------------------------------------------------------------

2). If table has upto 10 entries then page would be like this:

-----------------------------------------------------------------------------------------------------

3).  If Table has 11-20 entries then pages would be like this (footer aligned at bottom margin,). like if table has 12 entries then (tell how to set or code for calling second page like below (no footer subform break within content))

I hope that now it is more understandable. Now tell what should I do?

Regards

Piyush

nsikka
Active Participant
0 Likes

Ok.. You can do like this..

Go to master page and put the footer subform over content area. Do not reduce the content area to fit the footer. Just overlap like this :

And write the script to display footer subform on last page. So this way you will not consume the space on every page and display the footer on last page only and in the bottom margin

Thanks,

Nitin

Piyushmatrixs
Participant
0 Likes

Hi,

   Thanks for reply. I have already done this what you are saying. I want to bring your attention on above condition. What you told to do, is good and will work correctly with first and second condition. But when we run it with third condition then :

     If table have 12 entries.

         It will print all twelve entries on first page.

             and it will also print footer on that first page and footer also will overlap over 2 rows of table.

                  In this condition I want to do that program call and generate second page and place the footer on second page. It means if tables have 12 entries then program will create 2 page, first page contain Header then 12 rows of table(no footer on this page) and second page will contain Header at top and footer at bottom margin(no table and there would empty space between header and footer).

  How to do this?

Regards

Piyush