#1
|
|||
|
|||
![]()
Hi,
This is a 2 part problem. I'm trying to match (or come close) to the 2 static examples at the top of the template page. 1) I need the space between the $ and the 1 closed up. I'd actually like it a more closed up between all the numbers if possible since the client may ask for that after they see the proof. 2) I need tighter tracking on the word "OFF". In both cases if I remove the superscript tag from my function/rule, it sees the tracking tag. My javascript global Code:
function YourPrice(price) { var newYourPrice = ""; var trimPrice = price.replace(/[^\d\.]/g,''); // Strips out anything that's not a digit or a decimal var decimalPrice = FormatNumber("0.00", trimPrice); // Formats to 2 decimals var SuperPrice = decimalPrice.split(".")[1]; // Everything to the right of the decimal var SuperPriceNoZero = SuperPrice.replace(/00/g, ""); var NormalPrice = decimalPrice.split(".")[0]; // Everything to the left of the decimal var regOneMatch = /1/g; var NormalPrice1 = NormalPrice.replace(regOneMatch, "<tracking newsize=\"-12\">1</tracking>"); var dollar = "<tracking newsize=\"-40\">$</tracking>"; if (price != "") { // If the price doesn't start with zeros, format as $x.xx if (NormalPrice1.replace(/0/g,'')){ newYourPrice = '<p override="true" br="false" superratio="44" superoffset="95"><superscript>' + dollar + '</superscript>' + NormalPrice1 + '<p override="true" br="false" superratio="44" superoffset="95"><superscript>' + SuperPriceNoZero + '</superscript>'; } // If the price is cents only, format as: xx˘ else { newYourPrice = '<tracking newsize="-5">' + SuperPriceNoZero + '</tracking>' + '<z newsize="8">' + " " + '<z newsize="50">' + '<p override="true" br="false" superratio="44" superoffset="95"><superscript>' + "¢" + '</superscript>'; } } return newYourPrice; } Code:
newOffPrice = Field("Value2"); off = newOffPrice.replace(/ /g, '<span><z newsize=25>' + " " + '</span>'); OffPrice1 = '<span><z newsize=30> </span>' + '<span><p override="true" br="false" superratio="60" superoffset="50"><tracking newsize="-12"><uppercase>' + off +'</span></tracking>'; return OffPrice1; Any help is appreciated since I'm on a tight deadline for this. Thanks Lisa |
#2
|
|||
|
|||
![]()
Can you upload the font as well?
__________________
VDP Creator (Desktop) FusionPro VDP software version 11.1.2 Windows 10 64-bit Adobe Acrobat Pro DC Version 2020.013.20074 |
#3
|
|||
|
|||
![]()
You could try cropping the area around the word "off" in your static sample. See attached. Then insert the word "off" in your variable text editor as a graphic, using a text rule with a graphic tag linked to an "off.pdf" file or resource. Something like this:
Code:
return '<graphic file="C:\\Off.pdf">';
__________________
VDP Creator (Desktop) FusionPro VDP software version 11.1.2 Windows 10 64-bit Adobe Acrobat Pro DC Version 2020.013.20074 |
#4
|
|||
|
|||
![]()
Another idea, to tighten up the space between the $ and the 1, you could put the $ in a separate text frame. Position the new text frame with the $ right next to the 1, as close as you want it. For records where there should be a cents sign instead of a dollar sign, turn off the $ in that frame, have a rule that returns "" (empty quotes) instead of a dollar sign.
__________________
VDP Creator (Desktop) FusionPro VDP software version 11.1.2 Windows 10 64-bit Adobe Acrobat Pro DC Version 2020.013.20074 |
#5
|
|||
|
|||
![]()
Hi,
Thanks for your reply. I've read other posts on the forum with the same issue, so I figured it was something I'd have to find a workaround for. However, I was kind of hoping they would have come up with a fix for this. Thanks again for the suggestion! Lisa |
#6
|
|||
|
|||
![]()
One solution we applied for something like this was to create a custom version of the font in Fontographer specifically for a project. In the custom font, we made the dollar/cent signs superscripted by default (so no tag necessary) and tightened up the kerning built in to each of the numeral characters.
We also used one of the unused symbol characters to insert "graphics" as type (e.g. a "^" character would insert the word "OFF" custom designed to client specs). Then we would perform a replace() to swap the string "OFF" with "^" wherever it occurred. |
#7
|
|||
|
|||
![]()
Hi Eric,
Thanks for the reply. I actually downloaded FontForge, we no longer have Fontographer, last week and started to poke around in it. In my spare time (haha), I am going to try your suggestion. It seems like it will work out well for this project. Thanks Lisa |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|