Twain scanning with Delphi 2009/2010

Having spent some time with porting scanning application from Delphi 6 to 2009, I want to share with some working twain code. I used very well written component DelphiTwain with some modifications to run in Delphi 2009.

Program sample is attached with library, ready to run. Here is example program screenshot:

[adsense_id=”1″]

Download example here

Update: Delphi 2010

It was very kind from Gian Mario Benetti side to port this application to Delphi 2010 and add some useful features

  • image rotation clockwise and counterclockwise by 90 degrees
  • moving image with the mouse type PDF
  • function “Save” (which is enabled only if you have made changes to the image) and “save as …” with preview of files already in the folder (open file with Preview)
  • auto save (with check box to choose to enabled or not) to automatically generate a name and save image in the folder “scan” created in the pathwhere the application is located
  • correct the code that decide whether or not to open the scanner interface (there was an erroneous reference to relative ChecBox)
  • icons to the buttons to embellish the interface
  • disabling buttons while the scanner is active
  • keyboard shortcuts for the most important buttons

Download Delphi 2010 updated code here

Did you find this post useful? Support the the author ($10)
My Google Profile+

10 comments

  1. sorry I can not run the program I’m missing component mcmimaging12.bpl, mcmimagingdb12.bpl,mcmocr12.bpl, mcminte12.bpl, mcmtwn12-bpl not if you could tell me where to get components or send e-mail hsencia@gmail.com Thanks in advance.

  2. I am still using Delphi 2005 and, unfortunately, your source code generates error messages. Do you have a version of your source files compatible with Delphi 2005? Thanks.

  3. Sorry, its Delphi 2009 only. porting wasn’t a hardwork, so you can manage thouse errors easily, I guess

  4. Bonjour
    je trouve votre code très intéressant, mais malheureusement je ne pourrais l’utiliser, message d’erreur “ExceptionLog. dcu manquant.
    SVP comment parer à ce problème.
    merci d’avance pour l’aide

  5. I am still using Delphi 2010 and, unfortunately, your source code generates error message. ExceptionLog. dcu intruvable. Thanks.

  6. I have the “almost” same code working on delphi 7, and in my programs. But recently i install one of my prograns on 64 bits windows and does not work. Do you have some idea to help me?

  7. Sorry by my english: I choose Anonymous … lets do again

    I have the “almost” same code working on delphi 7, and in my programs. But recently i install one of my prograns on 64 bits windows and does not work. Do you have some idea to help me?

Leave a Reply

Your email address will not be published.