<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Allan,<br>
<br>
&nbsp;&nbsp;&nbsp; Thanks.&nbsp; I've added a "Multi-page" checkbox to my interface and
that part works fine; when it's checked and I'm scanning with a ADF, I
get all pages and drop out of the loop after the last page.&nbsp; When the
box is not checked, I can scan with the flatbed and exit the loop after
the scan.&nbsp; Problem is, if the box is checked while I'm using the
flatbed, it just goes back and scans the same page again.&nbsp; I should put
a "Place next page on scanner" modal dialog box in the loop . . . but .
. . if I do that, then the user gets the dialog box between each page
even when using an ADF.&nbsp; No fun if you're scanning a 50 page document!&nbsp;
The only way I can think of to get around this is to _know_ whether or
not an ADF's in use.&nbsp; You say there isn't any way?&nbsp;&nbsp; Here's my code:<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; do {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; status = [sane Scan];<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (status == SANE_STATUS_NO_DOCS)<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NSImage * image = [sane GetCurrentImage];<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [imageStore addObject: image];<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [DisplayImage setImage: image];<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [DisplayImage display];<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; currentPageNumber++;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } while (status == SANE_STATUS_EOF &amp;&amp; isMultiPage);<br>
<br>
Regards,<br>
<br>
Mark<br>
</tt>
<br>
************<br>
<br>
m. allan noah wrote:
<blockquote
 cite="mid:97246d0e0905271641p50a48164y1c6ef345666f31f0@mail.gmail.com"
 type="cite">
  <pre wrap="">you cannot know, and you should not assume that just because a user
has an adf that they want to scan all sheets. ask them.

allan

On Wed, May 27, 2009 at 6:07 PM, Mark Pemburn <a class="moz-txt-link-rfc2396E" href="mailto:mark@pemburn.com">&lt;mark@pemburn.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi y'all,

&nbsp; Just got a Fujitsu fi-5120Cdj to play with and the contrast with my little
Canon has provided a great education as I compare the features exposed by
the SANE back ends. &nbsp;The Fujitsu is a sheetfeed-only scanner and the Canon
is a flatbed-only. &nbsp;I have learned how to scan multi-page documents by
looping over my "Scan" routine while the status is SANE_STATUS_EOF --
however, this won't work for the flatbed because it returns that same status
when it's done. &nbsp;Unless there's something I'm missing, it looks like the
only way I can differentiate between the two actions is to have some way to
tell whether I'm using an ADF or not. &nbsp;The "type" member of the SANE_Device
structure for the Canon is "flatbed scanner" and the Fujitsu merely says
"scanner" so that's no help. &nbsp;The only other thing is to test whether the
substring "ADF" appears in the currently selected "source" option but this
seems kind of bogus. &nbsp;Any suggestions?

Regards,

Mark

--
sane-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sane-devel@lists.alioth.debian.org">sane-devel@lists.alioth.debian.org</a>
<a class="moz-txt-link-freetext" href="http://lists.alioth.debian.org/mailman/listinfo/sane-devel">http://lists.alioth.debian.org/mailman/listinfo/sane-devel</a>
Unsubscribe: Send mail with subject "unsubscribe your_password"
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;to <a class="moz-txt-link-abbreviated" href="mailto:sane-devel-request@lists.alioth.debian.org">sane-devel-request@lists.alioth.debian.org</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->


  </pre>
</blockquote>
<br>
</body>
</html>