GUJUm0deL,
The problem is this: I am putting together an instructions CD for some device. The user will navigate through the pages at will but in the event that they require a printout of a particuliar procedure (ie;tables, flowcharts steps), the formatting of the printed page gets messed up if printed from Internet Explorer.
That where the pdf files come into action because I made certain that the pdf files would print exactly as they should (paper size and orientation, page break etc.)
As much as it is possible and for all the above reasons, I want IE to always print the pdf file instead of the html version; the user may select File/Print from IE menu, the Print button in IE toolbar and I have added a printer icon on the page that should initiate the print process.
By going through the FAQs and Forums, this should work:
<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="javascript

rintpdf ()"><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.
Thanks for your interrest!
Jean01