Giter Site home page Giter Site logo

denysvitali / airscan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stapelberg/airscan

0.0 1.0 0.0 39 KB

Go package to scan paper documents ๐Ÿ“„ from a scanner ๐Ÿ–จ๏ธ via the network ๐Ÿ•ธ๏ธ using the Apple AirScan (eSCL) protocol.

License: Apache License 2.0

Go 100.00%

airscan's Introduction

GitHub Actions CI Go Report Card PkgGoDev

airscan ๐Ÿ“„ ๐Ÿ–จ๏ธ ๐Ÿ•ธ๏ธ

The airscan Go package can be used to scan paper documents ๐Ÿ“„ from a scanner ๐Ÿ–จ๏ธ via the network ๐Ÿ•ธ๏ธ using the Apple AirScan (eSCL) protocol.

Getting started: example program

First, install the example program coming with this package:

go get -v github.com/stapelberg/airscan/cmd/airscan1

Then, query the local network for AirScan compatible devices:

% airscan1
2020/08/16 08:50:31 finding airscan-compatible devices for 1s
2020/08/16 08:50:31 device "Brother MFC-L2750DW series" discovered (use -host="BRW405BD8AxxDyz")

Now, I can scan the contents of the flatbed scanner:

% airscan1 -host=BRW405BD8AxxDyz
2020/08/16 08:52:44 finding device for 5s (use -timeout=0 for unlimited)
2020/08/16 08:52:45 device "Brother MFC-L2750DW series" found in 298.151935ms
2020/08/16 08:52:51 scan done in 6.738205326s

โ€ฆor the page(s) inserted into the Automatic Document Feeder (ADF):

% airscan1 -host=BRW405BD8A10D7C -source=adf
2020/08/16 11:10:34 finding device for 5s (use -timeout=0 for unlimited)
2020/08/16 11:10:34 device "Brother MFC-L2750DW series" found in 112.127399ms
2020/08/16 11:10:45 wrote /tmp/page12.jpg (211305 bytes)
2020/08/16 11:10:47 wrote /tmp/page13.jpg (139335 bytes)
2020/08/16 11:10:47 scan done in 13.068799513s

โ€ฆor the page(s) from ADF, colored, and as single PDF file output:

% airscan1 -host=HPFXXXXXXXXXXXX -source adf -color RGB24 -format "application/pdf"
2021/04/04 00:12:13 finding device for 5s (use -timeout=0 for unlimited)
2021/04/04 00:12:14 device "HP OfficeJet Pro 9010 series" found in 315.486148ms
2021/04/04 00:14:07 wrote /tmp/page5.pdf (123456 bytes)
2021/04/04 00:14:07 scan done in 1m53.772520178s

Getting started: using the package in your program

See the package airscan examples in godoc for how to use the package to scan.

See airscan1.go for a full example scan program, including network service discovery, timeouts, and writing scan data to files.

Project status

The package does what I needed: grayscale/color scan of A4 documents from the flat bed or the automatic document feeder (ADF).

If you have any improvements, Iโ€™d be happy to review a pull request. Please see the contribution guidelines.

Tested devices

If you successfully scanned documents from your device using the airscan1 example program as described above, please send a pull request to include your report in this table for the benefit of other interested users:

Device Name Working features Known issues
Brother MFC-L2710DN flat bed scan, automatic document feeder scan must be run with -duplex=false
Brother MFC-L2750DW flat bed scan, automatic document feeder scan
Canon G3560 flat bed scan, color: RGB24
Epson XP-7100 flat bed scan, automatic document feeder scan must be run with -duplex=false for flat bed scanning; also needs -skip_cert_verify
HP Laserjet M479fdw flat bed scan, automatic document feeder scan
HP OfficeJet Pro 9010 series flat bed scan, automatic document feeder scan, color: RGB24

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.