CN114035755A - Picture processing method and printing method - Google Patents

Picture processing method and printing method Download PDF

Info

Publication number
CN114035755A
CN114035755A CN202111352915.5A CN202111352915A CN114035755A CN 114035755 A CN114035755 A CN 114035755A CN 202111352915 A CN202111352915 A CN 202111352915A CN 114035755 A CN114035755 A CN 114035755A
Authority
CN
China
Prior art keywords
printing
data
picture
print
template
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
CN202111352915.5A
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.)
Shanghai Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji Network Technology 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 Shanghai Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202111352915.5A priority Critical patent/CN114035755A/en
Publication of CN114035755A publication Critical patent/CN114035755A/en
Pending legal-status Critical Current

Links

Images

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/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1242Image or content composition onto a page
    • G06F3/1243Variable data printing, e.g. document forms, templates, labels, coupons, advertisements, logos, watermarks, transactional printing, fixed content versioning
    • 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/1253Configuration of print job parameters, e.g. using UI at the client
    • G06F3/1257Configuration of print job parameters, e.g. using UI at the client by using pre-stored settings, e.g. job templates, presets, print styles

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 relates to the technical field of character printing, in particular to a picture processing method and a printing method. The picture processing method comprises the following steps: the method comprises the steps of obtaining printing information by using a terminal, drawing a printing template according to the printing information, setting key values for a plurality of printing elements in the printing template, carrying out data conversion on the printing template to obtain template data, assigning the key values in the template data to obtain printing data, generating a printing picture according to the printing data, and sending the printing picture to a printer end so that the printer can analyze the printing picture for printing. By using the template to convert the printing content into the picture for printing, most characters can be printed because the template is compatible with multi-language development and is not limited by a printer word stock.

Description

