Giter Club home page Giter Club logo

swiftescl's People

Contributors

leoklaus avatar

Stargazers

 avatar

Watchers

 avatar

swiftescl's Issues

Problem working with AirSane

Hello! I am having an issue using this on an iPad (MYFY2LL/A, 16,4,1(a) ) and communicating with an AirSane instance (https://github.com/SimulPiscator/AirSane.) My AirSane instance does work on my Mac mini M2 with macOS Ventura 13.2.1.

When I launch OpenAirScan, it finds the scanner, but it just shows a spinner for the space where the icon would be, and when I click on the scanner, the next page has no options. Clicking 'Custom Scan' and then 'Start scan!' just brings up an red banner stating 'the scanner is busy!'

IMG_0220

IMG_0221

I have checked the URLs and they are using self-signed certificates, but I am able to access them with the iPad. Here is the output from Bonjour (via the Discovery app) for the scanner along with the XML from the ScannerCapabilities endpoint.

_uscans._tcp. - 1 item
FUJITSU fi-6110dj
officepi.local.
192.168.50.5:4443
192.168.99.10:4443
txtvers=1
vers=2.0
pdl=application/pdf,image/jpeg,image/png
ty=FUJITSU fi-6110dj
note=2nd Floor Office
uuid=561ca374-a30b-5d55-b459-632579be635e
rs=561ca374-a30b-5d55-b459-632579be635e
cs=grayscale,color
is=adf
duplex=T
adminurl=https://officepi.duplexx.net:4443/561ca374-a30b-5d55-b459-632579be635e
representation=https://officepi.duplexx.net:4443/561ca374-a30b-5d55-b459-632579be635e/ScannerIcon
<scan:ScannerCapabilities xmlns:pwg="http://www.pwg.org/schemas/2010/12/sm" xmlns:scan="http://schemas.hp.com/imaging/escl/2011/05/03">
<pwg:Version>2.0</pwg:Version>
<pwg:MakeAndModel>FUJITSU fi-6110dj</pwg:MakeAndModel>
<pwg:SerialNumber>1.0</pwg:SerialNumber>
<scan:UUID>561ca374-a30b-5d55-b459-632579be635e</scan:UUID>
<scan:AdminURI>
https://officepi.duplexx.net:4443/561ca374-a30b-5d55-b459-632579be635e
</scan:AdminURI>
<scan:IconURI>
https://officepi.duplexx.net:4443/561ca374-a30b-5d55-b459-632579be635e/ScannerIcon
</scan:IconURI>
<scan:Adf>
<scan:AdfDuplexInputCaps>
<scan:MinWidth>0</scan:MinWidth>
<scan:MinHeight>0</scan:MinHeight>
<scan:MaxWidth>2550</scan:MaxWidth>
<scan:MaxHeight>3300</scan:MaxHeight>
<scan:MaxPhysicalWidth>2550</scan:MaxPhysicalWidth>
<scan:MaxPhysicalHeight>3300</scan:MaxPhysicalHeight>
<scan:MaxScanRegions>1</scan:MaxScanRegions>
<scan:SettingProfiles>
<scan:SettingProfile name="0">
<scan:ColorModes>
<scan:ColorMode>Grayscale8</scan:ColorMode>
<scan:ColorMode>RGB24</scan:ColorMode>
</scan:ColorModes>
<scan:ColorSpaces>
<scan:ColorSpace>RGB</scan:ColorSpace>
</scan:ColorSpaces>
<scan:SupportedResolutions>
<scan:DiscreteResolutions>
<scan:DiscreteResolution>
<scan:XResolution>50</scan:XResolution>
<scan:YResolution>50</scan:YResolution>
</scan:DiscreteResolution>
<scan:DiscreteResolution>
<scan:XResolution>75</scan:XResolution>
<scan:YResolution>75</scan:YResolution>
</scan:DiscreteResolution>
<scan:DiscreteResolution>
<scan:XResolution>150</scan:XResolution>
<scan:YResolution>150</scan:YResolution>
</scan:DiscreteResolution>
<scan:DiscreteResolution>
<scan:XResolution>300</scan:XResolution>
<scan:YResolution>300</scan:YResolution>
</scan:DiscreteResolution>
<scan:DiscreteResolution>
<scan:XResolution>600</scan:XResolution>
<scan:YResolution>600</scan:YResolution>
</scan:DiscreteResolution>
</scan:DiscreteResolutions>
</scan:SupportedResolutions>
<scan:DocumentFormats>
<pwg:DocumentFormat>application/pdf</pwg:DocumentFormat>
<pwg:DocumentFormat>image/jpeg</pwg:DocumentFormat>
<pwg:DocumentFormat>image/png</pwg:DocumentFormat>
</scan:DocumentFormats>
</scan:SettingProfile>
</scan:SettingProfiles>
<scan:SupportedIntents>
<scan:SupportedIntent>TextAndGraphic</scan:SupportedIntent>
<scan:SupportedIntent>Photo</scan:SupportedIntent>
</scan:SupportedIntents>
</scan:AdfDuplexInputCaps>
<scan:AdfOptions>
<scan:AdfOption>DetectPaperLoaded</scan:AdfOption>
</scan:AdfOptions>
</scan:Adf>
</scan:ScannerCapabilities>

Thanks for any help you can provide!

SwiftESCL in NSViewController

Hello,,

I need to use SwiftESCL in a NSViewController but it's impossible to use @State :

import Cocoa
import Foundation
import SwiftESCL
import SwiftUI
import AppKit

class ViewController: NSViewController {

    @State var discoveredDevices: [String:ScannerRepresentation] = [:]
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let button = NSButton(frame: NSRect(x: 150, y: 200, width: 80, height: 55))
        button.title =  "A button in code"
        self.view.addSubview(button)
        button.target = self
        button.action = #selector(buttonTest)
        
        let browser = Browser(usePlainText: true)
        // The string contains the hostname of the device, which should be sufficient to uniquely identify it.
        //@State var discoveredDevices: [String:SwiftESCL.ScannerRepresentation] = [:]
        // As the discovery runs asynchronously, it's easiest to just pass the dictionary as binding
        browser.setDevices(scanners: $discoveredDevices)
        // Now you just have to start the browser to discover devices:
        browser.start()

        // Do any additional setup after loading the view.
    }
    
    @objc func buttonTest() {
        print("Test button")
        print(discoveredDevices.count)
    }

    override var representedObject: Any? {
        didSet {
        // Update the view, if already loaded.
        }
    }
}

Thanks

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.