zoukankan      html  css  js  c++  java
  • WEB打印控件Lodop6.0简明教程

    扩展版的http协议页面调用与标准版完全兼容 ,支持双端口,格式如下:

    引用C-Lodop很简单,在页面head中添加 如下路径的js文件,就可用固定变量名LODOP或CLODOP发打印请求了:

    <script src='http://demo.c-lodop.com:8000/CLodopfuncs.js'></script>

    如果C-Lodop安装在PC本地,采用localhost或127.0.0.1,当有多个引用时,用name设置新变量名来区分调用:

    <script src='http://localhost:8000/CLodopfuncs.js?name=LODOPA'></script>

     页面引用了C-Lodop的js之后,就可以调用Lodop传统功能

    1.例如:(本地连着打印机,不需要远程链接)

    LODOP.PRINT_INIT("打印任务名");               //首先一个初始化语句 
    LODOP.ADD_PRINT_TEXT(0,0,100,20,"文本内容一");//然后多个ADD语句及SET语句 
    LODOP.PRINT();                               //最后一个打印(或预览、维护、设计)语句

    2.例如:(远程打印的步骤)

    var strHTML=document.getElementsByTagName("html")[0].innerHTML;
    LODOP.PRINT_INITA("测试C-Lodop远程打印四步骤");
    LODOP.SET_PRINTER_INDEXA('中通G420D,C8269878084;USER-20170802SP');//端桥驱动名或序号 , 端桥编号;端桥标识名
    LODOP.ADD_PRINT_TEXT(20,10,"90%","95%",strHTML);
    LODOP.ADD_PRINT_HTM(20,10,"90%","95%",strHTML);
    LODOP.PRINT();

    函数扩展

     

    LODOP.PRINT_SETUP();//打印维护
    LODOP.PREVIEW(true) //打印并预览
    LODOP.PRINTA(false,true);//不预览 ,但可选打印机
    LODOP.GET_VALUE("AO_PRINT_BridgeID",0);//获取本地端桥编号
    LODOP.SET_PRINT_PAGESIZE(intOrient,intPageWidth,intPageHeight,strPageName);//设定纸张大小
    LODOP.ADD_PRINT_HTM(intTop,intLeft,intWidth,intHeight,strHtml);//增加超文本项
    LODOP.ADD_PRINT_TEXT(intTop,intLeft,intWidth,intHeight,strContent);//增加纯文本项
    LODOP.ADD_PRINT_TABLE(intTop,intLeft,intWidth,intHeight,strHtml);//增加表格项
    LODOP.ADD_PRINT_SHAPE(intShapeType,intTop,intLeft,intWidth,intHeight,intLineStyle,intLineWidth,intColor);//画图形
    LODOP.SET_PRINT_STYLE(strStyleName, varStyleValue);//设置对象风格

    参考文献:http://demo.c-lodop.com:8000

          http://demo.c-lodop.com:8000/CLodopDemos/PrintSampIndex.html

          http://demo.c-lodop.com:8000/c_aoprint

    官网地址: http://www.mtsoftware.cn/index.html    (下载中含有技术手册)

  • 相关阅读:
    hdu 5119
    Codeforces Round #428 (Div. 2)
    2017"百度之星"程序设计大赛
    2017 Multi-University Training Contest
    2017 Multi-University Training Contest
    2017 UESTC Training for Search Algorithm & String
    Educational Codeforces Round 26 D dp,思维
    2017 UESTC Training for Math
    2017 Multi-University Training Contest
    2017"百度之星"程序设计大赛
  • 原文地址:https://www.cnblogs.com/lliuhh/p/8399617.html
Copyright © 2011-2022 走看看