Posts

Showing posts from October, 2006

HOW TO programmatically generate PDF files on the fly without spending a buck

Use iText# . "iText# (iTextSharp) is a port of the iText open source java library written entirely in C# for the .NET platform by . iText# is a library that allows you to generate PDF files on the fly. It is implemented as an assembly." To get started with creating a PDF programmatically, download the DLL & pretty self explanatory code available in C# & VB.NET from the creators' SourceForge Project.

HOW TO implement "Download as Word/Excel" functionality through a web page

I "discovered" Office XML two summers ago when I had to implement "Download as Word Document" functionality for a report with customized features, through a web page without using any third party utility. In Office 2000 (& above) documents can be converted from Word to HTML (File->Save As) and vice versa! It is interesting to see how an Office Document renders HTML. The various formatting features in the Office document are defined through XML as explained in the Microsoft Office HTML and XML Reference . By manipulating these properties exposed through XML programmatically, we can incorporate custom formatting capability in the Office docs that we offer for downloading. All this without resorting to Office Automation or expensive tools. I recently stumbled upon a stellar example that utilizes this technique from among a bunch of re-usable utility methods that Daniel Olson has kindly shared. The method "DataTable2ExcelString" takes a DataTable

Phone number to word - mnemonic generator

Phone numbers like strong passwords (enforced by systems like online banks) are typically beyond 8 digits (in most countries) and hard to remember - unless you are using some kind of mnemonics. Interestingly, there is a phone number to word/phrase generator online that splits a phone number into a single or multiple words. This works on the fact that on most phone handsets, numbers have alphabets A-Z mapped to them. Kevin Meltzer, has a Perl script to Mnemonic Phone Numbers. Crucial to the effectiveness of the mnemoics generator is a dictionary (or collection of various dictionaries on slang, brand names etc) that can convert a number to a convenient memorizable word or phrase or set of words. I look forward to writing my own program/web service sometime that converts a number to a easy to remember word or set of words & I welcome feedback/ideas related to this.