CN107092450A - A kind of thermal printing method based on display frame - Google Patents

A kind of thermal printing method based on display frame Download PDF

Info

Publication number
CN107092450A
CN107092450A CN201710211965.9A CN201710211965A CN107092450A CN 107092450 A CN107092450 A CN 107092450A CN 201710211965 A CN201710211965 A CN 201710211965A CN 107092450 A CN107092450 A CN 107092450A
Authority
CN
China
Prior art keywords
display
dot matrix
caching
service module
type
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.)
Pending
Application number
CN201710211965.9A
Other languages
Chinese (zh)
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.)
GUANGDONG TELEPOWER COMMUNICATION CO Ltd
Original Assignee
GUANGDONG TELEPOWER COMMUNICATION 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 GUANGDONG TELEPOWER COMMUNICATION CO Ltd filed Critical GUANGDONG TELEPOWER COMMUNICATION CO Ltd
Priority to CN201710211965.9A priority Critical patent/CN107092450A/en
Publication of CN107092450A publication Critical patent/CN107092450A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1206Improving or facilitating administration, e.g. print management resulting in increased flexibility in input data format or job format or job type
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1268Job submission, e.g. submitting print job order or request not the print data itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

The invention discloses a kind of thermal printing method based on display frame, including:Print service module receives the print request of application end, and the type information in print request is committed into printing display modular converter;Printing shows that modular converter calls the display service module of application end that type information is converted into display information;Display service module calls the display processing framework of application end to carry out display information dot matrix caching process to generate display dot matrix caching;The display dot matrix caching that dot matrix modular converter is exported to display processing framework is intercepted, if display dot matrix caching is produced by display request, then display dot matrix caching transmission to display progress image conversion is shown, if display dot matrix caching is produced by print request, display dot matrix caching is sent to printer and printed.Using the present invention, the matching that can remove various Chinese matrixes from is imported, and is removed the work of repetition editor's exploitation printing character library lattice file from, is reduced the cost of product.

Description

