Skip to main content
1-Visitor
February 13, 2018
Solved

Change page region size APP

  • February 13, 2018
  • 1 reply
  • 4444 views

Hi,

 

How can I change page region size dynamically using APP?

 

Florin

 

Best answer by GarethOakes

OK, so what you're asking for is to have dynamically sized page regions, such that the height varies automatically based on the depth of the content? Presumably this is because the number of columns varies between the two regions? I don't believe this feature is exposed in Styler, and it's a little fiddly even in the underlying APP engine.

APP offers two ways of dealing with this type of thing. The first is to have "copyfit" frames (aka page regions). The copyfit setting allows the height of the frame to vary dynamically based on its content.

The second way is to use blocks to arrange the content (rather than page regions). So you would have one page region with a single column and use two blocks to divide the content up into dynamically sized arrangements of columns.

For the first option, you would have to edit the page region source Javascript and insert something like the following:

 frame.copyFit[0].fitProperty = '/bn'; // can use "/bqn" for quick mode, but this can cause issues
 frame.copyFit[0].copyFitUpdate = true; // update real frame dimensions after copyfit?
 frame.copyFit[0].scaleMode = fFrameCopyFit.MODE_AUTO; // review documentation for options
 frame.copyFit[0].minPercent = 0; // min scaling in percent
 frame.copyFit[0].maxPercent = 9000; // max scaling in percent

For the second option, you would have to use an element or UFE that is type "Block". Then you edit the source and use something like the following to enable the columns:

block.numColumns = 2; // how many columns
block.balanceColumns = true; // balance the columns or not
block.columns[0] = new fBlockColumn;
block.columns[0].gutter = '12pt'; // set gutter between each column and the next

1 reply

16-Pearl
February 13, 2018

Just to be clear, you mean Styler/APP (not native APP template)? And the use case would be to switch to a landscape or foldout page and then back again?

otudor1-VisitorAuthor
1-Visitor
February 14, 2018

Hi Gareth,

 

You know how a Page Set has Page Types, and Page Types have Page Regions, right? On a Page Type I have 4 Page Regions, one as a header, one as a footnote, and 2 for main content, one on top and one on the bottom, both between header and footnote regions. The one on top could have a variable number of text rows which implicitly would run over the bottom region; therefore, as the size of the top region increases or decreases, the size of the bottom one should decrease and respectively increase. Basically, I would like to manipulate the absolute height of the two regions.

 

Thank you for help!

 

Florin

16-Pearl
February 14, 2018

OK, so what you're asking for is to have dynamically sized page regions, such that the height varies automatically based on the depth of the content? Presumably this is because the number of columns varies between the two regions? I don't believe this feature is exposed in Styler, and it's a little fiddly even in the underlying APP engine.

APP offers two ways of dealing with this type of thing. The first is to have "copyfit" frames (aka page regions). The copyfit setting allows the height of the frame to vary dynamically based on its content.

The second way is to use blocks to arrange the content (rather than page regions). So you would have one page region with a single column and use two blocks to divide the content up into dynamically sized arrangements of columns.

For the first option, you would have to edit the page region source Javascript and insert something like the following:

 frame.copyFit[0].fitProperty = '/bn'; // can use "/bqn" for quick mode, but this can cause issues
 frame.copyFit[0].copyFitUpdate = true; // update real frame dimensions after copyfit?
 frame.copyFit[0].scaleMode = fFrameCopyFit.MODE_AUTO; // review documentation for options
 frame.copyFit[0].minPercent = 0; // min scaling in percent
 frame.copyFit[0].maxPercent = 9000; // max scaling in percent

For the second option, you would have to use an element or UFE that is type "Block". Then you edit the source and use something like the following to enable the columns:

block.numColumns = 2; // how many columns
block.balanceColumns = true; // balance the columns or not
block.columns[0] = new fBlockColumn;
block.columns[0].gutter = '12pt'; // set gutter between each column and the next