GithubHelp home page GithubHelp logo

leeyonggak / jquery-printpage-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from posabsolute/jquery-printpage-plugin

0.0 0.0 0.0 83 KB

A plugin that print any linked pages without loading a popup

Home Page: http://www.position-absolute.com/articles/printing-web-pages-a-new-jquery-printing-plugin/

JavaScript 88.52% HTML 11.48%

jquery-printpage-plugin's Introduction

#jQuery printPage plugin

Print any page within your website without quitting your page.

Typically you would create a special print template, open it in a popup and then call window.print().This plugin take the page you want to print, put it in an iframe and print it without the need of a popup

Also, because you still actually link to your popup, if some of your users have javascript disabled, they could still open the special template and print it.

Example: http://www.position-absolute.com/creation/print/

##Using it

$(".btnPrint").printPage()

##Optional There is some options available: ###url: Overwrite the automatic url fetching in the href attribute ###message: The text message displayed before the print page is loaded ###attr (default: href) : change the default href attribute that is used to retrieve the print page URL.

$(".btnPrint").printPage({
  url: "/print/custompage/html",
  attr: "href",
  message:"Your document is being created"
})

To be a little more specific, if you declare a url it will not look in the attribut and directly use this one.

##Tested on: Firefox 3.6 IE 7&8 Chrome latest

** I use a data url background image and some CSS3 properties for the little warning box, you might want to have a look if you care about IE

endorse

jquery-printpage-plugin's People

Contributors

posabsolute avatar davidpaulsson avatar karol-may avatar antongorodezkiy avatar saberma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.