CN106569755B - Printing method and printing device for mobile payment terminal - Google Patents
Printing method and printing device for mobile payment terminal Download PDFInfo
- Publication number
- CN106569755B CN106569755B CN201610948389.1A CN201610948389A CN106569755B CN 106569755 B CN106569755 B CN 106569755B CN 201610948389 A CN201610948389 A CN 201610948389A CN 106569755 B CN106569755 B CN 106569755B
- Authority
- CN
- China
- Prior art keywords
- printed
- printing
- information
- picture
- mobile payment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1244—Job translation or job parsing, e.g. page banding
- G06F3/1247—Job translation or job parsing, e.g. page banding by conversion to printer ready format
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1278—Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
- G06F3/1285—Remote printer device, e.g. being remote from client or server
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/18—Payment architectures involving self-service terminals [SST], vending machines, kiosks or multimedia terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/20—Point-of-sale [POS] network systems
- G06Q20/209—Specified transaction journal output feature, e.g. printed receipt or voice output
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07G—REGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
- G07G1/00—Cash registers
- G07G1/0018—Constructional details, e.g. of drawer, printing means, input means
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Human Computer Interaction (AREA)
- General Engineering & Computer Science (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Record Information Processing For Printing (AREA)
Abstract
The invention is suitable for the technical field of printing, and provides a printing method and a printing device for a mobile payment terminal, wherein the printing method and the printing device comprise the following steps: acquiring information to be printed through a preset printing application program; converting the information to be printed into binary picture data; and printing a receipt containing the information to be printed according to the binaryzation picture data. According to the embodiment of the invention, the information to be printed is converted into the binary image data, and the information printing function is completed according to the binary image data. Compared with the prior art, the printing equipment for the mobile payment terminal can directly identify the machine language information based on the binary image data, so that a character lattice of a specific character code does not need to be acquired from a character library, the setting of a character library IC can be avoided, the problem that the printing of the information coded by adopting a character coding mode which is not supported by the character library cannot be correctly completed is solved, and the application scene of the mobile payment terminal is further expanded.
Description
Technical Field
The invention belongs to the technical field of printing, and particularly relates to a printing method for a mobile payment terminal and a printing device for the mobile payment terminal.
Background
With the popularization of the internet, mobile payment is also developing in a diversified direction. The mobile intelligent payment terminal brings great convenience to daily life of people. With the payment behavior, the bills printed by the mobile payment terminal are endowed with more application scenes, so that the printing device on the mobile payment terminal is required to provide more convenient customized functions for printing various types of characters and pictures.
As shown in fig. 1, the printing apparatus of the existing mobile payment terminal is mainly composed of five hardware parts: encryption chip, application chip, printing control chip, word stock IC and thermal sensitive printing device core. The bill printing implementation process comprises the following steps: the application chip sends the character code to the printing control chip, the printing control chip sends an instruction to the word stock IC to obtain a character lattice corresponding to the character code, the lattice content is converted into a data format which can be identified by the printing device and then is sent to the printing device core, and the printing of characters is completed by the printing device core.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems: the character content printed by the bill is limited by the recognition capability of the word stock, and the character coding mode which is not supported by the word stock cannot be correctly printed, so that the application scene of the mobile payment terminal is greatly limited.
Disclosure of Invention
The embodiment of the invention aims to provide a printing method and a printing device for a mobile payment terminal, and aims to solve the problem that the existing printing device for the mobile payment terminal cannot correctly print information coded by a character coding mode which is not supported by a character library.
The embodiment of the invention is realized in such a way that the printing method for the mobile payment terminal comprises the following steps:
acquiring information to be printed through a preset printing application program;
converting the information to be printed into binary picture data;
and printing a receipt containing the information to be printed according to the binaryzation picture data.
Another object of an embodiment of the present invention is to provide a printing apparatus for a mobile payment terminal, including:
the device comprises an acquisition unit, a printing unit and a printing unit, wherein the acquisition unit is used for acquiring information to be printed through a preset printing application program;
the conversion unit is used for converting the information to be printed into binary image data;
and the printing unit is used for printing the receipt containing the information to be printed according to the binaryzation picture data.
According to the embodiment of the invention, the information to be printed is converted into the binary image data, and the information printing function is completed according to the binary image data. Compared with the prior art, the printing equipment for the mobile payment terminal can directly identify the machine language information based on the binary image data, so that a character lattice of a specific character code does not need to be acquired from a character library, the setting of a character library IC can be avoided, the problem that the printing of the information coded by adopting a character coding mode which is not supported by the character library cannot be correctly completed is solved, and the application scene of the mobile payment terminal is further expanded.
Drawings
Fig. 1 is a block diagram illustrating a structure of a printing apparatus for a mobile payment terminal provided in the related art;
FIG. 2 is a flowchart of an implementation of a printing method for a mobile payment terminal according to an embodiment of the present invention;
fig. 3 is a flowchart of a specific implementation of the printing method S202 for a mobile payment terminal according to an embodiment of the present invention when information to be printed is a character;
fig. 4 is a flowchart of a specific implementation of the printing method S202 for a mobile payment terminal according to an embodiment of the present invention when information to be printed is a picture;
FIG. 5 is a block diagram of a printing apparatus for a mobile payment terminal according to an embodiment of the present invention;
fig. 6 is a block diagram of a printer for a mobile payment terminal related to a printing apparatus provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
According to the embodiment of the invention, each piece of information to be printed is taken as a basis, each piece of information to be printed is processed, and the binarization picture data is obtained, so that a printing device for the mobile payment terminal can print and output the receipt based on a series of received binarization picture data. By the printing method for the mobile payment terminal, provided by the embodiment of the invention, the expansibility of an application scene of the mobile payment terminal is ensured not to be invalid because a word stock in a printing device cannot identify the coding format of the data to be printed, and the sustainable expansion of the mobile payment terminal in the aspect of printing is ensured.
In the embodiment of the invention, the printing device is positioned in the mobile payment terminal, the mobile payment terminal provides the function of account payment for goods or services consumed by a user, and the embedded printing device can print and output the receipt and the evidence containing the detailed information of the account payment. By using the mobile payment terminal, a payment instruction can be directly or indirectly sent to a bank financial institution by using the internet or a close-range sensing mode and the like so as to generate the behaviors of money payment and fund transfer, thereby realizing the function of mobile payment. The printing device for the mobile payment terminal may be a printing device in an intelligent POS (point of sale) machine, a printing device of an aerial recharging machine, a printing device of a taxi ticket, a printing device of an automatic teller machine, or other movable embedded micro-printing devices, which is not limited herein.
Fig. 2 shows an implementation flow of the printing method for the mobile payment terminal provided by the embodiment of the invention, which is detailed as follows:
in step S201, information to be printed is acquired by a preset printing application.
In this embodiment, the mobile payment terminal includes one or more applications inside, and the information that needs to be printed and is input by the user in the printing application of the mobile payment terminal can be received through the user interaction interface provided by the terminal. The information input process can be completed by detecting a keyboard input instruction or a touch screen instruction.
In addition, the information to be printed can be transmitted to the printing application program in a wired or wireless mode through a third-party application program and third-party equipment, and the printing function based on third-party remote data is achieved.
As an embodiment of the present invention, the information to be printed is a character to be printed or a picture to be printed.
Through a text input method used in a printing application program, a user can input characters to be printed through a keyboard or a virtual keyboard on a mobile payment terminal, and the input mode of the characters to be printed is not limited by a text encoding format.
Through a drawing board function preset in the printing application program, a user can draw a pattern or self-define a personalized signature by taking a screen on the mobile payment terminal as a drawing board.
In practical application, the document printed by the mobile payment terminal often needs to contain a trademark of a merchant or some specific list symbols, so that the common trademarks and symbols are stored in the terminal in the form of pictures or characters, the data can be conveniently and directly called in each printing process and used as input information to be printed, and the printing efficiency of the printing device for the mobile payment terminal is improved.
In step S202, the information to be printed is converted into binarized picture data.
In this embodiment, the binarization representation converts the information to be printed with the character meaning or the picture meaning from the original multi-dimensional data into a binary data stream of 1 if not 0, and the processed whole piece of information to be printed is still information capable of reflecting the overall and local characteristics, and the binarization picture data enables a printing device based on a machine language to directly identify and print the information without being limited by a data format.
As another embodiment of the present invention, fig. 3 shows a specific implementation flow of the printing method S202 for a mobile payment terminal provided in the embodiment of the present invention when the information to be printed is a character, which is detailed as follows:
when the information to be printed is a character to be printed, converting the information to be printed into binary picture data comprises:
in S301, the characters to be printed are typeset, so as to obtain a typeset text of the characters to be printed based on the text type.
In this embodiment, a self-contained StaticLayout interface of a preset android Software Development Kit (SDK) is adopted to limit the width of a layout area required to be occupied when a character to be printed is drawn into a text, so that the automatic line feed of the character text can be realized according to the limited width when the text is laid out. And measuring the font of the character to be printed by adopting a TextPaint interface carried by a preset android SDK, so as to realize the drawing and typesetting of the character.
In S302, the typeset text is converted into a picture containing the characters to be printed by using a preset canvas component.
The Canvas component is an android Canvas component, and is represented in a blank rectangular area on an interactive screen provided by the mobile payment terminal, drawing can be performed in the area through a corresponding application program, and input events of a user can be captured from the area.
In this embodiment, the typeset text obtained in S301 is used as the input event, and the typeset text is used as the input of the Canvas component to generate the picture related to the typeset text and including the characters to be printed.
As an embodiment of the invention, the picture of the character to be printed is a color picture based on a red, green and blue (RGB) mode. The present embodiment can reduce the design complexity of the canvas component.
In S303, the picture is compressed, so that the resolution of the compressed picture is the printing resolution supported by the mobile payment terminal.
The printing resolution supported by the mobile payment terminal in this embodiment refers to the number of heating dots supported by the thermal sticker inside the printing device when the printing device is used to output a printed image, that is, the number of heating dots of each line of print data supported by the thermal sticker when each line of data is printed and output. The larger the value of the printing resolution, the finer the printed image.
When compressing a picture, the width of the picture is mainly adjusted and compressed so as to reduce the resolution of the picture.
In this embodiment, the printing resolution supported by the mobile payment terminal is obtained in advance, and then the picture is compressed to the resolution supported by the mobile payment terminal.
Particularly, when the print resolution is obtained, due to downward compatibility of the print resolution, in this embodiment, when the picture is compressed, the resolution of the compressed picture is smaller than the print resolution supported by the mobile payment terminal.
In S304, graying the compressed picture to obtain a grayscale image of the character to be printed.
In this embodiment, the picture is grayed.
For example, when the picture is an RGB picture, graying is to convert the value of each pixel point R, G, B in the picture into the same value, where the same value is a grayscale value. The method for performing graying processing on the compressed RGB picture includes, but is not limited to, a component method, a maximum value method, an average value method, a weighted average method, and the like.
Particularly, the graying processing method provided in this embodiment is a weighted average method, and performs weighted average on the RGB three-component value of each pixel point in the image to obtain the grayscale value of the pixel point. The calculation formula of the Gray value Gray is as follows:
Gray=R*0.299+G*0.587+B*0.114
the gray level image of the character to be printed is formed by the gray level value set of all the pixel points in the RGB image.
In S305, the gray-scale map is converted into the binarized picture data according to the size relationship between the gray-scale value of each pixel point in the gray-scale map and a preset threshold value.
For the Gray value Gray of each pixel point in the Gray map, if the Gray is smaller than a preset threshold value, adjusting the Gray value corresponding to the pixel point to be 1; and when the Gray is larger than the set threshold value, adjusting the Gray value corresponding to the pixel point to be 0. After the binarization process is finished, the picture can show obvious black and white effect, and a binarization picture data set of the picture is obtained.
In this embodiment, the preset threshold is set according to the printing effect of a specific printing device.
Preferably, in the embodiment of the present invention, the preset threshold is 128.
As another embodiment of the present invention, fig. 4 shows a specific implementation flow of the printing method S202 for a mobile payment terminal provided in the embodiment of the present invention when the information to be printed is a picture, which is detailed as follows:
in S401, the picture to be printed is compressed, so that the resolution of the compressed picture to be printed is the printing resolution supported by the mobile payment terminal.
In S402, graying the compressed picture to be printed to obtain a grayscale image of the picture to be printed.
In S403, the gray scale map is converted into the binarized picture data according to the size relationship between the gray scale value of each pixel point in the gray scale map and a preset threshold value.
In this embodiment, because the input information to be printed is the image information, the image does not need to be redrawn, and only the image needs to be directly compressed, grayed and binarized to obtain the binarized image data set of the image to be printed.
The content not mentioned in this embodiment is the same as the specific implementation principle of the printing method S202 for a mobile payment terminal provided in the embodiment of the invention shown in fig. 3 when the information to be printed is a character, and is not repeated herein.
The embodiment of the invention improves the application development flexibility of the printing device for the mobile payment terminal, so that an application developer in mobile payment only needs to care about the design of application interaction. The printing device for the mobile payment terminal in the embodiment can print all fonts of the font library codes supported by the terminal system, and can realize vector amplification and reduction printing of various characters and pictures. The printing device saves a word stock IC module of the printing device in the prior art on hardware, and replaces the original function of the word stock IC by converting characters into pictures.
In step S203, a receipt containing the information to be printed is printed according to the binarized picture data.
And heating the point indicated by the binary image data through a heat-sensitive sticker in the printing device, so that the receipt containing the information to be printed can be output.
As an embodiment of the present invention, the implementation flow of S203 is specifically as follows:
printing the binary image data in batches according to the printing resolution supported by the mobile payment terminal, wherein the collection of the binary image data printed in each batch is output as a receipt containing the information to be printed; the number of bytes of the binarized picture data printed in each batch is the quotient of the printing resolution supported by the mobile payment terminal and the number eight.
In the embodiment, the uniformly processed binary image data is printed in batches, and the byte number of the binary image data printed in each batch is the quotient of the printing resolution ratio supported by the mobile payment terminal and the number eight, so that the number of the data bytes printed at each time cannot exceed the number of the printing bytes supported by the printing device, the occurrence of data overflow is avoided, and the accuracy of information printing is improved.
According to the embodiment of the invention, the information to be printed is converted into the binary image data, and the printing function of the information is completed according to the binary image data, so that compared with the traditional printing method for the mobile payment terminal, the method can avoid the arrangement of a font library IC, reduce the number of chips on hardware, and reduce the design complexity and hardware cost of the hardware; because the printing equipment for the mobile payment terminal can directly identify the machine language information based on the binary image data, a character lattice of a specific character code does not need to be obtained from a character library, the problem that the printing of information coded by a character coding mode which is not supported by the character library cannot be correctly completed is solved, and the application scene of the mobile payment terminal is further expanded.
Fig. 5 shows a block diagram of a printing apparatus for a mobile payment terminal according to an embodiment of the present invention, and for convenience of explanation, only the parts related to the embodiment are shown.
Referring to fig. 5, the printing apparatus of the mobile payment terminal includes:
an acquisition unit 51 configured to acquire information to be printed by a preset printing application.
And a converting unit 52, configured to convert the information to be printed into binarized picture data.
And the printing unit 53 is configured to print a receipt containing the information to be printed according to the binarized picture data.
Optionally, the information to be printed is characters to be printed or pictures to be printed.
Optionally, when the information to be printed is a character to be printed, the converting unit 52 is specifically configured to:
typesetting the characters to be printed to obtain a typesetting text of the characters to be printed based on the text type;
converting the typesetting text into a picture containing the characters to be printed by using a preset canvas assembly;
compressing the picture to enable the resolution of the compressed picture to be the printing resolution supported by the mobile payment terminal;
graying the compressed picture to obtain a grayscale image of the character to be printed;
and converting the gray-scale image into the binary image data according to the size relation between the gray-scale value of each pixel point in the gray-scale image and a preset threshold value.
Optionally, when the information to be printed is a picture to be printed, the converting unit 52 is specifically configured to:
compressing the picture to be printed to enable the resolution of the compressed picture to be printed to be the printing resolution supported by the mobile payment terminal;
graying the compressed picture to be printed to obtain a grayscale image of the picture to be printed;
and converting the gray-scale image into the binary image data according to the size relation between the gray-scale value of each pixel point in the gray-scale image and a preset threshold value.
Optionally, the printing unit 53 is specifically configured to:
printing the binary image data in batches according to the printing resolution supported by the mobile payment terminal, wherein the collection of the binary image data printed in each batch is output as a receipt containing the information to be printed;
the byte number of the binaryzation picture data printed in each batch is the quotient of the printing resolution ratio supported by the mobile payment terminal and the number eight
According to the embodiment of the invention, the information to be printed is converted into the binary image data, and the printing function of the information is completed according to the binary image data, so that compared with the traditional printing method for the mobile payment terminal, the method can avoid the arrangement of a font library IC, reduce the number of chips on hardware, and reduce the design complexity and hardware cost of the hardware; because the printing equipment for the mobile payment terminal can directly identify the machine language information based on the binary image data, a character lattice of a specific character code does not need to be obtained from a character library, the problem that the printing of information coded by a character coding mode which is not supported by the character library cannot be correctly completed is solved, and the application scene of the mobile payment terminal is further expanded.
Fig. 6 is a block diagram illustrating a printer for a mobile payment terminal related to a printing apparatus provided in an embodiment of the present invention. Referring to fig. 6, the printer includes: an application chip 61, an encryption chip 62 and a printer core 63. Those skilled in the art will appreciate that the structure of the printer for the mobile payment terminal shown in fig. 6 does not constitute a limitation of the printer, and the arrangement may be implemented by different chips.
The following describes each constituent chip of the printer in detail with reference to fig. 6:
the application chip 61 is configured to obtain information to be printed through a preset printing application program, convert the information to be printed into binarized picture data, and send the binarized picture data to the encryption chip 62.
Particularly, when the information to be printed is a character to be printed, the application chip 61 is specifically configured to typeset the character to be printed, so as to obtain a typesetting text based on the character to be printed; converting the drawn text into a red, green and blue (RGB) picture by utilizing a preset canvas assembly; compressing the RGB picture to enable the resolution of the compressed RGB picture to be the resolution supported by the printing device core; graying the compressed RGB picture to obtain a grayscale image of the character to be printed; and converting the gray-scale image into the binary image data according to the size relation between the gray-scale value of each pixel point in the gray-scale image and a preset threshold value.
In particular, when the message to be printed is a picture to be printed, the application chip 51 is specifically configured to compress the picture to be printed, so that the resolution of the compressed picture to be printed is the resolution supported by the printing device core; graying the compressed picture to be printed to obtain a grayscale image of the picture to be printed; and converting the gray-scale image into the binary image data according to the size relation between the gray-scale value of each pixel point in the gray-scale image and a preset threshold value.
Further, the encryption chip 62 is configured to transmit the binarized picture data to the printer core 63.
Specifically, the encryption chip 62 sends the binarized picture data to the printer core 63 in batches according to the resolution supported by the printer core 63; the number of bytes of the binarized picture data sent in each batch is a quotient of the resolution supported by the printer core 63 and the number eight.
In addition, the printer core 63 is configured to print a receipt containing the information to be printed according to the binarized picture data.
The thermal printer core controls the heating element on the printing device core to pass through the current according to a series of received binaryzation picture data, so that the information to be printed is changed into the printing content on the output paper.
In the process of implementing the invention, the inventor finds that in practical situations, because the requirement of the printing device core on the time sequence control is very high, the time required for the control is accurate to microsecond level, and therefore, a real-time system is required to be matched for controlling the printing device core to print the information to be printed.
The factory design of the application chip is realized based on an android system, and is an operating system based on a Linux kernel, and the scheduling time of the operating system is generally 10ms (milliseconds), so that the printing device core cannot be controlled to complete a large amount of printing operations accurate to microsecond level.
In this embodiment, the factory design of the encryption chip is implemented based on the embedded single chip, the execution of the rest program instructions is interrupted by the timer preset in the encryption chip, and the interrupt priority is set to a higher priority, so that the microsecond-level accurate control of the printing device core can be preferentially completed in a limited time period. Therefore, the binarization picture data are directly sent to the printing device core through the encryption chip, and the control command is sent to enable the printing device core to execute the printing action, so that the real-time requirement of the printing device core can be met.
In the embodiment of the invention, the information to be printed is converted into the binary image data by the application chip, and the encryption chip controls the printing device core to complete the printing function of the information, so that compared with the traditional mobile payment terminal printing method, the method can avoid the arrangement of a printing control chip and a font library IC, reduce the number of chips on hardware, and reduce the design complexity and hardware cost of the hardware; the character dot matrix of the specific character code is not required to be obtained from the character library, so that the problem that the printing of the information coded by the character code mode which is not supported by the character library cannot be completed correctly is solved, and the application scene of the mobile payment terminal is further expanded.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (4)
1. A printing method for a mobile payment terminal, comprising:
acquiring information to be printed through a preset printing application program, wherein the information to be printed is characters to be printed;
converting the information to be printed into binary picture data;
printing a receipt containing the information to be printed according to the binaryzation picture data;
when the information to be printed is a character to be printed, converting the information to be printed into binary picture data comprises:
typesetting the characters to be printed to obtain a typesetting text of the characters to be printed based on the text type;
generating a picture which is related to the typesetting text and contains the characters to be printed by utilizing a preset canvas assembly; the picture is a color picture based on a red, green and blue (RGB) mode;
compressing the picture to enable the resolution of the compressed picture to be the printing resolution supported by the mobile payment terminal;
graying the compressed picture to obtain a grayscale image of the character to be printed;
and converting the gray map into the binary image data according to the size relation between the gray value of each pixel point in the gray map and a preset threshold value, and sending the binary image data to an encryption chip, wherein the encryption chip is used for sending the binary image data to a printer core.
2. The method as claimed in claim 1, wherein said printing the receipt containing the information to be printed according to the binarized picture data comprises:
printing the binary image data in batches according to the printing resolution supported by the mobile payment terminal, wherein the collection of the binary image data printed in each batch is output as a receipt containing the information to be printed;
the number of bytes of the binarized picture data printed in each batch is the quotient of the printing resolution supported by the mobile payment terminal and the number eight.
3. A printing apparatus for a mobile payment terminal, comprising:
the device comprises an acquisition unit, a processing unit and a printing unit, wherein the acquisition unit is used for acquiring information to be printed through a preset printing application program, and the information to be printed is a character to be printed;
the conversion unit is used for converting the information to be printed into binary image data;
the printing unit is used for printing a receipt containing the information to be printed according to the binaryzation picture data;
when the information to be printed is a character to be printed, the conversion unit is specifically configured to:
typesetting the characters to be printed to obtain a typesetting text of the characters to be printed based on the text type;
generating a picture which is related to the typesetting text and contains the characters to be printed by utilizing a preset canvas assembly; the picture is a color picture based on a red, green and blue (RGB) mode;
compressing the picture to enable the resolution of the compressed picture to be the printing resolution supported by the mobile payment terminal;
graying the compressed picture to obtain a grayscale image of the character to be printed;
and converting the gray map into the binary image data according to the size relation between the gray value of each pixel point in the gray map and a preset threshold value, and sending the binary image data to an encryption chip, wherein the encryption chip is used for sending the binary image data to a printer core.
4. The printing apparatus of claim 3, wherein the printing unit is specifically configured to:
printing the binary image data in batches according to the printing resolution supported by the mobile payment terminal, wherein the collection of the binary image data printed in each batch is output as a receipt containing the information to be printed;
the number of bytes of the binarized picture data printed in each batch is the quotient of the printing resolution supported by the mobile payment terminal and the number eight.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610948389.1A CN106569755B (en) | 2016-10-26 | 2016-10-26 | Printing method and printing device for mobile payment terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610948389.1A CN106569755B (en) | 2016-10-26 | 2016-10-26 | Printing method and printing device for mobile payment terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106569755A CN106569755A (en) | 2017-04-19 |
CN106569755B true CN106569755B (en) | 2020-06-05 |
Family
ID=58535032
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610948389.1A Active CN106569755B (en) | 2016-10-26 | 2016-10-26 | Printing method and printing device for mobile payment terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106569755B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109669650A (en) * | 2017-10-16 | 2019-04-23 | 宁波柯力传感科技股份有限公司 | The image display method of weighing dot matrix large screen |
CN108628557A (en) * | 2018-04-19 | 2018-10-09 | 深圳鼎智通讯股份有限公司 | A kind of efficient printer technology based on picture compression |
CN109177510A (en) * | 2018-08-12 | 2019-01-11 | 深圳国微金融科技有限公司 | A kind of thermal printer based on external typesetting |
CN109901803B (en) * | 2019-03-12 | 2022-09-09 | 南京沁恒微电子股份有限公司 | Additional printing processing method for micro printer and computer readable storage medium |
CN111460782B (en) * | 2020-04-01 | 2023-08-22 | 支付宝(杭州)信息技术有限公司 | Information processing method, device and equipment |
CN113805822A (en) * | 2021-08-26 | 2021-12-17 | 福建魔方电子科技有限公司 | Ticket printing generation method, device, equipment and medium on embedded terminal |
CN115599323B (en) * | 2022-12-01 | 2023-03-21 | 深圳诺优学科技有限公司 | Printing device control method, apparatus, device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4677571A (en) * | 1985-02-08 | 1987-06-30 | Rise Technology Inc. | Electronic publishing |
JPH0618432A (en) * | 1991-10-15 | 1994-01-25 | Matsushita Electric Ind Co Ltd | Wiring pattern inspection unit |
US5553171A (en) * | 1993-11-01 | 1996-09-03 | Xerox Corporation | Apparatus and method for arbitrary binary resolution conversion |
EP0772117A1 (en) * | 1995-11-01 | 1997-05-07 | Seiko Epson Corporation | Printer driver architecture for reducing band memory |
JP2010135986A (en) * | 2008-12-03 | 2010-06-17 | Canon Inc | Output system |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001078000A2 (en) * | 2000-04-11 | 2001-10-18 | Oce Printing Systems Gmbh | Method for producing and outputting at least one printed page |
CN101335805A (en) * | 2008-05-30 | 2008-12-31 | 北京天语君锐科技有限公司 | Text file printing method in mobile terminal |
CN102117188A (en) * | 2009-12-31 | 2011-07-06 | 鸿富锦精密工业(深圳)有限公司 | Printing system and printing method |
CN102810163B (en) * | 2011-06-02 | 2015-03-25 | 航天信息股份有限公司 | Picture channel and information transfer method thereof |
CN104574707B (en) * | 2013-10-28 | 2017-09-05 | 航天信息股份有限公司 | A kind of method of printed invoice |
CN104714763A (en) * | 2013-12-17 | 2015-06-17 | 厦门雅迅网络股份有限公司 | Method for printing electronic signature on mobile terminal |
CN105589686B (en) * | 2014-11-14 | 2021-03-02 | 航天信息股份有限公司 | Template-based information input and printing method and device under WinCE platform |
-
2016
- 2016-10-26 CN CN201610948389.1A patent/CN106569755B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4677571A (en) * | 1985-02-08 | 1987-06-30 | Rise Technology Inc. | Electronic publishing |
JPH0618432A (en) * | 1991-10-15 | 1994-01-25 | Matsushita Electric Ind Co Ltd | Wiring pattern inspection unit |
US5553171A (en) * | 1993-11-01 | 1996-09-03 | Xerox Corporation | Apparatus and method for arbitrary binary resolution conversion |
EP0772117A1 (en) * | 1995-11-01 | 1997-05-07 | Seiko Epson Corporation | Printer driver architecture for reducing band memory |
JP2010135986A (en) * | 2008-12-03 | 2010-06-17 | Canon Inc | Output system |
Non-Patent Citations (1)
Title |
---|
"基于打印指令的检测数据快速解析与输出***研究与实现";李大森;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20090715;I138-380 * |
Also Published As
Publication number | Publication date |
---|---|
CN106569755A (en) | 2017-04-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106569755B (en) | Printing method and printing device for mobile payment terminal | |
US8610929B2 (en) | Image processing apparatus, control method therefor, and program | |
US20210064859A1 (en) | Image processing system, image processing method, and storage medium | |
CN110321084A (en) | Machine-readable security label and its generating process | |
CN101308610A (en) | Calligraphy exercising method and apparatus based on mobile terminal | |
CN107423004B (en) | Method for printing bill by POS terminal and POS terminal | |
CN110263781B (en) | Image processing device, image processing method, and storage medium | |
CN108038093B (en) | PDF character extraction method and device | |
CN103150293B (en) | The method that the electronic installation of mess code recovery can be carried out and recover mess code | |
CN107346399A (en) | Electronic signature method and system | |
JP2020170309A (en) | Image processing system, image processing device, image processing method, and program | |
JP2015138496A (en) | Document file generation device and document file generation method | |
US20050146528A1 (en) | Arrangement for the scaling of fonts | |
CN112214180A (en) | Method and system for controlling the rendering of objects in a printed document by a raster image processor | |
CN111612138A (en) | Neural network image identification system, neural network construction system and method | |
US8335007B2 (en) | Image processing apparatus | |
JP2016221806A (en) | Image formation apparatus | |
JP2020086850A (en) | Information processor, information processing method and program, and image forming system | |
JP7147544B2 (en) | Information processing device and information processing method | |
CN115187987A (en) | Method and device for recognizing text outside special area, electronic equipment and storage medium | |
CN113038184A (en) | Data processing method, device, equipment and storage medium | |
CN112101356A (en) | Method and device for positioning specific text in picture and storage medium | |
US11030500B2 (en) | Code processing device and code processing method | |
JP2020099030A (en) | Information processing apparatus and information processing method | |
CN1787662A (en) | Apparatus and method for controlling movable terminal display |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Guangdong Nanshan District street of Shenzhen city in Guangdong province 518000 software industry base in Shenzhen, fifth building room 505 Applicant after: Shenzhen box Mdt InfoTech Ltd Address before: Guangdong Nanshan District street of Shenzhen city in Guangdong province 518000 software industry base in Shenzhen, fifth building room 505 Applicant before: Shenzhen Iboxpay Information Technology Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |