Lodop is a professional WEB printing control. Its design goal is to be simple and easy to use, and powerful enough to create a new situation in WEB printing development.
Lodop designers classified and summarized the printing development tasks under WEB, which were highly abstract, and designed to implement complex printing tasks with just a few functional functions, minimizing the user's knowledge cumbersome. The control publishing package consists of 3 system files, and all functions are implemented using several control parameters and 2 sets of function functions.
We have often encountered printing content on a certain web page. For example, when applying for a Hong Kong and Macao pass online, you need to fill out the application form and then print it out. How to implement printing technology like this? This kind of printing can be done through a plug-in called cloud printing. According to my understanding of cloud printing technology, the content that needs to be printed is uploaded to the "cloud" server, and then transmitted to the printer through the server.
Usually when we are online, we can click to print directly on a certain web page. This kind of printing is called network printing, which stores data on a printing device or a built-in storage device of the printer, while cloud printing is storing data on the "cloud" end.
Printing technology is used in many development projects. Printing technology is used in a Tangxia project that our project team has developed. Printing implementation requires adding downloaded printing files to eclipse.
Next is the entire printing implementation process:
(1) Prepare materials
In the Java compiler eclipse, put the file downloaded above into the corresponding folder and you can place it anywhere, as long as the path is referenced when it is referenced.
The .exe file is some plug-ins that need to be installed on the client. You can follow which bits of the browser (client) are.
This printing is only related to the front end, and the background code does not need to do anything.
(2) Effects to be achieved by demand
Click to print the page and print out A4 paper after previewing.
(3) Implement in the code
First, print.html page references the printed JS file
<!-- Print plugin--><script src="/js/Lodop/LodopFuncs.js" type="text/javascript"></script><object id="LODOP_OB"classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0><embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed></object>
This is the printed html page
<form action="offcomplete/print" method="post"><input type="hidden" id="id" name="offBatchfile.id"value="${offBatchfile.id!}" /><%if(off.display_Name == null){%><div><a href="#" onclick="PrintURL()"><i></i>Print</a> <a href="/offcomplete/export/${printUsefullId!}"><i></i>Download</a></div><%}%><div align="center" id="print"><% include("/offcomplete/view.html"){}%></div></form> Then give the print button a click event
<script type="text/javascript">//Print registration function PrintURL() {try {var LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));LODOP.PRINT_INIT("");LODOP.SET_PRINT_STYLE("FontSize", 18);LODOP.SET_PRINT_STYLE("Bold", 1);LODOP.ADD_PRINT_HTM(45, 55, 770, 1004, document.getElementById("print").innerHTML);LODOP.PREVIEW();} catch (e) {}}</script>If all these steps are completed, you can print it. You may encounter some problems when printing on the client (IE browser will not appear), such as prompting for such installation information. That means that install_lodop is not installed. Before installing, it is best to check the operating system of the computer and the browser used. It is divided into 32-bit and 64-bit, and choose to install.
I hope my sharing will leave a lingering fragrance. I suggest that no matter what kind of web project I do, the choice of a browser is still very important.
Generally speaking, I am used to using IE at the beginning, because no matter who bought the computer, Microsoft's things are definitely essential to install them in the system, unless they are not computers with Windows operating systems, and IE is the lowest-end for many browsers. Other browsers will have IE kernels more or less. The lowest-end browsers developed will run without any problems. Then according to customers' preferences, it is even more okay. In theory, this is the case. Lower versions can pass, let alone higher versions. Of course, as a developer, he still prefers Yu Huo Browser, so it is better to use it for debugging.