Frame fitting / Making an object take up all remaining space

69 views
Skip to first unread message

007design

unread,
Mar 16, 2011, 2:41:55 PM3/16/11
to XMPie Interest Group
What I'm trying to do is have an image take up any remaining space on
a page. Here's the setup: imagine a text large text frame, the whole
page say, which is populated with text of a variable length. It could
be 2 lines, it could be 20 lines. Regardless of the amount of text,
I'd like there to be an image (also variable) which is sized to take
up any remaining space. So, if there's only 2 lines of text, the
image would be larger than if there are only 2 lines of text.
My first thought was to use an image frame anchored inline at the end
of the story and which has the Fit & Transform property set to Fit
Frame to content. However, if there is enough text to cause the
anchor to overflow it will do so rather than shrinking to remain on
the page.
My next thought was to have a text frame anchored within another text
frame and followed by an anchored image frame. However, I don't see
that there's a way to dynamically resize the anchored text frame to
fit to the content. Is it possible to apply Fit Frame to Content
after the frame is populated with ADOR text?
Finally, I considered using a table (or a Table ADOR, which I've
actually never used before). Unfortunately, getting an image to fill
a table cell, especially dynamically, seems impossible.
Anyone have any idea how I can have an image take up all remaining
space, resizing based on the length of the text on the page?

thomaus

unread,
Mar 28, 2011, 2:14:31 PM3/28/11
to xmpie...@googlegroups.com, 007design
This may be a kludgy way to pull it off.

For the text part, could you use the length of the text string and then determine roughly how much of the page will be left over? (This won't work if there are a high proportion of returns within the text as it flows to fill the box.) But if it's just making a single or a few paragraphs it may be the start of determining how much of the page is open. 

Then it would be a matter of setting up a few different ranges of picture box sizes (small - medium - large) that would be called based on the length of the text string. You could bring these in as layers or as .xnip files. And you could turn on Dynamic Story Length to handle both Overflow and Underflow to further get it to fill or fit the page.
Reply all
Reply to author
Forward
0 new messages