iText Flying Saucer pdf标题并忽略html [英] iText Flying Saucer pdf headers and ignoring html

查看:290
本文介绍了iText Flying Saucer pdf标题并忽略html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用xhtml到pdf取得了很大的成功,但是每个页面都有一个新的要求,即头文件和页面数量。我们正在使用新版飞碟。

We use xhtml to pdf with good success, but a new requirement came up to have headers and page count on every page. We are using newset release of Flying Saucer.

我在这里举例说明: http://today.java.net/pub/a/today/ 2007/06/26 / generating-pdfs-with-flying-saucer-and-itext.html#page-specific-features

...但是这不行。标题将在第一页的左上角。

...but this would not work. The header would be top left on first page.

如果我使用r7版本,标题和页码编号可以完美地工作,但是没有传递的html被渲染,而在r8中,headers \页码被忽略,但html被完美呈现。用于测试的xHTML是从上面的url复制的。

If I use the r7 version, headers and page numbering works perfectly, but none of the passed in html is rendered, whilst in r8 the headers\ page numbers are ignored, but the html is rendered perfectly. xHTML used for tests is copied from url above.

我知道我必须遗漏一些非常简单的东西,如果有人有任何想法或评论,我将非常感谢听到。

I know I must be missing something very simple, if anyone has any ideas\ comments, I would be very grateful to hear.

推荐答案

我认为他们在r8中改变了这个功能....试试这个方法:

I think they changed this functionality in r8.... try this method instead:

https://gist.github.com/626264

这篇关于iText Flying Saucer pdf标题并忽略html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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