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

Discussions about image processing and document imaging.
Post Reply
aaron
Posts: 1
Joined: Thu Jul 22, 2021 7:48 pm

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

Post by aaron » Thu Jul 22, 2021 7:54 pm

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);
}

Hugo
Posts: 113
Joined: Tue Dec 18, 2018 10:09 am

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

Post by Hugo » Wed Aug 04, 2021 4:49 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest