Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to create a c# project for rental management. I need the functionality of the program to read from a database and generate an offer letter with information from database..information from database will be name ,last name ,house type and amount you paying.The letter should be same only functionality I want is for it to slot the information in required sections and generate an offer letter

What I have tried:

I did database part of it what am left with is just to show me a sample of how to write to a pdf with stuff generated from a database in c#
Posted
Updated 30-Apr-18 8:27am
Comments
Tomas Takac 25-Jul-17 7:52am    
I know about iTextSharp library - should make a good starting point. Also try to google there ought to be more pdf libraries out there.

1 solution

I assume, you are using a template which you can store it in String builder.
So what you need to do is string.format and in your template the information from database can be given as parameter to read something like String.format("Name:{0}", name).

Once you got everything, then you can use some pdf libraries to create a pdf with that information.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900