Skip to content

打印 HTML 的方法能批量打印吗? #78

@Exclusive-gfj

Description

@Exclusive-gfj

打印 HTML 的方法能批量打印吗?文档中的打印HTML是单个
/**

  • @description: 打印 html 字符串
  • @param {String} html 打印的html字符串
  • @param {String|number} templateId vue-plugin-hiprint 中的模板id,你可以自定义传入一个 Id,用于回调 success/error 判断
  • @param {String} printer 打印机名称 printer.name 可为空,缺省默认使用设备默认打印机
  • @param {pageSize} pageSize 打印纸张大小 { height: 80 * 1000, width: 60 * 1000 } 可为空,缺省默认使用打印机默认纸张
  • @description: 其他参数参考 默认打印参数说明
    */
    if (globalThis.connect) {
    socket.emit("news", { html, templateId, printer, pageSize });
    } else {
    alert("未连接客户端!");
    window.open("hiprint://");
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions