CN102693109A - Method and device for printing - Google Patents

Method and device for printing Download PDF

Info

Publication number
CN102693109A
CN102693109A CN2012101641085A CN201210164108A CN102693109A CN 102693109 A CN102693109 A CN 102693109A CN 2012101641085 A CN2012101641085 A CN 2012101641085A CN 201210164108 A CN201210164108 A CN 201210164108A CN 102693109 A CN102693109 A CN 102693109A
Authority
CN
China
Prior art keywords
printer
file
print
language
printing
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
CN2012101641085A
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.)
Sonoscape Co Ltd
Original Assignee
Sonoscape 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 Sonoscape Co Ltd filed Critical Sonoscape Co Ltd
Priority to CN2012101641085A priority Critical patent/CN102693109A/en
Publication of CN102693109A publication Critical patent/CN102693109A/en
Pending legal-status Critical Current

Links

Images

Abstract

An embodiment of the invention discloses a method and a device for printing. The method and the device for printing are used for realizing individual printing output in an embedded system. The method in the embodiment of the invention comprises reading a pre-written printing template file; storing the pre-written printing template file as a file to be printed; writing the pre-written printing template file by a printer programming language; corresponding the printer programming language with a language of a required region of printed contents; filling data required to be printed into the file to be printed according to an appointed printed content rule; generating a printer programming language example file; and transmitting the printer programming language example file to a printer.

Description