A kind of thermal printing method based on display frame
Technical field
The present invention relates to printing technique field, more particularly to a kind of thermal printing method based on display frame.
Background technology
Thermal printing technique is earliest using on facsimile machine, and its general principle is the data conversion that receives printer into point The signal of battle array controls the heating of temperature responsive unit, and heat susceptible coating heating on heat-sensitive paper is developed.
In today that thermal printer application demand is increasing, many Android devices all employ thermal printer The printing of all kinds of bills is carried out, but thermal printer is the printing heated in dots, all words, picture It is required for issuing in the form of dot matrix.Existing thermal printing technique scheme mainly has following two:
(1)Directly use the text that language-specific or specific coding scope are stored in word storehouse of the hardware chip, word storehouse of the hardware chip Word lattice, the dot matrix of specified word is extracted, printed when printing from word storehouse of the hardware chip.This scheme is real It is existing fairly simple, but need to increase hardware cost, and word storehouse of the hardware chip character library is relatively simple, due to asking for memory space Topic, can significantly increase cost, the changes in demand for printing character library can directly cause for multilingual or big font support The change of hardware, hardware cost is higher.
(2)It is used to print by extracting dot matrix font in all kinds of existing Chinese matrixes, this way is directly formed and beaten Lettering library file is placed in android system, is required for updating for undesirable word in Chinese matrix, each The increase for planting spoken and written languages is required for the modification of software code, and a kind of language has a variety of Chinese matrixes, for example, beaten in Chinese character again Just there are this GB2312 in India and China, the type matrix coding schedule such as GBK, black matrix, all kinds of font masters such as Song typeface, so need very many words Library file meets different demands, and exploitation maintenance cost is higher.
Therefore, original technical scheme matches new spoken and written languages and can taken very much, for some special spoken and written languages It is related to the problem of typesetting problem and deformation conversion, can also increases research and development difficulty of matching, increase development cost and maintenance cost.Mesh It is preceding on Android thermal printing terminal devices, also without efficient stable, easy to use, the high technical scheme of reusability.
The content of the invention
The technical problems to be solved by the invention are, there is provided a kind of thermal printing method based on display frame, to exempt from Go the matching of various Chinese matrixes to import, remove the tedious work of repetition editor's exploitation printing character library lattice file from, greatly drop The R&D costs of low product, maintenance cost and time cost.
In order to solve the above-mentioned technical problem, the invention provides a kind of thermal printing method based on display frame, including:
S1, print service module receives the print request of application end, and it is aobvious that the type information in print request is committed into printing Show modular converter;
S2, the printing shows that modular converter calls the display service module of application end that type information is converted into display information;
S3, the display service module calls the display processing framework of application end to carry out dot matrix caching process to display information with life Into display dot matrix caching;
S4, the display dot matrix caching that dot matrix modular converter is exported to display processing framework is intercepted, if display dot matrix caching is By display request generation, then it will show that dot matrix caching is sent to display progress image conversion and show be if display dot matrix is cached Produced by print request, then display dot matrix caching is sent to printer and printed.
It is described to show that dot matrix caching is sent to the side of printer progress dot matrix dump as the improvement of such scheme Method includes:Obtain the display dot matrix caching shown in dot matrix buffering area;Dot matrix caching conversion will be shown according to the requirement of printer Into matrix of printed dots;The matrix of printed dots is printed by printer.
As the improvement of such scheme, the type information includes printing content, type fount type, type fount size And printing picture.
As the improvement of such scheme, the printing shows that modular converter calls display service module to change type information Include for the method for display information:Type fount size is converted into display font size;Type fount type is converted to aobvious Show font type;Printing picture is converted into display picture.
As the improvement of such scheme, the display service module calls display processing framework to carry out dot matrix to display information Caching process includes in the method for generating display dot matrix caching:Picture and text are merged calculating, dipstick metering conversion and zoom operations.
As the improvement of such scheme, also include before the step S1:After print service module starts, application end is inquired about The display font type supported, and provide font setting interface for application end.
As the improvement of such scheme, the application end includes Android application ends or Linux application ends.
Implement the present invention, have the advantages that:
The present invention extracts the actual point in Android/Linux display picture contents by Android/Linux internal mechanism Battle array, is converted to the dot matrix of printing, and the matching that can not only so remove various Chinese matrixes from is imported, moreover it is possible to accomplish the fast of different language Speed switching is used, and largely saves manpower, removes the tedious work of repetition editor's exploitation printing character library lattice file from, so that greatly Reduce the R&D costs of product, maintenance cost and time cost.
Specifically, the present invention submits to Android/ by print service module and printing display module by picture and text are printed Linux carries out display processing;Text-processing, the picture processing of printing are completed using Android/Linux display processings framework, Realize typesetting and multilingual support;The multilingual support shown using Android/Linux come complete printing multilingual support; Display caching is intercepted by dot matrix modular converter, Android/Linux display cachings are converted into thermal-sensitive printer printing caching.
Correspondingly, the thermal printing method of the invention based on display frame has advantages below:
(1)The present invention can save hardware cost without using word storehouse of the hardware chip;
(2)The present invention can flexibly switch font, realize the flexible switching of different fonts size, different fonts type, without system Make the printing character library file of all size, greatly save exploitation maintenance cost;
(3)The present invention greatly improves development efficiency and drop without carrying out dot matrix processing and typesetting processing to printing content graph piece etc. Low development difficulty;
(4)The present invention utilizes Android/Linux multilingual support so that printing can directly support multilingual, carry significantly Rise competitiveness and development efficiency.
Brief description of the drawings
Fig. 1 is existing matrix of printed dots extracting method schematic diagram;
Fig. 2 is the embodiment flow chart of the thermal printing method of the invention based on display frame;
Fig. 3 is the embodiment schematic diagram of the thermal printing method of the invention based on display frame.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, the present invention is made into one below in conjunction with accompanying drawing It is described in detail on step ground.Only this is stated, the side such as the up, down, left, right, before and after of the invention that occurs in the text or will appear from, inside and outside Position word, only on the basis of the accompanying drawing of the present invention, it is not the specific restriction to the present invention.
As shown in figure 1, it is necessary to voluntarily realize android system thermal printing point in existing matrix of printed dots extracting method Battle array handles framework to complete the function of thermal printer, meanwhile, android system thermal printing dot matrix processing framework needs to realize The dot matrix processing of dot matrix conversion process and word to picture, this needs to make substantial amounts of font file(Including various language, word Body size, the character library of font type), or use different external hardware word-base chips.
Therefore, existing technical scheme matches new spoken and written languages and can taken very much, for some special spoken and written languages It is related to the problem of typesetting problem and deformation conversion, can also increases research and development difficulty of matching, increase development cost and maintenance cost, surely Qualitative low, using trouble, reusability is low.
It should be noted that Android/Linux systems support multilingual display in itself, because display is using the arrow such as TTF Font is measured, allows font arbitrarily undistorted amplification, there are very many TTF files at present(Windows, Android, Linux are grasped Make system and carry substantial amounts of TTF displays character library in itself), can easily download various types of fonts(Black matrix, Song typeface etc.), and After processing actually by Android/Linux display frames, the content being shown on screen is also lattice information, if I Can the content that will print, printed words be converted to the display frame processing that the content to be shown gives Android/Linux systems, Then the lattice information for the lattice information that display frame is converted being reconverted into printing is printed, so, can be saved Very many workloads.
The embodiment of the thermal printing method of the invention based on display frame is shown referring to Fig. 2 and Fig. 3, Fig. 2 and Fig. 3.
As shown in Fig. 2 the thermal printing method of the invention based on display frame includes:
S1, print service module receives the print request of application end, and it is aobvious that the type information in print request is committed into printing Show modular converter.
It should be noted that being packaged with type information in print request, the type information includes printing content, printing word Body type, type fount size and printing picture.Correspondingly, present invention can apply to android system and linux system, institute Stating application end includes Android application ends or Linux application ends.
Further, also include before the step S1:After print service module starts, print service module polls application end The display font type supported, and provide font setting interface for application end.
S2, the printing shows that modular converter calls the display service module of application end that type information is converted into display letter Breath.
Specifically, the printing shows that modular converter calls display service module that type information is converted into display information Method includes:Type fount size is converted into display font size, type fount type is converted into display font type, will Printing picture is converted to display picture.
Therefore, printing shows the type information that modular converter is transmitted according to print service module, calls the aobvious of application end Show that the interface in service module is changed, type fount size is converted into display font size, type fount type is turned Display font type is changed to, printing picture is converted into display picture.
S3, the display service module calls the display processing framework of application end to carry out dot matrix caching process to display information Dot matrix caching is shown to generate.
Specifically, the display service module calls display processing framework to carry out dot matrix caching process to display information with life Method into display dot matrix caching includes:Picture and text are merged calculating, dipstick metering conversion and zoom operations.
Therefore, the interface in the display service module of application end gets display information(Display information includes display font Size, display font type and display picture)Afterwards, by the display processing framework of unified call application end, picture and text is carried out and are merged meter Calculate, dipstick metering conversion, the operation such as amplification, diminution, so as to obtain display dot matrix caching.
S4, the display dot matrix caching that dot matrix modular converter is exported to display processing framework is intercepted.If showing, dot matrix delays Deposit is that by display request generation, then will show that dot matrix caching is sent to display progress image conversion and show;If showing, dot matrix delays Deposit and produced by print request, then display dot matrix caching is sent to printer and printed.
It should be noted that display dot matrix caching can by display request or print request produce, when application end directly to When showing that service module sends display request, then the display dot matrix caching corresponding to the display request is produced by display request 's;When application end sends print request to print service module, then the display dot matrix caching corresponding to the print request is Produced by print request.
For example, when application end directly sends display request to display service module, the display service module is called should Dot matrix caching process is carried out to display information with the display processing framework at end to generate display dot matrix caching, now, dot matrix is shown Caching is produced by display request.
And for example, when application end sends print request to print service module, print service module is by print request Type information is committed to printing and shows modular converter;Printing shows that modular converter calls the display service module of application end to print Information is converted to display information;Display service module calls the display processing framework of application end to carry out dot matrix caching to display information Processing is cached with generating display dot matrix.Now, display dot matrix caching is produced by print request.
Specifically, the method that will show that dot matrix caching transmission carries out dot matrix dump to printer includes:
Obtain the display dot matrix caching shown in dot matrix buffering area;
It will show that dot matrix caching is converted into matrix of printed dots according to the requirement of printer;
The matrix of printed dots is printed by printer.
Therefore, the display dot matrix caching that dot matrix modular converter can be exported to display processing framework is intercepted, if display Dot matrix caching is produced by display request, and dot matrix modular converter will show that dot matrix caching is directly issued to LCD(Liquid Crystal Display thin film transistor LCD devices)Image conversion is carried out to show;If showing that dot matrix caching is by printing What request was produced, dot matrix modular converter will obtain the display dot matrix caching in display dot matrix buffering area, then according to printer Different require that dot matrix processing is carried out to display dot matrix caching to be changed and generate matrix of printed dots(Change, format change such as gray scale Deng), the printing of last operation printer progress matrix of printed dots.
From the foregoing, it will be observed that because Android/Linux systems have supported the language of various countries various regions, by simply switching just The display at different language word interface can be achieved.The present invention extracts Android/ by Android/Linux internal mechanism Actual dot matrix in Linux display picture contents, is converted to the dot matrix of printing, can not only so remove of various Chinese matrixes from With importing, moreover it is possible to accomplish that being switched fast for different language uses, largely save manpower, remove repetition editor's exploitation printing character library point from The tedious work of battle array file, so as to greatly reduce the R&D costs of product, maintenance cost and time cost.
Specifically, the present invention submits to Android/ by print service module and printing display module by picture and text are printed Linux carries out display processing;Text-processing, the picture processing of printing are completed using Android/Linux display processings framework, Realize typesetting and multilingual support;The multilingual support shown using Android/Linux come complete printing multilingual support; Display caching is intercepted by dot matrix modular converter, Android/Linux display cachings are converted into thermal-sensitive printer printing caching.
Correspondingly, the thermal printing method of the invention based on display frame has advantages below:
(1)The present invention can save hardware cost without using word storehouse of the hardware chip;
(2)The present invention can flexibly switch font, realize the flexible switching of different fonts size, different fonts type, without system Make the printing character library file of all size, greatly save exploitation maintenance cost;
(3)The present invention greatly improves development efficiency and drop without carrying out dot matrix processing and typesetting processing to printing content graph piece etc. Low development difficulty;
(4)The present invention utilizes Android/Linux multilingual support so that printing can directly support multilingual, carry significantly Rise competitiveness and development efficiency.
It should be noted that present invention can apply to android system and linux system.When applied to android system When, the application end is Android application ends, and the display service module is that Android is shown at service module, the display Reason framework is Android display processing frameworks;When applied to linux system, the application end is Linux application ends, described It is that Linux shows service module to show service module, and the display processing framework is Linux display processing frameworks.
Described above is the preferred embodiment of the present invention, it is noted that for those skilled in the art For, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as Protection scope of the present invention.

