如何根据XSL-FO中的页码显示一个或另一个信息? [英] How to display one or the other information depending on the page number in XSL-FO?

查看:106
本文介绍了如何根据XSL-FO中的页码显示一个或另一个信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用XSL-FO创建PDF.现在,我有了一个只想在第一页上显示的标签,另一个要在所有其他页面上显示的标签,例如

I'm using XSL-FO to create PDF's. Now I have a label that I want to display only on the first page, and another label that I want to display on all other pages, e.g.

Last month's balance

第2页-n

Previous page's balance

整个PDF实际上只是一个简单的表格,因此,这与位于数据外部的封面无关.我该怎么办?

The whole PDF is actually just a simple table, so this isn't about a cover page that stands outside of the data. How can I do it?

另请参阅以下相关问题:

See also this related question: How can I sum up some values per page in a table in XSL-FO?

推荐答案

可以使用fo:marker和fo:retrieve-marker(来自fo:static-content)或在fo:page的帮助下实现这一目标-sequence-master,它为首页(@ page-position ="first")和其他页面(="rest")提供不同的fo:simple-page-master条目.

This one can either be achieved using fo:marker and fo:retrieve-marker (from fo:static-content), or with the help of fo:page-sequence-master, that provides different fo:simple-page-master entries for the first page (@page-position="first") and other pages (="rest").

在后一种情况下,您需要对不同的简单页面母版上的静态区域进行不同的命名,并在fo:page-sequence中为每个页面母版提供fo:static-content.

In the latter case you would need to name static regions on different simple-page-masters differently, and provide an fo:static-content in the fo:page-sequence for each page master.

这篇关于如何根据XSL-FO中的页码显示一个或另一个信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