Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use a scanner in .NET? [closed]

I am planning in making an application (Archiving System specifically) wherein, my app can access printer/scanner for scanning of document and storing it to database and access printer/scanner for printing requested documents. Any suggestions? Just a simple scan document -> store to database type of solution will do. Thanks! :)

like image 463
Noobie Avatar asked Feb 08 '23 06:02

Noobie


1 Answers

Although scanning and printing are two separate areas and you have asked both terms together but I have explained both that what you may need to get started. Search further on TWAIN Scanning in C#/VB.Net.

For printing you may use .Net API/Winforms however for scanning purpose you will need to use TWAIN SDK/Wrapper for .Net. Some of the options are explained below.

1- Printing

 PrintDocument pd = new PrintDocument();
 pd.PrintPage += new PrintPageEventHandler(PrintPage);
 PrintDialog pdi = new PrintDialog();
 pdi.Document = pd;
 if (pdi.ShowDialog() == DialogResult.OK)
 {
     pd.Print();
 }
 else
 {
      MessageBox.Show("Print Cancelled");
 }

2 - Scanning Possibilities:

a - Free/opensource

  • NTwain Lib

  • NET-TWAIN-image-scanner

  • NTwain Source & Samples

b - Paid SDK

  • Atalasoft DotTwain.

  • Vintasoft

like image 89
Munawar Avatar answered Feb 16 '23 02:02

Munawar