Claims (7)

1. a kind of thermal printing method based on display frame, it is characterised in that including:
S1, print service module receives the print request of application end, and it is aobvious that the type information in print request is committed into printing Show modular converter;
S2, the printing shows that modular converter calls the display service module of application end that type information is converted into display information;
S3, the display service module calls the display processing framework of application end to carry out dot matrix caching process to display information with life Into display dot matrix caching;
S4, the display dot matrix caching that dot matrix modular converter is exported to display processing framework is intercepted,
If display dot matrix caching is to be asked to produce by display, display dot matrix caching is sent to display progress image conversion and shown Show,
If display dot matrix caching is produced by print request, display dot matrix caching is sent to printer and printed.
2. the thermal printing method as claimed in claim 1 based on display frame, it is characterised in that described to delay display dot matrix Depositing to send to the method for printer progress dot matrix dump includes:
Obtain the display dot matrix caching shown in dot matrix buffering area;
It will show that dot matrix caching is converted into matrix of printed dots according to the requirement of printer;
The matrix of printed dots is printed by printer.
3. the thermal printing method as claimed in claim 1 based on display frame, it is characterised in that the type information includes Print content, type fount type, type fount size and printing picture.
4. the thermal printing method as claimed in claim 3 based on display frame, it is characterised in that the printing display conversion Module calls display service module to include the method that type information is converted to display information:
Type fount size is converted into display font size;
Type fount type is converted into display font type;
Printing picture is converted into display picture.
5. the thermal printing method as claimed in claim 1 based on display frame, it is characterised in that the display service module The method for calling display processing framework to carry out dot matrix caching process to display information to generate display dot matrix caching includes:Picture and text are closed Spell calculating, dipstick metering conversion and zoom operations.
6. the thermal printing method as claimed in claim 1 based on display frame, it is characterised in that before the step S1 also Including:After print service module starts, the display font type that inquiry application end is supported, and provide font setting for application end Interface.
7. the thermal printing method as claimed in claim 1 based on display frame, it is characterised in that the application end includes Android application ends or Linux application ends.
CN201710211965.9A 2017-04-01 2017-04-01 A kind of thermal printing method based on display frame Pending CN107092450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710211965.9A CN107092450A (en) 2017-04-01 2017-04-01 A kind of thermal printing method based on display frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710211965.9A CN107092450A (en) 2017-04-01 2017-04-01 A kind of thermal printing method based on display frame

