I need some help with this code...
I am trying to force the pdf file to print instead of the active Internet Explorer window.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link rel="alternate" media="print" href="document_name.pdf">
<script language="Javascript">
<!--
function printpdf() {
browserVersion = parseInt ( navigator.appVersion)
if (browserVersion >= 4) window.print ()
}
// -->
</script>
<title>Title</title>
</head>
I have put an image on the page that looks like a printer and that should initiate the printing process.
The code behind the image looks like this:
href="javascriptrintpdf ()"><img src="../images/Pics/printr01.gif"
alt="Print Adobe Acrobat version of this page" style="border: medium none" WIDTH="33"
HEIGHT="29">
The only things that gets printed are the IE headers (containing the title of the html page + page numbering)and footers (containing the actual path of the PDF file + date), not the actual PDF file. Both HTML and PDF files are located in the same directory and the PDF file prints fine if I right-click on it and select "print" from the source directory.
Reading the FAQ and other threads leads me to believe that it should work!.
Thanks
I am trying to force the pdf file to print instead of the active Internet Explorer window.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link rel="alternate" media="print" href="document_name.pdf">
<script language="Javascript">
<!--
function printpdf() {
browserVersion = parseInt ( navigator.appVersion)
if (browserVersion >= 4) window.print ()
}
// -->
</script>
<title>Title</title>
</head>
I have put an image on the page that looks like a printer and that should initiate the printing process.
The code behind the image looks like this:
href="javascriptrintpdf ()"><img src="../images/Pics/printr01.gif"
alt="Print Adobe Acrobat version of this page" style="border: medium none" WIDTH="33"
HEIGHT="29">
The only things that gets printed are the IE headers (containing the title of the html page + page numbering)and footers (containing the actual path of the PDF file + date), not the actual PDF file. Both HTML and PDF files are located in the same directory and the PDF file prints fine if I right-click on it and select "print" from the source directory.
Reading the FAQ and other threads leads me to believe that it should work!.
Thanks