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 8th, 2014, 11:57 AM
psmosser psmosser is offline
Junior Community Member
 
Join Date: Dec 2011
Location: Lancaster, PA
Posts: 37
Default Replace font globally for one record

Is it possible with an OnRecordStart rule to replace a font throughout the template (including on repeatable components) based on a field?

What I have is a person who's name starts with "IL" and in Avante Garde that prints as "ll". What I would like to do is by using her client Id field have any occurrence of Avante Garde Change to "Mercury Text G1" anywhere Avante Garde is used in the template.

I don't want to search for her name and replace just that because this may come up again later at which point I would add a field for "alternate font" to my data.

Any ideas would be appreciated.
__________________
FusionPro Designer 9.0.3
Acrobat 11.0.6
Mac OSX 10.8.5
2. x 2.4 Ghz 6 Core Xeon
12gb ram
Reply With Quote
  #2  
Old January 8th, 2014, 02:54 PM
jreynolds jreynolds is offline
Junior Community Member
 
Join Date: Feb 2011
Location: Dallas, TX
Posts: 11
Default Re: Replace font globally for one record

How about creating a formatted text resource with "Il" using Mercury Text, then create a rule to pull that resource when [Name] = "Il"?

I've done something similar when I needed special characters that didn't look good in the main body font.
__________________
Jeff Reynolds
ViaTech Publishing
Windows 7 / Acrobat 10.1.3
FP VDP Creator 8.2.7
Reply With Quote
  #3  
Old January 9th, 2014, 11:12 AM
psmosser psmosser is offline
Junior Community Member
 
Join Date: Dec 2011
Location: Lancaster, PA
Posts: 37
Default Re: Replace font globally for one record

Quote:
Originally Posted by jreynolds View Post
How about creating a formatted text resource with "Il" using Mercury Text, then create a rule to pull that resource when [Name] = "Il"?

I've done something similar when I needed special characters that didn't look good in the main body font.
Appreciate the feedback but that won't work for what we're doing. Inevitably I will end up with more people who want to change the font and I would just have to keep chasing rules.

I also don't want to make an alternate template page with another font because the client can choose from many templates each month and may change from month to month so I would need doubles of each.
__________________
FusionPro Designer 9.0.3
Acrobat 11.0.6
Mac OSX 10.8.5
2. x 2.4 Ghz 6 Core Xeon
12gb ram
Reply With Quote
  #4  
Old January 9th, 2014, 11:53 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,359
Default Re: Replace font globally for one record

Well, it's a bit hard to say without seeing the template. Also, it depends on how the Avante Garde font is being specified in the first place. Is it via tagging in the data, or is it being set in the GUI (in the Variable Text Editor dialog)? Also, are you trying to apply the change for just one particular data field, or are you really trying to do it globally for the template?

If the font is being specified in the data, then you can do something similar to what's discussed in this thread:
http://forums.pti.com/showthread.php?t=3133
Something like this in OnRecordStart:
Code:
for (var i in FusionPro.Fields)
     FusionPro.Composition.AddVariable(i, ReplaceSubstring(Field(i), "Avante Garde", "Mercury Text G1", true));
If the font is being specified in the GUI, then it depends on whether you want to replace the font in one field, or in just one or a few particular text frames.

If it's really just one field, you can do something like this in OnRecordStart:
Code:
FusionPro.Composition.AddVariable("client Id", '<f name="Mercury Text G1">' + Field("client Id") + '</font>', true));
If it's more than one field, then you might need to do the above multiple times. Again, it's hard to say without more specific information.

If you really only want to make the change for a particular record, then the logic above (whichever you choose) can be put into a conditional "if" block, although I don't know what that condition is.

Of course, this is all kind of playing tricks to work around an issue with the font. So I think what would be better is to find another font which looks similar to the one you're using now, but with a different representation of the capital "L".

Finally, I'll reiterate that this would be easier for others to analyze and make more specific suggestions if you could post the job, or at least a stripped-down version that shows what you're trying to do.
__________________
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 January 9th, 2014, 04:14 PM
psmosser psmosser is offline
Junior Community Member
 
Join Date: Dec 2011
Location: Lancaster, PA
Posts: 37
Default Re: Replace font globally for one record

Thanks for the input Dan.

I was actually trying to use some variation of your first suggestion but to no avail.

The font is specified in the GUI. The fields are being called out directly not through rules. I do need to affect multiple fields however.

I tried your second suggestion.

Code:
if (Field("ClientID") == "1467708")

FusionPro.Composition.AddVariable("AlternateName", '<f name="Mercury Text G1">' + Field("AlternateName") + '</f>', true);
FusionPro.Composition.AddVariable("ReturnAddressSenderLabel1", '<f name="Mercury Text G1">' + Field("ReturnAddressSenderLabel1") + '</f>', true);
The result of this is that the AlternateName field font changes for the record where the if statement is satisfied and then goes back to AvantGarde. The second AddVariable line however changes the font on all records.