Publications (1)

Publication Number Publication Date
CN107092450A true CN107092450A (en) 2017-08-25

Family

ID=59649080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710211965.9A Pending CN107092450A (en) 2017-04-01 2017-04-01 A kind of thermal printing method based on display frame

Country Status (1)

Country Link
CN (1) CN107092450A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109515006A (en) * 2018-11-06 2019-03-26 安徽瀚洋纸品印刷有限公司 A kind of thermal printing machine control system
CN111556596A (en) * 2020-04-28 2020-08-18 沈阳工业大学 Writing device and method supporting private interaction

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050168523A1 (en) * 2003-06-05 2005-08-04 Yuji Takiguchi Image reading apparatus and a control method for an image reading apparatus
CN101003216A (en) * 2006-01-17 2007-07-25 精工爱普生株式会社 Recording device control method
CN106408798A (en) * 2016-09-22 2017-02-15 上海寰果信息科技有限公司 Pos machine printing method and printing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050168523A1 (en) * 2003-06-05 2005-08-04 Yuji Takiguchi Image reading apparatus and a control method for an image reading apparatus
CN101003216A (en) * 2006-01-17 2007-07-25 精工爱普生株式会社 Recording device control method
CN106408798A (en) * 2016-09-22 2017-02-15 上海寰果信息科技有限公司 Pos machine printing method and printing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109515006A (en) * 2018-11-06 2019-03-26 安徽瀚洋纸品印刷有限公司 A kind of thermal printing machine control system
CN111556596A (en) * 2020-04-28 2020-08-18 沈阳工业大学 Writing device and method supporting private interaction

