-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Describe the bug
When connecting to an ADF-only eSCL/AirScan scanner, ScanBridge fails to fetch scanner capabilities and throws an exception:
IllegalArgumentException: Required element not found: scan:Platen
This happens because the parser expects a <scan:Platen> element, which is absent on ADF-only devices. According to the eSCL specification, a scanner may expose only <scan:Adf> if it has no flatbed/platen.
To Reproduce
Steps to reproduce the behavior:
- Open ScanBridge
- Connect to an ADF-only eSCL/AirScan scanner (e.g., Brother DS‑940DW)
- Attempt to fetch scanner capabilities
- Observe the exception during parsing
Expected behavior
ScanBridge should:
- Accept scanners that expose only
<scan:Adf> - Handle the absence of
<scan:Platen>gracefully - Allow scanning via the ADF
Screenshots
Not applicable (the failure occurs during capability fetch, no UI screenshot available)
Smartphone (please complete the following information):
- Device: [Redacted / Your device, e.g., Pixel 7]
- Android version: [e.g., 14]
- ScanBridge version: [e.g., 22]
Additional context
Redacted eSCL ScannerCapabilities XML (identifiers anonymized):
<?xml version="1.0" encoding="UTF-8"?>
<scan:ScannerCapabilities
xmlns:scan="http://schemas.hp.com/imaging/escl/2011/05/03"
xmlns:pwg="http://www.pwg.org/schemas/2010/12/sm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<pwg:Version>2.63</pwg:Version>
<pwg:MakeAndModel>DS-940DW</pwg:MakeAndModel>
<pwg:SerialNumber>REDACTED</pwg:SerialNumber>
<scan:UUID>REDACTED</scan:UUID>
<scan:AdminURI>http://scanner.local/</scan:AdminURI>
<scan:Adf>
<scan:AdfSimplexInputCaps>
<!-- capabilities omitted for brevity -->
</scan:AdfSimplexInputCaps>
<scan:AdfDuplexInputCaps>
<!-- capabilities omitted for brevity -->
</scan:AdfDuplexInputCaps>
</scan:Adf>
<!-- Note: No <scan:Platen> element is present, as this is an ADF-only device -->
</scan:ScannerCapabilities>Suggested fix:
- Treat
<scan:Platen>as optional - Accept scanners that expose only
<scan:Adf> - Avoid failing capability parsing when platen support is absent
Metadata
Metadata
Assignees
Labels
No labels