asp.net mvc5+ef6+easyui background Management system (-web) print

Source: Internet
Author: User
asp.net mvc5+ef6+easyui background Management system (-web) print Preface

1. This time to make up for the workflow, user form data printing

2. Use Jqprint as Web print plugin

3. Compatible: Firefox,chrome,ie,

4. No dependencies and no configuration, easy to use

Code Download: Https://github.com/tanathos/jquery.jqprint the workflow application form as an example

(because I do not have a printer locally, so eject output to fax and pdf,xps, output to PDF and print the result is actually the same) implementation method

Introduction of related JS

<script src= "~/scripts/jquery.min.js" ></script>
<script src= "~/scripts/jquery.jqprint-0.3.js" ></script>

I use the jquery v1.11.3 here to print

<script language= "javascript" >
function  Print () {
        $ ("#setFormLayout"). Jqprint ();
</script>

Just specify the div that prints the content, I have the above form included in ID setformlayout, attribute related

$ ("#printContainer"). Jqprint ({
     debug:false,//If true you can display IFRAME view effect (iframe default high and wide are very small, can be adjusted in the source code), the default is False
     Importcss:true,//true represents the introduction of the original page CSS, the default is true. (If it is true, the $ ("Link[media=print]") is found first, if there is no one to find the CSS file in $ ("link")
     printcontainer:true,// Indicates that if the object originally selected must be printed (note: setting to false may break your CSS rules).
     operasupport:true//says if the plugin must also support the Opera browser, in this case it provides a temporary print tab. Default is True
});
Printing Effect

Use is too simple, Jqprint source code is also extremely concise and easy to understand

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.