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

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 16th, 2018, 02:55 PM
S_Black's Avatar
S_Black S_Black is offline
Junior Community Member
 
Join Date: Mar 2015
Location: Louisville, KY
Posts: 25
Default Highlighting Words of a Text Frame

I am looking to highlight words within a text frame. But can't find a way that works. I have attempted a rule as such the following, but it doesn't produce what I would expect.
Quote:
return '<span style="background-color: #FFFF00">highlighted words</span>';
I would add a highlight to the background, but the placement of the highlight moves based on variables in the paragraph.

Any help would be appreciated.
__________________

Shawn Black
Pioneer Direct Marketing
Louisville, KY
Reply With Quote
  #2  
Old April 17th, 2018, 05:47 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Highlighting Words of a Text Frame

There isn't a way to highlight text in FusionPro.

If you posted your template, some sample data, and an example of what you're trying to achieve, it might be possible to come up with a solution that gives you the results you're looking for by using other means (for example: a table with cell shading).
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #3  
Old April 17th, 2018, 10:17 AM
S_Black's Avatar
S_Black S_Black is offline
Junior Community Member
 
Join Date: Mar 2015
Location: Louisville, KY
Posts: 25
Default Re: Highlighting Words of a Text Frame

Thanks Step.

For now, we are going to communicate with the client to change their paragraph to either omit the highlighted text, or place it before the variable(s) to ensure it does not move.

I would still like to know how to control the shading for future projects, and my own education. Attached is a zip file with everything you might need. In this example I am attempting to highlight "ABOVE MARKET TRADE VALUE", which you can see may wrap to a second line.

There is no urgency to this, so please don't take extensive time. If there is a resource/video/wiki or anything I can use to self-learn I would be fine with that as well.
Attached Files
File Type: zip 10375 Xcel Capital Nissan of Wilmington SignOff.pdf.zip (4.72 MB, 12 views)
__________________

Shawn Black
Pioneer Direct Marketing
Louisville, KY
Reply With Quote
  #4  
Old April 18th, 2018, 03:55 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,408
Default Re: Highlighting Words of a Text Frame

Step is correct. There's currently no feature to highlight an arbitrary range of inline text in FusionPro. This is on a list of enhancements we're considering, along with related features like partially transparent or blended text, flipped (mirror image) text, and other effects.

For now, I can think of a few possibilities to get something close to what you want.

1. I would do something like Step's solution in this thread:
http://forums.pti.com/showthread.php?t=2578

You need the text in question on a line by itself, so you need to rearrange the wording a bit, but something like the attached "Dan-1" template should work. Here's the rule:
Code:
var fieldVal = "ABOVE MARKET TRADE VALUE"; // This should be a variable field, or the result of another rule.
var text = TaggedTextFromRaw(fieldVal);

var tm = new FusionProTextMeasure;
tm.pointSize = "11 pt"; // set the type size
tm.font = "Helvetica Neue"; // set your typeface
tm.CalculateTextExtent(text);
var tmWidth = tm.textWidth;

var myTable = new FPTable;
myTable.AddColumns(tmWidth); 
var cell = myTable.AddRow().Cells[0];
cell.Margins = { Top:0, Bottom:0, Left:0, Right:0 };
cell.ShadeColor = "C=0 M=0 Y=100 K=0";
cell.ShadePct = 100;
cell.Content = text;
return myTable.MakeTags();
2. To keep the text inline, you can use stroked text, as in the attached "Dan-2" template, with a rule like so:
Code:
var fieldVal = "ABOVE MARKET TRADE VALUE"; // This should be a variable field, or the result of another rule.
var text = TaggedTextFromRaw(fieldVal);
return '<stroke color="C=0 M=0 Y=100 K=0" width=50>' + text + '</stroke>';
3. You can approximate highlighting with a bit of a cheat, as in the attached "Dan-3" template. You need to have a second frame, directly underneath the first, with stroked text, at a thickness so great that it has a "flooded" effect, then use a rule with the "Re-evaluate this rule for every text flow" box check, like this:
Code:
var fieldVal = "ABOVE MARKET TRADE VALUE"; // This should be a variable field, or the result of another rule.
var text = TaggedTextFromRaw(fieldVal);
if (FusionPro.Composition.CurrentFlow.name)
    return text;
//else
return '<stroke color="C=0 M=0 Y=100 K=0" width=500>' + text + '</stroke>';
You can play around with the width to tweak this effect. It's not perfect, but it's as close as I can get to a true highlight for inline text.
__________________
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
  #5  
Old April 19th, 2018, 08:32 AM
S_Black's Avatar
S_Black S_Black is offline
Junior Community Member
 
Join Date: Mar 2015
Location: Louisville, KY
Posts: 25
Default Re: Highlighting Words of a Text Frame

Thank you Dan, this is really helpful.
__________________

Shawn Black
Pioneer Direct Marketing
Louisville, KY
Reply With Quote
  #6  
Old May 17th, 2018, 02:58 PM
Susan Susan is offline
Regular Contributor
 
Join Date: Oct 2008
Location: Maitland, FL
Posts: 57
Default Re: Highlighting Words of a Text Frame

I was playing with your file and used Illustrator graphics that flow with the type to get a highlight. I also made the text a superscript and changed the global settings to 100/11 so that it would line up with the graphic text. Anyway, thought it might be another way you can try to use to get your highlight next time.

Files are attached.
Attached Files
File Type: zip 32172 Archive.zip (2.80 MB, 11 views)
__________________
FusionPro Creator v10.1.11 / FusionPro Producer / FusionPro Expression 3.2.2 / Mac OSX 10.13.6 / Acrobat Pro DC
Reply With Quote
Reply

Tags
highlight

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 08:53 AM.


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