Click here to Skip to main content
14,937,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello guys... I would like to ask if there is a way to print a pdf from an embed html tag? You see i have embeded the pdf using this code
<embed class='soa' width='650' height='815' id="plugin" name="plugin" src="myPDF.pdf" type="application/pdf" />

Now i would like to print that pdf using a button. is it possible using plain javascript? or do we need a server side script?

Well the embed form offers a print and save button but the problem is when the user clients computer doesnt have any acrobat reader installed. it means they will not have this button. so i want to provide a print button for them... but i dont know how to accomplish this... please help guys...
Mohibur Rashid 9-Jun-12 3:41am
What button? where it would be? why do you need an external button? what's wrong with the associated button?
Madzmar25 9-Jun-12 4:12am
i just want to create something like this <input type="submit" value="print" önclick="printPDF();" /> how can we achieve printing the pdf file displayed in and embed element?
Mohibur Rashid 9-Jun-12 4:17am
fact one, you cant, fact two why do you want that? whats wrong with associated print button?

1 solution

Please check out this StackOverflow question (In the question you got the answer):[^]

P.S.: I got this by Googling your question title. And this was the 1st result after sponsored links. So if you were not lazy and Googled it, you could have got the answer faster.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900