Author |
Topic |
|
jgun
India
11 Posts |
Posted - Dec 06 2013 : 05:56:43
|
How to set the units of measurement, number of pages to scan , paper size like (A4letter, B5Letter, USLetter options) for the TWAIN Scanner using ImageEN TIETwainParams component |
|
xequte
38615 Posts |
|
John
USA
94 Posts |
Posted - Feb 18 2014 : 16:51:46
|
Nigel
I am trying to populate a ComboBox with the available paper sizes for a given scanner. The following code results in the compiler error, "Property standard size inaccessible here". The code format (which I show below) works for other scanner properties as demonstrated by the ImageEn AllAcquire demo.
const Acquire_PageSize: array[0..57] of string = ('IETW_NONE', 'IETW_A4LETTER', 'IETW_B5LETTER', 'IETW_USLETTER', W_A5', 'IETW_B4', 'IETW_B6', 'IETW_USLEDGER', 'IETW_USEXECUTIVE', 'IETW_A3', 'IETW_B3', 'IETW_A6', 'IETW_C4', 'IETW_C5', 'IETW_C6', 'IETW_4A0', 'IETW_2A0', 'IETW_A0', 'IETW_A1', 'IETW_A2', 'IETW_A4', 'IETW_A7', 'IETW_A8', 'IETW_A9', 'IETW_A10', 'IETW_ISOB0', 'IETW_ISOB1', 'IETW_ISOB2', 'IETW_ISOB3', 'IETW_ISOB4', 'IETW_ISOB5', 'IETW_ISOB6', 'IETW_ISOB7', 'IETW_ISOB8', 'IETW_ISOB9', 'IETW_ISOB10', 'IETW_JISB0', 'IETW_JISB1', 'IETW_JISB2', 'IETW_JISB3', 'IETW_JISB4', 'IETW_JISB5', 'IETW_JISB6', 'IETW_JISB7', 'IETW_JISB8', 'IETW_JISB9', 'IETW_JISB10', 'IETW_C0', 'IETW_C1', 'IETW_C2', 'IETW_C3', 'IETW_C7', 'IETW_C8', 'IETW_C9', 'IETW_C10', 'IETW_USSTATEMENT', 'IETW_BUSINESSCARD');
Code snippet ComboBoxPageSize.Items.Clear; for I := ord(Low(Acquire_PageSize)) to ord(High(Acquire_PageSize)) do begin ComboBoxPageSize.Items.Add(Acquire_PageSize[TIETwainParams.StandardSize(I)]); end; ComboBoxOrientation.ItemIndex := ImageEnView1.IO.TWainParams.StandardSize.CurrentValue;
Can you please explain what I am missing.
TIA
John
|
|
|
xequte
38615 Posts |
Posted - Feb 19 2014 : 12:57:09
|
Hi John
When is this filled? In your form create event? Does it work if you delay until after the form is ready?
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
John
USA
94 Posts |
Posted - Feb 20 2014 : 07:43:19
|
Nigel
I access this property in the OnShow event of the form that contains the ImageEn components.
I can access other properties from this event including TIEAcquireOrientation and TIEAcquirePixelType.
Interestingly, although the code I mentioned earlier in the thread causes a problem, the following code works.
for I := 0 to ImageEnView1.IO.TWainParams.StandardSize.Count - 1 do begin J := ImageEnView1.IO.TWainParams.StandardSize[I]; if J <= high(Acquire_PageSize) then begin ComboBoxPageSize.Items.Add(Acquire_PageSize[J]); end; end; ComboBoxPageSize.ItemIndex := ImageEnView1.IO.TWainParams.StandardSize.CurrentValue;
John
|
|
|
John
USA
94 Posts |
Posted - Feb 26 2014 : 22:21:08
|
Hi
Can you give me an example of how to limit the number of pages scanned via code?
TIA
John |
|
|
|
Topic |
|
|
|