Author |
Topic  |
|
jsands
3 Posts |
Posted - Jul 18 2012 : 13:49:47
|
I have a Canon DR-2010C scanner and I am trying to use the MIO.TwainParams.AutoDiscardBlankPages to Duplex scan and skip blank pages. The scanner is capable of this function from the Acquisition Dialog. It has a Scanning Side drop down with "Simplex", "Duplex", "Skip Blank Page", and "Folio". I can change between Simplex and Duplex using the duplexenabled property and that works correctly, changing Simplex and Duplex on the Acquisition Dialog. When the Scanning Side is set to SkipBlankPage it enables a setting button that allows you to set the content density so the scanner must support the byte size cutoff. How can I get these settings to work with code?
Thanks
|
|
fab
   
1310 Posts |
Posted - Jul 18 2012 : 14:16:15
|
If the scanner supports AutoDiscardBlankPages you could just set using two ways:
// The scanner will decide if an image is blank or not and discard as appropriate ImageEnMView.MIO.TwainParams.AutoDiscardBlankPages := Twain_AutoDiscard_DiscardBlank;
..or..
// The scanner will use the value as the byte size cutoff point to identify which images to discard. ImageEnMView.MIO.TwainParams.AutoDiscardBlankPages := ...a value > 0...; |
 |
|
jsands
3 Posts |
Posted - Jul 18 2012 : 17:03:39
|
The scanner supports duplex scanning and it supports "Skip Blank Page". The code example you provided will set the AutoDiscardBlankPages to the various values (-2,-1,0 and up). However to get the duplex scanning and skipping of blank pages you have to (in the properties dialog for the scanner) set the Scanning Side to "Skip Blank Page". This setting has 3 other choices, "Simplex", "Duplex", and "Folio". I can change between Simplex and Duplex with the ImageEnMView1.MIO.TwainParams.DuplexEnabled, False makes it Simplex and True makes it Duplex. I need to be able to set it to "Skip Blank Page" to get the skipping to work. Any ideas?
|
 |
|
fab
   
1310 Posts |
Posted - Jul 19 2012 : 03:45:28
|
The unique Twain property like "Skip Blank Page" is AutoDiscardBlankPages. Maybe this scanner supports "Skip Blank Page" but not AutoDiscardBlankPages (as defined in Twain standard). In this case you have to discard blank pages programmatically, calling, for example, ImageEnMView.RemoveBlankPages() method. |
 |
|
jsands
3 Posts |
Posted - Jul 19 2012 : 08:44:11
|
I really like that idea! Instead of trying to get the scanner to remove the pages I just have ImageEn do it! More control that way and I don't worry about other scanners in the future having problems. This works just the way I want it now.
Thanks fabrizio!
|
 |
|
|
Topic  |
|