AndyB Posted March 7, 2023 Share Posted March 7, 2023 Hello, I have a rule that selects a graphic resource depending on the name in the field. And this rule is placed into a formatted text resource as an "inline graphic". This works fine but the graphic ends up being too small. Is there any way to change the size of the inline graphic? It's basically a variable signature that is at the end of a variable letter. It needs to be an inline graphic as not all the letters have the same length and the signature needs to move up and down accordingly. Below I have included the rule javascript. switch (Field("sender").toLowerCase()) { case "Aneesa Din".toLowerCase(): return Resource("Aneesa Din"); case "Barbara Merz".toLowerCase(): return Resource("Barbara Merz"); case "Frances Cifrino".toLowerCase(): return Resource("Fran Cifrino"); case "Jeremiah Haruna".toLowerCase(): return Resource("Jerry Haruna"); case "Lois Quam".toLowerCase(): return Resource("Lois Quan"); default: return NullResource(); } Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted March 7, 2023 Share Posted March 7, 2023 Wrap that code in a function and set the height and/or width property of the returned resource object, like so: function SenderResource() { switch (Field("sender").toLowerCase()) { case "Aneesa Din".toLowerCase(): return Resource("Aneesa Din"); case "Barbara Merz".toLowerCase(): return Resource("Barbara Merz"); case "Frances Cifrino".toLowerCase(): return Resource("Fran Cifrino"); case "Jeremiah Haruna".toLowerCase(): return Resource("Jerry Haruna"); case "Lois Quam".toLowerCase(): return Resource("Lois Quan"); default: return NullResource(); } } var r = SenderResource(); r.height = HundredthsOfPointsFromText("0.5 in"); return r; 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.