A kind of Method of printing and device
Technical field
The present invention relates to computer realm, relate in particular to a kind of Method of printing and device.
Background technology
Current being in the information explosion epoch, various electronic products emerge in an endless stream, and it is in the operation interface that has more and more hommization, and also requiring equally can be through the personalized printed report of printer output as PC (PC, Personal Computer).Because the hardware platform that various electronic products use is different; Operating system is different, how to utilize the limited processing power of central processing unit (CPU, Central Processing Unit), limited memory size; Realizing intelligent, beautiful printout, is a difficult problem.
In the prior art, generally be to use the upper strata programming language, like HTML (HTML; Hypertext Markup Language), hypertext pre-service language (PHP; Hypertext Preprocessor), JSP (Java Server Pages) etc., carry out character image and set type, utilize the document format switching software then; Typesetted file conversion is become the printer language formatted file; Utilize instruments such as general print system (CUPS, Common UNIX Printing System), GhostScript again, convert the printer language formatted file to normal printer discernible raster data file; At last these raster data files are sent to printer, realize printout.
But in the above-mentioned prior art, printout requires all very high to hardware environment, need a lot of support softwares, and the dependence between each software is complicated, is not suitable in embedded system, using.
Summary of the invention
The embodiment of the invention provides a kind of Method of printing and device, in order in embedded system, to realize personalized the printing.
Method of printing in the embodiment of the invention comprises: the printing template file that reading prelists writes, and save as file to be printed, and the said printing template file of writing that prelists uses the printer programming language to write, and corresponding with the required regional language of print What; Print What rule according to a preconcerted arrangement need print data be inserted said file to be printed, generates printer programming language instance document; Said printer programming language instance document is sent to printer.
Printing equipment in the embodiment of the invention comprises: read module, be used to read the printing template file that prelists and write, and the said printing template file write of prelisting uses the printer programming language to write, and corresponding with the required regional language of print What; Preserve module, be used for the said printing template file of writing that prelists is saved as file to be printed; Generation module is used for print What rule according to a preconcerted arrangement, need print data insert said file to be printed, generates printer programming language instance document; Sending module is used for said printer programming language instance document is sent to printer.
Can find out that from above technical scheme the embodiment of the invention has the following advantages: the printing template file that reading prelists writes, this printing template file of writing that prelists uses the printer programming language to write; And corresponding with the required regional language of print What, the file after reading is saved as file to be printed, according to the print What rule of printing template file agreement; The need print data is inserted the file to be printed of having preserved, generate printer programming language instance document, then send to printer; Carry out printing by this printer, very low to the system hardware and software requirement in the above-mentioned print procedure, cpu frequency is more than 100M usually; More than the internal memory 64M, and dependence is very little between the software, increased ease of implantation thereof; Flexible and efficient, be applicable to embedded system.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, to those skilled in the art; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is an embodiment synoptic diagram of the Method of printing in the embodiment of the invention;
Fig. 2 is another embodiment synoptic diagram of the Method of printing in the embodiment of the invention;
Fig. 3 is an embodiment synoptic diagram of the printing equipment in the embodiment of the invention;
Fig. 4 is another embodiment synoptic diagram of the printing equipment in the embodiment of the invention.
Embodiment
Further specify the technical scheme of the embodiment of the invention below in conjunction with accompanying drawing and specific embodiment, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those skilled in the art are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The embodiment of the invention provides a kind of Method of printing and device, is used for realizing personalized printout in embedded system.Introduce in detail respectively below.
See also Fig. 1, one embodiment comprises of the Method of printing in the embodiment of the invention:
101, read the printing template file that prelists and write, and save as file to be printed, this printing template file of writing of prelisting uses printer programming language to write, and corresponding with the required regional language of print What;
In advance according to the print service demand; Use the printer programming language to write corresponding printing template file; Can support the multizone language to print, promptly be directed against the printing template file of the corresponding language of language of country variant, the corresponding different printing template files of country variant language; Certainly, also can be programmed in the printing template file of supporting a plurality of national languages in the same printing template.
Further, the printing template file that reading prelists writes, this printing template file of writing of prelisting uses printer programming language to write, and corresponding with the required regional language of print What, and the file after reading is saved as file to be printed.
102, according to a preconcerted arrangement print What rule needs print data inserted this file to be printed, generation printer programming language instance document;
The print What rule of different printing template file correspondences maybe be different, according to regular with the print What of printing template file agreement, the need print data inserted the file to be printed of having preserved, generate printer programming language instance document.
103, this printer programming language instance document is sent to printer.
The printer programming language instance document that generates is sent to printer, carry out by this printer and print.
In the embodiment of the invention, the printing template file that reading prelists writes, this printing template file of writing that prelists uses the printer programming language to write; And corresponding with the required regional language of print What, the file after reading is saved as file to be printed, according to the print What rule of printing template file agreement; The need print data is inserted the file to be printed of having preserved, generate printer programming language instance document, then send to printer; Carry out printing by this printer, very low to the system hardware and software requirement in the process of above-mentioned realization technical scheme, cpu frequency is more than 100M usually; More than the internal memory 64M, and dependence is very little between the software, increased ease of implantation thereof; Flexible and efficient, be applicable to embedded system.
For ease of understanding, specify the Method of printing in the embodiment of the invention with another embodiment below, see also Fig. 2, another embodiment of the Method of printing in the embodiment of the invention comprises:
201, obtain the required regional language message of current print What;
Survey current ultrasonic system zone language environment, obtain the required regional language message of current print What, judge and use which kind of language printed report.
General ultrasonic user can select different regional language through ultrasonic system software, controls ultrasonic system and uses which kind of regional language to show, thereby obtain the required regional language message of current print What.
202, read the printing template file that prelists and write, and save as file to be printed, this printing template file of writing of prelisting uses PS or PCL to write, and corresponding with the required regional language of print What;
In advance according to the print service demand; Use PostScript PS (PostScript) or printer command language PCL (Printer Command Language); Perhaps other printer programming languages are write corresponding printing template file; Can support the language of multizone to print, promptly be directed against the printing template file of the corresponding language of language of country variant, the corresponding different printing template files of country variant language; Corresponding en.ps file of for example English printing template file or en.pcl file; Corresponding ch.ps file of Chinese printing template file or ch.pcl file certainly, also can be programmed in the printing template file of supporting a plurality of national languages in the same printing template.
Further, the printing template file that reading prelists writes, this printing template file of writing that prelists uses the printer programming language to write; And it is corresponding with the required regional language of print What; File after reading is saved as file to be printed, and for example, the regional language message of obtaining current print What is English; That read is English template file en.ps, saves as file to be printed tmp.ps.
203, according to a preconcerted arrangement print What rule needs print data inserted file to be printed, generation PS or PCL instance document;
The print What rule that different printing template files is corresponding possibly be not quite similar, and according to regular with the print What of printing template file agreement, the need print data is inserted the file to be printed of having preserved, generates PS or PCL instance document.
For example; Need to print English patient medical report; So; The patient medical data of English are inserted in the position of treating printed report file tmp.ps correspondence, treated field " Name " hurdle among the printed report file tmp.ps, then only need print What rule according to a preconcerted arrangement if patient's name " Bill Ball " is inserted in preparation; With patient's name's field and treat to produce mapping relations between " Name " field in the printed report file, thereby " Bill Ball " inserted " Name " field one hurdle of treating printed report file tmp.ps.
Further, when printing the patient medical report file, the information such as patient's personal information, check result, diagnostic result, diagnosis picture, doctor's signature of generally can inserting generate PS or PCL instance document thus in the tmp.ps file.
204, convert PS or PCL instance document the rasterizing data of printer identification to, and send to printer.
PS or PCL instance document are passed through the rasterizing switching software; Like GhostScript; Call printer driver, this print example file conversion is become to print the rasterizing data of function identification, and through USB (USB; Universal Serial BUS) or transmission medium such as network send to printer, by this printer output printed report.
In the embodiment of the invention, obtain the required regional language message of current print What, read the printing template file that prelists and write that should language; This printing template file of writing that prelists uses PS or PCL language, and saves as file to be printed, print What rule according to a preconcerted arrangement; Need print data insert this file to be printed, generate PS or PCL instance document, convert PS or PCL instance document to rasterizing data that printer is discerned; And send to printer and print output, system hardware and software is required low, and dependence is very little between the software; Increased ease of implantation thereof, flexible and efficient, be applicable to embedded system.
With the Method of printing in the instantiation explanation embodiment of the invention, be reported as example below with the output print of medical ultrasound equipment:
At first, use the PS language, write out the printing template file according to the requirement of ultrasonic diagnosis report, the corresponding different printing template files of country variant language, and the printing template file is kept under the ultrasonic system assigned catalogue.
The doctor uses ultrasonic software that the patient is checked, produces patient's information data, when the doctor need print the ultrasonic report of patient, obtains the language message in the regional language environment of current ultrasonic system; According to the country variant language, select corresponding different printing template files, for example print English patient medical report, then duplicate a English printing template file earlier through application program; And save as and treat printed report file tmp.ps, then, according to the print What rule that presets; The patient information data of English are inserted in the tmp.ps file, general, need insert the patient's name in the medical report; Diagnosis content, diagnosis picture, doctor's english information such as sign.Insert complete after; English template file becomes English PS instance document, then through the rasterizing switching software, calls printed driver; Convert the PS instance document to printer discernible rasterizing data; Be about to this print example file conversion and become to print the rasterizing data of function identification, the rasterizing data after the conversion are exported to printer through transmission mediums such as USB or networks, print English medical report file.If printer, also can be handled without rasterizing after forming the PS instance document for supporting the intelligence printer of PS language, the PS instance document is sent to printer through transmission mediums such as USB or networks, output to this intelligence printer and print output.In this example, the PS instance document also can be the PCL instance document, and is corresponding, the corresponding en.pcl file of English printing template file, and the corresponding ch.pcl file of Chinese printing template, and corresponding concrete print procedure is identical with above-mentioned print procedure, repeats no more.
Introduce the printing equipment in the embodiment of the invention below, see also Fig. 3, one embodiment comprises of the printing equipment in the inventive embodiments:
Read module 301 is used to read the printing template file that prelists and write, and this printing template file of writing of prelisting uses printer programming language to write, and corresponding with the required regional language of print What;
Preserve module 302, be used for this printing template file of writing that prelists is saved as file to be printed;
Generation module 303 is used for print What rule according to a preconcerted arrangement, need print data insert this file to be printed, generates printer programming language instance document;
Sending module 304 is used for this printer programming language instance document is sent to printer.
Each module realizes the detailed process of function separately in the printing equipment in the embodiment of the invention, sees also aforementioned relevant description in embodiment illustrated in fig. 1, repeats no more here.
In the embodiment of the invention, read module 301 reads the printing template file that prelists and write, and this printing template file of writing that prelists uses the printer programming language to write; And corresponding with the required regional language of print What, preserve module 302 this printing template file of writing that prelists is saved as file to be printed, generation module 303 print What rule according to a preconcerted arrangement; Need print data insert this file to be printed, generate printer programming language instance document, sending module 304 sends to printer with this printer programming language instance document; Above-mentioned Method of printing requires very low to system hardware and software, cpu frequency is more than 100M, more than the internal memory 64M usually; And dependence is very little between the software; Increased ease of implantation thereof, flexible and efficient, be applicable to embedded system.
For ease of understanding, specify the printing equipment in the present invention's enforcement with another embodiment below, see also Fig. 4, another embodiment of the printing equipment during the present invention implements comprises:
Read module 401 is used to read the printing template file that prelists and write, and this printing template file of writing of prelisting uses PS or PCL to write, and corresponding with the required regional language of print What;
Preserve module 402, be used for this printing template file of writing that prelists is saved as file to be printed;
Generation module 403 is used for print What rule according to a preconcerted arrangement, need print data insert this file to be printed, generates PS or PCL instance document;
Sending module 404 is used for this PS or PCL instance document are sent to printer.
Need to prove that the printing equipment in the embodiment of the invention can further include:
Acquisition module 405 is used to obtain the required regional language message of current print What;
Modular converter 406 is used for converting this PS or PCL instance document to rasterizing data that this printer is discerned.
Further, sending module 404 specifically is used for PS or PCL instance document or rasterizing data will be sent to printer through USB or network.
Each module realizes the detailed process of function separately in the printing equipment in the embodiment of the invention, sees also aforementioned relevant description in embodiment illustrated in fig. 2, repeats no more here.
In the embodiment of the invention, at first, acquisition module 405 obtains the required regional language message of current print What; Read module 401 reads the printing template file that prelists and write, and the required regional language of this prelist the printing template file write and print What is corresponding, and this printing template file of writing that prelists uses PS or PCL to write; Preserve module 402 this printing template file of writing that prelists is saved as file to be printed, generation module 403 print What rule according to a preconcerted arrangement need print data be inserted this file to be printed; Generate PS or PCL instance document, modular converter 406 converts this PS or PCL instance document to rasterizing data that this printer is discerned, and sending module 404 is with PS or PCL instance document or rasterizing data; Send to printer through transmission mediums such as USB or networks, the realization of the Method of printing in the present embodiment requires low to system hardware and software; And dependence is very little between the software; Increased ease of implantation thereof, flexible and efficient, be applicable to embedded system.
It will be appreciated by those skilled in the art that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in a kind of computer-readable recording medium; The above-mentioned storage medium of mentioning can be a ROM (read-only memory), disk or CD etc.
More than a kind of Method of printing provided by the present invention and device have been carried out detailed introduction; For those skilled in the art; Thought according to the embodiment of the invention; The part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. a Method of printing is characterized in that, comprising:
The printing template file that reading prelists writes, and save as file to be printed, the said printing template file of writing that prelists uses the printer programming language to write, and corresponding with the required regional language of print What;
Print What rule according to a preconcerted arrangement need print data be inserted said file to be printed, generates printer programming language instance document;
Said printer programming language instance document is sent to printer.
2. method according to claim 2 is characterized in that,
Said printer programming language comprises: PostScript PS or printer command language PCL.
3. method according to claim 1 and 2 is characterized in that, the said template file of writing that prelists that reads comprises before:
Obtain the required regional language message of current print What.
4. method according to claim 3 is characterized in that, saidly said printer programming language instance document is sent to printer also comprises:
Convert said PS or PCL instance document the rasterizing data of said printer identification to, and send to said printer.
5. method according to claim 4 is characterized in that, the said printer that sends to comprises:
Send to printer through USB or network.
6. a printing equipment is characterized in that, comprising:
Read module is used to read the printing template file that prelists and write, and the said printing template file write of prelisting uses the printer programming language to write, and corresponding with the required regional language of print What;
Preserve module, be used for the said printing template file of writing that prelists is saved as file to be printed;
Generation module is used for print What rule according to a preconcerted arrangement, need print data insert said file to be printed, generates printer programming language instance document;
Sending module is used for said printer programming language instance document is sent to printer.
7. device according to claim 6 is characterized in that,
Said printer programming language comprises: PostScript PS or printer command language PCL.
8. according to claim 6 or 7 described devices, it is characterized in that said device also comprises:
Acquisition module is used to obtain the required regional language message of current print What.
9. device according to claim 8 is characterized in that, said device also comprises:
Modular converter is used for converting said PS or PCL instance document to rasterizing data that said printer is discerned.
10. device according to claim 9 is characterized in that,
Said sending module specifically is used for said PS or PCL instance document or said rasterizing data are sent to printer through USB or network.
CN2012101641085A 2012-05-24 2012-05-24 Method and device for printing Pending CN102693109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012101641085A CN102693109A (en) 2012-05-24 2012-05-24 Method and device for printing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012101641085A CN102693109A (en) 2012-05-24 2012-05-24 Method and device for printing

