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 March 26th, 2018, 07:07 AM
indum@glynndevins.com indum@glynndevins.com is offline
Junior Community Member
 
Join Date: Jan 2018
Location: Kansas City, MO
Posts: 15
Default Two Fonts and Custom Copy

Hi,

New here and to Marcom/Javascript/Fusion Pro so figured to reach out for some help.
Working on a postcard and the field EventHeader has 2 fonts and a variable spot to enter [Community Name] (I attached the image).

So, on Marcom side it would be pre filled field and user can change the Community Name. Not sure what the code looks like to return 2 fonts and for it to be a custom field. Any help is appreciated.

Thanks,
Attached Images
File Type: png Untitled-2.png (45.2 KB, 8 views)
Reply With Quote
  #2  
Old March 26th, 2018, 10:04 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,327
Default Re: Two Fonts and Custom Copy

I don't think you need any JavaScript code to accomplish this. Just set the text with the data field name in the Text Editor, and set the fonts to whatever you want.

Attached Images
File Type: jpg TextEditor.jpg (53.7 KB, 42 views)
__________________
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
  #3  
Old March 26th, 2018, 08:24 PM
indum@glynndevins.com indum@glynndevins.com is offline
Junior Community Member
 
Join Date: Jan 2018
Location: Kansas City, MO
Posts: 15
Default Re: Two Fonts and Custom Copy

Thanks Dan,

I will try that. Maybe I'm overthinking this .
Reply With Quote
  #4  
Old March 27th, 2018, 06:49 AM
scotts scotts is offline
Junior Community Member
 
Join Date: Feb 2011
Location: Zeeland, MI, USA
Posts: 40
Default Re: Two Fonts and Custom Copy

Quote:
Originally Posted by indum@glynndevins.com View Post
Thanks Dan,

I will try that. Maybe I'm overthinking this .
I will say, a majority of the solutions you will find are a lot easier than you think. I would say 75%, I, myself, overthink the problems, and then find a very simple solution to the problem. Just letting you know, you are not alone.
Reply With Quote
  #5  
Old March 28th, 2018, 06:34 AM
indum@glynndevins.com indum@glynndevins.com is offline
Junior Community Member
 
Join Date: Jan 2018
Location: Kansas City, MO
Posts: 15
Default Re: Two Fonts and Custom Copy

Quote:
Originally Posted by scotts View Post
I will say, a majority of the solutions you will find are a lot easier than you think. I would say 75%, I, myself, overthink the problems, and then find a very simple solution to the problem. Just letting you know, you are not alone.
Thanks Scotts! It's good to know I'm not alone in this and to have a great support as this forum along the way
Reply With Quote
  #6  
Old March 28th, 2018, 11:09 AM
indum@glynndevins.com indum@glynndevins.com is offline
Junior Community Member
 
Join Date: Jan 2018
Location: Kansas City, MO
Posts: 15
Default Re: Two Fonts and Custom Copy

Quote:
Originally Posted by Dan Korn View Post
I don't think you need any JavaScript code to accomplish this. Just set the text with the data field name in the Text Editor, and set the fonts to whatever you want.

Hey Dan,

So, when I set the fonts and change the data field to <header> it changes the font to the first font (top line)- see attached. This is all one field (header). This should also work as a custom field where user can change the copy if they would like. Is there a way to make it work like this without making it two separate data fields?

Thank you,
Attached Images
File Type: png Untitled-2.png (29.0 KB, 4 views)
File Type: png Untitled-3.png (20.9 KB, 4 views)
Reply With Quote
  #7  
Old March 28th, 2018, 12:36 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,327
Default Re: Two Fonts and Custom Copy

Quote:
Originally Posted by indum@glynndevins.com View Post
So, when I set the fonts and change the data field to <header> it changes the font to the first font (top line)- see attached. This is all one field (header). This should also work as a custom field where user can change the copy if they would like. Is there a way to make it work like this without making it two separate data fields?
Sorry, I don't understand. If you posted the collected template, or at least the data file, and a mockup of what you want the output to look like, that might be clearer.
__________________
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
  #8  
Old March 28th, 2018, 02:31 PM
indum@glynndevins.com indum@glynndevins.com is offline
Junior Community Member
 
Join Date: Jan 2018
Location: Kansas City, MO
Posts: 15
Default Re: Two Fonts and Custom Copy

Quote:
Originally Posted by Dan Korn View Post
Sorry, I don't understand. If you posted the collected template, or at least the data file, and a mockup of what you want the output to look like, that might be clearer.
LOL Sorry...here are the files I'm working on (template and PDF mockup). Hope that helps explain my struggle.
Attached Files
File Type: zip Collect2.zip (2.93 MB, 2 views)
File Type: pdf Cinco Self Mailer.pdf (315.7 KB, 5 views)
Reply With Quote
  #9  
Old March 29th, 2018, 10:21 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,327
Default Re: Two Fonts and Custom Copy

Thanks for posting the template.

Are you trying to figure out how to replace the "[COMMUNITY NAME]" text in the data with something else? And what do you want to replace it with? Because the value of the "CommunityName" field in your data is just "[Community Name]". Or is the actual community name defined somewhere else?

Anyway, there may be a new feature in an upcoming version of FusionPro that makes this kind of text replacement much easier, but for now, you need to write a rule that takes the original field value and replaces the denoted text with something else. So you could make a rule named "Copy" that does this:
Code:
return ReplaceSubstring(Field("Copy"), "[COMMUNITY NAME]", "Your community name here");
Or, you could add this line to OnRecordStart:
Code:
FusionPro.Composition.AddVariable("Copy", ReplaceSubstring(Field("Copy"), "[COMMUNITY NAME]", "Your community name here"));
Or, if you want to replace that text with another field value:
Code:
FusionPro.Composition.AddVariable("Copy", ReplaceSubstring(Field("Copy"), "[COMMUNITY NAME]", Field("CommunityName")));
Though, as I said, with the data you posted, that's still going to put just "[Community Name]" in the output, since that's the value in that field.

Anyway, I'm still not sure what this has to do with your original question about "two fonts." Where do you want two different fonts applied as part of this?
__________________
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
  #10  
Old March 30th, 2018, 10:09 AM
indum@glynndevins.com indum@glynndevins.com is offline
Junior Community Member
 
Join Date: Jan 2018
Location: Kansas City, MO
Posts: 15
Default Re: Two Fonts and Custom Copy

Quote:
Originally Posted by Dan Korn View Post
Thanks for posting the template.


Anyway, I'm still not sure what this has to do with your original question about "two fonts." Where do you want two different fonts applied as part of this?
Hey Dan,

Thanks for that [Community Name] explanation...very helpful! Reason we add value this way is so the user can put the name of their Community Name inside our provided copy. This is a variable template not specific to any community. Hope i'm explaining it right.

Now, the font in the header 'Join us for' (first line) and second line 'CINCO DE MAYO' are two different fonts. When I add text to the text editor and select those two lines and insert <header> it changes both of those lines of text to the first font :/.

Thanks,
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 04:04 PM.


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