You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
In the current version of NAPS2, it is not possible to configure additional scan options supported by the device and the SANE library. Specifically, there is a need for settings such as paper-protect and df-action.
While the SaneOptionController.cs file already includes the TrySet method, which allows working with these options, its use is restricted because the class and related components have the internal access modifier. This makes it impossible to configure advanced options without modifying the NAPS2 source code.
Why This Matters
Adding support for extended scan options would:
Simplify working with devices that support specific SANE parameters.
Avoid the need to modify the library source code, making it easier to update via NuGet.
Expand functionality for Linux users while maintaining compatibility wwith existing standard options.
Proposed Solution
Add a newproperty to the ScanOptions.cs, such as a dictionary Dictionary<string, string> (KeyValueScanOptions??), to allow specifying additional SANE options.
This property could be used to pass custom parameters to SaneOptionController.TrySet, which already handles such configurations.
Alternative Solutions
Extend the public API to make to work with some internal classes.
Add a more flexible system for configuring SANE options within the existing interface, such as by enabling direct registration of supported parameters.
Benefits
This feature would provide greater flexibility and convenience for a broader range of users.
It would preserve the ability to update the library via NuGet without requiring source code changes.
Thank You
Thank you for providing such an excellent library! I hope this suggestion will be helpful.
The text was updated successfully, but these errors were encountered:
yozhikov13
changed the title
Extended Scan Options fo Linux/SANE
Extended Scan Options for Linux/SANE
Jan 24, 2025
Problem
In the current version of NAPS2, it is not possible to configure additional scan options supported by the device and the SANE library. Specifically, there is a need for settings such as
paper-protect
anddf-action
.While the
SaneOptionController.cs
file already includes theTrySet
method, which allows working with these options, its use is restricted because the class and related components have theinternal
access modifier. This makes it impossible to configure advanced options without modifying the NAPS2 source code.Why This Matters
Adding support for extended scan options would:
Proposed Solution
Add a newproperty to the
ScanOptions.cs
, such as a dictionaryDictionary<string, string>
(KeyValueScanOptions??
), to allow specifying additional SANE options.Example:
This property could be used to pass custom parameters to
SaneOptionController.TrySet
, which already handles such configurations.Alternative Solutions
internal
classes.Benefits
Thank You
Thank you for providing such an excellent library! I hope this suggestion will be helpful.
The text was updated successfully, but these errors were encountered: