Jump to content

Question about variable images in variable text


Recommended Posts

Hi all

 

I have a problem. I'm setting up a letter that has an address box on top and a signature in the bottom. Both are variable. I have it the signature working correctly, but the variable image box is just layed under the text box so that it shows through. The problem is, when there is an address 2 in that field the whole letter goes up and down a line thus throwing off how the signature appears in the letter.

 

Is there a way that i can include the variable graphic inside the variable text so that it moves with the letter? Any ideas on how i can set up something like this?

 

Thanks

Devin

Link to comment
Share on other sites

Ok, i got it to work using the inline graphic rule. This allowed me to put the graphic right into the text. The only problem is that the graphics are pretty big now. Is there a way that i can set up the inline graphic rule so that the image is a certain size?

 

You can create a rule to return the <graphic> tag with any parameters you want, like so:

return '<graphic file="' + Field("Destination") + '.jpg" width=7200 height=7200>';

Change the field name and file extension as appropriate. The width and height attributes are in hundredths of points (7200 per inch), so the rule above will force the graphic to be one inch on each side. You can specify just width, or just height, and the graphic will be scaled accordingly without stretching.

 

Please refer to the FusionPro Tags Reference Guide for more information. Look for the bookmark "Graphic Tag Inside Story Tag".

Link to comment
Share on other sites

Yes, you want to completely replace the logic in the Inline Graphic rule you have now. Click "Convert to JavaScript", then select all the text and delete it and replace it with what I suggested above.

 

P.S. It's JavaScript, not Java. They're two completely different languages.

Link to comment
Share on other sites

  • 2 months later...

Hello,

 

Although the built-in "Inline Graphic Rule" rule works by allowing you to select a field that contains the inline graphic file name, you do not need to have your inline referenced in a database field.

 

After you add the graphic as a resource, create a new JavaScript TEXT rule that references that graphic such as this:

 

return '<graphic file="myInlineImage.jpg">';

Give that rule a name (making sure you check the "Treat returned strings as tagged text" checkbox in the rule editor) and then insert that rule into your variable frame.

 

hth.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...