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
 Memorizes the orientation of the scan page

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
Stalker4 Posted - Mar 06 2025 : 08:35:05
Hi,

1) Scanning two pages:
ImageEnMView.MIO.Acquire()
The default orientation of the pages is portrait.

2) I select the last page and change its orientation:
ImageEnMView.MIO.Params[ImageEnMView.SelectedImage].PDF_PaperLayout := ielLandscape;

3) I scan the third page and this page has a landscape orientation for some reason.
I checked, if I don't change the orientation of the second page to landscape, then the orientation of the third page will not change either (i.e. it will be portrait).

It turns out that when adding another scanned page to ImageEnMView, its orientation is taken from the last page.

Question: Is there any way to cancel this behavior ?
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 12 2025 : 19:19:12
Hi

You are better to leave them at the default and then set the layout afterwards, e.g. using the OnAfterAcquireBitmap event:

https://www.imageen.com/help/TImageEnMIO.OnAfterAcquireBitmap.html

Or by iterating over the images when Acquire completes.

// Add a description to all scanned images
ImageEnMView.MIO.OnAfterAcquireBitmap := AfterAcquireBitmap;

procedure TForm1.AfterAcquireBitmap(Sender: TObject; index: Integer);
begin
  ImageEnMView1.ImageTopText[ index ] := 'Image scanned on ' + DateTimeToStr( now );
end;




Nigel
Xequte Software
www.imageen.com
Stalker4 Posted - Mar 12 2025 : 07:34:34
Hi,

How can you set a default value for PDF_PaperLayout before starting scanning ?
xequte Posted - Mar 11 2025 : 15:16:02
Sorry, i have checked the code. When appending bitmaps (via scanning or just adding), the parameters default to the last used. They are not reset, so if you set ielLandscape, you should then set ielPortrait.

Nigel
Xequte Software
www.imageen.com
Stalker4 Posted - Mar 07 2025 : 06:46:31
Hi,

If you add images from files to ImageEnMView, the problem is not reproduced.

You should add images to ImageEnMView only through scanning:
ImageEnMView.MIO.Acquire()
xequte Posted - Mar 06 2025 : 15:58:01
Hi

If PDF_PaperLayout is not set, it should always default to ielPortrait.

Can you please give me some reproducible code that shows this issue? I tried the following, and i correctly created a PDF that is Portrait/Landscape/Portrait:

ImageEnMView1.AppendImage( 'D:\Testing_Multimedia\Portrait1.jpg' );
//ImageEnMView1.MIO.Params[0].PDF_PaperLayout := ielPortrait;
ImageEnMView1.AppendImage( 'D:\Testing_Multimedia\Portrait2.jpg' );
ImageEnMView1.MIO.Params[1].PDF_PaperLayout := ielLandscape;
ImageEnMView1.AppendImage( 'D:\Testing_Multimedia\Portrait3.jpg' );
//ImageEnMView1.MIO.Params[2].PDF_PaperLayout := ielPortrait;
ImageEnMView1.MIO.SaveToFilePDF('D:\out2.pdf')


Nigel
Xequte Software
www.imageen.com