Add the following code to the page:
<ObjectID= "Lodop_ob"ClassID= "Clsid:2105c259-1e0c-4534-8141-a753534cb4ca"width= "0"Height= "0"> <EmbedID= "Lodop_em"type= "Application/x-print-lodop"width= "0"Height= "0"pluginspage= "/content/plugins/lodop/install_lodop.exe"></Embed></Object>
View Code
JS Code:
//PrintvarLodop;functionPrintPage (areaid) {Lodop= Getlodop (document.getElementById (' Lodop_ob '), document.getElementById (' Lodop_em '))); Lodop. Print_init ("Pagination Printing"); Lodop. Set_print_mode ("Print_page_percent", "92%"); Lodop. Add_print_htm (1170, "bottommargin:30px", document.getElementById (areaid). InnerHTML); Lodop. PREVIEW ();}functionGetlodop (Oobject, oembed) {/************************** This function determines which object to use as the control instance depending on the browser type: IE series, ie kernel series browser with Oobject, other browsers (Firefox series, Chrome series, opera department Safari series, etc.) with oembed. **************************/ varSTRHTML1 = "<br><br><br><br><font color= ' #FF00FF ' > Print control not installed! Click here <a href= '/content/ Plugins/lodop/install_lodop.exe ' > Perform installation </a>, please refresh the page or re-enter after installation. </font> "; varSTRHTML2 = "<br><br><br><br><font color= ' #FF00FF ' > Print controls need to be upgraded! Click here <a href= '/content/ Plugins/lodop/install_lodop.exe ' > Perform upgrade </A>, please re-enter after upgrade. </font> "; varSTRHTML3 = "<br><br><br><br><font color= ' #FF00FF ' > Note:<br> 1: If you have installed Lodop older version of the attachment Npactivexplugin, please uninstall it in the extensions, tools, add-ons, <br>2: If the browser shows an exception such as stagnation, it is recommended to close it " Plugin-container "(Online search Close method) function;</font>"; varLodop =oembed; Try { if(Navigator.appVersion.indexOf ("MSIE") >= 0) Lodop =Oobject; if(Lodop = =NULL) || (typeof(Lodop. VERSION) = = "Undefined")) { if(Navigator.userAgent.indexOf (' Firefox ') >= 0) Document.documentElement.innerHTML= STRHTML3 +Document.documentElement.innerHTML; if(Navigator.appVersion.indexOf ("MSIE") >= 0) document.write (STRHTML1);ElseDocument.documentElement.innerHTML= StrHtml1 +Document.documentElement.innerHTML; returnLodop; } Else if(Lodop. VERSION < "6.0.5.8") { if(Navigator.appVersion.indexOf ("MSIE") >= 0) document.write (STRHTML2);ElseDocument.documentElement.innerHTML= STRHTML2 +Document.documentElement.innerHTML; returnLodop; } //* * * * The following blank position is suitable for calling the Unified function: ********* //******************************************* returnLodop; } Catch(Err) {Document.documentElement.innerHTML= "Error:" + STRHTML1 +Document.documentElement.innerHTML; returnLodop; }}
View Code
Control uses:
Web Print Control Lodop