Page 1 of 1

Detect Pageorientation

Posted: Thu Feb 19, 2015 10:15 am
by zweitaktfan
Hi!

I'm using Fujitsu FI5750C and 6770A scanners, both scanners have A3-ADF, where the user can load some A4.
All the scanned pages from ADF get in one tif-file, after scanning i detect barcodes and split the files.
How can i detect, if the user has loaded the A4-paper into the ADF PORTRAIT or LANDSCAPE ?

Greetings,
Uli

Re: Detect Pageorientation

Posted: Thu Feb 19, 2015 10:50 am
by Alex
Hi Uli,

TWAIN specification allows to specify page orientation before scanning but it does not allow to get information about page orientation of acquired image.

TWAIN specification allows to extend functionality of driver by creating the custom capabilities. You need contact Fujitsu support for information about custom capabilites of your scanners.

Also you can use the software solution for detecting page orientation. For example, VintaSoftDocCleanup.NET Plug-in allows to detect page orientation of document images.

Best regards, Alexander

Re: Detect Pageorientation

Posted: Thu Feb 26, 2015 7:23 pm
by zweitaktfan
Hi Alexander,
how can i detect the pagesize? Is there autosize-param?
is this correct?

Code: Select all

DeviceCapability Pageautosize = device.Capabilities.Find(DeviceCapabilityId.IAutoSize);
            if (Pageautosize == null)
                MessageBox.Show("Kein automatisches Erkennen der Seitengröße möglich, der Scanner unterstützt das nicht.");
            else
                device.PageAutoSize = PageAutoSize.Auto;
How can i detect blank pages? i use this:

Code: Select all

            DeviceCapability autoDiscardBlankPagesCap = device.Capabilities.Find(DeviceCapabilityId.IAutoDiscardBlankPages);
            if (autoDiscardBlankPagesCap == null)
                MessageBox.Show("Kein automatisches Erkennen von leeren Seiten möglich, der Scanner unterstützt das nicht.");
            else
                autoDiscardBlankPagesCap.SetValue(true);
If i run this code, no messagebox is shown.

Additionally, in imageacquired-event i use this in hope to get cleaner images for blank-page-detection:

Code: Select all

e.Image.Despeckle(8, 25, 30, 400);
            e.Image.Deskew(BorderColor.AutoDetect, 5, 5);
            e.Image.DetectBorder(5);
But:
if (!e.Image.IsBlank(0.02F))
returns always true, none of my images are blank.

Please help!
Thx,
Uli

Re: Detect Pageorientation

Posted: Thu Feb 26, 2015 8:32 pm
by Alex
Hi Uli,

Please read this how to:
http://www.vintasoft.com/docs/vstwain-d ... nning.html

and let me know if you will have any question or problem.

Best regards, Alexander