Giter Site home page Giter Site logo

windows-virtual-scanner's Introduction

Windows Virtual Scanner

The project is ported from twain-samples.

Pre-requisites

  • Visual Studio 2017 or above
  • Qt 5.12.11 msvc2017

Environment Setup

  • Add system variable QTDIR: msvc2017 (x86) or msvc2017_64 (x64) Qt system variable
  • If you have multiple Qt Kit directories in system path, move the target kit directory ahead of others. Otherwise, when running windeployqt.exe to deploy a Qt project, it will fail to copy the correct dll files. Qt kit path

How to Build

  1. Start Visual Studio as administrator.
  2. Open TWAIN-Samples\Twain_DS_sample01\visual_studio\TWAINDS_VS2017.sln.
  3. Build the project. The relevant files will be copied to C:\Windows\twain_32\sample2\.

How to Test

How to Debug

  1. Run twacker.

  2. In Visual Studio, set a breakpoint in DS_Entry() and then go to Debug > Attach to Process to find the twacker process.

    attach TWAIN DS to twacker

  3. Click the Attach button and then select the virtual scanner to trigger debugging.

    Debug TWAIN virtual scanner

How to Load Custom Image Set

  1. Create a source.json file which contains the folder of custom image set. For example:

    {
        "folder": "C:/Users/admin/Pictures/barcode"
    }

    Copy the JSON file to C:\Windows\twain_32\sample2.

  2. In the folder of custom image set, create a info.json file which contains the index of current selected file and max image count for ADF:

    {
        "index": 0,
        "maxcount": 10
    }
  3. Use twacker to scan the custom images one by one. The index will be auto-updated if your folder have Write permission.

    Windows virtual scanner with custom image set

Blog

How to Build Windows Virtual Scanner and Feed Custom Images

windows-virtual-scanner's People

Contributors

mlmcl62 avatar mihailmikov avatar yushulx avatar kenya31 avatar kolomiets avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.