daniel Posted February 9, 2016 Share Posted February 9, 2016 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! Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted February 9, 2016 Share Posted February 9, 2016 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... Quote Link to comment Share on other sites More sharing options...
daniel Posted February 10, 2016 Author Share Posted February 10, 2016 (edited) 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 February 10, 2016 by daniel Quote Link to comment Share on other sites More sharing options...
daniel Posted February 10, 2016 Author Share Posted February 10, 2016 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. Quote Link to comment Share on other sites More sharing options...
daniel Posted February 10, 2016 Author Share Posted February 10, 2016 For some reason when I put nothing in certain fields gives the "text does not fit" message. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted February 10, 2016 Share Posted February 10, 2016 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. Quote Link to comment Share on other sites More sharing options...
daniel Posted April 13, 2016 Author Share Posted April 13, 2016 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? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 13, 2016 Share Posted April 13, 2016 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. Quote Link to comment Share on other sites More sharing options...
step Posted April 13, 2016 Share Posted April 13, 2016 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>'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.