Picture processing method and printing method
Technical Field
The invention relates to the technical field of character printing, in particular to a picture processing method and a printing method.
Background
When the operator uses the printer, because the typeface of the printer manufacturer is not uniform, the printed content is inconsistent with the content designed by the operator, in the prior art, the manufacturer generally solves the problem by upgrading the font library of the printer, but in the printing process, because the font library of the printer is insufficient, the situation that the printed characters are not complete still can occur.
Disclosure of Invention
In view of the above, the present invention provides a picture processing method and a printing method, so as to overcome the problem that the printed characters are not complete due to insufficient printer font library in the current printing process.
In order to achieve the purpose, the invention adopts the following technical scheme:
in one aspect, the present invention provides a method for processing an image, which is applied to a user terminal, and the method includes:
acquiring printing information;
drawing a printing template according to the printing information;
setting key values for a plurality of printing elements;
performing data conversion on the printing template to obtain template data;
assigning values to the key values in the template data to generate printing data;
generating a printing picture according to the printing data;
and sending the print picture to a printer end so that the printer analyzes the print picture to print.
Further, in the above picture processing method, the print element includes: at least one of horizontal lines, vertical lines, characters, two-dimensional codes, bar codes and pictures.
Further, in the above image processing method, before setting key values for a plurality of the print elements,
further comprising:
setting attributes of the print elements;
wherein the attributes of the print elements include at least one of position, size, color, degree of rotation, and thickness.
Further, the above image processing method, where performing data conversion on the print template to obtain template data, includes:
and placing the printing elements in an array, and converting the array into a json data format to obtain template data.
Further, the above picture processing method, generating a print picture according to the print data, includes:
analyzing the printing data to generate a view;
and converting the view into an image to obtain a printing picture.
Further, in the above image processing method, assigning a value to a key value in the template data to generate print data includes:
uploading the template data to a server;
assigning the key values in the template data to generate printing data, wherein the assigning comprises:
acquiring downloading information of a user;
acquiring the template data from a server according to the downloading information;
and assigning values to the key values in the template data to generate printing data.
Further, the above picture processing method, generating a view by parsing the print data, includes:
loading the view object into a view by converting the print element into the view object, thereby generating a view;
wherein said converting the print element into a view object comprises: the line is converted into a UIView object, the text is converted into a UILabel object, and the two-dimensional code, the bar code and the picture are converted into at least one of the UIImageView object.
In another aspect, the present invention further provides a printing method applied to a printer, where the method includes:
acquiring a printing picture; wherein the printed picture is generated by any one of the picture processing methods;
and analyzing the printing picture and printing.
The picture processing method and the printing method have the beneficial effects that: firstly, establishing a printing template, then adding printing elements, setting key values, generating template data, assigning the key values to form printing data, finally converting the printing data into a printing picture, and analyzing the printing picture by a printer to start printing; by using the template to convert the printing content into the picture for printing, most characters can be printed because the template is compatible with multi-language development and is not limited by a printer word stock.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for processing pictures according to an embodiment of the present invention;
FIG. 2 is a flow chart provided by one embodiment of the printing method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
Fig. 1 is a flowchart of an embodiment of a picture processing method according to the present invention. Referring to fig. 1, the present embodiment may include the following steps:
and S11, acquiring the printing information.
The user terminal acquires the print information written by the user through the writer.
And S12, drawing the printing template according to the printing information.
And adding printing elements in the blank template by using the terminal according to the acquired printing information.
In some alternative embodiments, the print elements include: at least one of horizontal lines, vertical lines, characters, two-dimensional codes, bar codes and pictures.
S13, setting key values for several print elements.
According to the printing information input by the user, the printing elements marked by the user in the printing template are set as key values, so that the content in the printing elements marked by the user can be modified conveniently in the subsequent using process.
And S14, converting the data of the printing template to obtain template data.
In some alternative embodiments, the printing template may be subjected to data conversion to obtain template data by:
and (3) placing all printing elements in the printing template in the same array, and converting the array into a json data format to obtain template data.
And S15, assigning the key values in the template data to obtain the printing data.
In some alternative embodiments, the key values in the template data may be assigned to obtain the print data by:
the method comprises the steps that template data are uploaded to a server side through a terminal, then a mobile phone side obtains downloading information of a client, the template data are obtained from the server side according to the downloading information of the client, dynamic data input by the user are obtained, and assignment is conducted on key values in the template data according to the dynamic data of the user, so that printing data are obtained.
S16, generating a print picture according to the print data.
In some alternative embodiments, the printed picture may be generated by:
analyzing the print data through a preset algorithm, and placing the print data on a view to generate a view;
converting a view generated according to the printing data into an image through a preset algorithm to obtain a printing picture;
specifically, line data in the print data are converted into a UIView object through a preset conversion algorithm, text data are converted into a UILabel object, two-dimensional code data, bar code data and picture data are converted into a UIImageView object, the objects are placed on a preset app with view to obtain a view of the print data, and the preset app converts the view generated according to the print data into an image to obtain a print picture.
And S17, sending the print picture to the printer end so that the printer can analyze the print picture for printing.
And sending the printing pictures to be printed to a printer end, so that the printer prints according to the printing pictures.
By using the template to convert the printing content into the picture for printing, most characters can be printed because the template is compatible with multi-language development and is not limited by a printer word stock.
In some optional embodiments, before setting key values to several print elements in step S13 of the above embodiments, the method may further include:
setting the attribute of each element in the printing template;
wherein the attributes of the print elements include at least one of position, size, color, degree of rotation, and thickness;
specifically, the setting of the font size may include 16-size, 20-size, 24-size, 32-size, 48-size, and 56-size fonts;
the width settings for the barcode may include 120, 240, 360, 480, 600, and 720.
Based on one general inventive concept, the present application also provides a printing method, including:
s21, acquiring a print picture; wherein, the printing picture is generated by the picture processing method in the above embodiment;
the printer end acquires the pictures to be printed from the user terminal.
And S22, analyzing the print picture and printing.
Since the print picture acquired by the printer from the user terminal is a binary stream, the printer can directly analyze the print picture and perform printing.
The data flow related to this embodiment is a very mature prior art, and those skilled in the art can obtain the data flow without any creative idea, and details are not described here.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (8)

