【发布时间】:2023-03-28 12:47:01
【问题描述】:
我正在开发一个 FONET 应用程序来生成一些简单的 PDF 报告;除了客户希望将注册商标符号正确提升到上标级别之外,一切正常。
我在一个内联元素上尝试了text-altitude,但没有成功,所以在搜索了互联网上糟糕的 XSL:FO 文档之后,我认为我需要将它包装在一个 fo:inline-container 中。但是,这根本没有出现。
我已经用这个basic example减少了它:
<?xml version="1.0" encoding="utf-8"?>
<!-- inline-container-Converts-Block-to-Inline.fo
- Copyright (c) 2016, HerongYang.com, All Rights Reserved.
-->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="page"
margin="0.1in" page-height="4in" page-width="3in">
<fo:region-body region-name="body" background-color="#eeeeee"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="page">
<fo:flow flow-name="body">
<fo:block margin="0.1in" padding="0.2in"
border-width="1px" border-style="solid"
background-color="#eeffff" color="#000000"
font-family="sans-serif" font-size="10pt">
Once upon a time
<fo:inline-container width="0.7in" margin="0in"
alignment-baseline="middle">
<fo:block background-color="#eeeeee" margin="0in"
border-width="1px" border-style="solid"
padding="4px">there were three little pigs</fo:block>
</fo:inline-container>
who lived with their Mother.
Early one morning they woke up and their mother said,
"<fo:inline font-style="italic" color="#ff22ff">you're too big
for this house and its time you left home.</fo:inline>"
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
并尝试运行它,但这也不会显示来自inline-container 的任何内容;在this online processor 中尝试过,但也没有显示容器中的任何内容,所以不仅仅是 FONET 问题。
FONET 是 FOP 0.2 的端口,should have basic support 用于 text-altitude 和 inline-container。
我错过了什么?这个版本的FOP是否可以得到上标效果?
【问题讨论】:
标签: pdf xsl-fo apache-fop