Jump to content

Recommended Posts

Posted

Hi everybody,

I am looking for a way to measure the necessary height of a text frame and adapt it depending on the content the final user will put in MarcomCentral's Store.

Is it possible to use the function call FusionProTextMeasure ?

May someone have produced some template like this ?

 

Many thanks for help :)

 

Olivier

 

Using FP VDP 9.0.3, AcrobatPro 9 and MarcomCentral

adapted-texte-frame-height.pdf

Posted

Thank you Dan, but I don't see the way to know how many lines the table will have, I don't know what the final user will have to place in MCC's Store :confused:.

 

Any example ?

 

Regards,

Olivier

Posted
Thank you Dan, but I don't see the way to know how many lines the table will have, I don't know what the final user will have to place in MCC's Store :confused:.

That doesn't matter. You don't need to know how many lines there will be. You can just put all the text into a table with a single cell, and the height of the cell (actually the table row) will automatically grow as large as needed to fit the text.

Any example ?

Something like this:

var table = new FPTable;
table.AddColumns(12000);
table.AddRows(1);
var theCell = table.Rows[0].Cells[0];
theCell.SetBorders("Thin", "Cyan", "Top", "Bottom", "Left", "Right");
theCell.ShadeColor = "Yellow";
theCell.ShadePct = 100;
theCell.Content = "Here is some text with multiple lines.<br>Line 2<br>Line 3";
return table.MakeTags();

If you already have the contents of the text frame built up in the Text Editor, you can copy-and-paste it all into a new Formatted Text Resource, and then call out that resource from the rule, like so:

var table = new FPTable;
table.AddColumns(12000);
table.AddRows(1);
var theCell = table.Rows[0].Cells[0];
theCell.SetBorders("Thin", "Cyan", "Top", "Bottom", "Left", "Right");
theCell.ShadeColor = "Yellow";
theCell.ShadePct = 100;
theCell.Content = Resource("Resource1").content;
return table.MakeTags();

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.

Guest
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...