cancel
Showing results for 
Search instead for 
Did you mean: 

Printing issue..

Former Member
0 Kudos

All,

I know this issue discussed lot many time in this thread. I searched the forum too. nothing solves my problem..

I create a HTML MIME file with following code:


&#65279;<html>
<head />
<body onLoad="window.parent.focus(); window.parent.print(); window.close();">
</body>
</html>

and I'm calling the page when "Print" button action using below code:

		IWDWindow dialog =
	wdComponentAPI.getWindowManager().
createExternalWindow
("http://BM:50000/webdynpro/resources/local/Welcome/Components/print.html",
"SAP",
 false);				
			dialog.open();

But when i click the print button its opening new html window along with print option

<b>My issue is:</b>

1. When i print, its printing the blank page instead of parent page.

2. I dont want user to see the new html window.

How can i do above..

Thanks..

BM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can try modifying the javascript a bit:

<html>
<head />
<body onLoad="window.opener.focus(); window.opener.print(); window.close();">
</body>
</html>

Regards,

Satyajit.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bharati,

If you want to print the webdynpro application itself, and don't want to show the popup, it seems easier to not use a popup.

I would consider using the iframe UI element (1x1 px, hidden) and trigger the print from there.

See Sigiswald Madou's code example in this thread:

Keep in mind that as of NW2004s the iframe UI element is deprecated and it may be not available in future releases.

Regards,

Johan