Giter Site home page Giter Site logo

scanadf2docspell's People

Contributors

dependabot[bot] avatar eresturo avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

maztapee

scanadf2docspell's Issues

Please migrate to scanimage

Hi,

on the distro I use is not scanadf (sane-frontends package with scanadf) available. I'm also unable to get the required patch for sane.

However scanimage is still maintained, available on Arch and uses almost the same paramters as scanadf, but the ppm format isn't supported.
Supported formats are pnm|tiff|png|jpeg|pdf.

I replaced scanadf with scanimage and added format parameter and it failed at converting to pdf.

./scan.py --device epson2:libusb:001:009                      1 ✘ 
scan all pages using color mode: "Gray" and source: Automatic Document Feeder ...
scanimage --format=pnm -d epson2:libusb:001:009  --mode Gray --source "Automatic Document Feeder" --resolution 300 -o "scans/"9a866e34-e05e-11ec-801d-144f8a790aae"_%04d.ppm "
Preprocess all pages...: 100%|█████████████████████████████████████████████████████████| 1/1 [00:00<00:00,  1.46it/s]
combine to one pdf...
Traceback (most recent call last):
  File "/home/may/github/scanadf2docspell/./scan.py", line 69, in <module>
    main(config=args)
  File "/home/may/github/scanadf2docspell/./scan.py", line 25, in main
    exporter.save_as_pdf(pages)
  File "/home/may/github/scanadf2docspell/src/exporter.py", line 25, in save_as_pdf
    f.write(img2pdf.convert(image_names, layout_fun=layout_fun_a4, viewer_center_window=True))
  File "/usr/lib/python3.10/site-packages/img2pdf.py", line 2360, in convert
    ) in read_images(
  File "/usr/lib/python3.10/site-packages/img2pdf.py", line 1537, in read_images
    im = BytesIO(rawdata)
TypeError: a bytes-like object is required, not 'str'

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.