Giter Club home page Giter Club logo

Comments (5)

B200019A avatar B200019A commented on May 29, 2024

var printText =
EscCommand.InitializePrinter +
EscCommand.TextAlignCenter +
EscCommand.BoldOn +
"Shop Name\n" +
EscCommand.BoldOff +
" No 22560, Jalan hahaha 19 , Bandar Putra , 81000 Kulai, Johor Malaysia\n" +
"-------------------------------\n" +
EscCommand.TextAlignLeft +
Date: ${new Date().toLocaleString()}\n +
"Receipt #: 1111\n" +
"-------------------------------\n" +
Merchange Member: ${merchantMemberId}\n +
"-------------------------------\n" +
Item Price Qty Amount\n +
EscCommand.TextAlignLeft +
"-------------------------------\n" +
${products[0]} 2.00 2 ${subtotalPrice}\n +
"Product B 1.00 2 2.00\n" +
"-------------------------------\n" +
"Total Items 2\n" +
"-------------------------------\n" +
"Total Price: 6.00\n"+
"-------------------------------\n" +
"Amount Received RM10\n"+
"Change Return RM6\n"+
"-------------------------------\n" +
EscCommand.TextAlignCenter +
"Thank You, Visit Again\n"+
EscCommand.TextAlignLeft +
"-------------------------------\n" +
EscCommand.TextAlignCenter +
"Power By Shop Name\n"+
EscCommand.PrintAndFeedMaxLine+
cutAndFeedLine();

我使用的thermal printer只打印到"Change Return RM6\n"+这行 剩下的就直接忽略 没有打印出来

from cordova-posprinter-sample.

liangminhua avatar liangminhua commented on May 29, 2024

根据打印机规格,实现字符串分片处理。发送多次打印指令。

from cordova-posprinter-sample.

B200019A avatar B200019A commented on May 29, 2024

好的 发送多次打印指令有什么建议吗? 使用什么方法?

from cordova-posprinter-sample.

liangminhua avatar liangminhua commented on May 29, 2024

分段发送指令,或者以EscCommand.printAndFeedLine(0)隔开一定行数文字

EscCommand.prototype.printAndFeedLine = function(verticalUnit) {

from cordova-posprinter-sample.

B200019A avatar B200019A commented on May 29, 2024

好的 谢谢你

from cordova-posprinter-sample.

Related Issues (11)

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.