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

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 20th, 2012, 06:15 AM
traba5058 traba5058 is offline
Regular Contributor
 
Join Date: Jan 2012
Location: Atlanta, GA
Posts: 77
Question Superscript from Data File

I'm still fairly new at this and my pre-press department just came to me for assistance for an offline VDP job.

We are processing a VDP job for a new client. The Excel file has a field with a dollar amount for some records. When we are using this field, the customer wants us to superscript the dollar sign.

Have any of you done this before? If so, will one of you help me?
Reply With Quote
  #2  
Old December 20th, 2012, 06:19 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 469
Default Re: Superscript from Data File

I will pass on a code that was posted here that worked for me.

Code:
var s = Field("YOUR FIELD NAME"); // replace with your field
return s.replace(/\$/g,"<superscript>$</superscript>");
Make sure you check the Tagged Text Box!!
__________________
Don Reimer - JavaScript Novice

MAC OS 10.12.5 Acrobat XI 11.0.0 FP Creator 10.0.16
Windows 7 Acrobat X 10.1.4 FP Creator 9.3.9
Reply With Quote
  #3  
Old December 20th, 2012, 09:26 AM
esmith's Avatar
esmith esmith is offline
Senior Contributor
 
Join Date: Oct 2008
Location: Charlotte, NC
Posts: 870
Default Re: Superscript from Data File

Note that I had to create a custom font in Fontographer with a pre-superscripted dollar sign to handle this when the price occurs in a field that may break to two lines. This is because the tags allow a line break to occur between the symbol and the numbers so it is possible that your output could look like:
Code:
When you buy two items for $
3.99, you can the 3rd item FREE
With a custom font, the symbol stays with the numbers in that scenario.
__________________
Eric Smith
Content Developer
Classic
FP 9.3.6, MAC OSX 10.9.4, Acrobat 11.0.09
Reply With Quote
  #4  
Old December 21st, 2012, 08:05 AM
traba5058 traba5058 is offline
Regular Contributor
 
Join Date: Jan 2012
Location: Atlanta, GA
Posts: 77
Talking Re: Superscript from Data File

Thanks so much for your help! It worked perfectly! Happy Holidays to both of you.
Reply With Quote
Reply

Tags
dollar sign, superscript

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 03:11 AM.


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