在itextsharp.dll附加信息中发生了类型为'iTextsharp.text.documentexception'的未处理异常:表宽度必须大于零。 [英] An unhandled exception of type 'iTextsharp.text.documentexception' occurred in itextsharp.dll additional information: the table width must be greater than zero.

查看:131
本文介绍了在itextsharp.dll附加信息中发生了类型为'iTextsharp.text.documentexception'的未处理异常:表宽度必须大于零。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

   For i As Integer = 0 To AdmissionDataGridView.Rows.Count - 2

            For j As Integer = 0 To AdmissionDataGridView.Columns.Count - 1
                pdfcell = New pdf.PdfPCell(New Phrase(AdmissionDataGridView(j, i).Value.ToString(), pTable))
                PdfTable.HorizontalAlignment = Element.ALIGN_LEFT
                PdfTable.AddCell(pdfcell)
            Next
        Next
        pdfFile.Add(PdfTable)
        pdfFile.Close()





我尝试了什么:



请帮助我解决这个问题,这会带来错误我大胆。谢谢



What I have tried:

please kindly help me with this problem, its bringing error from those that i bold. thank you

推荐答案

Quote:

表格宽度必须大于零。

the table width must be greater than zero.

由于某种原因,表格的总宽度为零(或负数)。但是显示的代码不包含表创建和初始化。



检查代码并在必要时设置宽度。可能的属性是 TotalWidth (绝对值), WidthPercentage (百分比),以及 SetWidths (列宽度数组)。

For some reason the total width of your table is zero (or negative). But the shown code does not contain the table creation and initialisation.

Check your code and set the width if necessary. Possible properties are TotalWidth (absolute), WidthPercentage (percentage), and SetWidths (array of column widths).


这篇关于在itextsharp.dll附加信息中发生了类型为'iTextsharp.text.documentexception'的未处理异常:表宽度必须大于零。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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