Jump to content

Adjusting the size of a Text Frame


Recommended Posts

I have a client requesting a task I am unsure how to implement.


There is a text frame of variable content. By default I allowed text to shrink to fit a frame, but the client is asking for the text box to shrink to the size of the text... or expand if necessary.


Is that even possible?:confused:

Link to comment
Share on other sites

Yes, it's possible. Though how to accomplish this depends on the parameters.


Is it a single line of text, or multiple lines?


Also, how exactly do you want the frame to be adjusted? Do you want it to get taller but keep a constant width? Or do you want it to expand or shrink proportionally?


And should this affect other content on the page as well?


The simplest thing is to put the text into a table with a single cell. You can set the cell's (or table's) borders and fill color as desired. Then, like with any table, the cell will expand vertically as needed to accommodate its content, though the width will be constant (at whatever width you specify for the single column). In FusionPro 11.1 and later, you can do this with almost no JavaScript!


If it's a single line of text, you can do the same thing, but measure it first to determine the width to set for the cell (column), similar to this post.


Other kinds of resizing may require different strategies. Again, if you can give me some specifics about what results you're trying to achieve, I can offer more specific suggestions.


Note that all of the above can be done with any version of FusionPro, as all you're really doing is setting down a table. If you're composing via FusionPro VDP Producer or Server (or via an application such as MarcomCentral which uses FP Server), then you can actually modify the size and position of any frame, and even create new frames, programmatically, per-record, with JavaScript, which offers more flexibility.

Edited by Dan Korn
Link to comment
Share on other sites

Thanks Dan,


I have a few screen caps.

Capture1: Text with Variable fields

Capture2: Example of a lot of content

Capture3: Example of a little content.


I've never used the table feature and made an attempt to create one, but I'm stuck. I placed the text in a Formatted Text Resource and create the table from a Rule that returned the resource, but the table data is invalid. I need to read up on the table feature. It looks like a powerful feature, but I haven't had a need to use it thus far.


The width can be fixed, and the text should wrap around the table when necessary.




Edited by S_Black
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...