roncapat / WSD-python

Web Services for Devices (WSD) tools and utilities for cross platform support
GNU General Public License v3.0
32 stars 3 forks source link

I have been updating a Scanner GUI #7

Open markosjal opened 5 years ago

markosjal commented 5 years ago

I have been updating a scanner Web GUI that I made for several models of orphaned scanners thanks to a command line binary. Recently I added eSCL/AirScan support, meaning that it can take advantage of and now use eSCL Scanners. Not only that . It should also allow the orphaned scanners to be available via AirScan (by way of the Linux host). The scanner web GUI offers some quick edit tools (imagemagick) like Grayscale. PDF (the orphaned scanners only to JPG in color), and a cropping tool by way of jcrop. Aside from the quickedit tools the latest version integrates Tui Image Editor. I figure I am in the testing Phase for scanner compatibility. I know there are remaining issues elsewhere they are just things That I need to deal with after making way for GUI changes and eSCL .

What I need to say is that this project is interesting . It is similar to those that originally had me interested in eSCL but in the case of eSCL I did not find any python projects that were actually mature enough. They all had issues, and I ended up writing it all in php. So if I implemented this to my Web GUI project for a WSD scanner (that did not support eSCL/AirScan), my Web GUI could also make it available as an AirScan scanner.

I am also interested in going the other way too however and have an orphaned or eSCL scanner be abailable as a WSD device if that is even possible. I do not believe that there is any WSD advertising available in linux yet.

For now I wish you luck and hope you have great success and can do broad testing , as I do not have a WSD scanner to test with . Using your python code would make it a no-brainer.

I do not understand why the Linux SANE projects lag so far behind when it comes to new scanner technology and why the support is so limited. they do a wonderful job on USB, Parallel, and Net scanners why did they never implement the ability to use an external command line at all? I hope that the Fred, Wilma, Barney and Betty at the SANE project wake up soon so they can get from the Flintstones to the Jetsons . Airscan has been on OSX and iOS for years now and SANE still has not woke up to it.

roncapat commented 5 years ago

Hi! An eSCL-to-WSD adapter could be doable, but I need to learn more about eSCL.

Do you have any reference for the protocol?

BTW, I plan to implement WSD proxy and also WSD device (currently, I only developed a WSD client). It would be very interesting to play around similar protocols. Note: WSD device API would be necessary for the bridge/adapter you're talking about, so you just gave me another good reason to implement it!

Thanks for the encouragement!

markosjal commented 5 years ago

write me at markosjal at the email with a G I have some things for you

markosjal commented 5 years ago

Thinking about the bridge idea.....

I wanted to let you know as I have been digging around in the small incoherent number eSCL protocol docs I found what is pasted below in this doc: ftp://ftp.pwg.org/pub/pwg/candidates/cs-sm20-scan10-20090410-5108.02.pdf

I also found this and maybe you know abou it already? https://github.com/RunasSudo/pyWSDscan

18 Apendix A – WS-Scan protocol mapping This model can be mapped onto Microsoft’s WS-Scan protocol. The intent is not to map all of the PWG Model but to map those parts of the PWG model that overlap the WS-Scan model. There are a number of mapping issues that must be addressed. Below is a summary of some of those mapping issues. This list is not meant to be exhaustive but does help clarify the WS-Scan mapping.

  1. The target namespace must be Microsoft’s and not the target namespace in the PWG’s WSDL and schema files associated with this specification.
  2. The PWG model for the transfer of scan data is a push model (i.e. the Scan Service delivers the scan data to a location specified by the requesting client). Microsoft uses a pull model where the scan data is retrieved by an explicit operation (i.e. RetrieveImage). a. Although the PWG operation model does not include this operation it is possible to provide this extended operation. b. The information required for the retrieving the Image (i.e. DestinationToken) can be held in an extension to the PWG Destination element. c. The PWG Model does not specify scan events. WS-Scan requires an event to coordinate the timely delivery of scan data to the WS-Scan client. This can be handled through protocol binding specific extensions. The PWG model does represent the state transition required to trigger the ScanAvailableEvent
  3. There are a number of PWG elements that have the same semantics and syntax as associated WS-Scan elements. They differ only in the element name. Below are the PWG elements and the associated WSScan elements a. PWG “ScanService” maps to WS-Scan “Scanner” b. PWG “CurrentTime” maps to WS-Scan “ScannerCurrentTime” c. PWG “ServiceName” maps to WS-Scan “ScannerName” d. PWG “ServiceInfo” maps to WS-Scan “ScannerInfo” e. PWG “ScanService.ScanServiceCapabilities” maps to WS-Scan “Scanner.ScannerConfiguration.DeviceSettings” i. PWG “DocumentFormat” maps to WS-Scan “FormatSupported” ii. PWG “DocumentSizeAutoDetect” maps to WS-Scan “DocumentSizeAutoDetectSupported” iii. PWG “Brightness” maps to WS-Scan “BrightnessSupported” iv. PWG “Contrast” maps to WS-Scan “ContrastSupported” v. PWG “Rotation” maps to WS-Scan “RotationSupported” PWG 5108.02-2009 MFD: Scan Service April 10, 2009 Copyright © 2007-2009, Printer Working Group. All rights reserved. Page 120 of 120 vi. PWG “CompressionQualityFactor” maps to WS-Scan “CompressionQualityFactorSupported” f. PWG “ImagesCompleted” maps to WS-Scan “ScansCompleted” g. PWG “DateTimeAtCreation” maps to WS-Scan “JobCreatedTime” h. PWG “DateTimeAtCompleted” maps to WS-Scan “JobCompletedTime” i. PWG “ScanService.ScanServiceCapabilities.ScanDocumentProcessing.sides” maps to WS-Scan “Scanner.ScannerConfiguration.ADF.SupportsDuplex” j. PWG “ScanService.DefaultScanJobTicket.ScanDocumentProcessing” maps to WS-Scan “Scanner.DefaultScanTicket.DocumentParameters” k. PWG “ScanJob.ScanJobReceipt” maps to WS-Scan “Job.Document.DocumentFinalParameters”
  4. There are some items whose syntax differ but the semantics are directly mapped a. PWG “ScanService.ScanServiceConfiguration.ScanMediaPaths” (“ScanMediaPathType”) maps to WS-Scan “Scanner.ScannerConfiguration.[Platen, ADF, Film]” i. PWG “ScanMediaPathMaxMediaSizeName” and “ScanMediaPathMaxMediaSizeName” that use self describing media names maps to WS-Scan “Min” and “Max” sizes for Platen, ADF and Film that use “Height” and Width” b. PWG ScanService.ScanServiceConfiguration.Scanner.ScannerStatus.Addressabilties” maps to WS-Scan OpticalResolution for ADF, Platen and Film