cancel
Showing results for 
Search instead for 
Did you mean: 

Table - minimum height?

Former Member
0 Kudos

Hi,

I'm creating an PDF print form for a customer and they have a layout requirement which I cannot figure out how to do.

The problem is that a table should fill the most of the page regardless of the number of lines, but when the document should be paginated, the footer should be moved to the last page. I hoped it would be as simple at the ability to set minimum height on the bodyrow, but this isn't possible.

I hope someone has a great idea how to fix this, as it's beginning to drive me crazy?

Here you can see page 1 and 2 from the customers layout description - if there is no pagination, page 1 should look like page 2.

Regards,
Stefan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I found the solution by scripting it.


The bodyrow content is wrapped in a positioned subform, where I calculate the subform height based on table height, page numbers, and the other elements on the pages.

Florian
Active Contributor
0 Kudos

Would be nice, if you share your solution here

~Florian

Former Member
0 Kudos

I already did, but here's some more details.

The bodyrow content is wrapped in a positioned subform, where I calculate the subform height based on table height, page numbers, and the other elements on the pages.

On the initialize event on the wrapper subform I have this javascript:

var layoutheight = "174mm";

var lastpagelayoutheight = "147.79mm";

var pagecount = $layout.pageCount();

if (data.Page1.Linjer.BodyRows.HeightSpacer.Linjetabel.h > lastpagelayoutheight){

  data.Page1.Linjer.BodyRows.HeightSpacer.h = ((pagecount - 1) * layoutheight) + lastpagelayoutheight;

  }

else{

  data.Page1.Linjer.BodyRows.HeightSpacer.h = lastpagelayoutheight;

  }


Currently it needs some work done after some more thorough testing with a lot of lines. But you probably get the point.

Florian
Active Contributor
0 Kudos

Hi Stefan,

thanks for sharing. I saw that you have done some before, but a lot of us (me) like solutions with some javascript-lines in to get a better clue.

I'm just thinking if there is another solution available...

~Florian

harshal_likhar
Explorer
0 Kudos

Hello Stefan,
I have a similar requirement where the table should fill the most of the page regardless of the number of lines, I tried the few ways but it did not work,I am new to the adobe forms could you please share some insight how exactly i can achieve it.

Thanks,

Harshal

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, if u want show footer in last page  please follow the steps below.

1. create separate subform for footer.

2. then for that subform write following form calc code

Displaying Dynamic footer in adobe form:

Please write the code in the initialize event of the subform.

Language:Form calc:

Run at : Client.

var curpage  = $layout.page ( ref ( $ ) )

var totpages = $layout.pageCount()

if ( curpage ne totpages ) then

$.presence = "hidden"

endif

Former Member
0 Kudos

Thanks for the hint Suri!


But hiding the footer is the easy part.

I don't think that will fix the issue with setting a minimum height on the bodyrows, while still being able to "expand to fit" and be working on pagination? I've been trying to set the minimum height using the minH property, but I'm really not that familiar with scripting, so I can't get it to work.

Regards,
Stefan

Florian
Active Contributor
0 Kudos

Hi Stefan,

you can archive that by creating a template with the assistant.

I think there is an option located at: Table > Cell Options > Rows And Columns

I think there is something like "expand complete area" or something like that.

Unfortunately I do not got a system available so I'm not pretty sure.

Here is a link to the official helpsite:

Adobe InDesign * Creating tables

Perhaps you didn't knew the link. There are a lot tutorials available.

Regards

Florian

Former Member
0 Kudos

Hi Florian,

You are refering to InDesign - I need a solution for Livecycle Designer where your suggestion didn't work.

Florian
Active Contributor
0 Kudos

Hi Stefan,

I know it is indesign, but there are a lot of parts very similar. That's why I shared the link. Not nice, that this solution differs.... I will try it, but I do not got that much time at the moment, so it could take some days.

~Florian