Opening a pdf/image in a new browser window


My issue is similar to the one described in Open a new window in browser with components v7

The requirement is to open files (PDF / Images) in a separate browser window rather than a new tab in the same window such that users can view the 2 windows side by side.

The solution provided in the issue above is to use exportDisplay without specifying the ExportFormat but this results in a new tab rather than new window.

Is there any other solution available for this?

Well, I’m not sure it is possible. Check the OpenMode definitions:

They say:

* In Desktop Client open a screen in new main window, in Web Client the same as new {@link #NEW_TAB}
* In Web Client opens a screen as main

So, in the web client, you get a NEW_TAB when you say NEW_WINDOW. ROOT seems to give you an entire new browser window, so maybe that would work for you, but that probably will also re-create all the menus, etc.

Mario’s comment about fixing the ExportDisplay call allowed us to download to the browser instead of a file.

So, if you can figure out how to make any window open the way you want, then you can write the ExportDisplay in its controller and that should do it.