Page 1 of 1

Duplex ADF scanning returning 2 of the first side only on HP ScanJet Enterprise Flow 5000 scanner

Posted: Thu Jul 22, 2021 7:54 pm
by aaron
We are experiencing an issue where the method TwainAcquireToGdPictureImage returns 2 pages but each of only the first side of a two sided document when scanning using Duplex on the HP ScanJet Enterprise Flow 5000 s4 ADF scanner. This is not an issue on other scanners with duplex scanning, but is a consistent one for this HP scanner. I have opened a ticket with you all but was hoping maybe to either see if there is a known issue or at least have it documented incase others experience this aswell. Below is the code we are using:

Code: Select all

using (GdPictureImaging gdpi = new GdPictureImaging())
      {
        if (TWAINDSMLocation.Length > 0)
        {
          gdpi.TwainSetDSMPath(TWAINDSMLocation);
        }

        if (gdpi.TwainOpenDefaultSource(0))
        {
          gdpi.TwainSetHideUI(!displayScannerOptions);
          gdpi.TwainSetAutoFeed(true);
          gdpi.TwainSetAutoScan(true);

          do
          {
            // acquire initial page
            imageID = gdpi.TwainAcquireToGdPictureImage(0);

            if (imageID != 0)
            {
              pageCount++;

              if (pageCount == 1)
              {
                // if first page, create multipage file on disk
                multiPageID = imageID;

                gdpi.TiffSaveAsMultiPageFile(imageID, localFileName, compression);
              }
              else
              {
                // add subsequent pages to multipage file
                gdpi.TiffAddToMultiPageFile(multiPageID, imageID);
                gdpi.ReleaseGdPictureImage(imageID);
              }
            }
  
          } while (gdpi.TwainGetState() > TwainStatus.TWAIN_SOURCE_ENABLED);

          gdpi.TwainCloseSource();
          gdpi.TiffCloseMultiPageFile(multiPageID);
          gdpi.ReleaseGdPictureImage(multiPageID);
}

Re: Duplex ADF scanning returning 2 of the first side only on HP ScanJet Enterprise Flow 5000 scanner

Posted: Wed Aug 04, 2021 4:49 pm
by Hugo
Hi Aaron,

Thank you for your feedback and for thinking how this may also help others who run into similar issues.

To resolve your issue, I would first highly recommend checking you have the latest drivers for your scanner installed.
Thanks for your code sample however would you be able to test this within our demo application here please? C:\GdPicture.NET 14\Samples\WinForm\C#\TWAIN Scanning\
This is to make sure it is not an issue within the code.

Please let me know if your issue persists.

Regards,
Hugo