xsl-fo图文混排的问题解决

来源:互联网 发布:html怎么调用php文件 编辑:程序博客网 时间:2024/06/09 18:45

xsl-fo图文混排的问题解决


用fop转换fo文件到pdf遇到了很多奇奇怪怪的问题,插入图片之后图片总是在一行,而文字不能排在旁边,效果很不好,查了很多资料,文档里有一个fo:float标签可以用,但是w3c教程里面又没有说怎么用,试了很多回直接连图片都不显示 …最后用谷歌搜索才搜出了一个给了很多实例的网站,对照着上面的例子才发现卧槽float原来是用start,end标示位置不是用left,right啊 = =

<fo:block space-before="0.5em" space-after="0.5em">    <fo:float float="start">        <fo:block start-indent="0cm" end-indent="0cm" border=".1pt solid red" color="blue">            <fo:external-graphic src="url('img/dtp-xsl.emf')" width="5cm" height="3.5cm" content-width="4.5cm" content-height="3.0cm" display-align="center" text-align="center"/>            <fo:block/>        Image 1: image inside the side float        </fo:block>    </fo:float>An image is inserted at the beginning of the paragraph as fo:float.</fo:block>
0 0
原创粉丝点击