I found that when cell text size is larger than the columnwidth, error will occurr.
Please help to fix this, thanks.
Code:
table1 = New Aspose.Pdf.Table
sec1.Paragraphs.Add(table1)
table1.ColumnWidths = BorderLength '"180 180 180"
For j = 0 To MyTable.Rows.Count - 1
row1 = table1.Rows.Add()
row1.Cells.Add(" ")
row1 = table1.Rows.Add()
For i = 0 To MyTable.Columns.Count - 1
cell1 = row1.Cells.Add(MyTable.Rows(j)(i))
tempText = cell1.Paragraphs(0)
tempText.Segments(0).TextInfo.FontName = "Helvetica"
'----- Trun UniCode On to Show Chinese
tempText.Segments(0).TextInfo.IsUnicode = True
tempText.Segments(0).TextInfo.TruetypeFontFileName = "c:/winnt/fonts/SIMHEI.ttf"
tempText.Segments(0).TextInfo.FontSize = 9
Next
Next
Error:
Microsoft.VisualBasic.CompilerServices.VBBinder.set_InternalThrow(Exception Value) +16
Microsoft.VisualBasic.CompilerServices.VBBinder.BindToMethod(BindingFlags bindingAttr, MethodBase[] match, Object[]& args, ParameterModifier[] modifiers, CultureInfo culture, String[] names, Object& ObjState) +4896
Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String name, BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +596
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +480
suncypress.WebForm3.CreatePDF() in D:\WebFolder\SunTest\suncypress\rptpreview\rpt_PDF.aspx.vb:151
suncypress.WebForm3.Page_Load(Object sender, EventArgs e) in D:\WebFolder\SunTest\suncypress\rptpreview\rpt_PDF.aspx.vb:56
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731