Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Adobe form - Pages - Table layout into multiple page

Avatar

Avatar
Level 1
pmsow
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
pmsow
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
pmsow
Level 1

24-02-2020

Hello,

I have an Adobe form that can be displayed on 1 or multiple pages.

The Adobe form is composed of a header, a table, a total, a "References" block and a footer.

The header and the footer are present on each page.

The "References" block is only displayed on the last page.

The number of pages depends on the number of items into the table.

For example :

a) 1 page

 

1781924-adobe-form-1-page.png

 

b) 2 pages

 

1781926-adobe-form-items.png

 

My problem :

If the Adobe form contains various pages, logically, the table has to be displayed on various pages. Two things have to be taken into account :

  • In the table, each item has a description which may contain 1 to various lines.

For example :

 

1781927-adobe-form-2-pages.png

 

  • Each table on each page must have the same size.

I think it would be laborious to control how many lines each item contains.

I would like to put the "References" block only on the last page and keep the same size for each part of the table on the multiple-pages document.

Does anyone have a solution for this ?

Thank you !

Pmsow

 

 

 

 

adobe float table size

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

26-02-2020

Hi, 

 

it's not that difficult to keep tables the same size. The layout processor can determine the exact size of every object via script. This can be used to "transfer" the value to other objects.

 

This is a calculate script to copy the cell heights of Table1 over to Table2. 

You possible have to modify this script to work with your form. 

 

var cUnit = "mm",
nCellHeight = -1,
oInputRows = Table1.resolveNodes('#subform.[layout eq "row"]'),
oOutputRow = Table2.resolveNodes('#subform.[layout eq "row"]'),
i;

if (oInputRows.length === oOutputRow.length) {
for (i = 0; i < oInputRows.length; i += 1) {

// get the height of the first draw object in the row

nCellHeight = xfa.layout.h(oInputRows.item(i).resolveNode('#draw'), cUnit);

// set the same height to the first draw object in the other table

oOutputRow.item(i).resolveNode('#draw').h = nCellHeight.toString().concat(cUnit);
}

// Recreate the layout, to see the effects

xfa.layout.relayout();
}

 

The visibiliy of the reference block can be easily set. You only need to determine if it's on the last page or not. Put this into the layout:ready event of the reference object.

this.presence = (xfa.layout.page(this) < xfa.layout.pageCount()) ? "invisible" : "visible";