Scanner Pro SDK ActiveX

Scanner Pro SDK ActiveX 11.0

Platform : Windows 10, Windows 8, Vista, Windows 7, XP

For Windows Developers who need to capture image from scanner, digital camera that has a TWAIN device driver and save to Docx, TIFF , PDF/A with C#, C++ ,VB.NET , VB, Delphi, VFP, MS Access.

C# - How to Add TWAIN Scanning features to WinForm application and save to PDF/A file from NuGet Packages

Step 1: Close the Visual Studio 2019.

Step 2: Run the Visual Studio 2019  as Administrator.  Right click on your VS product and select Run as administrator.

Step 3: Select Visual C# or Visual Basic, Select Windows Form Application.

Step 4: Select your project in Solution Explorer, Right click the mouse, select Manage NuGet Packages...

This brings up the NuGet Package Manager, enter "scannerpro" in search textbox , then select Viscomsoft.ScannerProControl.WinForms.x86 package and click Install button.

 

Step 6: Now you will see DllRegisterServer in scanner.ocx successful Message Box. If not, you should close the Visual Studio 2019. Run the Visual Studio 2019  as Administrator again.

 


Step 7: Select Toolbox, select Components item, right click mouse button, select Choose Items...


Step 8:  Select COM Components tab, select Scanner Pro Control , click OK.

 

Step 9: Now the Scanner Pro SDK ActiveX Control's icon will display on Toolbox.

Step 10:  Drag the Scanner Pro SDK ActiveX Control from toolbar to form and add button to form. Change the caption of button to Scan and add another button to form. Change the caption of button to Save.

 

Step 11:  Double click the Scan button. Add the below code on button1_Click.

 private void button1_Click(object sender, EventArgs e)

{

     bool bResult= this.axScanner1.SelectImageSource();

 

      if (!bResult)

        return;

 

     this.axScanner1.Scan();       

}

Step 12: Double click the Save button. Add the below code on button1_Click.

 private void button2_Click(object sender, EventArgs e)

{

this.axScanner1.View = 5;

        this.axScanner1.PDFOutputPDFA = true;

        SaveFileDialog SaveFileDialog1 = new SaveFileDialog();

SaveFileDialog1.Filter = "PDF File (*.pdf)|*.pdf";

 

if (SaveFileDialog1.ShowDialog(this) == DialogResult.OK)

        {

          bool bResult = this.axScanner1.SaveAllPage2PDF(SaveFileDialog1.FileName, true, 1);

        }

 

Step 13: Press F5 to Run the project. Click the scan button, it will capture the image from scanner. Click the scan button few times, then click Save button, It will output PDF/A file.

Download more Samples from  https://github.com/Viscomsoft/Scanner-TWAIN-Pro-SDK-ActiveX