AWhite2504 Posted August 5, 2019 Share Posted August 5, 2019 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? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 5, 2019 Share Posted August 5, 2019 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. Quote Link to comment Share on other sites More sharing options...
AWhite2504 Posted August 6, 2019 Author Share Posted August 6, 2019 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>";} Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 6, 2019 Share Posted August 6, 2019 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>"; 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: if (Field("ST") == "AR") return '<graphic file="AR Sylvester Smith.tif">'; //else return ""; Or: if (Field("ST") == "AR") return CreateResource("AR Sylvester Smith.tif", "graphic").content; //else return ""; Quote Link to comment Share on other sites More sharing options...
AWhite2504 Posted August 6, 2019 Author Share Posted August 6, 2019 Still no luck.. edited the rule to your recommendations and signature is still not showing up. Quote Link to comment Share on other sites More sharing options...
S_Black Posted August 6, 2019 Share Posted August 6, 2019 I don't know, but you may want to look at the path of your image(s). I've had to do the following. { 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 />'; } Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 6, 2019 Share Posted August 6, 2019 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. I don't know, but you may want to look at the path of your image(s). I've had to do the following. { 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: Add the folder path to the Search Path on the Advanced tab of the Composition Settings dialog. OR Add the graphic as a resource in the job, with the Resources dialog, then do this in the rule: 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. Quote Link to comment Share on other sites More sharing options...
AWhite2504 Posted August 7, 2019 Author Share Posted August 7, 2019 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. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 7, 2019 Share Posted August 7, 2019 Adding the files as resources then using the "resource" rule worked. Thanks for helping me out with this. Great, glad I could help! 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: 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. Quote Link to comment Share on other sites More sharing options...
AWhite2504 Posted August 7, 2019 Author Share Posted August 7, 2019 Am I able to use this rule in multiple instances, as each state will have a different signature. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 7, 2019 Share Posted August 7, 2019 Am I able to use this rule in multiple instances, as each state will have a different signature. Of course! That's what variable data is all about. If you can tell me a bit about how the different signature graphics are denoted in the data, or what in the data indicates which graphic to use, I can make some more specific suggestions. Posting a sample of the data is probably the easiest way to accomplish this. Quote Link to comment Share on other sites More sharing options...
AWhite2504 Posted August 8, 2019 Author Share Posted August 8, 2019 Great! So the signature is determined by the state of the recipient. For Example: Arkansas correlates to the Sylvester Smith Signature. Quote Link to comment Share on other sites More sharing options...
AWhite2504 Posted August 8, 2019 Author Share Posted August 8, 2019 Here's a sample Data ListSAMPLE LIST - Copy.txt Quote Link to comment Share on other sites More sharing options...
S_Black Posted August 8, 2019 Share Posted August 8, 2019 There are multiple ways of doing doing things, but if it were me I would change the names of your signatures to be only the state or place the signature name into your data file and do something like: //Change the image from "AR Sylvester Smith.tif" to "AR" return '<graphic resource="'+Field("st")+'.tif" height=7200>'; //OR add the signature name to your data as a field to be pulled return '<graphic resource="'+Field("signature")'" height=7200>'; This way you don't need to program each state, and if a signature is updated you don't need to update your code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.