What would be preferable is to switch the AvanteGarde font in every field where it's used rather than listing these out. Is that possible with some variation of your first code?
__________________
FusionPro Designer 9.0.3
Acrobat 11.0.6
Mac OSX 10.8.5
2. x 2.4 Ghz 6 Core Xeon
12gb ram
Reply With Quote
  #6  
Old January 9th, 2014, 05:25 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,359
Default Re: Replace font globally for one record

Quote:
Originally Posted by psmosser View Post
Thanks for the input Dan.

I was actually trying to use some variation of your first suggestion but to no avail.

The font is specified in the GUI. The fields are being called out directly not through rules. I do need to affect multiple fields however.

I tried your second suggestion.

Code:
if (Field("ClientID") == "1467708")

FusionPro.Composition.AddVariable("AlternateName", '<f name="Mercury Text G1">' + Field("AlternateName") + '</f>', true);
FusionPro.Composition.AddVariable("ReturnAddressSenderLabel1", '<f name="Mercury Text G1">' + Field("ReturnAddressSenderLabel1") + '</f>', true);
The result of this is that the AlternateName field font changes for the record where the if statement is satisfied and then goes back to AvantGarde. The second AddVariable line however changes the font on all records.
Well, of course. If you don't put a statement block, with curly brackets {} after an "if" statement, then only the next statement (line) immediately after the "if" statement is conditional upon the "if" statement, and any subsequent lines are executed unconditionally. So if you want to have both of those lines to be executed based upon the condition, then you need the curly brackets, like so:
Code:
if (Field("ClientID") == "1467708")
{
    FusionPro.Composition.AddVariable("AlternateName", '<f name="Mercury  Text G1">' + Field("AlternateName") + '</f>', true);
    FusionPro.Composition.AddVariable("ReturnAddressSenderLabel1", '<f name="Mercury Text G1">' + Field("ReturnAddressSenderLabel1") +  '</f>', true);
}
(White space, such as indentation and blank lines, doesn't affect the execution of the code in JavaScript, although it can make it easier for humans to read. The curly brackets are what matter here. When in doubt, just use the brackets.)
Quote:
Originally Posted by psmosser View Post
What would be preferable is to switch the AvanteGarde font in every field where it's used rather than listing these out. Is that possible with some variation of your first code?
I'm still a bit confused as to exactly what you're trying to accomplish, but I think this might be what you want:
Code:
if (Field("ClientID") == "1467708")
{
    for (var i in FusionPro.Fields)
        FusionPro.Composition.AddVariable(i, '<f name="Mercury Text G1">' + Field(i) + '</font>', true);
}
Although, to properly handle certain characters which may be present in the data, as well as to handle other markup which may be present, you probably want this slight variation:
Code:
if (Field("ClientID") == "1467708")
{
    for (var i in FusionPro.Fields)
        FusionPro.Composition.AddVariable(i, '<span font="Mercury Text G1">' + TaggedDataField(i) + '</span>', true);
}
__________________
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)});

Last edited by Dan Korn; January 9th, 2014 at 05:29 PM.. Reason: slightly better answer to handle special characters and other markup
Reply With Quote
  #7  
Old January 14th, 2014, 07:35 AM
psmosser psmosser is offline
Junior Community Member
 
Join Date: Dec 2011
Location: Lancaster, PA
Posts: 37
Default Re: Replace font globally for one record

