Jump to content

Connect Text Frame to Graphic Frame


AWhite2504

Recommended Posts

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?

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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 "";

Link to comment
Share on other sites

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 />';
}

Link to comment
Share on other sites

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:

  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:

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...