ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Set Units of Measurement , paper on TWAIN

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jgun 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
5   L A T E S T    R E P L I E S    (Newest First)
John 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
John 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

xequte 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 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 Posted - Dec 09 2013 : 13:51:48
Hi

Paper size is available via TIETrainParams.StandardSize:

http://www.imageen.com/help/TIETwainParams.StandardSize.html

Resolution is in DPI, but this is easily converted to inches or cm with code.

You will also need to use code, rather than a property, to limit the number of pages that are scanned.




Nigel
Xequte Software
www.xequte.com
nigel@xequte.com