Home › Forums › TWAIN Classic › what’s the best way to scan a ‘custom paper size’
- This topic has 1 reply, 2 voices, and was last updated 10 years, 3 months ago by dpenney.
- AuthorPosts
What would you TWAIN experts – and driver writers 😉 – recommend as best practice for an application that wants to scan a custom (non-standard) sized piece of paper?
ICAP_SUPPORTEDSIZES is an enumeration, so if it isn’t in the list (or the scanner doesn’t list it) – I can’t specify my paper size that way.
For example, suppose I want to scan 4″ x 3″ cards. Or 7.75″ x 12.5″…I could set ICAP_SUPPORTEDSIZES to 0(TWSS_NONE) and then set the ROI to my paper size.
In theory that means select the largest possible paper size, but I’m worried that some scanners will interpret TWSS_NONE to mean 8.5×11 in US, and A4 elsewhere.I feel like I’ve read comments on this somewhere, but I had no luck searching on this forum.
I may even have asked this question myself before! What can I say, my mind is going. I can feel it.@spike wrote:
What would you TWAIN experts – and driver writers 😉 – recommend as best practice for an application that wants to scan a custom (non-standard) sized piece of paper?
Hi Spike,
You should use DAT_IMAGELAYOUT not ICAP_SUPPORTEDSIZES to set a custom scan area. All DS’s are required to support DAT_IMAGELAYOUT.
Note that scanners with feeders may require special consideration. ICAP_SUPPORTEDSIZES takes care of the feeder alignment but DAT_IMAGELAYOUT does not. This is not an issue if you always scan the full width. Otherwise, you’ll need to read CAP_FEEDERALIGNMENT and align the scan area accordingly.
Doug
–- AuthorPosts