Publications (1)

Publication Number Publication Date
CN102693109A true CN102693109A (en) 2012-09-26

Family

ID=46858599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012101641085A Pending CN102693109A (en) 2012-05-24 2012-05-24 Method and device for printing

Country Status (1)

Country Link
CN (1) CN102693109A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268205A (en) * 2013-04-16 2013-08-28 深圳市科曼医疗设备有限公司 Embedded laser printing method and printing device
CN103885731A (en) * 2012-12-20 2014-06-25 北大方正集团有限公司 Data printing method and device
WO2015078053A1 (en) * 2013-11-26 2015-06-04 深圳市科曼医疗设备有限公司 Printing method and system
CN105058998A (en) * 2015-09-05 2015-11-18 吴耀 Printer intelligent box for realizing standardized printing service and using method thereof
CN105204790A (en) * 2015-08-27 2015-12-30 许继集团有限公司 Printing control method of embedded type relaying protection device
CN108228119A (en) * 2018-01-11 2018-06-29 平安万家医疗投资管理有限责任公司 Method of printing, terminal device and storage medium based on HXML
CN110874195A (en) * 2018-11-22 2020-03-10 哈尔滨安天科技集团股份有限公司 Printing language identification method and device, electronic equipment and storage medium
CN112214184A (en) * 2020-10-16 2021-01-12 平安国际智慧城市科技股份有限公司 User-defined printing method and device, computer equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477449A (en) * 2009-01-20 2009-07-08 北京展鹏电子技术有限公司 Printing management system and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477449A (en) * 2009-01-20 2009-07-08 北京展鹏电子技术有限公司 Printing management system and method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885731A (en) * 2012-12-20 2014-06-25 北大方正集团有限公司 Data printing method and device
CN103268205A (en) * 2013-04-16 2013-08-28 深圳市科曼医疗设备有限公司 Embedded laser printing method and printing device
WO2015078053A1 (en) * 2013-11-26 2015-06-04 深圳市科曼医疗设备有限公司 Printing method and system
CN105204790A (en) * 2015-08-27 2015-12-30 许继集团有限公司 Printing control method of embedded type relaying protection device
CN105204790B (en) * 2015-08-27 2018-06-19 许继集团有限公司 A kind of Embedded Relay Protector print control program
CN105058998A (en) * 2015-09-05 2015-11-18 吴耀 Printer intelligent box for realizing standardized printing service and using method thereof
CN108228119A (en) * 2018-01-11 2018-06-29 平安万家医疗投资管理有限责任公司 Method of printing, terminal device and storage medium based on HXML
CN110874195A (en) * 2018-11-22 2020-03-10 哈尔滨安天科技集团股份有限公司 Printing language identification method and device, electronic equipment and storage medium
CN112214184A (en) * 2020-10-16 2021-01-12 平安国际智慧城市科技股份有限公司 User-defined printing method and device, computer equipment and medium
CN112214184B (en) * 2020-10-16 2023-11-24 深圳赛安特技术服务有限公司 Custom printing method, device, computer equipment and medium

