Blog Archives

All about Int32.Parse, Convert.ToInt32 and Int32.TryParse

Some days back I wrote one chunk of code for fixing one of the client specific defects in one of application on which I was working. I used Int32.Parse for parsing string value to integer. After some days the issue resurfaced again. I debugged the code for finding the root cause behind the issue, and I found that for some values Int32.Parse was failing.

Then I decided to dig into all the options available for parsing and just thought to share my findings with you.

Read the rest of this entry

Generating Web Page to PDF

Background:

Easiest, simplest, fastest and of course free way to generate PDF or images for web pages:

– Tool is named as “wkhtmltopdf” and “wkhtmltoimage”
– Both are in exe format.
– Written in C++ and also its source is open and licensed under open source.
– Because it is an exe, we can use this tool in both windows and web applications. And it is in C++  so it can be used for windows platform as well as in Linux based systems.

In Details:

I will be explaining how to use it in web applications to generate PDF and push that PDF to client. Rest can be taken care by considering this as an example.
You can download the exe from  https://code.google.com/p/wkhtmltopdf/downloads/list. And trust me this is really cool kit as it provides a lot of flexibility to hide or extend the content of the page in nearly every manner.
Read the rest of this entry

%d bloggers like this: