World of PDF – 2
This entry is in continuation to my earlier post “World of PDF”. You need to read this first if you are new to creating PDF files.
Today in the Chennai .NET User Group, Prashanthan K pointed to an interesting link to iTextSharp. This is a port of the iText open source Java library written entirely in C# for the .NET platform. iText# is a library that allows you to generate PDF files on the fly.
I am yet to try this out. But the sample is pretty impressive. A “Hello World” file in PDF is generated with the following 5 lines of code!!!.
Document document = new Document(); PdfWriter.getInstance(document, new FileStream("Chap0101.pdf", FileMode.Create)); document.Open(); document.Add(new Paragraph("Hello World")); document.Close();
Happy PDFing in .NET