0

I have an html page with a link like this:

<a href="javascript:window.print()">Print QR code</a>

When a user clicks it, it does what you think it will.. prints the whole page.. sadly, it does not print the QR code at all. How do I specify what I want to print? Like, lets say I want to print a specific image on the page?

2 Answers 2

2

I know this is an old post, but just wanted to share you this solution that worked very well without using jquery.

http://www.codescratcher.com/javascript/print-image-using-javascript/#comment-762

Sign up to request clarification or add additional context in comments.

1 Comment

Please include some content fromthe link.
1

I found this plugin that does the trick:

http://projects.erikzaadi.com/jQueryPlugins/jQuery.printElement/

$('img#some_id').printElement();

1 Comment

Ah cool saweet man will remove my post check this out: bennadel.com/blog/… or stackoverflow.com/questions/6674425/… if need be

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.