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
 Acquire from Scanner in spez. Papersize

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
Ralf Posted - Jan 31 2017 : 10:09:24
Hello,

how can i say the scanner the papersize i want to scan.

Thanks

Ralf
8   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Feb 09 2017 : 20:22:32
Hi Ralf

At present, ImageEn does not support WIA 2.0 properties such as WIA_IPS_PAGE_SIZE. We will investigate its implementation.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Ralf Posted - Feb 07 2017 : 05:59:54
Hi Nigel,

i found a way how i can set the Papersize for the scanner.
ImageenMView.MIO.TwainParams.StandardSize.CurrentValue:=iETW_A4;
That seems to work. But how can i do the same for the WIA? Or is there no way to do that at WIA.

Regards
Ralf
Ralf Posted - Feb 02 2017 : 07:58:42
Hi Nigel,

i forgot to test the change.

But when i set the AcquireFrame... in the AcquireParams the result is not the same as setting the TwainParams.

By Acquireparams the left value is ignored and the width of the scanned area is only 50% of the wanted.

One Error on my side is how i get the information for the Papersize and the information what the max. values for bottom and right when left and top is 0.

When i use the max Physicalwidth the result of the scan is wrong. In the case of my fujitsu i get A4 correct when the left is 0 and the right is the A4 width.

But how can i get really the correct Width and height of the scanner.

Hier my sourcecode


procedure ImageEnMView_SetPaperSize(Const ImageMEV: TImageEnMView; PSize:Integer; doCenter:Boolean);
var
  PLeft,
  PWidth,
  PHeight : Double;

begin
  with IOPDFPaperSizes[IndIOPDFPaperSizes(PSize)] do
  begin
    with ImageMEV.MIO, AcquireParams{, TwainParams} do
    begin
      AcquireFrameEnabled:=false;
      AcquireFrameEnabled:=true;
      Update;

      PWidth :=Width /72;
      PHeight:=Height/72;
      PLeft:=0;

      if doCenter then
      begin
        PLeft:=(AcquireFrameRight{PhysicalWidth}-PWidth)/2;
      end;

      AcquireFrameLeft  :=Max(0,PLeft);
      AcquireFrameTop   :=0;
      AcquireFrameRight :=Min(PLeft+PWidth,PhysicalWidth); 
      AcquireFrameBottom:=PHeight;
    end;
  end;
end;


The different result of the scanning setting parameters by AcquireParams or Twainparams seem to me like an error.

Regards
Ralf
Ralf Posted - Feb 02 2017 : 02:41:37
Hi Nigel,

sorry but i really hadn't recognized, that the AcquireParams has also this feature.
Thanks and best regards

Ralf
xequte Posted - Feb 01 2017 : 15:33:41
Hi Ralf

When you set a property of TIEAcquireParams it sets it for both Twain and WIA, e.g. setting

TIEAcquireParams.AcquireFrameLeft

Sets:
TIETwainParams.AcquireFrameLeft
TIEWia.SetItemProperty( WIA_IPS_XPOS ... )


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Ralf Posted - Feb 01 2017 : 04:27:47
Hi Nigel,

know i have made it with setting the AcquireframeLeft...Botton.

Is this also possible for WIA? I only found it for Twain.

Thanks
Ralf
Ralf Posted - Feb 01 2017 : 01:59:15
Hi Nigel,

i allready know, that the AcquireParams must be the key to solve the problem. But i haven't found a example how to do. In my old Twain Tool this was solved better!!! There i said i need to scan in Din A4. Thats it.

Do you know a example how to do it for A4? Then i can also make it for the other used Papersizes. The help is not very helpful at this point. Also the bought eBook is in this case not very helpful.

Thanks

Ralf
xequte Posted - Feb 01 2017 : 01:45:48
Hi Ralf

Scanners don't work by paper size, but by inches, so you will need to do the math.

Please see the AcquireFrame* properties at:

http://www.imageen.com/help/TIEAcquireParams.html


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