Thursday, September 22, 2011

Print a Paragraph

By default, browsers will print the content of an entire page/web page or selected text. With some simple scripting you can make it easier for your users to get the browser to print the contents of a particular block or paragraph. The trick is to copy these contents into a new popup window, then print the contents of that window. I put together a very simple demo, which I should turn into a plugin, of how to do this:

1 comment:

  1. Just adding a note about Printliminator. It's a bookmarklet that lets you remove unwanted items from a page in anticipation of printing.

    I think I may need to update this code to include the print stylesheet they are using as well!

    ReplyDelete