Subject: [xsl] 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) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLTdoc version 1.1, Iwan Birrer | Thread | [xsl] Complex XPath Expression, Karl Stubsjoen |
Re: [xsl] when to use xslt, Henning Waack | Date | Re: [xsl] Extracting highest values, David Carlisle |
Month |