I am creating a project on online movie ticket booking. Now I want to create a pdf file of ticket. How to create or generate a pdf file.
Asked
Active
Viewed 1,088 times
0
-
Related, poss duplicate: http://stackoverflow.com/questions/465433/creating-pdf-files-at-runtime-in-c-sharp – Apr 24 '14 at 13:09
3 Answers
1
To generate pdf go for below code
Document document = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35);
PdfWriter writer = PdfWriter.GetInstance(document , new FileStream(@"C:\YourPdf.pdf", FileMode.Create));
document .Open();
Paragraph paragraph = new Paragraph("Hi, \n This is my pdf file");
document .Add(paragraph);
document .Close();
For more information :-
http://www.codeproject.com/Articles/686994/Create-Read-Advance-PDF-Report-using-iTextSharp-in

Neel
- 11,625
- 3
- 43
- 61
-
1You may want to add information about the third party library the OP will need in order to use this code. – Apr 24 '14 at 13:07
-
1