Quote:
Originally Posted by Dan Korn View Post
Well, of course. If you don't put a statement block, with curly brackets {} after an "if" statement, then only the next statement (line) immediately after the "if" statement is conditional upon the "if" statement, and any subsequent lines are executed unconditionally. So if you want to have both of those lines to be executed based upon the condition, then you need the curly brackets, like so:
Code:
if (Field("ClientID") == "1467708")
{
    FusionPro.Composition.AddVariable("AlternateName", '<f name="Mercury  Text G1">' + Field("AlternateName") + '</f>', true);
    FusionPro.Composition.AddVariable("ReturnAddressSenderLabel1", '<f name="Mercury Text G1">' + Field("ReturnAddressSenderLabel1") +  '</f>', true);
}
(White space, such as indentation and blank lines, doesn't affect the execution of the code in JavaScript, although it can make it easier for humans to read. The curly brackets are what matter here. When in doubt, just use the brackets.)

I'm still a bit confused as to exactly what you're trying to accomplish, but I think this might be what you want:
Code:
if (Field("ClientID") == "1467708")
{
    for (var i in FusionPro.Fields)
        FusionPro.Composition.AddVariable(i, '<f name="Mercury Text G1">' + Field(i) + '</font>', true);
}
Although, to properly handle certain characters which may be present in the data, as well as to handle other markup which may be present, you probably want this slight variation:
Code:
if (Field("ClientID") == "1467708")
{
    for (var i in FusionPro.Fields)
        FusionPro.Composition.AddVariable(i, '<span font="Mercury Text G1">' + TaggedDataField(i) + '</span>', true);
}
Ah the { brackets. I know better than that. Sorry for that.

That technically would work for what I'm doing but I wonder still if there is a cleaner way to do this. I have quite a few fields that use this font so I would have to list maybe a dozen in that rule.

Would there be a way to modify this to look in "i" for "Avante Garde Bold" and replace only that with Mercury Text?
Code:
if (Field("ClientID") == "1467708")
{
    for (var i in FusionPro.Fields)
        FusionPro.Composition.AddVariable(i, '<span font="Mercury  Text G1">' + TaggedDataField(i) + '</span>', true);
}
I don't want to change every field in the layout with Mercury Text just those styled "Avante Garde Bold".

Again, I appreciate the assistance.
__________________
FusionPro Designer 9.0.3
Acrobat 11.0.6
Mac OSX 10.8.5
2. x 2.4 Ghz 6 Core Xeon
12gb ram
Reply With Quote
  #8  
Old January 14th, 2014, 10:41 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,359
Default Re: Replace font globally for one record

Quote:
Originally Posted by psmosser View Post
That technically would work for what I'm doing but I wonder still if there is a cleaner way to do this. I have quite a few fields that use this font so I would have to list maybe a dozen in that rule.
Why would you need to list anything else to get more fields? The "for (var i in FusionPro.Fields)" loop will pick up every field in the job.
Quote:
Originally Posted by psmosser View Post
Would there be a way to modify this to look in "i" for "Avante Garde Bold" and replace only that with Mercury Text?
Code:
if (Field("ClientID") == "1467708")
{
    for (var i in FusionPro.Fields)
        FusionPro.Composition.AddVariable(i, '<span font="Mercury  Text G1">' + TaggedDataField(i) + '</span>', true);
}
I don't want to change every field in the layout with Mercury Text just those styled "Avante Garde Bold".
That's what this code from my previous post does:
Quote:
Originally Posted by Dan Korn View Post
Code:
for (var i in FusionPro.Fields)
     FusionPro.Composition.AddVariable(i, ReplaceSubstring(Field(i), "Avante Garde", "Mercury Text G1", true));
Just put that logic inside the "if" statement:
Quote:
Originally Posted by Dan Korn View Post
Code:
if (Field("ClientID") == "1467708")
{
    for (var i in FusionPro.Fields)
        FusionPro.Composition.AddVariable(i, ReplaceSubstring(TaggedDataField(i), "Avante Garde", "Mercury Text G1", true));
}
Does that not do what you want?
__________________
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
  #9  
Old January 15th, 2014, 09:49 AM
psmosser psmosser is offline
Junior Community Member
 
Join Date: Dec 2011
Location: Lancaster, PA
Posts: 37
Default Re: Replace font globally for one record

Quote:
Originally Posted by Dan Korn View Post
Why would you need to list anything else to get more fields? The "for (var i in FusionPro.Fields)" loop will pick up every field in the job.
This was in response to this option.

Code:
 
if (Field("ClientID") == "1467708") {     FusionPro.Composition.AddVariable("AlternateName", '<f name="Mercury  Text G1">' + Field("AlternateName") + '</f>', true);
FusionPro.Composition.AddVariable("ReturnAddressSenderLabel1", '<f name="Mercury Text G1">' + Field("ReturnAddressSenderLabel1") +  '</f>', true); }
Quote:
That's what this code from my previous post does:
Code:
for (var i in FusionPro.Fields)      FusionPro.Composition.AddVariable(i, ReplaceSubstring(Field(i), "Avante Garde", "Mercury Text G1", true));
I understood you to mean that this would only work if the font was tagged in the data which it is not.

Quote:
Originally Posted by psmosser
Thanks for the input Dan.

I was actually trying to use some variation of your first suggestion but to no avail.

The font is specified in the GUI. The fields are being called out directly not through rules. I do need to affect multiple fields however.

I tried your second suggestion.

Code:
if (Field("ClientID") == "1467708") FusionPro.Composition.AddVariable("AlternateName", '<f name="Mercury Text G1">' + Field("AlternateName") + '</f>', true); FusionPro.Composition.AddVariable("ReturnAddressSe nderLabel1", '<f name="Mercury Text G1">' + Field("ReturnAddressSenderLabel1") + '</f>', true);
The result of this is that the AlternateName field font changes for the record where the if statement is satisfied and then goes back to AvantGarde. The second AddVariable line however changes the font on all records.
Quote:
Just put that logic inside the "if" statement:
Quote:
Originally Posted by Dan Korn
Code:
if (Field("ClientID") == "1467708") { for (var i in FusionPro.Fields) FusionPro.Composition.AddVariable(i, ReplaceSubstring(TaggedDataField(i), "Avante Garde", "Mercury Text G1", true)); }


Does that not do what you want?
That actually does nothing in my scenario. I believe this to be because the fonts are specified in the GUI.

I've attached a sample data and the template so that you can better understand what I'm looking to achieve.

Specifically the "AlternateName" field on Template page "FIC IC001" in teh FIC right column rule will show you what font I'm after. It's the AvantGarde Bold font that I'd like to replace. It is used throughout the template if you look around a bit.

Any questions please let me know.

Thanks!
Attached Files
File Type: zip FusionProTemplates_FlammFont.zip (1.88 MB, 1 views)
__________________
FusionPro Designer 9.0.3
Acrobat 11.0.6
Mac OSX 10.8.5
2. x 2.4 Ghz 6 Core Xeon
12gb ram
Reply With Quote
  #10  
Old January 15th, 2014, 11:39 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,359
Default Re: Replace font globally for one record

Quote:
Originally Posted by psmosser View Post
This was in response to this option.
Code:
 
if (Field("ClientID") == "1467708") {     FusionPro.Composition.AddVariable("AlternateName", '<f name="Mercury  Text G1">' + Field("AlternateName") + '</f>', true);
FusionPro.Composition.AddVariable("ReturnAddressSenderLabel1", '<f name="Mercury Text G1">' + Field("ReturnAddressSenderLabel1") +  '</f>', true); }
I understood you to mean that this would only work if the font was tagged in the data which it is not.

That actually does nothing in my scenario. I believe this to be because the fonts are specified in the GUI.
Okay, sorry, there's been a lot of stuff thrown around in this thread. This will change the font for every data field, regardless of what's specified in the GUI:
Code:
if (Field("ClientID") == "1467708")
{
    for (var i in FusionPro.Fields)
        FusionPro.Composition.AddVariable(i, '<span font="Mercury  Text G1">' + TaggedDataField(i) + '</span>', true);
}
But I understand that you don't want to change every data field like this.

If you have a specific set of fields to which you want to apply the change, then yes, you will need to list each field. But you don't need to have a dozen lines of code with similar AddVariable calls; you can reduce the code like this instead:
Code:
var FieldsToChangeFont =
[
    "AlternateName",
    "ReturnAddressSenderLabel1",
    // etc.
]

if (Field("ClientID") == "1467708")
{
    for (var i in FieldsToChangeFont)
    {
        var fieldName = FieldsToChangeFont[i];
        FusionPro.Composition.AddVariable(fieldName, ReplaceSubstring(TaggedDataField(fieldName), "Avante Garde", "Mercury Text G1"), true);
    }
}
Quote:
Originally Posted by psmosser View Post
I've attached a sample data and the template so that you can better understand what I'm looking to achieve.
Yes, thanks for attaching the template. Unfortunately, though, while having the template to look at is usually quite helpful, and it is still somewhat useful here, in this particular case, I can't really see what you're seeing, because I don't have all of your fonts installed, and the fonts are quite relevant to the issue at hand. That said, please do not post the fonts here to this public forum.
Quote:
Originally Posted by psmosser View Post
Specifically the "AlternateName" field on Template page "FIC IC001" in teh FIC right column rule will show you what font I'm after. It's the AvantGarde Bold font that I'd like to replace. It is used throughout the template if you look around a bit.
Okay, but it's not just that one field "AlternateName" that you want to change, right?

Anyway, there are a few other ways you could approach this. Since you already have copyfitting applied to that "FIC-Right Column" frame, one way you could handle this in the OnCopyfit rule, like so, at the start of the rule:
Code:
FusionPro.Composition.CurrentFlow.content = ReplaceSubstring(FusionPro.Composition.CurrentFlow.content, "Avante Garde", "Mercury Text G1");
Although, this will replace all instances of that font in the entire frame/flow, not just in that one field. I'm not sure if that's what you want. And again, while I think this will work to replace the font, I can't really be sure, because I don't have your fonts installed, and therefore can't really test this on my end.

Also, I'm not sure what else you're trying to do there in the OnCopyfit rule, but I don't think it will work to call CopyfitLine, since you're obviously trying to copyfit a frame with multiple lines in it, and besides, using "return" in a callback rule like that doesn't have any effect anyway, as the box notes when you click Validate.
__________________
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
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 07:53 AM.


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