The document has no pages itextsharp error
Hi,
Please help to sort out this 1
Dim doc As New Document(PageSize.LETTER, 25.0F, 25.0F, 50.0F, 25.0F)
PdfWriter.GetInstance(doc, New FileStream(path, FileMode.Create))
doc.Open()
Dim page As Rectangle = doc.PageSize
Dim table As New PdfPTable(2)
table.TotalWidth = page.Width
Dim image As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance("C:\Documents and Settings\Desktop\inner_logo.jpg")
image.ScaleAbsoluteHeight(80)
image.ScaleAbsoluteHeight(25)
image.Alignment = Element.ALIGN_RIGHT
Dim cell1 As New PdfPCell(image)
table.AddCell(cell1)
doc.Add(table)
doc.Add(New Paragraph(""))
doc.Close()
when i close the doc it throws the error as the document has no pagesT