Press "Enter" to skip to content

Easy to Use Element Print Plugin for jQuery

jQuery.print is a plugin for printing certain parts of a page. Print is an easy and simple jQuery plugin that allows the visitor to print only the selected region of your web page.

jquery print section of page, print another page using jquery, jquery print div, jquery print page number, jquery print popup window, jquery print div with css

How to make use of it:

1. Specify a distinctive ID to your HTML aspect the place you wish to make it printable.

<div id="printable">
  Your Content
</div>

2. Create a button to print the required HTML aspect.

<button class="print">
  Print this
</button>

3. Import the newest jQuery library and jQuery print plugin.

<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/jQuery.print.js"></script> 

. Call the plugin on the print button and accomplished.

$(function() {
  $("#printable").find('.print').on('click', function() {
    $.print("#printable");
  });
});

5. Available plugin settings.

$("#printable").print({

  // Use Global styles
  globalStyles : false, 

  // Add link with attrbute media=print
  mediaPrint : false, 

  //Custom stylesheet
  stylesheet : "http://fonts.googleapis.com/css?family=Inconsolata", 

  //Print in a hidden iframe
  iframe : false, 

  // Don't print this
  noPrintSelector : ".avoid-this",

  // Add this on top
  append : "<br/>", 

  // Add this at bottom
  prepend : "<br/>",

  // Manually add form values
  manuallyCopyFormValues: true,

  // resolves after print and restructure the code for better maintainability
  deferred: $.Deferred(),

  // timeout
  timeout: 250,

  // Custom title
  title: null,

  // Custom document type
  doctype: '<!doctype html>'

});

jQuery Plugin To Print Any Part Of Your Page, jQuery Print Plugin/Github, jquery print div with bootstrap, jquery print preview


See Demo And Download

Official Website(DoersGuild): Click Here

This superior jQuery/javascript plugin is developed by DoersGuild. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published.