Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Formatting Text

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 12th, 2014, 11:18 AM
ivdb ivdb is offline
Forum n00b
 
Join Date: Jun 2011
Posts: 6
Default how to keep inline graphic and text together

I'm working on a business card. In one of the frames, I want to give the user the possibility to add a website, a facebook address and a twitter address. Everything is calculated in a rule that returns a string with all the needed information.
I want to represent facebook and twitter by their graphic image by using an inline graphic. I would also like to keep the graphic and its text together if there is not anough space on a line, but I do not know how. I tried with an   between the graphic image and the text, but this does not work (see attached image). I find back my image at the end of one line and the text on the next line
Does someone has an idea how I could solve this?
The text string that I return looks like
<magnify type=text factor=90><f name="Myriad Pro"><z newsize="9">
<b>abc@a.com</b><br><z newsize="9">B-1047 Brussels - Tel. +32 2 11-12345 - Fax +32 2 11-98765<br>
<z newsize="9"><b>www.website1.com - www.website2.com - <graphic file="E:\dsf_vdp_data\DAM\IMAGES\cc_fb.pdf">&nbsp; MyFacebook - <graphic file="E:\dsf_vdp_data\DAM\IMAGES\cc_tw.pdf">&nbsp; MyTwitter</b></magnify>
Attached Images
File Type: jpg image_break.JPG (12.1 KB, 17 views)

Last edited by ivdb; March 12th, 2014 at 11:20 AM..
Reply With Quote
  #2  
Old March 12th, 2014, 11:56 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: how to keep inline graphic and text together

Your code looks like you're using a non-breaking space and a space. You should take that space out:
Code:
<z newsize="9"><b>www.website1.com - www.website2.com - <graphic file="E:\dsf_vdp_data\DAM\IMAGES\cc_fb.pdf">&nbsp;MyFacebook - <graphic file="E:\dsf_vdp_data\DAM\IMAGES\cc_tw.pdf">&nbsp;MyTwitter</b></magnify>
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #3  
Old March 12th, 2014, 02:50 PM
ivdb ivdb is offline
Forum n00b
 
Join Date: Jun 2011
Posts: 6
Default Re: how to keep inline graphic and text together

I checked everything. There is no space after &nbsp;
Reply With Quote
  #4  
Old March 13th, 2014, 09:11 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: how to keep inline graphic and text together

I suppose you could use the FusionProTextMeasure tool (here's a good example) to determine if that line is too long to fit in the text box, and if it is, insert a break ('<br>') before the last inline graphic in order to keep the graphic beside the text on the next line.
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
Reply

Tags
format, graphic

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:53 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.