Jump to content

Inline Graphic Controlling width & height


mgalligar

Recommended Posts

I have a project using inline graphics in a table. It's a postcard with

 

CSR photo + Name + Phone.

 

Those 3 things have to flow with the text (& stay next to each other).

You can never tell what kind of photo a client will upload. Is there any way I can control the photo (width + height + scale)?

I thought if I put a 3rd page in my postcard template that is the exact size the photo needs to be; .7" x .9"; I could have the photo load there in a graphic box, then bring Page 3 into my table on Page 2.

I'm not sure how to do that or if it's even possible.

I tried to attach the zipped template but got an error.

 

Please let me know what you think.

Thanks for your time.

Mike G.

Link to comment
Share on other sites

Sure, you can use the width and/or height attributes of the <graphic> tag, like so:

<graphic file="mygraphic.jpg" height=3600 />

Please refer to the Tags Reference Guide, specifically the section titled, "Graphic Tag Inside Story Tag," for more information.

 

You could also create a Template page containing a graphic frame, and bring that in as a repeatable component inline in the text.

 

Although I think in your case, you probably just want to use a graphic frame and line it up with the text manually.

Link to comment
Share on other sites

Ok

It doesn't seem to be a lot of use unless you can control both.

 

One client uploads a square image.

Another uploads a vertical rectangular image.

and....

Another uploads a horizontal rectangular image.

 

 

If you're just controlling the width and a client uploads a vertically oriented rectangular image;

then...

the Photo + CSR name + Phone;

will take up an inordinate amount of space on the page.

There may not even be enough room on the page for just the photo.

 

In this case the Photo, Name, Phone; appear in the middle of variable paragraphs, so they need to move. I've never used repeatable component. I'll look into that.

 

Thanks

Link to comment
Share on other sites

It doesn't seem to be a lot of use unless you can control both.

You can control both by specifying both width and height attributes, but it will result in a skewed image.

One client uploads a square image.

Another uploads a vertical rectangular image.

and....

Another uploads a horizontal rectangular image.

 

If you're just controlling the width and a client uploads a vertically oriented rectangular image;

then...

the Photo + CSR name + Phone;

will take up an inordinate amount of space on the page.

There may not even be enough room on the page for just the photo.

You could use Text Measurement to determine the original dimensions of the graphic, as demonstrated in this thread, then use a little math to determine the new width and height to specify in your graphic tag to keep it scaled proportionally. But I would use a repeatable component instead.

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...