在C#中导出为pdf的问题 [英] problem in export to pdf in c#

查看:96
本文介绍了在C#中导出为pdf的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我正在使用iTextSharp dll导出到pdf,它工作正常,但是在单个页面上我遇到了问题.因为页面设计不是固定的,所以列因条件而异.
在固定了列的其他页面上,它可以正常工作.在此页面上,有时列为10(例如使用表的colspan属性),有时设计更改(如true或false),则列和列为14或更多.但是页面是一样的.如果我修复了一个问题,那么就会给另一个问题造成麻烦.

因此,有什么方法可以将其转换为页面图像并以pdf显示.

在此先感谢

Hello,
i am using iTextSharp dll for export to pdf and it is working perfectly but on a single page I am facing problem. because the page design is not fixed columns are varying from condition to condition.
On other pages where columns are fixed it is working fine. And on this page sometimes columns are 10 like using colspan property of table and sometimes design change like true or false the columns and columns are 14 or more. But page is same. If i fix it for one then it creates problem for another one.

So is there any way to convert it into image of page and show in pdf.

Thanks in advance

推荐答案

尝试将数据表导出到PDF.如果各列各不相同,请根据修改后的结构准备一个数据表,然后将其导出..
这是将DataTable导出为PDF的链接.

此处 [
Try to export the datatable to the PDF. If the columns are varying , prepare a datatable as per the modified structure and export it..
Here is the link for exporting DataTable to PDF.

Here[^]

Thanks
--RA


这篇关于在C#中导出为pdf的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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