Massoud Mazar

Sharing The Knowledge

NAVIGATION - SEARCH

Code sample for using iTextSharp PDF library

iTextSharp is a rich code library to create PDF and RTF output. Recently I decided to use it for a client and realized there are not much good code examples available on the internet. Even some of the code samples from its online tutorial wont run.

By doing a lot of try and error and with some help from other posts, I could get the desired output. It took me too much time to gather all this information and thought it may come handy to others. So I put together a sample web application which creates a PDF document and renders it to the client browser. Here is the code behind for the page: More...

serviceInstaller component and its default EventLogInstaller

While working on a Windows Service project in .net (Visual Studio 2008), a minor problem related to defining custom event logs kept bugging me.

As you already know, to debug your Windows Service you should use InstallUtil tool to install the service in your Windows. For InstallUtil to be able to install your Service, you add an Installer to your project which contains a ServiceProcessInstaller and a ServiceInstaller. So far everything is cool. You set the properties on these components and BAM! you can now easily install your Service. If you look closely at the IinstallUtil messages on your screen you will see that it creates an EventLog source with the same name you specify for the Service Name property of the ServiceInstaller component and assigns that source to a standard Windows event log called Application. More...