How to Print from browser without print popup window
Are you looking for a way to Print from browser without print popup window ? then read this thread to know more about it
I have Oracle v11 and I have a single PL/SQL scripts, as the internet application
I'm using window.print() for printing
I would like to print directly from browser without print popup window
I have own procedures for testing, but no success, it not work
The following is a test case!
Can only help me to solve this problems
Regards!
Hine
CREATE OR REPLACE PROCEDURE TEST_PRINT
AS
begin
htp.prn('<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<script type="text/javascript">
var PrintCommandObject = null;
function printPage(){
if (PrintCommandObject)
{
try{
PrintCommandObject.ExecWB(6, 2);
PrintCommandObject.outerHTML = "";
}
catch(e){
alert(e);
window.print();
}
}
else{ window.print(); }
}
</script>
<title>PrintPage</title>
</head>
<body>
<object id="PrintCommandObject" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" width="0" height="0"></object>
<button type="button" onclick="printPage()">Print</button>
</body>
</html>');
end;