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
 ImageViewingToolbar and PdfViewingToolbar

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
jrpcguru Posted - Feb 18 2022 : 14:56:12
IEGlobalSettings().ImageViewingToolbar.Position := iepTop;
IEGlobalSettings().PdfViewingToolbar.Position := iepTop;

ImageEnView.AutoToolbars := [ ievPdfViewing ];
ImageEnView1.AutoToolbars := [ ievViewing, ievSelection];

As I switch back and forth from regular ImageEnView to PDFium, I set the appropriate AutoToolbars. On my main form this works correctly. I also have a popup form for full size viewing on a second screen. I have tried with and without the global settings on that form and use the appropriate version of AutoToolbars but I am unable to get any toolbar at all to display on the second form.

I have tried several other positions in addition to iepTop with no better result. Do the toolbars have some kind of limitation to only one copy being displayed?

Since we've had problems with multi-monitor use before, I tried different combinations of where the main form and popup form were located on my 3 monitor system. No luck.


J.R.
8   L A T E S T    R E P L I E S    (Newest First)
jrpcguru Posted - Feb 25 2022 : 13:17:27
For what it is worth, I've just discovered that my main form correctly selects text in a PDF, if it is set to continuous page display. That doesn't help my ability to make the problem appear in our test project, however.

J.R.
jrpcguru Posted - Feb 24 2022 : 20:07:20
Thanks for setting me straight. After all my effort to fix form2 so it could automatically be loaded by form1, I missed that your original code launched it with a local variable. Kind of funny actually, but it sure did frustrate me!

My program is called Photorenamer. The main form uses about half the screen for features needed to organize and rename files while displaying EXIF data. The remaining half is used by the image. That is too small for a decent review of photos. The popup form restores itself to its last position and size which is normally on a second monitor, maximized. It has the ability to split the screen between two images so they can be compared on the same monitor. The popup form must be updated whenever the main form changes the photo, rotating, flipping or loading a new file, and the popup form must update the main form if it does anything to the image.

I have now found that my popup form was accidentally set to StayOnTop and that is why it didn't show the popup toolbars. Oddly, if the main form is set to StayOnTop, the toolbars do display on the main form but not the popup form. That is important since my program has a DDE mode so it is a DDE Server for Access programs that need to view images and documents. The DDE mode hides all other user interface and displays the image using the entire available space on the form. It is designed to stay on top and sit on blank space on an Access form that shows the linked data and uses DDE to tell my program to display the desired image file. Fortunately, the only time that is likely to be needed is if there is only one screen. If there is more than one screen then Access can have the main screen and Photorenamer can maximize on the second screen, with no StayOnTop needed and no popup form needed either.

Just to add mystery, I now find that my popup form successfully selects PDF text as we would expect. My main form still shows graphic garbage as it selects, then restores the correct view because of the Refresh that I've added. I have tried to figure out what difference between the two forms might cause this. I've added all units and controls that aren't normally on the popup form but it persists in operating correctly. So I'm still back to having to subtract things from my program until the problem goes away. I don't know when I'll get that ambitious.

For now, I will concentrate on convincing the popup form to correctly update the main form when a popup toolbar rotates or causes a PDF to change pages. I succeeded in the main form, so hopefully that will just be doing the work tomorrow.

Thanks again for the assistance.

J.R.
xequte Posted - Feb 23 2022 : 22:52:39
Hi JR

I'm not really understanding what your project is trying to do, but the TForm2.DisplayImageOnPopupFromPopup() method makes reference to the variable, Form2, which is not created anywhere.

In the method, TForm1.btnLoadFoirm2Click(), you create an instance of TForm2 using a local variable (Form2) and not the global Form2 variable in Form2Dlg.pas

Nigel
Xequte Software
www.imageen.com
jrpcguru Posted - Feb 23 2022 : 19:48:23

attach/jrpcguru/2022223194043_PDFium 2022-02-20 NZ.zip
73.12 KB

I give up. I am totally frustrated by this effort:

