How do you create PDF files from ASP.NET page using vb.net?

I am needing to know how to create pdf files from asp.net using vb.net.  I have heard of several different ways but need to have some type of examples... thanks ahead of time vikingg97
LVL 1
vikingg97Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NowaYCommented:
To do it easily you will need an external component that does most of the work for you. The link I am providing is an Open Source (free) PDF maker for ASP.NET. It provides good examples for you. It works very well:

http://report.sourceforge.net/
vikingg97Author Commented:
That is not in VB.NET, which I was asking for.
NowaYCommented:
You can use it with VB.net. The external component is written in C#, but you can use it in VB.net.

Here is a sample for you:

        Try
            Dim report As Report = New Report(New PdfFormatter)
            Dim fd As FontDef = New FontDef(report, FontDef.StandardFont.Helvetica)
            Dim fp As FontProp = New FontPropMM(fd, 25)
            Dim page As Page = New Page(report)
            Dim pp As PenProp = New PenProp(report, 12.5)
            Dim line As RepLine = New RepLine(pp, 12.2, 23.3)
            Dim filename As String = "c:\test\HelloWorldVB.pdf"
            page.AddCB_MM(80, New RepString(fp, "Hello World!"))
            page.AddCB_MM(100, line)
            RT.ViewPDF(report, filename)

            report = Nothing


        Catch excep As Exception

        End Try

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Abirami RajendranCommented:
NowaYCommented:
I provided a solution for vikingg97 with code example in vb.net as requested. I think the points should be rewarded.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.