Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Open PDF in a new window

843844Jun 16 2008 — edited Jun 18 2008
Hi. I'm trying to create a PDF and open it in a new browser window. I've already achieved to create the PDF and it seems to work fine when it opens in the current browser window but that's not what we are looking for.

This is the code where I call the open report method:
<h:commandLink id="informe" target="report"
	        onclick="openReport();"
		action="#{listadoPDSBean.mostrarInforme}"
		styleClass="boton"
		value="Ver Informe"/>
Here is the javascript method where I open the new window (and about:blank window).
function openReport() {
	
		
		nuevaVentana = window.open("about:blank", "report", "type=window, fullscreen=no, Menubar=no,
                Status=no, Titlebar=no, Toolbar=no, Location=no, Directories=no, Resizable=yes");
		
}
When I try this it opens a new blank window and then opens the report in the application window.

I'm sorry for my bad english.

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2008
Added on Jun 16 2008
14 comments
1,572 views