Can you print a webpage including an embedded pdf

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
barb woolums
Forum Contributor
Posts: 134
Joined: Sun Feb 08, 2009 9:52 pm

Can you print a webpage including an embedded pdf

Post by barb woolums »

I have a web page with a pdf file embedded in an iFrame. I would like to print the whole page including the contents of the iFrame. Is this possible?

Also I have a scrolling problem in Firefox(3.6). The only thing that scrolls on the page is the embedded pdf, even if I click outside it, it still scrolls when I use my mouse wheel. So there's no way to scroll through the web page itself without using the scroll bar on the right side of the page. Anyone know of a way to stop this behaviour?
User avatar
barb woolums
Forum Contributor
Posts: 134
Joined: Sun Feb 08, 2009 9:52 pm

Re: Can you print a webpage including an embedded pdf

Post by barb woolums »

OK, not much response. So I am happy to print the webpage and the pdf separately which works fine in firefox, but not in IE8. The webpage prints but not the pdf. I get a print dialog, but then nothing prints.

here's the code

Html

<embed id=embeddedpdf src='images/recipe/$pdf#scrollbar=0&toolbar=0&statusbar=0&messages=0&navpanes=0'
width='800px'
height='1032px'>
</embed>

Menu print html

<a href='#' onclick='window.print();pdfprint(embeddedpdf);'>Print</a>

Javascript

function pdfprint(oTgt) {
oTgt.focus();
oTgt.print();
}
Post Reply