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

11 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. 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

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

  5. 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?

  6. 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?

  7. I trie to get it to work. I want to convrt it to Delphi Tokyo 10.2 and 10.3 . It could not compile. Here is the mesage.

    [dcc32 Fatal Error] Unit1.pas(7): F1026 File not found: ‘..\..\prove 1.2\AcquireImage.pas’

    Are you able to hslpe me with the missing files please ? I am happy to gie back my work when/if I get it to work on W10 64 bit.

Leave a Reply

Your email address will not be published.