in vb.net i have some code that looks like this:
Imports System
Imports System.IO
Imports iTextSharp.text
Imports iTextSharp.text.pdf
Public Class Form1
Public Sub New1()
Directory.SetCurrentDirectory("C:\Users\alexluvsdanielle\Desktop\") '"
Console.WriteLine("Chapter 10 example 10: nested PdfPTables")
Dim doc As Document = New Document(PageSize.A4, 50, 50, 50, 50)
Try
Dim writer As PdfWriter = PdfWriter.GetInstance(doc, New FileStream("Chap1010.pdf", FileMode.Create))
doc.Open()
Dim table As PdfPTable = New PdfPTable(4)
Dim nested1 As PdfPTable = New PdfPTable(2)
nested1.AddCell("1.1")
nested1.AddCell("1.2")
Dim nested2 As PdfPTable = New PdfPTable(1)
nested2.AddCell("2.1")
nested2.AddCell("2.2")
Dim k As Integer = 0
While k < 24
If k = 1 Then
table.AddCell(nested1)
Else
If k = 20 Then
table.AddCell(nested2)
Else
table.AddCell("cell " + k)
End If
End If
System.Threading.Interlocked.Increment(k)
End While
table.TotalWidth = 300
table.WriteSelectedRows(0, -1, 100, 600, writer.DirectContent)
doc.Close()
Catch de As Exception
Console.Error.WriteLine(de.Message)
Console.Error.WriteLine(de.StackTrace)
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
New1()
End
End Sub
End Class
i would like to see what the console is writing. how do i do this?