Giter Site home page Giter Site logo

web_print_service's Introduction

网页打印控件

1.打印协议说明

1.1 基本打印

发送Http请求到本地 http://127.0.0.1:19999/?paperWidth=纸张宽度&paperHeight=纸张高度 post域中写需要打印的图片的Base64格式数据。

1.2 多页打印

多页打印只需在Post域中的打印图片数据使用 # 隔开就行。

1.3 安装

只需下载打开运行 printWin.exe

2.打印JS插件

JS插件使用html2canvas 工具将当前页面需要打印的内容生成图片并生成Base64数据,然后使用jquery 发送给本地地址。 js插件文件存在demo中

    jkPrint({
        width:150,//纸张宽度
        height:60,//纸张高度
        page:".print-page", //自动获取class 为printPage的Html元素进行打印,多个printPage 会自动进行分页
        success:function(){
            //打印成功的回调
        },
        error:function(error){
            //打印失败的回调
        }
    })

web_print_service's People

Contributors

xuejike avatar xuejike0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.