Home › Forums › TWAIN Classic › Problem with landscape
- This topic has 4 replies, 3 voices, and was last updated 12 years, 5 months ago by dpenney.
- AuthorPosts
Hi, i´m trying to scan in landscape but it doesn´t work. I test it with the original Epson Software and it works. So it must be supported by Scanner. I use the Epson Expression 10000XL Scanner.
Can anyone tell me what is my mistake?
Here is my Code:
if(DSOpen())
{
TW_CAPABILITY twCap;
pTW_ONEVALUE pVal;
twCap.hContainer = GlobalAlloc(GHND,sizeof(TW_ONEVALUE));
twCap.Cap = ICAP_ORIENTATION;
pVal->ItemType = TWTY_UINT16;
pVal->Item = TWOR_LANDSCAPE;
CallTwainProc(&m_AppId,&m_Source,DG_IMAGE,DAT_IMAGELAYOUT,MSG_SET,(TW_MEMREF)& twCap);
}
CallTwainProc returns TWRC_CHECKSTATUS
thanks in advance
KeniffDid you get any error message for this part?
In addition, please try using TWAIN_App_mfc32.exe to check whether the capability is supported by the scanner. (although it works with the original Epson Software, please make sure it is fully twain compatible)
__________________
Adam
Dynamsoft: version control | TWAIN SDK@keniff1 wrote:
Hi, i´m trying to scan in landscape but it doesn´t work….
You’re using the wrong triplet. ICAP_ORIENTATION is a capability so it’s set by DG_CONTROL / DAT_CAPABILITY / MSG_SET not DG_IMAGE / DAT_IMAGELAYOUT / MSG_SET.
If you haven’t already, it would be good to spend some time reading the “Application Implementation” chapter in the TWAIN specification.
–Hi,
I have checked the source an saw that one of the two sources from scanner does not suport this cap.
I changed it to the other and corrected the triplet. Now it works.thank you verry much 🙂
PS @ dpenney: I have read the Specification before and I should have known the right triplet because i use it before to set resolution. But i am a Twain beginner and make a lot of mistakes 🙂
thanks again
keniffI didn’t intend to be harsh. Glad to help.
- AuthorPosts