jQuery Plugin For Html Print Preview printPreview - Download jQuery Plugin For Html Print Preview - printPreview

Download jQuery Plugin For Html Print Preview – printPreview

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin For Html Print Preview – printPreview, hope it will help you in programming stack.

jQuery Plugin For Html Print Preview printPreview - Download jQuery Plugin For Html Print Preview - printPreview
File Size: 4.18 KB
Views Total: 34238
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Print-Preview is a jQuery plugin that allows a “Print Preview” button to open a new browser window displaying specific print area of your webpage.

How to use it:

1. Load jQuery library and the printPreview.js script in the web page.

1 <script src="jquery.min.js"></script>
2 <script src="js/printPreview.js"></script>

2. Create a Print Preview button on the webpage.

1 <button id="btnPrint">Print Preview</button>

3. Enable the plugin and specify the specific part of the webpage you want to print.

1 $("#btnPrint").printPreview({
2   obj2print:'#main'
3 });

4. Customize the print preview window.

01 // additonal CSS styles
02 style:'',
03  
04 // the width of the print preview window
05 width: '670',
06  
07 // the width of the print preview window
08 height:screen.height,
09  
10 // top position
11 top:0, 
12  
13 // left position
14 left:'center',
15  
16 // resizable
17 resizable : 'yes',
18  
19 // display scrollbar
20 scrollbars:'yes',
21  
22 // display status
23 status:'no',
24  
25 // title of the print preview window
26 title:'Print Preview'

Change log:

2015-08-24

  • multiple seperate window and input values

This awesome jQuery plugin is developed by alamnaryab. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net