Converting Scanned Document Images to Searchable PDFs with OCR

Bill Bither has an article at Code Project showing how to use Atalasoft’s DotImage to OCR a PDF to make it searchable.

I have been working with DotImage to see if we could make use of their webviewer and thumbnail controls.

Using window.onload without overwriting existing onload event handlers

When you are creating reusable javascript files, there are times when you want to tap into the window.onload event, which is fired when the window has finished loading the content.

The problem here, is that you can’t have multiple event handlers for the same event.

So if you have a page that uses 2 scripts which both use the window.onload event, then which ever is loaded last will win, and the other script will never catch the event.

Well one way you can deal with this problem is to write your window.onload (or other events for that matter) using this type of a pattern:

    //-- see if there is already something on the onload
    var tempFunc = window.onload;
    //-- create our event handler
    window.onload = function(){
        //-- if tempFunc is a function, try to call it
        if (typeof (tempFunc) == "function"){
            } catch(e){} //--- if it errors, don't let it crash our script
     //-- Call your onload function here

This way, you can have several function that all utilize the onload event, and none of them have to know about each other.


Getting Real

Here is the online version (free) of book on development: Getting Real.

I think they have basically an agile approach to not only software development but business as well.

Like almost all development methodologies, I think some of their ideas are pretty valid, unless they aren’t.

For example, some of the things I hear a lot from the sort of XP / Agile development styles are things like:

 “Get your app out as soon as possible, even if it isn’t fully debugged or fully complete.  Let your users tell you what features need to be added, rather than spending the time guessing what they want”


“2 rules of performance optimization. 1) Don’t.  2) Not yet!”


1) If you get your app out, and you start spending you time getting people to use it, and it sucks, then you have actively made people who had no opinion of your product now have a negative opinion.  If you fix the bugs and add features later, they will just remember that they tried it, and it sucked.

2) You can always add performance optimization later, except what about when need to rewrite 2 months of work because you were too lazy to spend an extra 4 hours during the design phase to build in some ability to scale?