Jump to content

Overflow text blank out entire field


daniel

Recommended Posts

In FusionPro, I know there's a way to set overflow text "discard text that does not fit" but is there a way to make the whole text inputted not show because it does not fit? I'm trying to make people really notice when their text is not fitting a space so they accidentally don't send partial paragraphs to print. Thanks for any help!
Link to comment
Share on other sites

In the Overflow Options, select "Adjust text to fit," then in the OnCopyfit rule, change the code to do something like this:

if (!FusionPro.Composition.CurrentFlow.fits)
   FusionPro.Composition.CurrentFlow.content = '<para><color name=Red><z newsize=36>TEXT DOES NOT FIT!</para>';

If you want to do this only for specific frames, you can name the frame/flow and do this:

if (FusionPro.Composition.CurrentFlow.name == "your frame name")
{
   if (!FusionPro.Composition.CurrentFlow.fits)
       FusionPro.Composition.CurrentFlow.content = '<para><color name=Red><z newsize=36>TEXT DOES NOT FIT!</para>';
}
// else default copyfit logic below...

Link to comment
Share on other sites

Thanks Dan, I tried the code. At first it seemed it worked well and if I put a lot of copy it would show the "text does not fit" message. I noticed however that it shrinks the text a bit before actually putting the message shows, so there's some sort of tolerance on adjust text to fit. That kind of messes up my formatting. Is there a way to make it show that message just as soon as text is overflowing? Edited by daniel
Link to comment
Share on other sites

Thanks Dan, I tried the code. At first it seemed it worked well and if I put a lot of copy it would show the "text does not fit" message. I noticed however that it shrinks the text a bit before actually putting the message shows, so there's some sort of tolerance on adjust text to fit. That kind of messes up my formatting. Is there a way to make it show that message just as soon as text is overflowing?

You need to completely replace the code in OnCopyfit with the new code I suggested. Or put the new code before the existing code.

oh nevermind, there was some code in oncopyfit rule i didn't know what it does that someone wrote it there. it must have adjusted the text. i deleted it and it behaves like i expect now.

The OnCopyfit rule is automatically populated with some default settings when you select "Adjust text to fit" for any frame.

For some reason when I put nothing in certain fields gives the "text does not fit" message.

I don't understand what you mean.

Link to comment
Share on other sites

  • 2 months later...
Hi Dan, I'm trying to use this code. For some reason when users leave the field blank or empty, it shows the "text does not fit". Know how to fix that?

Not without more information. What field? Is there anything else in the text frame? Other messages in the log file? Perhaps attaching the job, or a simplified version that demonstrates the issue, would be worth a thousand words.

Link to comment
Share on other sites

Hi Dan, I'm trying to use this code. For some reason when users leave the field blank or empty, it shows the "text does not fit". Know how to fix that?

 

Have you seen this post?

 

It references a similar situation. It appears that the Copyfit function may interpret empty textflows as "unable to fit." This slight revision should work in your scenario:

var cf = FusionPro.Composition.CurrentFlow;

if (!cf.fits)
   if (+!!RawTextFromTagged(cf.content.replace(/<variable name="([^"]*)">/g, function(s,p){return RuleOrField(p);})))
       cf.content = '<para><color name=Red><z newsize=36>TEXT DOES NOT FIT!</para>';

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.

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