-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I needed a tool to specify a different DPI than what the UI offered and this tool saved the day!
My environment: MacOS Sonoma 14.4.1
I had a minor issue when I used this tool for the first time. I didn't realize that I also had preview app attempting to import from the scanner. The error message wasn't obvious. See below
➜ ~ scanline -list
Available scanners:
* HP Color LaserJet MFP M283cdw (F8D366)
Done
➜ ~
➜ ~ scanline -flatbed -name s_pp.pdf -resolution 100
Error received while attempting to open a session with the scanner.
Failed to scan document.
Done
➜ ~ scanline -flatbed -name s_pp.pdf -resolution 100 -scanner "HP Color LaserJet MFP M283cdw (F8D366)"
Error received while attempting to open a session with the scanner.
Failed to scan document.
Done
➜ ~ scanline -flatbed -name s_pp.pdf -resolution 100 -scanner "HP Color LaserJet MFP M283cdw (F8D366)" -verbose
Browsing for scanners.
Waiting up to 10.0 seconds to find scanners
Added device: {
UUIDString = "564E4252-5037-5330-3651-6C02E0F8D366";
autolaunchApplicationPath = "";
class = ICScannerDevice;
connectionID = 0x00000000;
delegate = "<0x0>";
deviceID = 0x00000000;
deviceRef = 0x100001f0;
iconPath = "(null)";
locationDescription = "HP Color LaserJet MFP M283cdw (F8D366)";
moduleExecutableArchitecture = 0;
modulePath = "/System/Library/Image Capture/Devices/AirScanScanner.app";
moduleVersion = "1.0";
name = "HP Color LaserJet MFP M283cdw (F8D366)";
persistentIDString = "564E4252-5037-5330-3651-6C02E0F8D366";
shared = NO;
softwareInstallPercentDone = "0.000000";
transportType = ICTransportTypeTCPIP;
type = 0x00000402;
} availableFunctionalUnitTypes :
selectedFunctionalUnit : (null) <0x0>
transferMode : ICScannerTransferModeFileBased
downloadsDirectory : file:///Users/srikant/Pictures/
documentName : Scan
documentUTI : public.tiff
Done searching for scanners
Found scanner: HP Color LaserJet MFP M283cdw (F8D366)
Opening session with scanner
didOpenSessionWithError: The operation couldn’t be completed. (com.apple.imagecapture error 4294967249.)
Error received while attempting to open a session with the scanner.
Failed to scan document.
Done
Once I figured this out and shutdown/closed the preview app and retried, everything worked as expected.
I am able to consistently reproduce this issue
- Ensure scanner is in use from another application. for ex.,
- open
previewand perform import from scanner operation Printers & Scanners--> select printer/scanner -->Open Scanner
- open
- Run
scanlinefrom terminal --> error message shown above - Terminate app using scanner (from Step 1)
- Run
scanlinefrom terminal --> successful scan
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels