Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Formatting Text

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 2nd, 2014, 08:15 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 473
Default Text Box With Border

So I am trying to create a way to have a text box turn off and on based on the back graphic. I have the text working correctly with rules and using formatted text but how can I turn the border off for the records where that text box isn't used. Basically, I have an indicia that is in different locations for different backs. Hope that makes sense. TIA

Or should I do this a different way and have two unused pages for my backs and use an OnRecordStart rule to pick the back that I want. I just don't know how to write that rule. For example my Graphic resources are named 1.pdf, 2.pdf, 3.pdf and so on through 10.pdf. I want backs 2.pdf and 3.pdf to have the same back page layout and 5.pdf, 6.pdf, 7.pdf 8.pdf, 9.df, 10.pdf to have the other back layout. My two different fronts are 1.pdf and 4.pdf, but I can easily set a graphic switch for those. So I am thinking maybe have a three page template. Any ideas?
__________________
Don Reimer - JavaScript Novice

MAC OS 10.13.6 Acrobat DC FP Creator 10.1.11
Windows 7 Acrobat X 10.1.4 FP Creator 9.3.9

Last edited by dreimer; January 2nd, 2014 at 08:21 AM..
Reply With Quote
  #2  
Old January 2nd, 2014, 09:22 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 473
Default Re: Text Box With Border

Figured out a workaround, but if anyone has an idea on how to do the OnRecordStart rule I would like to see it for maybe future use.

Thanks
__________________
Don Reimer - JavaScript Novice

MAC OS 10.13.6 Acrobat DC FP Creator 10.1.11
Windows 7 Acrobat X 10.1.4 FP Creator 9.3.9
Reply With Quote
  #3  
Old January 2nd, 2014, 10:21 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,388
Default Re: Text Box With Border

Just name the frame and do something like this:
Code:
if (<some condition>)
    FindTextFrame("YourFrameName").borderThickness = 0;
Or:
Code:
if (<some condition>)
    FindTextFrame("YourFrameName").suppress = true;
Or:
Code:
FindTextFrame("YourFrameName").suppress = !<some condition>;
__________________
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
  #4  
Old January 2nd, 2014, 10:47 AM
jwhittaker jwhittaker is offline
Senior Contributor
 
Join Date: Feb 2009
Location: San Diego
Posts: 161
Default Re: Text Box With Border

dreimer
This is what I use for the OnRecordStart rules I use.

FusionPro.Composition.SetBodyPageUsage(Field("Ver" ), true);

You can use regular if-then statements to set the page to use or suppress.
The Field("Ver") can be a field with the page to use or suppress but it can also be hard coded with the page name "back2" for example in an if-then statement

if (location == "san diego")
FusionPro.Composition.SetBodyPageUsage("backpage1" , true);
else
FusionPro.Composition.SetBodyPageUsage("backpage2" , true);

Where both backpages are set to unused.
__________________
FusionPro VDP Creator 10.0.26 | MacOS 10.13.4 | Acrobat DC
Reply With Quote
  #5  
Old January 2nd, 2014, 11:14 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 473
Default Re: Text Box With Border

Thanks for the ideas. I will give them a shot.
__________________
Don Reimer - JavaScript Novice

MAC OS 10.13.6 Acrobat DC FP Creator 10.1.11
Windows 7 Acrobat X 10.1.4 FP Creator 9.3.9
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 12:04 PM.


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