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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEn 13.0: Questions on working with scanning with AcquireParams class
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Stalker4

Ukraine
27 Posts

Posted - Jan 16 2025 :  05:40:04  Show Profile  Reply
Hi,

Delphi 12.1, ImageEn 13.0.

1) Do I understand correctly that if I need specific properties of TWAIN or WIA interfaces (read/write) when working with AcquireParams, I can access them. specific properties of TWAIN or WIA interfaces (read/write), they can be accessed in the following way can be accessed in the following way:
with ImageEnMView.MIO do 
   if AcquireParams.SelectedSource.API = ieaTwain then
     AcquireParams.AttachedTwainParams.Brightness.CurrentValue := 50
  else
  if AcquireParams.SelectedSource.API = ieaWIA then begin
    AcquireParams.AttachedWIAParams.GetItemPropertyAttrib(WIA_IPS_BRIGHTNESS, AcquireParams.AttachedWIAParams.Device, ieAttrib, ieValues);
    nMin := ieValues.Min
  end;

2) The TWAIN interface has AcceptedImages and StandardSize properties for setting the number of sheets and sheet size.
The WIA interface or TAcquireParams does not have these properties.
Question: WIA interface does not support these features (properties) or they are not implemented in your system ?

3) When saving the scan result to PDF
with ImageEnMView.MIO do
   for nCou := 0 to ImageEnMView.ImageCount-1 do begin
     Params[nCou].PDF_Compression := ioPDF_JPEG;
     Params[nCou].PDF_Creator := 'My Creater';
   end;

 ImageEnMView.MIO.SaveToStreamPDF(FStream);
There are string properties, e.g. PDF_Creator or PDF_Author.
Question: In which encoding of them are the string data written to PDF ?
I need to understand how to write Cyrillic encoded strings to these fields.

xequte

38730 Posts

Posted - Jan 16 2025 :  19:43:06  Show Profile  Reply
Hi

1. Yes, you can either use the AcquireParams properties which set the Twain/WIA properties, or you can set them directly via AttachedTwainParams/AttachedWIAParams. The result will be the same.

2. There are not equivalent properties in WIA

3. At this time, only ANSI strings are supported

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Stalker4

Ukraine
27 Posts

Posted - Jan 17 2025 :  03:50:57  Show Profile  Reply
2) Your answer is clear, but I find it strange that the WIA interface has no properties for page size or number of sheets of paper, it turns out that there are scanners with automatic sheet feeder, but it is impossible to control the number of sheets through WIA ....

3) Then there is a suggestion, if possible, to add properties for Unicode string format there.
Go to Top of Page

xequte

38730 Posts

Posted - Jan 17 2025 :  18:32:59  Show Profile  Reply
2. Strictly speaking there is a page size property, WIA_DPS_PAGE_SIZE, but it has much more limited functionality than the Twain StandardSize. You could test that:

https://www.imageen.com/help/TIEWia.GetDeviceProperty.html
https://www.imageen.com/help/TIEWia.SetDeviceProperty.html


3. Yes, we have it on our to-do list.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: