VintaSoft Twain .NET SDK Discussions

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Detect Pageorientation



Detect Pageorientation

Post 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

Post 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

Post by zweitaktfan »

Hi Alexander,
how can i detect the pagesize? Is there autosize-param?
is this correct?
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:
            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:
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

Post by Alex »

Hi Uli,

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

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

Best regards, Alexander


Page 1 from 1: 1