creating pdf
in my project when click a button i need to open a new pdf file, in that file contain values from my database. how to create it. please help me
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Glen LewisPosted Jul 9, 2014, 4:04 AM
You see this second approach is more common, you could create a word (DOCX) or template (DOTX) document in .NET which will define some place holders and then you can fill them with database data and convert the document to a PDF.
I also used this approach with a help of this .net dll for word and other document type file processing, more specific I used MergeField elements in DOTX file and then execute a mail merge operation in C# to import new data, after that I save the document into a PDF format.
Also just in case if that approach does not suit your needs, here is a sample how to create a new PDF file with DataTable's data:
I hope this helps.
Rahul PrasadPosted Jun 30, 2014, 11:09 PM
http://www.codeproject.com/Questions/385812/How-to-export-data-to-PDF-using-csharp
Anupam SinghPosted Jun 15, 2014, 10:41 AM
http://www.codeproject.com/Articles/81118/ITextSharp-Helper-Class