ravi2k7@hotmail.com:pls give me an example using this dll
Sure, add the dll as a reference to your project by right clicking on your solution in Visual Studio, then properties. Under references, click the add and add the .dll
Below is sample code I have used to create and write to PDF...
' PDF step 1: creation of a document-object
Dim document As New Document()
' PDF step 2: create a writer that listens to the document and directs a PDF-stream to a file
Dim today As String = DateTime.Now.ToString()
today = Replace(today, "/", "")
today = Replace(today, " ", "")
today = Replace(today, ":", "")
fileName = "C:\temp\" + today + ".pdf"
PdfWriter.GetInstance(document, New FileStream(fileName, FileMode.Create))
' PDF step 3: we open the document
document.Open()
' PDF step 4: add content to the doc
Dim header As New PdfPTable(1)
header.WidthPercentage = 100
header.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER
header.DefaultCell.BorderWidth = 0
Dim content As PdfPTable = New PdfPTable(3)
content.WidthPercentage = 100
content.DefaultCell.BorderWidth = 1
Dim row As Data.DataRow
Dim inTotal As Double = 0
Dim outTotal As Double = 0
content.AddCell("Test1")
content.AddCell("Test2")
content.AddCell("Test3")
For Each row In table.Rows
'displaying data from table
Dim FileDate As String = row("FileDate").ToString()
Dim IncTotals As String = (row("IncTotals")).ToString()
Dim OutTotals As String = (row("OutTotals")).ToString()
Dim SettlementDate As String = (row("SettlementDate")).ToString()
inTotal += CType(IncTotals, Double)
outTotal += CType(OutTotals, Double)
content.AddCell(FileDate.ToString())
content.AddCell(IncTotals.ToString())
content.AddCell(OutTotals.ToString())
Next
content.AddCell("")
content.AddCell(inTotal.ToString())
content.AddCell(outTotal.ToString())
Dim myDate As String = datePicker.ToString("dd / MM / yyyy")
header.AddCell("text here")
header.AddCell("text here")
header.AddCell("text here"))
document.Add(header)
document.Add(New Chunk(""))
document.Add(content)
' step 5: we close the document
document.Close()