CN109901803B - Additional printing processing method for micro printer and computer readable storage medium - Google Patents

Additional printing processing method for micro printer and computer readable storage medium Download PDF

Info

Publication number
CN109901803B
CN109901803B CN201910182993.1A CN201910182993A CN109901803B CN 109901803 B CN109901803 B CN 109901803B CN 201910182993 A CN201910182993 A CN 201910182993A CN 109901803 B CN109901803 B CN 109901803B
Authority
CN
China
Prior art keywords
bmp
printer
printing
dot matrix
height
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
Application number
CN201910182993.1A
Other languages
Chinese (zh)
Other versions
CN109901803A (en
Inventor
刘志斌
刘帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Qinheng Microelectronics Co ltd
Original Assignee
Nanjing Qinheng Microelectronics Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nanjing Qinheng Microelectronics Co ltd filed Critical Nanjing Qinheng Microelectronics Co ltd
Priority to CN201910182993.1A priority Critical patent/CN109901803B/en
Publication of CN109901803A publication Critical patent/CN109901803A/en
Application granted granted Critical
Publication of CN109901803B publication Critical patent/CN109901803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The invention discloses a method for processing additional printing of a micro printer and a computer readable storage medium, comprising the following steps: s1, appointing and reading a BMP picture to be chased; s2, dividing the dot matrix; s3, filling a command header; s4, splicing to generate a file; and S5, calling an additional printing interface. The method has the advantages of convenient operation, high efficiency and good flexibility, and effectively simplifies the pursuit of the BMP format content.

Description

Additional printing processing method for micro printer and computer readable storage medium
Technical Field
The invention relates to an additional printing processing method of a micro printer and a computer readable storage medium, belonging to the technical field of micro printers.
Background
With the development of big data related technology, more and more consumption information acquisition and processing cases are generated, wherein the data acquisition and processing scheme of the miniature bill printer is the most widely applied scheme at present. The data processing process of the one-time micro printer can be divided into two parts according to the transmission direction of the information flow:
and in the acquisition part, the external equipment uploads the data at the printer end to a local or server for processing.
And in the additional printing part, local software or a server downloads the content needing additional printing to the micro printer through external equipment and executes printing.
Aiming at the acquisition and processing scheme that the additional printing content is in a BMP format (two-dimensional code, Logo, character drawing and the like), the following steps commonly used by the current scheme known in the industry are as follows (as shown in figure 1):
step 1, obtaining the model of a micro printer connected with external equipment and a BMP picture needing to be printed additionally in advance;
step 2, printing and collecting the content needing additional printing by using the micro printer with the specific model;
and 3, when the data file acquired in the step 2 needs to be chased, sending the data file to external equipment through a server or local supporting software.
And 4, downloading the data to the micro printer by the external equipment and executing additional printing.
It has the following disadvantages:
the efficiency is low, printing and collecting operations need to be executed before formal printing tasks when the contents are replaced each time, the operation is complicated, and the normal bill opening efficiency can be influenced in some scenes of actual commercial activities;
the flexibility is poor, the additionally printed content can only use the configuration set by the printer last time, the layout information such as font and ink dot density cannot be changed, and certain customization requirements cannot be met.
Disclosure of Invention
In order to solve the above problems, the present invention provides an additional printing processing method for a micro printer and a computer-readable storage medium, which are convenient and fast to operate, high in efficiency, and good in flexibility, and effectively simplify the additional printing of BMP format contents.
The technical scheme for solving the problems is as follows: the additional printing processing method of the micro printer comprises the following steps:
s1, appointing and reading a BMP picture to be chased;
s2, dividing the dot matrix;
s3, filling a command header;
s4, splicing to generate a file;
and S5, calling an additional printing interface.
Further, a specific method for implementing S1 is that, in the preset options of the supporting software or the server interface, the user manually introduces the monochrome BMP picture to be traced and reads the monochrome BMP picture.
Or in the matched software or the preset options of the server interface, the user designates the two-dimensional code source character string data, generates the two-dimensional code, stores the two-dimensional code as the monochrome BMP picture and reads the monochrome BMP picture.
Further, the specific method for implementing S2 is to calculate the dot matrix width after four-byte padding according to the width-height byte parameter of the acquired BMP picture. Dividing read BMP pixel points into a plurality of complete lattice sections and a non-full-length lattice section by taking an algorithm default value as the lattice height;
or, according to the acquired BMP picture width and height byte parameters, calculating to obtain the dot matrix width after four-byte completion, and directly taking the height of the original picture as the dot matrix height to store the read BMP pixel points as a dot matrix section.
Further, the specific method for implementing S3 is that the user selects the connected model in the software embedded with the algorithm or the printer brand preset on the server interface, and then selects the typesetting parameters such as printing dot density, retraction distance, paper feed length, etc.; calling a corresponding preset instruction system according to the printer model by the algorithm to generate a printing function related instruction head, and modifying the typesetting function related instruction head according to the input parameters;
or, the algorithm uses the recorded instruction system and the typesetting parameters for the last single printing to generate various instruction headers.
Further, the specific method for implementing S4 is to create a blank file, fill the printer parameter setting command header to the beginning of the file, then fill each print-related command header and dot matrix data in sequence, and finally fill the print, cut paper, and reset command headers.
Further, the specific method for implementing S5 is to call a matching software or a server chasing interface, send the generated printer instruction file to the micro printer through the external device, and execute a chasing operation.
A computer-readable storage medium having stored thereon a computer program which, when executed by a main control module, carries out the steps of any of the methods described above.
The invention has the advantages that: the operation is convenient and fast, BMP pictures are transmitted into a server or a related interface of local supporting software when additional printing is needed, the BMP pictures can be automatically downloaded to a micro printer to execute the additional printing, and a normal business order opening plan is not needed to be interrupted when the additional printing content is changed;
the layout is personalized, parameter interfaces such as printing font setting, ink dot density, paper feeding distance, indentation length and the like are reserved, a user can customize the typesetting style of the additional printing content, the subsequent normal opening format cannot be influenced, the additional printing content is highlighted, and the original bill layout information is reserved;
the function integration is realized, the two-dimension code generation and storage are integrated into the function code of the BMP monochrome image, and a user can automatically generate the two-dimension code image and send the two-dimension code image to a related interface only by specifying the character information of the two-dimension code source, so that the user operation is further simplified.
The present invention is described in further detail below with reference to the attached drawing figures.
Drawings
FIG. 1 is a schematic diagram of a method for adding print processing to a printer in the prior art;
FIG. 2 is a schematic diagram of an additional print processing method of the printer of the present invention;
FIG. 3 is a schematic flow chart of the present invention;
FIG. 4 is a flowchart illustrating the operation of the present invention.
Detailed Description
For the purpose of enhancing the understanding of the present invention, the present invention will be further described in detail with reference to the following examples and the accompanying drawings, which are only used for explaining the present invention and are not to be construed as limiting the scope of the present invention.
As shown in fig. 2-4, the method for additionally printing by a micro printer includes the following steps:
and S1, appointing and reading the BMP picture to be traced.
The method comprises the following specific steps: in the matched software or the preset options of the server interface, the user manually imports the monochrome BMP picture to be chased and reads the monochrome BMP picture.
Or in the matched software or the preset options of the server interface, the user designates the two-dimensional code source character string data, generates the two-dimensional code, stores the two-dimensional code as the monochrome BMP picture and reads the monochrome BMP picture.
And S2, dividing the lattice.
The method specifically comprises the following steps: and calculating the width of the dot matrix after completing the four bytes according to the width and height byte parameters of the acquired BMP picture. And dividing the read BMP pixel points into a plurality of complete lattice sections and a non-full-length lattice section by taking the algorithm default value as the lattice height.
Or, according to the width and height byte parameters of the acquired BMP picture, calculating the width of the dot matrix after completing the four bytes. And directly taking the height of the original image as the dot matrix height, and storing the read BMP pixel points as a dot matrix segment.
S3, filling the command header.
The method specifically comprises the following steps: the user selects the connected model from the software embedded with the algorithm or the printer brand preset on the server interface, and then selects the typesetting parameters such as the density of the printing points, the indentation distance, the paper feeding length and the like. The algorithm calls a corresponding preset instruction system according to the printer model to generate a printing function related instruction head, and then modifies the typesetting function related instruction head according to the input parameters.
Or, the algorithm uses the recorded instruction system and typesetting parameters for the last single printing to generate various instruction headers.
And S4, splicing to generate a file.
The method specifically comprises the following steps: and creating a blank file, filling a printer parameter setting instruction head to the beginning of the file, sequentially filling all printing related instruction heads and dot matrix data, and finally filling a printing instruction head, a paper cutting instruction head and a resetting instruction head.
And S5, calling an additional printing interface.
The method specifically comprises the following steps: and calling matched software or a server tracing interface, sending the generated printer instruction file to the micro printer through the external equipment, and executing tracing operation.
Example 1: the user directly imports the BMP picture:
and generating a starting command code segment, a printing function and an ending command code segment of the additional printing file according to the type of the instruction system of the micro printer returned after the algorithm presetting or the acquisition operation is finished.
And dividing the pixel points subjected to the reverse color processing into a plurality of dot matrixes by taking the default value of the algorithm as high and the horizontal byte number of the source BMP picture as wide, and filling the width and height parameters of each dot matrix into corresponding printing function command code segments.
And filling the corresponding instruction to the initial command code segment according to the typesetting parameters selected by the user.
Creating an instruction file, splicing each command code segment and the corresponding dot matrix, and filling the instruction file with the command code segments and the corresponding dot matrixes.
And calling a tracing interface of the matched software or the server, downloading the instruction file to the micro printer and executing the tracing printing operation.
Example 2: importing a BMP picture by using a two-dimensional code generation function:
and generating the two-dimensional code according to the character string specified by the user.
And storing the generated two-dimensional code as a BMP (bone morphogenetic map) monochrome picture.
And reading the generated BMP file to obtain pixel point data.
And skipping to the type of the micro printer instruction system returned after the algorithm presetting or acquisition operation is finished, and generating the initial, printing function and ending command code segments of the copy-on file.
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, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. The method for additionally printing the micro printer is characterized by comprising the following steps of:
s1, appointing and reading a BMP picture to be chased;
s2, dividing the lattice, specifically: calculating to obtain the dot matrix width after four-byte completion according to the width and height byte parameters of the acquired BMP picture, and dividing the read BMP pixel points into dot matrix sections by taking an algorithm default value or the height of the original picture as the dot matrix height;
s3, filling the command header, specifically: selecting the model of the connected printer and the typesetting parameters; calling a corresponding preset instruction system according to the printer model to generate a printing function related instruction head, and modifying the typesetting function related instruction head according to the input parameters;
or, using the recorded instruction system and typesetting parameters for the previous single printing to generate various instruction headers;
s4, splicing to generate a file, which specifically comprises the following steps: creating a blank file, filling a printer parameter setting instruction head to the beginning of the file, then sequentially filling all printing related instruction heads and dot matrix data, and finally filling a printing, paper cutting and command resetting head;
and S5, calling an additional printing interface.
2. The additional printing processing method of the micro printer according to claim 1, wherein the specific method for implementing S1 is that in the preset options of the matching software or the server interface, the user manually imports and reads the monochrome BMP picture to be chased;
or in the matched software or the preset options of the server interface, the user designates the two-dimensional code source character string data, generates the two-dimensional code, stores the two-dimensional code as the monochrome BMP picture and reads the monochrome BMP picture.
3. The method of claim 1, wherein the step of implementing S2 is to calculate the dot matrix width by four-byte completion according to the width-height byte parameter of the BMP picture; dividing read BMP pixel points into a plurality of complete lattice sections and a non-full-length lattice section by taking an algorithm default value as the height of the lattice;
or, according to the acquired BMP picture width and height byte parameters, calculating to obtain the dot matrix width after four-byte completion, and directly taking the height of the original picture as the dot matrix height to store the read BMP pixel points as a dot matrix section.
4. The method for additional printing processing of a micro printer as claimed in claim 1, wherein the specific method for implementing S3 is to select the connected model from the software embedded with the algorithm or the printer brand preset on the server interface, and then select the layout parameters such as the density of the printing dots, the setback distance, the paper feeding length, etc.
5. The method for additional printing processing of a micro printer according to claim 1, wherein the specific method for implementing S5 is to call a companion software or a server tracing interface, send the generated printer command file to the micro printer through an external device, and execute the tracing operation.
6. A computer-readable storage medium on which a computer program is stored, the computer program being characterized by implementing the steps of the additional print processing method for a micro printer according to any one of claims 1 to 5 when executed by a main control module.
CN201910182993.1A 2019-03-12 2019-03-12 Additional printing processing method for micro printer and computer readable storage medium Active CN109901803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910182993.1A CN109901803B (en) 2019-03-12 2019-03-12 Additional printing processing method for micro printer and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910182993.1A CN109901803B (en) 2019-03-12 2019-03-12 Additional printing processing method for micro printer and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109901803A CN109901803A (en) 2019-06-18
CN109901803B true CN109901803B (en) 2022-09-09

Family

ID=66946865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910182993.1A Active CN109901803B (en) 2019-03-12 2019-03-12 Additional printing processing method for micro printer and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109901803B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110517419B (en) * 2019-08-07 2022-08-02 北京数衍科技有限公司 Method and system for intercepting serial cash register printing data and tracing additional information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006148753A (en) * 2004-11-24 2006-06-08 Dainippon Screen Mfg Co Ltd Printing data creating device, printing system, method for backing up printing data and program
CN202472797U (en) * 2012-03-19 2012-10-03 刘帅 Unmanned multimedia multifunctional vending machine
CN106095350A (en) * 2016-07-21 2016-11-09 江苏沁恒股份有限公司 A kind of USB printer data monitoring analyzes system and method
CN107728967A (en) * 2017-11-13 2018-02-23 成都创慧科达科技有限公司 It is a kind of can Automatic Typesetting printer sharing and printer sharing composition method
CN108572802A (en) * 2017-03-13 2018-09-25 山东新北洋信息技术股份有限公司 Prevent the method, apparatus and print system of page duplicate printing

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AUPQ055999A0 (en) * 1999-05-25 1999-06-17 Silverbrook Research Pty Ltd A method and apparatus (npage01)
DE10017785C2 (en) * 2000-04-10 2002-04-18 Oce Printing Systems Gmbh Method and system for processing a print data stream
US7298510B2 (en) * 2001-05-10 2007-11-20 Canon Kabushiki Kaisha Image enlargement through poster printing by combining pattern data with image data
US7318191B2 (en) * 2002-10-10 2008-01-08 Bhk Systems, L.P. Automated system and method for dynamically generating customized typeset question-based documents
CN101554804B (en) * 2009-04-02 2012-04-18 福建实达电脑设备有限公司 General printing drive module
CN101625726B (en) * 2009-08-05 2012-08-22 北大方正集团有限公司 Printing method and printing system
CN202422292U (en) * 2011-11-25 2012-09-05 航天信息股份有限公司 Mobile invoice printing system
CN102591603A (en) * 2012-01-06 2012-07-18 北京公达数码科技有限公司 Printing method and printing system for micro printer
US9146698B2 (en) * 2013-10-02 2015-09-29 Fuji Xerox Co., Ltd. Print management apparatus, non-transitory computer readable medium, and printing system
CN106569755B (en) * 2016-10-26 2020-06-05 深圳盒子信息科技有限公司 Printing method and printing device for mobile payment terminal
CN109062521B (en) * 2018-07-20 2022-05-27 珠海智汇网络设备有限公司 Print data processing method and device, computer device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006148753A (en) * 2004-11-24 2006-06-08 Dainippon Screen Mfg Co Ltd Printing data creating device, printing system, method for backing up printing data and program
CN202472797U (en) * 2012-03-19 2012-10-03 刘帅 Unmanned multimedia multifunctional vending machine
CN106095350A (en) * 2016-07-21 2016-11-09 江苏沁恒股份有限公司 A kind of USB printer data monitoring analyzes system and method
CN108572802A (en) * 2017-03-13 2018-09-25 山东新北洋信息技术股份有限公司 Prevent the method, apparatus and print system of page duplicate printing
CN107728967A (en) * 2017-11-13 2018-02-23 成都创慧科达科技有限公司 It is a kind of can Automatic Typesetting printer sharing and printer sharing composition method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于打印指令的打印数据文本信息的提取和追加;李培然;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;20160715;1-95 *

Also Published As

Publication number Publication date
CN109901803A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
CN102637264A (en) System and method for name card generating and online printing based on network
JP2010091724A (en) Image processing system
JP4504369B2 (en) On-demand printing of coding patterns
EP2677418A2 (en) Image processing device, image processing system, and printing method
JP5924218B2 (en) Template processing program and template processing method
JP2009230738A (en) Printing control system, printing request terminal, printer, printing control program, and printing control method
CN109901803B (en) Additional printing processing method for micro printer and computer readable storage medium
CN108319578B (en) Method for generating medium for data recording
CN104246686A (en) Printing system and printing control program
US8928916B2 (en) Display device, portable terminal, control method for display device, and program product
US20150302280A1 (en) Data processing apparatus, recording apparatus and control method of the data processing apparatus
JP5954691B2 (en) Template processing program and template processing method
US20140347689A1 (en) Recording Medium and Printed Matter Producing Method
US20100147960A1 (en) Methods, devices, and systems for printing bar codes
US7431213B2 (en) Barcode printing system
US8614817B2 (en) Computer readable medium having print control program, print controller and computer executable method using the print control program
CN115454360A (en) Label printing method, device and medium capable of flexibly adjusting printing format
US20140071495A1 (en) Information processing device, control method of an information processing device, and storage medium storing a program executed by a control unit of the information processing device
US10639910B2 (en) System and methods for storing template data and creating printed matter based upon same
CN116795243A (en) Label printing method and system, computer equipment and medium
KR101494806B1 (en) System for handling rich text image and method therefor
JP5185159B2 (en) Information processing apparatus and conversion information change program
JP3865750B2 (en) Electronic form creation system, electronic form creation program, and electronic form creation method
CN109254740A (en) Method of printing, system and electronic equipment
JP2009101662A (en) Printing processor

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220808

Address after: No.18, ningshuang Road, Nanjing, Jiangsu, 210000

Applicant after: Nanjing qinheng Microelectronics Co.,Ltd.

Address before: No. 18 Ningshuang Road, Yuhuatai District, Nanjing City, Jiangsu Province, 210012

Applicant before: JIANGSU QINHENG Co.,Ltd.

GR01 Patent grant
GR01 Patent grant