1. A picture processing method is applied to a user terminal, and comprises the following steps:
acquiring printing information;
drawing a printing template according to the printing information;
setting key values for a plurality of printing elements;
performing data conversion on the printing template to obtain template data;
assigning values to the key values in the template data to generate printing data;
generating a printing picture according to the printing data;
and sending the print picture to a printer end so that the printer analyzes the print picture to print.
2. The picture processing method according to claim 1, wherein the print element comprises: at least one of horizontal lines, vertical lines, characters, two-dimensional codes, bar codes and pictures.
3. The method for processing pictures according to claim 1, wherein before setting key values for a plurality of said print elements, further comprising:
setting attributes of the print elements;
wherein the attributes of the print elements include at least one of position, size, color, degree of rotation, and thickness.
4. The method according to claim 1, wherein the converting the print template to obtain the template data comprises:
and placing the printing elements in an array, and converting the array into a json data format to obtain template data.
5. The picture processing method according to claim 1, wherein the generating a print picture from the print data comprises:
analyzing the printing data to generate a view;
and converting the view into an image to obtain a printing picture.
6. The method according to claim 1, wherein assigning the key value in the template data to generate the print data comprises:
uploading the template data to a server;
assigning the key values in the template data to generate printing data, wherein the assigning comprises:
acquiring downloading information of a user;
acquiring the template data from a server according to the downloading information;
and assigning values to the key values in the template data to generate printing data.
7. The picture processing method according to claim 5, wherein the generating a view by parsing the print data comprises:
loading the view object into a view by converting the print element into the view object, thereby generating a view;
wherein said converting the print element into a view object comprises: the line is converted into a UIView object, the text is converted into a UILabel object, and the two-dimensional code, the bar code and the picture are converted into at least one of the UIImageView object.
8. A printing method, applied to a printer side, the method comprising:
acquiring a printing picture; wherein the printed picture is generated by the picture processing method according to any one of claims 1 to 7;
and analyzing the printing picture and printing.
CN202111352915.5A 2021-11-16 2021-11-16 Picture processing method and printing method Pending CN114035755A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111352915.5A CN114035755A (en) 2021-11-16 2021-11-16 Picture processing method and printing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111352915.5A CN114035755A (en) 2021-11-16 2021-11-16 Picture processing method and printing method

Publications (1)

Publication Number Publication Date
CN114035755A true CN114035755A (en) 2022-02-11

Family

ID=80137765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111352915.5A Pending CN114035755A (en) 2021-11-16 2021-11-16 Picture processing method and printing method

Country Status (1)

Country Link
CN (1) CN114035755A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679452A (en) * 2013-12-02 2015-06-03 航天信息股份有限公司 Tax control system invoice print data binding method
KR20180107432A (en) * 2017-03-21 2018-10-02 주식회사 빅솔론 Printer and method for controlling the same
CN110210455A (en) * 2019-06-18 2019-09-06 石家庄捷弘科技有限公司 A kind of printing content format extracting method
CN111367478A (en) * 2018-12-26 2020-07-03 重庆首厚智能科技研究院有限公司 Data interaction printing system for laboratory instrument and printing method thereof
CN112000302A (en) * 2020-08-25 2020-11-27 上海合阔信息技术有限公司 Label generation method, template configuration method, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679452A (en) * 2013-12-02 2015-06-03 航天信息股份有限公司 Tax control system invoice print data binding method
KR20180107432A (en) * 2017-03-21 2018-10-02 주식회사 빅솔론 Printer and method for controlling the same
CN111367478A (en) * 2018-12-26 2020-07-03 重庆首厚智能科技研究院有限公司 Data interaction printing system for laboratory instrument and printing method thereof
CN110210455A (en) * 2019-06-18 2019-09-06 石家庄捷弘科技有限公司 A kind of printing content format extracting method
CN112000302A (en) * 2020-08-25 2020-11-27 上海合阔信息技术有限公司 Label generation method, template configuration method, device and storage medium

Similar Documents

Publication Publication Date Title
JP4896362B2 (en) Font selection method
CN110244921B (en) Label printing method and device, electronic equipment and system
JP2015130158A (en) Cloud-based font service system
CN110851092A (en) Customized printing method and system based on printing template under B/S framework
US11155102B2 (en) Image to script converter
WO2020015220A1 (en) Method and apparatus for downloading data based on pdf document, and storage medium and terminal
CN108319578B (en) Method for generating medium for data recording
CN113296774A (en) OFD file processing method and system based on browser
CN112486429A (en) Method for automatically configuring printer by terminal
CN116954450A (en) Screenshot method and device for front-end webpage, storage medium and terminal
CN114035755A (en) Picture processing method and printing method
CN110211484B (en) Electronic price tag display method, system, server and storage medium
JP2008310816A (en) System and method for compact representation of multiple markup page data
US20100079808A1 (en) Image-Forming Device Having Index Printing Function
CN111813350A (en) Printing data sending method, device, equipment and storage medium
US20100153842A1 (en) Rendering source content for display
JP5687098B2 (en) Print control program
KR100352787B1 (en) A font suppling system and a method on the network
CN111596872A (en) Data printing method and data printing device
CN112035076A (en) JSON-based printing analysis method, device, equipment and printing system
CN113743060B (en) Customizable report generation method, device, computer equipment and storage medium
JP6612167B2 (en) Rasterization processing apparatus, rasterization processing method, and program
CN116663073A (en) Vector signature method and system
JP2001255867A (en) Character string plotting device and method capable of performing plotting character string using font data having arbitrary data structure
US8055083B2 (en) Portable bitmap rendering systems and methods

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