Pre-order
There is a problem ahead: online printing contracts. Through the parties to find information and consult others, and finally the perfect solution to this problem. Among the solutions, you can view: http://www.cnblogs.com/zcy-xy/p/4290436.html. This is only a detailed introduction of some methods, I hope to give you some ideas. In fact, the implementation of printing in the back, encountered a lot of problems, now listed.
First, the browser comes with printing
It is easy and easy to bring your own print to your browser. In fact, we are very familiar with the printing, the final printing is a picture. Then when the call browser comes with the print, it automatically generates a picture for the current page for printing. However, there is a problem with the Print Setup issue . For us, this common sense is still there, but sometimes we really want to think of the user as a computer idiot, no operation. So now this approach must not be realized.
Second, Lodop online printing
About the solution to the front online printing problem, mention about Lodop. At that time, because of too many contract templates, too much content and gave up. Later in the printing, carefully studied for a long time. Check out the relevant documents, the line of defense Lodop in the printing aspect is indeed more convenient. Here are some tips on how to use it and share it with you.
When printing here, I used to display loading information in the picture, LODOP only to achieve printing. First we need to download the relevant documents on the official website, address: http://www.lodop.net/download.html.
LODOP Print Implementation
1. First in the page reference download the Lodopfuncs.js file in the package.
2. Install the Install_lodopxx.exe file according to the current operating system selection, only install this file to be implemented when the page prints preview. The lodopfuncs.js comes with the verification that this plugin is installed.
3.lodop are all implemented by JS, then the following to start the implementation of JS. Here I simply implement the function of printing. For detailed information, please visit the official website or view the technical manual
1 varLodop;//declared as a global variable2$ (document). Ready (function () {3 //Verify that the plug-in is currently installed4Lodop =Getlodop ();5 });6 7 //Print Preview, this feature can be in an edit page, edit the style you want, click on the evasion will pop up the relevant current settings8 functionPrn1_preview () {9 createoneformpage ();Ten Lodop. PREVIEW (); One //alert (Lodop. Print_design ()); A }; - //Direct Printing - functionPrn_print () { the createoneformpage (); - Lodop. PRINT (); - }; - //Create a printed page + functionCreateoneformpage () { -Lodop =Getlodop (); +Lodop. Set_print_style ("FontSize", 18); ALodop. Set_print_style ("Bold", 1); atLodop. Add_print_url (-16,-21, 800, 5000, URL); -};
View Code
Here I only use the LODOP and direct printing. Lodop actually includes, oneself designs the template, and gives the corresponding to do the point padding value, and realizes the multi-medium printing way, for example: incoming Html,url and so on. Here is not to repeat. Interested friends can understand. Here is mainly to share a plugin for everyone. Hope to be of help to you. If you are interested, we can communicate with each other.
Lodop of printing