Go Back   PTI Marketing Technologies User Community > Software-Related Talk > Getting Started

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 10th, 2018, 08:37 AM
Kal's Avatar
Kal Kal is offline
Regular Contributor
 
Join Date: Jun 2011
Location: Canada
Posts: 54
Default Hard space to color

I understand that this Rule will turn regular spaces to "Hard spaces and will not break.

return ReplaceSubstring(Field("Variable_FIELD1")," "," ")

Now is there a way to turn that hard space to print in color.

Reason is some of our client have custom fonts and their mapping of characters are messy, sometimes I get "question marks in boxes" being printed. Now if I can tell that "Hard space" to print in "White" then I can keep using the client custom fonts.

So I just want to add on to this rule and after it converts to Hard Spaces I then want to change the color. Hope this is clear.
__________________
Kal Bedi
FusionPro Desktop 10.1.9
Adobe Acrobat Pro DC
Mac OS Sierra 10.12.5
Canada
Reply With Quote
  #2  
Old January 10th, 2018, 10:32 AM
kjacobson's Avatar
kjacobson kjacobson is offline
Junior Community Member
 
Join Date: Oct 2008
Location: Alameda, CA
Posts: 29
Default Re: Hard space to color

You can use color tags in your replace string. So instead of just returning the non breaking space, you can return the color tag, then the non breaking space and then return the color to the original color. Make sure you have color swatches in FP named White and replace OriginalColor with the name of your color. Make sure you have "Treat returned strings as tagged text" checked.
Code:
return ReplaceSubstring(Field("Variable_FIELD1")," ",'<color name="White">&nbsp;<color name="OriginalColor">');
Not sure if there is a better solution for this, but this should change your text to white.
__________________
Windows 7 | InDesign CC 2017 | Acrobat DC | FusionPro 10.0.16
Reply With Quote
  #3  
Old January 10th, 2018, 03:11 PM
Kal's Avatar
Kal Kal is offline
Regular Contributor
 
Join Date: Jun 2011
Location: Canada
Posts: 54
Default Re: Hard space to color

Thanks, that's what I was trying to get at.
This helps.
__________________
Kal Bedi
FusionPro Desktop 10.1.9
Adobe Acrobat Pro DC
Mac OS Sierra 10.12.5
Canada
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 11:28 AM.


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