1. I have found no additions from my program to your test program that cause the weird graphical mess when I try to select text in a PDF file. Apparently I will have to make a copy of my program and subtract from it until the problem goes away. That doesn't sound like any more fun than I've had in the last 3 days.

2. My program's main form loads the image file into ImageEnView and then automatically loads it into the popup form, if that form is open. I attempted to modify your test program to do the same. I think I meticulously matched all settings and code and have completely failed. Every time Form2 generates an error when referencing its copy of ImageEnView. Form1 can run procedures contained in Form2 and Form2 can run procedures contained in Form1. In fact the Form2 load file button is now calling code in Form1 to load itself. But I can't get Form1 to load the Form2.ImageEnView and can't get Form2 to load its copy from Form1. It is probably something very simple, but I can't figure it out. Frustration doesn't help the thought process!

Because I can't get Form1 to load the image into Form2, I can't model the problem that my program refuses to display the desired toolbar on Form2.
BTW: I just noticed that I set Form2 to keep on top at some point, so the default toolbar appears underneath it. But that doesn't change the basic problem.

J.R.
xequte Posted - Feb 21 2022 : 19:38:58
Hi JR

Unfortunately it is not reliable to revert to the previous state when unchecking, say a selection option, because the previous state could be almost anything (selection or layer interactions, for example). It should revert to Zoom+Scroll. I will make that more explicit for 10.3.5.

I have added Select Zoom to the image toolbar.

Regarding buttons, please use:

// Disable hover buttons for navigating PDFs
ImageEnView1.PdfViewer.Options := ImageEnView1.PdfViewer.Options - [iepoAutoButtons];



Nigel
Xequte Software
www.imageen.com
jrpcguru Posted - Feb 21 2022 : 16:13:33
I have been working for several hours to try to make your sample project display the weird graphical junk when I select PDF Text or use PDF FindDialog for text. So far no luck. I have noted the following detail:

IEGlobalSettings().ImageViewingToolbar.Buttons := [ivbImageClipboard, ivbImagePrint , ivbImageZoom, ivbMouseSelect, ivbImageEditRotate, ivbImageSeek];


IEGlobalSettings().PdfViewingToolbar.Buttons := [ ivbImagePrint, ivbMouseZoomAndScroll, ivbImageClipboard, ivbMouseSelect, ivbImageEditRotate , ivbImageSeek];

My preferred setting is:
MouseInteractGeneral := [miSelectZoom];

On a .jpg or .tif file, the ImageViewingToolbar includes ivbMouseSelect but when I turn off selection, it returns to MouseInteractGeneral := [miScroll] rather than my setting of miSelectZoom.

On a .pdf file, the ImageViewingToolbar includes ivbMouseSelect, which includes an option called: Zoom to Selection, which is missing from the same option on the ImageViewingToolbar. This makes up for the fact that it too returns to MouseInteractGeneral := [miScroll].

I would prefer that turning off options on the toolbar reverts to the program's prior setting. Another option would be to explicitly select default values for the toolbar. Another option would be for ivbMouseSelect to have the Zoom to Selection option on both toolbars.

I will also test your project with the problem of toolbars not showing on the popup form. Your project, as delivered, works correctly on all these questions, so finding what is different in my program is proving challenging!

I just noticed another oddity. I added ivbImageZoom to the PdfViewingToolbar. If I turn on continuous form and use the File Dialog to search for text, it automatically turns on the page buttons when it changes pages, even though I already had ivbImageSeek which provides arrow buttons and even though I turned off the buttons via:ImageEnView1.ShowButtons := [];


J.R.
jrpcguru Posted - Feb 20 2022 : 20:54:29
Thanks. I will try it tomorrow.

J.R.
xequte Posted - Feb 20 2022 : 19:47:47
Hi JR

I'm not seeing that. Please try my test project and compare it to yours:

www.imageen.com/temp/Toolbars_x_2.zip

Nigel
Xequte Software
www.imageen.com