Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Producer (formerly FusionPro® Direct)

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 9th, 2016, 10:25 AM
daniel daniel is offline
Regular Contributor
 
Join Date: Apr 2015
Posts: 92
Default Overflow text blank out entire field

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!
Reply With Quote
  #2  
Old February 9th, 2016, 10:36 AM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,305
Default Re: Overflow text blank out entire field

In the Overflow Options, select "Adjust text to fit," then in the OnCopyfit rule, change the code to do something like this:
Code:
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:
Code:
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...
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #3  
Old February 10th, 2016, 11:28 AM
daniel daniel is offline
Regular Contributor
 
Join Date: Apr 2015
Posts: 92
Default Re: Overflow text blank out entire field

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?

Last edited by daniel; February 10th, 2016 at 11:33 AM..
Reply With Quote
  #4  
Old February 10th, 2016, 11:41 AM
daniel daniel is offline
Regular Contributor
 
Join Date: Apr 2015
Posts: 92
Default Re: Overflow text blank out entire field

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.
Reply With Quote
  #5  
Old February 10th, 2016, 12:23 PM
daniel daniel is offline
Regular Contributor
 
Join Date: Apr 2015
Posts: 92
Default Re: Overflow text blank out entire field

For some reason when I put nothing in certain fields gives the "text does not fit" message.
Reply With Quote
  #6  
Old February 10th, 2016, 12:50 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,305
Default Re: Overflow text blank out entire field

Quote:
Originally Posted by daniel View Post
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.
Quote:
Originally Posted by daniel View Post
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.
Quote:
Originally Posted by daniel View Post
For some reason when I put nothing in certain fields gives the "text does not fit" message.
I don't understand what you mean.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #7  
Old April 13th, 2016, 12:05 PM
daniel daniel is offline
Regular Contributor
 
Join Date: Apr 2015
Posts: 92
Default Re: Overflow text blank out entire field

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?
Reply With Quote
  #8  
Old April 13th, 2016, 12:40 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,305
Default Re: Overflow text blank out entire field

Quote:
Originally Posted by daniel View Post
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.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #9  
Old April 13th, 2016, 02:44 PM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Overflow text blank out entire field

Quote:
Originally Posted by daniel View Post
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:
Code:
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>';
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:44 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.