Click here to Skip to main content
12,702,599 members (33,024 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET
I have application that generates a form using Excel i also need to generate in PDF how can i do this?
Posted 20-Nov-12 12:02pm
Kschuler 20-Nov-12 17:06pm
There are lots of ways and lots of third party components that help with PDFs. You really haven't supplied enough information for us to recommend anything. Provide more information about your project. What have you looked into and why did or didn't you want to go that route? Have you googled for help and done research on this first?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

First of all you need to download "iTextSharp" from: iTextSharp

After that,extract iTextSharp and you need to add reference to file itextsharp.dll Chose right click on project-->add reference-->browse and browse to the extracted folder.

Now,you need to create pdf file on c:\ drive using this code:

Using fs As New IO.FileStream("c:\file.pdf", IO.FileMode.Create)
Using doc As New Document
Dim pdfWriter As pdf.PdfWriter = iTextSharp.text.pdf.PdfWriter.GetInstance(doc, fs)             
doc.Add(New Paragraph("Now pdf file is created and you can input what you need!"))
End Using
End Using
Sergey Alexandrovich Kryukov 20-Nov-12 17:34pm
Lacks some references; please see my answer...
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Some links to help you with iText suggested in Solution 1:[^],[^] (even though this is Java, most documentation is here),[^] (and this is .NET port of it, iTestSharp; this is what you would use).


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100