- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一些很长的表格,它们跨越多个页面,用 Apache-FOP 1.1 呈现
表格有标题,例如“表 7.6. 事物的详细信息”和列标题。
在每个连续页面上,列标题在顶部正确重复。但我还需要让表格延续也有标题,格式为:“表 7.6. 细节(续)”
有没有办法用 XSL-FO 和 Apache-FOP 做到这一点?或者它是否需要通过 RenderX 提供的扩展?
最佳答案
我不知道有什么方法可以在 FOP 中做到这一点,但这可能是因为除了基本的 PDF 生成之外,我还没有将 FOP 用于任何其他方面。
使用 RenderX (XEP),您可以设置您的 fo:table-header
到您想在后续页面上使用的任何标题,并使用常规 fo:block
对于初始标题。
然后您可以使用 rx:table-omit-initial-header="true"
您的 fo:table
上的属性首次输出表时不输出表头。
这是 RenderX 4.18 渲染的示例...
示例 XSL-FO
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:rx="http://www.renderx.com/XSL/Extensions">
<fo:layout-master-set>
<fo:simple-page-master master-name="my-page" page-width="8.5in" page-height="11in">
<fo:region-body margin="1in" margin-top="1.5in" margin-bottom="1.5in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my-page">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="12pt" font-weight="bold"
text-align="center" space-after="6pt">Sample Table</fo:block>
<fo:block>
<fo:table rx:table-omit-initial-header="true" space-before=".08in">
<fo:table-column column-width="100%"/>
<fo:table-header>
<fo:table-cell>
<fo:block font-weight="bold"
font-size="12pt" text-align="center"
space-after="6pt">Sample Table (Cont)</fo:block>
</fo:table-cell>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:table border-style="solid" border-width="1pt" padding="6pt">
<fo:table-column column-number="1" column-width="20%"/>
<fo:table-column column-number="2" column-width="80%"/>
<fo:table-header font-weight="bold">
<fo:table-cell text-align="left">
<fo:block>Column 1</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Column 2</fo:block>
</fo:table-cell>
</fo:table-header>
<fo:table-body>
<fo:table-row padding-before="20px">
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Lorem ipsum dolor sit amet</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn’t commit. These men promptly escaped from a
maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
关于xsl-fo - 当表格跨越多页时,如何让 XSL-FO 表格标题在每一页上重复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13922082/
扩展 SVG 标准以支持多个页面(又名 pageSet)的状态如何? 我看到几年前 SVG 1.2 和 SVG Print 计划慢慢停止,所以我想知道是否有人有关于 SVG future 功能的最新信
我是 PHP 的新手,在插入多个页面时使用 FPDI 有点困难。 我有一个包含 3 页的 .pdf 文件。我最终将第 1 页保存为第 3 页中的一个单独页面,并且与我的代码一起使用,但那是因为我的代码
有没有支持多页的 jQuery 画廊?我的问题是,每个页面包含不同数量的图像。我正在使用 Lightbox 2,但我看不到任何方法来配置多页画廊。我可以创建 5-6 个静态 HTML 页面,一页可以包
我正在开始使用 scrapy。我的 items.py 包含: class ParkerItem(scrapy.Item): account = scrapy.Field() m = s
我编写了一个代码来将单个 tiff 文件合并为多页 tiff。但输出最后带有空白页。如果输入文件是黑白的,但对于彩色的 .tiff 文件,代码工作正常。例如,如果我提供 100 个文件,作为输入输出,
我对 UIScrollView 中的 UITableView 有疑问。 情况是这样的: 我有一个 ListViewController,它在 UITableView 中显示一些事件。如果用户点击一个事
我想创建一个用于更改页面的按钮。我的问题是,我有一个我以前写的代码,但它不是我想要的那样工作。 代码如下: function loadingPage() { $(function () {
我希望对 1 个页面上的元素进行样式设置,并且不影响另一个页面上的相同元素。 我在每个元素上都有 class="homepage"。 有更好的方法吗? 为简单起见,这里是该页面上的 DIV。 h1.h
这是 jQuery 代码 $("#register-form").submit(function (e) { e.preventDefault(); }).validate({ rul
我的简单移动应用程序有 3 个页面,全部用 divs/data-role="page" 划分,并且位于同一文档 (.html) 中。页面加载完美,但如果我导航到第二页,按钮上的一个非常简单的单击事件将
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
我是 python 新手。我目前正在研究网络抓取。任务是抓取戴尔社区 Inspiron 问题的前 5 页。我有运行并返回我需要的信息的代码。但是,我无法仅获取文本。我当前的代码返回文本 + html。
我目前正在为我已经完成的 m.file 开发一个 GUI。 GUI 将是一个具有多个页面的页面,每个页面都是一个独立的 GUI。 在主 GUI 上,用户将在具有 2 个选项的单选按钮组上进行选择。根据
我需要从我的程序中保存多页 TIFF,但它似乎是 Qt doesn't support multipage TIFF .尽管如此,我还是需要这样做。从我的程序开始执行此操作的最佳方法是什么? 到目前为
我遇到了尝试将几个多页 html 文件与 jquery mobile 链接的问题,发现使用 ajax 时,jquery mobile 不会显示完整文档,而是第一页。 我查找了问题并找到了 todd t
我是桌面应用程序开发的新手,有一个非常基本的问题。我有一个名为 MainWindow 的 WPF 窗体,我应该如何在上面设置多个页面,例如“用户管理”、“管理内容”等。 我想我有以下选择: 使用多种形
我看到了一些关于多页 tiff 的问题和一些关于压缩的问题,但没有(我看到的)将两者联系起来。 This question和我见过的一样近,让我非常接近,所以我希望如此。我进入了提到的 Oracle
我正在尝试建立一个简单的多页表单,使用 session 稍后存储在数据库中的多个表中。 然而,我似乎遇到了问题。虽然最后一页的值被发布到数据库,但 session 变量却没有。 请记住.. 我和我的项
我正在尝试构建一个多页面 Dash 应用程序。当我运行以下代码时,一切正常,除了它不会路由到我的/dash_1 或/dash_2 url。想知道是否有人可以帮助我。 我的结构是这样的: 破折号项目/
search_1=raw_input('search criteria 1? ') search_2=raw_input('search criteria 2? ') br = mechanize.B
我是一名优秀的程序员,十分优秀!