飞碟-使用CSS的页数 [英] flying saucer - page count with css

查看:114
本文介绍了飞碟-使用CSS的页数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用飞碟将HTML数据转换为PDF,但是我要解决一个问题.

I'm using flying saucer to convert HTML data to PDF, but I've one issue to solve.

  • 在我的PDF中,第一页是介绍性页面,因此该页面没有数字.
  • 第二页必须有一个数字,第二页的数目必须是1.第三页必须显示第2页,等等.

我希望分页计数器仅从第二页开始.

I want the page counter to only begin on the second page.

我该怎么办?

推荐答案

我发现了.只需在要启动计数器的页面上以某种样式放置"-fs-page-sequence",页面计​​数器就会被重置.

I've discovered. Just put "-fs-page-sequence" in a style on page that you want to start the counter, and the page counter will be reseted.

例如:

<div style='-fs-page-sequence'></div>   

-fs-page-sequence:值开始或自动(默认值),并允许您将页面范围和页面计数器的范围限制为 文件

-fs-page-sequence: values start or auto (the default) and allows you to limit the scope of the page and pages counters to a portion of the document

这篇关于飞碟-使用CSS的页数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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