Similar Documents

Publication Publication Date Title
CN100565601C (en) A kind of bill processing apparatus and method
KR20060067141A (en) Remote content rendering for mobile viewing
JP2000187570A5 (en)
CN107092450A (en) A kind of thermal printing method based on display frame
EP0768611A3 (en) Tape printer
CN111581934A (en) Label printing method and system based on XML and Excel
CN103488441A (en) Implementation method for printing Arabic on POS (point-of-sale) terminals
CN106313907A (en) Thermal printer text printing method and thermal printer text printing system based on image conversion
CN107015959A (en) A kind of method that version is closed to pdf document
EP2310963B1 (en) Information output apparatus, information output method, and recording medium
CN1329810C (en) General method for printing and drawing graphics document, dynamic link-base
KR960700473A (en) DELIVERING AND FETCHING FONT INFORMATION
CN111045614A (en) Running statement printing method, nested file generation method, client and server
JPS6318215B2 (en)
CN116029260A (en) Text display typesetting file generation method, device and storage medium
CN111552445A (en) Method for realizing mirror image printing
CN100468309C (en) Information processor and its method, and image drawing device
JP2728906B2 (en) Character processor
JPS63104119A (en) Document processor
JPH1031471A (en) Method and device for printing and displaying foreign languages including english script and arabic using computer
JPH10254661A (en) Method and device for document processing
JP2690567B2 (en) Printing control device
JP2002207723A (en) Processing method for escape character
CN114201710A (en) B/S label printing software
Parkin Alphanumeric Output

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170825

RJ01 Rejection of invention patent application after publication