Simple example for creating PDF file using Sharp-PDF
I came across a new library for developing PDF in C# named as SharpPDF . It is open source .net dll . Find the URL here http://sharppdf.sourceforge.net/ .
You will find many tutorials on the net. But, I thought of sharing what I know (not completely).
Hoping for ?
A generic class to create pdf with different generic objects and mail it as attachment.
Lets get on
There are many objects that is supported by SharpPDF . Below are just a glimpse of objects supported in SharpPDF and used here in the post are
- Text Object
- Image Object
- Table Object
The main class is pdfDocument for preparing document.
Here we can add text or background image(Logo) using PdfDocument document .
PdfTable is the table object as specified above . Where , we use maximum of these objects
in PDF generation.
I have created a class PDFGenerate which has some properties included . And there is a Method CreatePDF with generic List (List<T> ) as input.
It will create PDF and save to the folder PDF in application.
Please find the guide related to the sharp pdf in below mentioned URL
Please, find the download link Click here (https://www.dropbox.com/s/3w1f28nn2tw3slk/sample-sharppdf.zip?dl=0)
If there are any changes required and any guidance are accepted happily.