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

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 5th, 2019, 11:16 AM
AWhite2504 AWhite2504 is offline
Junior Community Member
 
Join Date: May 2019
Posts: 17
Default Connect Text Frame to Graphic Frame

I have a two page letter that has variable bullets and signatures determined by recipient state. The body of the letter floats depending on the length of the bullet points. I need the graphic frame to float with the text as the set up is:

Sincerely,

Signature

Signors name

Is this possible?
Reply With Quote
  #2  
Old August 5th, 2019, 01:39 PM
Dan Korn's Avatar
Dan Korn Dan Korn is online now
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,338
Default Re: Connect Text Frame to Graphic Frame

Yes, but you don't use a separate graphic frame; instead, you insert a graphic into the text frame. This is called an "inline graphic." (The User Guide calls it "Graphic Tag Inside Story Tag.") There's an example of exactly this in the Cell Phone tutorial installed with FusionPro VDP, in the letter on the second page, where the Signature rule is called out in the text frame.
__________________
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 August 6th, 2019, 06:28 AM
AWhite2504 AWhite2504 is offline
Junior Community Member
 
Join Date: May 2019
Posts: 17
Default Re: Connect Text Frame to Graphic Frame

Thanks Dan!!

I set up the "signature rule" but the image is not appearing.
Using the simple if rule:
this is what I came up with
if (Field("ST") == "AR")
{
return "<graphic file=AR Sylvester Smith.tif>";}
Reply With Quote
  #4  
Old August 6th, 2019, 09:25 AM
Dan Korn's Avatar
Dan Korn Dan Korn is online now
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,338
Default Re: Connect Text Frame to Graphic Frame

Quote:
Originally Posted by AWhite2504 View Post
Thanks Dan!!

I set up the "signature rule" but the image is not appearing.
Using the simple if rule:
this is what I came up with
Code:
if (Field("ST") == "AR")
{
	return "<graphic file=AR Sylvester Smith.tif>";
For markup tags, just like in XML and HTML, if an attribute value has spaces in it, you need to put quotes around it. Also, you should account for the "else" case where the field doesn't match. This should work:
Code:
if (Field("ST") == "AR")
    return '<graphic file="AR Sylvester Smith.tif">';
//else
return "";
Or:
Code:
if (Field("ST") == "AR")
    return CreateResource("AR Sylvester Smith.tif", "graphic").content;
//else
return "";
__________________
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 August 6th, 2019, 10:43 AM
AWhite2504 AWhite2504 is offline
Junior Community Member
 
Join Date: May 2019
Posts: 17
Default Re: Connect Text Frame to Graphic Frame

Still no luck.. edited the rule to your recommendations and signature is still not showing up.
__________________
Fusion Pro: 10.1.11
Acrobat :
Reply With Quote
  #6  
Old August 6th, 2019, 12:50 PM
S_Black's Avatar
S_Black S_Black is offline
Junior Community Member
 
Join Date: Mar 2015
Location: Louisville, KY
Posts: 25
Default Re: Connect Text Frame to Graphic Frame

I don't know, but you may want to look at the path of your image(s). I've had to do the following.
Code:
{
    if (Len(Field("CS46SIGNAT"))==0)
        return '<graphic file="\\\\PDMSRV\\PioneerData\\Acknowledgements\\Client Files\\Signatures\\SA_00000_NO SIG IMAGE_Sig1.tif" height=4000 />';
    else
        return '<graphic file="\\\\PDMSRV\\PioneerData\\Acknowledgements\\Client Files\\Signatures\\'+Field("CS46SIGNAT")+'" height=4000 />';
}
__________________

Shawn Black
Pioneer Direct Marketing
Louisville, KY

VDP Creator 10.0.26 / Acrobat DC / Windows 10 x64
Reply With Quote
  #7  
Old August 6th, 2019, 01:23 PM
Dan Korn's Avatar
Dan Korn Dan Korn is online now
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,338
Default Re: Connect Text Frame to Graphic Frame

Quote:
Originally Posted by AWhite2504 View Post
Still no luck.. edited the rule to your recommendations and signature is still not showing up.
Do a regular composition (not a Preview) and click View Log, and see if there are any messages related to the signature graphic.
Quote:
Originally Posted by S_Black View Post
I don't know, but you may want to look at the path of your image(s). I've had to do the following.
Code:
{
    if (Len(Field("CS46SIGNAT"))==0)
        return '<graphic file="\\\\PDMSRV\\PioneerData\\Acknowledgements\\Client Files\\Signatures\\SA_00000_NO SIG IMAGE_Sig1.tif" height=4000 />';
    else
        return '<graphic file="\\\\PDMSRV\\PioneerData\\Acknowledgements\\Client Files\\Signatures\\'+Field("CS46SIGNAT")+'" height=4000 />';
}
Rather than hard-coding paths into rules, I recommend doing either one of these two things:
  1. Add the folder path to the Search Path on the Advanced tab of the Composition Settings dialog.

    OR
  2. Add the graphic as a resource in the job, with the Resources dialog, then do this in the rule:
Code:
if (Field("ST") == "AR")
    return Resource("AR Sylvester Smith.tif").content;
//else
return "";
Note the change to call Resource instead of CreateResource. You can use the Building Blocks dialog to insert the named resource rather than typing out the name.
__________________
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 August 7th, 2019, 06:22 AM
AWhite2504 AWhite2504 is offline
Junior Community Member
 
Join Date: May 2019
Posts: 17
Default Re: Connect Text Frame to Graphic Frame

Dan,

Adding the files as resources then using the "resource" rule worked. Thanks for helping me out with this.

Last thing, I need to increase the display size of the signatures. I tried using some of the tips I've seen across the forum but had no luck.
__________________
Fusion Pro: 10.1.11
Acrobat :
Reply With Quote
  #9  
Old August 7th, 2019, 09:16 AM
Dan Korn's Avatar
Dan Korn Dan Korn is online now
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,338
Default Re: Connect Text Frame to Graphic Frame

Quote:
Originally Posted by AWhite2504 View Post
Adding the files as resources then using the "resource" rule worked. Thanks for helping me out with this.
Great, glad I could help!
Quote:
Originally Posted by AWhite2504 View Post
Last thing, I need to increase the display size of the signatures. I tried using some of the tips I've seen across the forum but had no luck.
You can specify either the height or width of the graphic (or both, if you want to stretch it), by adding attributes with those names to the graphic tag (as documented in the FusionPro Tags Reference). The units are in hundredths of points, so 7200 = one inch.

The easiest way to do this is probably to go back to emitting the tag directly, something like this:
Code:
return '<graphic resource="AR Sylvester Smith.tif" height=7200>';
Note here the use of the resource attribute to denote the resource name, rather than the file attribute to denote the file name.

Another option, if you want the more sophisticated graphic scaling that you can get with a graphic frame, such as "Best Fit" or "Proportional Fill," is to use a graphic frame in a repeatable component, but that's more complicated.
__________________
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 August 7th, 2019, 11:25 AM
AWhite2504 AWhite2504 is offline
Junior Community Member
 
Join Date: May 2019
Posts: 17
Default Re: Connect Text Frame to Graphic Frame

Am I able to use this rule in multiple instances, as each state will have a different signature.
__________________
Fusion Pro: 10.1.11
Acrobat :
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 09:34 AM.


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