iTextSharp的文件集横向(水平)A4 [英] iTextSharp set document landscape (horizontal) A4

查看:3253
本文介绍了iTextSharp的文件集横向(水平)A4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在景观设置A4文档中iTextSharp的(水平)格式?

How can I set an A4 document in landscape (horizontal) format in iTextSharp?

推荐答案

您可以设置页面大小一个旋转A4。例如。 (假设PDF,但无论如何应适用):

You can set the page size to a rotated A4. E.g. (assuming PDF, but should apply regardless):

iTextSharp.text.Document doc;

// ...initialize 'doc'...

// Set the page size
doc.SetPageSize(iTextSharp.text.PageSize.A4.Rotate());



我做这个有没有PDF麻烦,也没有与其他文档类型的尝试。

I've done this with PDF without trouble, haven't tried it with other doc types.

这篇关于iTextSharp的文件集横向(水平)A4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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