[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl-fo question on how to align text and image at same

Subject: xsl-fo question on how to align text and image at same line
From: Fanyin Wang <fanyinxslt@xxxxxxxxx>
Date: Fri, 14 Jan 2005 09:09:40 -0800 (PST)
xsl fo vertical align
Hi all,
Here's my fo
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
> 
<fo:layout-master-set> 
<fo:simple-page-master master-name="simple"> 
<fo:region-body/> 
</fo:simple-page-master> 
</fo:layout-master-set> 
<fo:page-sequence master-reference="simple"> 
<fo:flow flow-name="xsl-region-body"> 
<fo:block line-height="30pt"
line-stacking-strategy="line-height"
vertical-align="sub">
<fo:inline vertical-align="sub" line-height="15pt"> 
What is Bella collected pictures Bella collected 
<fo:external-graphic src="fraction.jpg"
width="18.96pt" height="29.04pt" border="0"/>
pictures Bella collected pictures Bella collected
pictures collected
<fo:external-graphic src="fraction.jpg"
width="18.96pt" height="29.04pt" border="0"/>
What is the greatest number of these photographs that
Bella can fit side by side in one row across the
album?
<fo:external-graphic src="fraction.jpg"
width="18.96pt" height="29.04pt" border="0"/>
Bella collected pictures Bella collected pictures
Bella collected pictures Bella collected pictures
Bella 
</fo:inline>
</fo:block> 
</fo:flow> 
</fo:page-sequence> 
</fo:root> 
(image is a fraction number such as 1/3)
The PDF that I want is each line of text and image
aligned as "text text 1/3 text text".
No matter where the image show up in the text, it
always aligned up with text around ( before and
after). In my code, it works only at first line, but
when the text too long and go to next line ( I have no
control when it will go to next line), the
vertical-align="sub" lost it function until hit the
image object, then it functional again. ( if you can
use my fo to generate the pdf, you will see the result
of first line is what I want to achieve).

Is anyone know why its behavior like this and what is
the best way to achieve this?  I'm using Apache FOP
0.20.5.
 
Thank you very much!
Fanyin



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.