kdeutsch
asked on
Create PDF with ITextSharp DLL
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( "MyFirstPD F.pdf"), FileMode.Create)
Dim writer = PdfWriter.GetInstance(docu ment, output)
document.Open()
Dim welcome As Paragraph = New Paragraph("Hello World")
document.Add(welcome)
document.Close()
End Sub
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(
Dim writer = PdfWriter.GetInstance(docu
document.Open()
Dim welcome As Paragraph = New Paragraph("Hello World")
document.Add(welcome)
document.Close()
End Sub
Where are you looking for the file? Do you have write permission on the directory?
use a pdf printer and print to it.
set the settings on the pdf printer as default
set the settings on the pdf printer as default
ASKER
HI,
I have persmisisons to wrie to the server location it wrote the file to, but users need to be able to save to their client and I do not have permissions to write to it. So I just want to open the fiel and then they can save it themselves.
I have persmisisons to wrie to the server location it wrote the file to, but users need to be able to save to their client and I do not have permissions to write to it. So I just want to open the fiel and then they can save it themselves.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solved
ASKER