Similar Documents

Publication Publication Date Title
CN102693109A (en) Method and device for printing
CN102591847B (en) Document processing device, document processing and document processing method
US9086826B2 (en) Information processing apparatus, method for controlling the same, and storage medium
US20020186393A1 (en) Document printing using format-specific translation modules
CN106528006A (en) Page printing method and device
CN109101228B (en) Application program execution method and device
US20110170120A1 (en) Apparatus and method for printing plurality of pages on one page in PDF direct printing
EP1241575A2 (en) System and method for distributed processing
US8570581B2 (en) Image forming method and system using XHTML-print data
CN103092602A (en) Software development kit and terminal apparatus
EP2933716B1 (en) Image output system, image output method, document server
JP2006018808A (en) System and method for generating embedded resource update for output device
JP4144392B2 (en) Image processing apparatus, image forming system, image forming method, and program
CN104636740A (en) Image processing system and image processing method
US11003397B2 (en) Printing computing device for processing a print job to print a document at a multi-function printing device
US20090282150A1 (en) Service flow processing apparatus and method
CN103136559B (en) The grating method of barcode with changeable and device
US6684789B2 (en) Method and system for the transformation of digital print data streams and corresponding printer and printer server
CN114579065A (en) Printer redirection method and system of cloud desktop
US20120072827A1 (en) Information processing apparatus, page description method, and storage medium
CN102541479B (en) Method and system for using Portable Document Format (PDF) in security bills
JP2005071240A (en) Printing data creation device, printer, and printing system
JP2969695B2 (en) Document processing system with print format file split transmission device
KR100694101B1 (en) Method and system for forming an image using a XHTML-Print data
US20190250863A1 (en) Printing computing device for operating a multi-function printing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 518000 Guangdong city of Shenzhen province Nanshan District Yuquanlu Road Yizhe building 4, 5, 8, 9, 10 floor

Applicant after: Biologic medical Science and Technology Co., Ltd. is opened in Shenzhen

Address before: 518000 Guangdong city of Shenzhen province Nanshan District Yuquanlu Road Yizhe building 4 floor

Applicant before: Sonoscape Inc.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: SONOSCAPE INC. TO: SHENGZHEN SONOSCAPE MEDICAL CORP.

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120926