Trying to create a PDF document with the reference site of 4guys from Rolla and am trying to replicate what they are doing however no document comes up for me, none is produced, what do i need to do to get a PDF to come up.
Imports iTextSharp.text
Imports System.IO
Imports iTextSharp.text.pdf
Protected Sub lnkPrint_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkPrint.Click
Dim document = New Document(PageSize.A4, 50, 50, 25, 25)
Dim output = New FileStream(Server.MapPath("MyFirstPDF.pdf"), FileMode.Create)
Dim writer = PdfWriter.GetInstance(document, output)
document.Open()
Dim welcome As Paragraph = New Paragraph("Hello World")
document.Add(welcome)
document.Close()
End Sub
Our community of experts have been thoroughly vetted for their expertise and industry experience.