适用于飞碟/ iText的pdf风景和肖像 [英] Both landscape and portrait for pdf with Flying Saucer/iText

查看:148
本文介绍了适用于飞碟/ iText的pdf风景和肖像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法用Flying Saucer / iText设置不同的页面样式?我需要在横向上显示前几页,然后在某个页面切换到肖像,然后输出。

Is there a way to set different page styles with Flying Saucer/iText? I need to have the first couple of pages in landscape, then switch to portrait at a certain page and out.

任何想法?

推荐答案

没关系,找到了答案。对于任何有兴趣的人,这是你如何做到的:

Nevermind, found the answer. For anyone interested, this is how you do it:

@page land { size:landscape; }
@page port { size:portrait; }
.landscapePage { page:land; }
.portraitPage { page:port; }

voilá!

这篇关于适用于飞碟/ iText的pdf风景和肖像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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