Scanning settings

This Forum is for the use of Clarion For Windows - Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
marisoft
User
Posts: 57
Joined: Sat Nov 12, 2005 3:39 pm
Contact:

Scanning settings

Post by marisoft » Sun Jul 20, 2008 8:48 pm

I am using Scnpdf36.app but are hving problems getting the sizing correct for A4 portrait.

What should be the setting for Page Right and Page Bottom for Twain & for Wia if using centimeters.

I have tried 21.0 / 29.7 but pages in the scanned document are cropped.

Please see attached.

Cheers,
/Poul
Attachments
test1.zip
(68.29 KiB) Downloaded 137 times
.::Poul Jensen::.

Clarion developer

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Scanning settings

Post by Tracker - Clarion Support » Wed Jul 23, 2008 4:46 pm

Hi Poul!

First thing - not all scanners accept all units! Your scanner may not accept Centimeters as units of measure.

You can use GetUnits method to return 3 LONG values. The first LONG contains bit-coding which will indicate which units are accepted. The bit-coding is described by the UNITS_* equates near the beginning of SCANNER3.INC. BAND() those values against the returned LONG to see which you can use.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

marisoft
User
Posts: 57
Joined: Sat Nov 12, 2005 3:39 pm
Contact:

Re: Scanning settings

Post by marisoft » Fri Jul 25, 2008 10:01 am

Hi Craig,

I guess all scanneers support inches but if I select Inches and enter 8.23" and 10.91" I get a distorted image.

I notice that in Scan2Pdf, embed "after good scan" there is hardcoded settings 1700 and 2200 ( PDFXSTWN1.SetImageLayout(0,0,1700,2000) )

How are those settings related ?

Cheers,
/Poul
.::Poul Jensen::.

Clarion developer

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Scanning settings

Post by Tracker - Clarion Support » Fri Jul 25, 2008 2:34 pm

Hi Poul!
I guess all scanneers support inches
This may be a bad guess. In my first post, i suggested you use the class GetUnits method to return LONG values that contain bit-coded information on acceptable units of measure for your scanner. If you post the values here, I can interpret them for you.

You might want to try Pixels, but you'll have to convert your page dimensions, in inches, to pixels by multiplying them by the resolution, which is always measured in DPI (Dots per Inch).
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

marisoft
User
Posts: 57
Joined: Sat Nov 12, 2005 3:39 pm
Contact:

Re: Scanning settings

Post by marisoft » Tue Jul 29, 2008 3:10 pm

Hi again,

Well it turns out that the distorsion of the page has nothing to do with the x / y settings but instead the "SetPixelType".

Using this code to select type:
case clip(l:Pixeltype)
of 'BW'
PDFXSTWN1.SetPixelType(PT_BW)
of 'Gray'
PDFXSTWN1.SetPixelType(PT_GRAY)
of 'RGB'
PDFXSTWN1.SetPixelType(PT_RGB)
of 'Palette'
PDFXSTWN1.SetPixelType(PT_PALETTE)
else
PDFXSTWN1.SetPixelType(PT_GRAY)
end

the scan reliably fails with a distorted image when I select Black & White !

All other settings works OK.

Cheers,
/Poul
.::Poul Jensen::.

Clarion developer

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Scanning settings

Post by Tracker - Clarion Support » Tue Jul 29, 2008 4:21 pm

Hi Poul!

I use B&W for testing with my HP scanner with no problems.

It may be that your scanner does not support B&W output.

One thing I've noticed is that scanner manufacturers are removing features from their scanner/driver combinations and placing them in their OEM software.

You can test for that using the GetPixelTypeInfo class method to return a bit-coded LONG that indicates whether the scanner/driver supports B&W at that level. If you will do that and post the values here I can decode them for you. In this case, you are looking for an "odd" value as this indicates the 1-bit is set which means the scanner/driver supports B&W pixel type.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

marisoft
User
Posts: 57
Joined: Sat Nov 12, 2005 3:39 pm
Contact:

Re: Scanning settings

Post by marisoft » Tue Jul 29, 2008 7:05 pm

Hi,

PDFXS1:rtn = PDFXSTWN1.GetPixelTypeInfo(PDFXTB1:ptSupp, PDFXTB1:ptCurr, PDFXTB1:ptDef)
MESSAGE('rtn='&PDFXS1:rtn&' '&|
'|ptSupp = '&PDFXTB1:ptSupp&|
'|ptCurr = '&PDFXTB1:ptCurr&|
'|ptDef = '&PDFXTB1:ptDef, |
'GetPixelType)', )

returns 0, 15, 1, 4

My goal is to use this on unknown scanners, so I guess I need to test whether B&W is supported and if not use greyscale ?

/Poul
.::Poul Jensen::.

Clarion developer

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Scanning settings

Post by Tracker - Clarion Support » Tue Jul 29, 2008 8:03 pm

Hi Poul!
I guess I need to test whether B&W is supported and if not use greyscale ?
Exactly. I expect this may become a larger issue as time goes by.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

marisoft
User
Posts: 57
Joined: Sat Nov 12, 2005 3:39 pm
Contact:

Re: Scanning settings

Post by marisoft » Wed Jul 30, 2008 5:56 am

Hi Craig,

Could you provide a code-snippet to do this test I would be much obliged.

Cheers,
/Poul
.::Poul Jensen::.

Clarion developer

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Scanning settings

Post by Tracker - Clarion Support » Wed Jul 30, 2008 6:08 pm

Hi Poul!

I don't have one at the current time. I'll have to see what I can come up with.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Scanning settings

Post by Tracker - Clarion Support » Wed Jul 30, 2008 7:43 pm

Hi Poul!

I found this among some old files. It will display Pixel Type and Units (of Measure).

The "Supp" column indicates supported types. Check the PT_ and UNITS_ values for the bit-coding values.
Attachments
scninfo.zip
scninfo.app for Scanner values
(6.81 KiB) Downloaded 151 times
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

marisoft
User
Posts: 57
Joined: Sat Nov 12, 2005 3:39 pm
Contact:

Re: Scanning settings

Post by marisoft » Thu Jul 31, 2008 10:03 am

Thanks.

/Poul
.::Poul Jensen::.

Clarion developer

Post Reply

Return to “PDF-Tools SDK (DLL Libraries Only) - Clarion For Windows Developers Only Please”