Web Print Control Lodop

Source: Internet
Author: User

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&gt, 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 &LT;/A&GT, 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

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.