如何在C#中的PdfPTable中更改单元格的宽度 [英] How to change the width of a cell in PdfPTable in C#
本文介绍了如何在C#中的PdfPTable中更改单元格的宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
如何根据单元格中存在的数据调整PdfPTable(使用iTextSharp)中单元格的宽度?如果数据更多,则文本将被换行,但是,我希望将其显示在一行中.怎么办?
在此先感谢..
Hello,
How can the width of the cell in a PdfPTable(using iTextSharp) be adjusted based on the data present in the cell? If the data is more, the text is getting wrapped, but, I want it to be shown in a single line. How can it be done?
Thanks in advance..
推荐答案
检查是否可以选择关闭CSS类
您可以在Itext论坛中提出这个问题
check there may be the option of off css class
and u can asl this question in Itext forum
PdfPTable t1 = new PdfPTable(2);
t1.SetTotalWidth(new float [] {10f,40f});
PdfPTable t1 = new PdfPTable(2);
t1.SetTotalWidth(new float[] { 10f, 40f });
这篇关于如何在C#中的PdfPTable中更改单元格的宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文