Skip to content

Commit

Permalink
Improved duplex scanning
Browse files Browse the repository at this point in the history
Hopefully fixed the issue causing duplex scans to not actually scan duplex.

Also duplex scanning should now allow for up to 10 actual pages to be processed by the scanner, not just 5 pages.
  • Loading branch information
simon-knuth committed Dec 3, 2021
1 parent 80fa2dd commit 64b064c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Scanner.Package/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Identity
Name="9390SimonKnuth.ScannerforWindows10"
Publisher="CN=757034B5-C251-4A1E-BCA4-C0C9D29C0508"
Version="3.0.1.0" />
Version="3.0.2.0" />

<mp:PhoneIdentity PhoneProductId="584d67fc-bc8c-485b-bac0-4cbbf6609860" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
28 changes: 24 additions & 4 deletions Scanner/Models/DiscoveredScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,33 @@ public void ConfigureForScanOptions(ScanOptions options)
Device.FeederConfiguration.AutoCroppingMode = options.GetAutoCropModeForScanner();
}

// max number of pages
if (options.FeederMultiplePages) Device.FeederConfiguration.MaxNumberOfPages = 10;
else Device.FeederConfiguration.MaxNumberOfPages = 1;

// duplex
Device.FeederConfiguration.Duplex = options.FeederDuplex;

// max number of pages
if (options.FeederMultiplePages)
{
if (Device.FeederConfiguration.Duplex)
{
Device.FeederConfiguration.MaxNumberOfPages = 20;
}
else
{
Device.FeederConfiguration.MaxNumberOfPages = 10;
}
}
else
{
if (Device.FeederConfiguration.Duplex)
{
Device.FeederConfiguration.MaxNumberOfPages = 2;
}
else
{
Device.FeederConfiguration.MaxNumberOfPages = 1;
}
}

// brightness
if (options.Brightness != null)
{
Expand Down
2 changes: 1 addition & 1 deletion Scanner/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Identity
Name="9390SimonKnuth.ScannerforWindows10"
Publisher="CN=757034B5-C251-4A1E-BCA4-C0C9D29C0508"
Version="3.0.1.0" />
Version="3.0.2.0" />

<mp:PhoneIdentity PhoneProductId="584d67fc-bc8c-485b-bac0-4cbbf6609860" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down

0 comments on commit 64b064c

Please sign in to comment.