CN104598178A - Port printing method and device - Google Patents

Port printing method and device Download PDF

Info

Publication number
CN104598178A
CN104598178A CN201410839656.2A CN201410839656A CN104598178A CN 104598178 A CN104598178 A CN 104598178A CN 201410839656 A CN201410839656 A CN 201410839656A CN 104598178 A CN104598178 A CN 104598178A
Authority
CN
China
Prior art keywords
label
printing
content
tag
printed
Prior art date
Application number
CN201410839656.2A
Other languages
Chinese (zh)
Other versions
CN104598178B (en
Inventor
程友
Original Assignee
福建星网视易信息系统有限公司
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 福建星网视易信息系统有限公司 filed Critical 福建星网视易信息系统有限公司
Priority to CN201410839656.2A priority Critical patent/CN104598178B/en
Publication of CN104598178A publication Critical patent/CN104598178A/en
Application granted granted Critical
Publication of CN104598178B publication Critical patent/CN104598178B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/125Page layout or assigning input pages onto output media, e.g. imposition

Abstract

The invention discloses a port printing method. The port printing method comprises the following steps: dividing a printing page into at least one region, setting at least one label for each region, and fixedly displaying each label in one region; predefining printing attributes, label contents to be printed and label attributes to be set in a graphical interface; saving the set label attributes as a configuration file according to a customized format; receiving a content to be printed by a printer through a printing port, loading the configuration file, replacing the content to be printed to the position corresponding to a variable label, and printing each region in the printing page according to the configuration file in sequence. The invention also discloses a port printing device. According to the scheme, the printing format required by a final user can also be conveniently set by the final user while the advantage of high printing speed is kept, so the user satisfaction is improved.

Description

一种端口打印方法及装置 One kind of printing method and device port

技术领域 FIELD

[0001] 本申请涉及计算机技术领域,尤其涉及一种端口打印方法及装置。 [0001] The present application relates to computer technologies, and particularly to a printing method and apparatus port.

背景技术 Background technique

[0002] 常用的票据打印机分为针式打印机和热敏打印机。 [0002] Commonly used dot matrix printer paper into and thermal printers. 针式打印机用的是色带,一次可打印多联,但是打印速度慢;热敏打印机打印速度快,但是一次只能打一联,且保存不长久,时间长了票据上的内容就变淡、变没了。 Using a dot matrix printer ribbon, a multi-printable, but slow print speed; fast print speed thermal printer, but can only play a joint, and not save long, long time the contents of the notes on fades , did not change.

[0003] 打印机的工作方式可分为图形打印和端口打印。 [0003] The printer works can be divided into graphic printing and print port. 图形打印是把要打印的内容提交给操作系统的打印进程来完成打印,无需客户端程序控制,所打印的票据格式可以随意设置,但是打印速度慢、占用系统资源高; Graphic printing is to submit content to the printing process to print the operating system to complete the print, no client program control, bill printing format can be arbitrarily set, but the printing speed is slow, taking up high system resources;

[0004] 端口打印通过端口通信,把要打印的内容逐行发到打印机进行打印,打印过程需要客户端程序控制,打印速度快,占用系统资源少,但是打印的票据格式是固定的,只能在特定区域打印内容。 [0004] communication port of the print through the port, to print line by line the contents sent to the printer for printing, the printing process requires the client control program, print speed, less system resources, but the ticket printing format is fixed, only print content in a particular area. 如果要对打印格式进行修改,只能通过修改源程序代码,改完重新编译客户端程序来实现。 If you want to modify the print format, it can only be achieved by modifying the source code, recompile the client to change the complete program. 而这种修改并不直观,只能修改后通过试打页判断修改是否符合意图,使用起来较为繁琐,并且对用户的要求较高。 And this modification is not intuitive to determine whether the modified intent to use more complicated and require a higher user try to play through page after only modify.

发明内容 SUMMARY

[0005] 本申请提供了一种端口打印方法,在保持打印速度快的优势的同时,还能让最终用户方便地设置自己所需要的打印格式,提高了用户满意度。 [0005] The present application provides a method of printing port, while maintaining the print speed advantage, but also allows end users to easily set the print format they need, and improve user satisfaction.

[0006] 本申请实施例提供的一种端口打印方法,包括: [0006] The present application implementing a printing method provided in the port, comprising:

[0007] 把打印页面分成至少一个区域,对于每个区域设置至少一个标签,每个标签固定在一个区域内显示; [0007] The printed page into at least one region, for each region, at least one tag, each tag is fixed in a display region;

[0008] 在图形界面中预定义打印属性、需要打印的标签内容以及可供设置的标签属性; [0008] The graphic interface the predefined printing attributes, the contents need to print labels and a label set for the attribute;

[0009] 将设置好的标签属性按照自定义的格式保存成配置文件; [0009] A good set properties are saved into the profile tags according to the custom format;

[0010] 打印机通过打印端口接收所要打印的内容,加载所述配置文件,将所要打印的内容替换到标签对应的位置,并根据配置文件依次打印页面中的各个区域。 [0010] Printer port through the print content to be printed is received, loading the configuration file to replace the contents to be printed to a position corresponding to the label, and the respective areas are sequentially printed pages according to the configuration file.

[0011] 较佳地,所述标签包括常量标签和变量标签;常量标签对应固定的打印内容;变量标签根据每次打印时的取值,将所要打印的内容替换到变量标签对应的位置,打印出相应的内容。 [0011] Preferably, the tag comprises the constant and variable labels tag; fixed constants corresponding to the tag print content; tag variable based on the value at the time of each print content to be printed to a position to replace the variable corresponding to the tag, printing and the corresponding content.

[0012] 较佳地,所述标签属性包括:标签是否可见、标签的字体、标签在区域中的位置。 [0012] Preferably, said label attributes includes: label is visible, the label fonts, label position in the region.

[0013] 较佳地,通过复选框来控制标签是否可见,通过在预览页面中拖动各项标签内容来调整标签在区域中的位置。 [0013] Preferably, the label is controlled by the check box is visible, the label position is adjusted in the region of the tag by dragging the preview page content.

[0014] 较佳地,所述打印属性包括打印纸大小、打印纸边距、标题字体大小、正文字体大小,标题高度、内容高度和注解高度。 [0014] Preferably, the printing attributes include the size of the printing paper, printing paper margins, headline font size, the font size of the text, header height, the height of the content and height annotations.

[0015] 本申请实施例还提供了一种端口打印装置,包括: [0015] Example embodiments of the present application further provides a printing interface apparatus, comprising:

[0016] 分区模块,用于把打印页面分成至少一个区域,对于每个区域设置至少一个标签,每个标签固定在一个区域内显示; [0016] The partitioning module configured to print the page into at least one region, the at least one label is provided for each zone, each label in a fixed display region;

[0017] 预定义模块,用于在图形界面中预定义打印属性、需要打印的标签内容以及可供设置的标签属性; [0017] The predefined means for printing a predefined attributes in a graphical interface, and the need to print the contents of the tag label set for the attribute;

[0018] 配置文件生成模块,用于将设置好的标签属性按照自定义的格式保存成配置文件; [0018] Configuration file generating module, configured to set a good profile tag attributes to save customized according to the format;

[0019] 打印驱动模块,用于驱动打印机通过打印端口接收所要打印的内容,加载所述配置文件,将所要打印的内容替换到变量标签对应的位置,并根据配置文件依次打印页面中的各个区域。 [0019] The printer driver means for driving the printer by the contents of the print port receiver to be printed, loading the configuration file to replace the contents to be printed to a position variable corresponding to the tag, and sequentially prints each area of ​​a page in accordance with the profile .

[0020] 较佳地,所述标签包括常量标签和变量标签;常量标签对应固定的打印内容;变量标签根据每次打印时的取值,将所要打印的内容替换到变量标签对应的位置,打印出相应的内容。 [0020] Preferably, the tag comprises the constant and variable labels tag; fixed constants corresponding to the tag print content; tag variable based on the value at the time of each print content to be printed to a position to replace the variable corresponding to the tag, printing and the corresponding content.

[0021] 较佳地,所述标签属性包括:标签是否可见、标签的字体、标签在区域中的位置。 [0021] Preferably, said label attributes includes: label is visible, the label fonts, label position in the region.

[0022] 较佳地,通过复选框来控制标签是否可见,通过在预览页面中拖动各项标签内容来调整标签在区域中的位置。 [0022] Preferably, the label is controlled by the check box is visible, the label position is adjusted in the region of the tag by dragging the preview page content.

[0023] 较佳地,所述打印属性包括打印纸大小、打印纸边距、标题字体大小、正文字体大小,标题高度、内容高度和注解高度。 [0023] Preferably, the printing attributes include the size of the printing paper, printing paper margins, headline font size, the font size of the text, header height, the height of the content and height annotations.

[0024] 从以上技术方案可以看出,通过在图形界面中设置各个标签的属性,可以方便地确定所要打印的各项内容以及打印格式。 [0024] As can be seen from the above technical solution, by setting attribute of each tag in the graphical interface, you can easily determine the content to be printed and the print format. 本申请基于端口通信方式,可以实现高速打印,并且使最终用户无需掌握专门知识,也能够方便地设置自己所需要的打印格式,提高了用户满意度。 This application is based on communication ports, enabling high-speed printing, and enables end users need to master specialized knowledge, you can easily set print format they need, and improve user satisfaction.

附图说明 BRIEF DESCRIPTION

[0025] 图1为本申请实施例提供了一种端口打印方法的流程示意图; [0025] Figure 1 provides a flow schematic of one kind of port printing method of an embodiment of the present application;

[0026] 图2为本申请实施例提供的通过可视化界面设置配置文件的示意图; [0026] FIG. 2 of the present application profile provided by the visual interface schematic diagram according to an embodiment;

[0027] 图3为本申请实施例提供的端口打印装置的框图; [0027] FIG. 3 is a block diagram of the port printing apparatus according to an embodiment of the present application;

[0028] 图4为应用本申请方案打印的一个出品小票示例图; [0028] FIG. 4 is a small ticket application example of application of the present embodiment FIG. Publisher printed;

[0029] 图5为本申请实施例提供的打印出品小票的流程图。 [0029] FIG 5 is a flowchart of a print produced small ticket according to an embodiment of the present application.

具体实施方式 Detailed ways

[0030] 为使本申请技术方案的技术原理、特点以及技术效果更加清楚,以下结合具体实施例对本申请技术方案进行详细阐述。 [0030] To make the technical principles of the present application aspect, characteristics and technical effect more apparent, the following embodiments in conjunction with the specific embodiments of the technical solutions of the present application in detail.

[0031] 本申请实施例提供了一种端口打印方法的流程,如图1所示,包括如下步骤: Process Embodiment [0031] The present application provides a method of printing ports, shown in Figure 1, comprising the steps of:

[0032] 步骤101:把打印页面分成至少一个区域,对于每个区域设置至少一个标签,每个标签固定在一个区域内显示。 [0032] Step 101: the print page is divided into at least one region, the at least one label is provided for each zone, each label in a fixed display area.

[0033] 其中,标签和区域是多对一的关系,一个标签只能在一个区域内显示,但是一个区域内可以有多个标签。 [0033] wherein the tag and the region is many-to, a label only display in one region, but a region with a plurality of tags.

[0034] 标签根据内容的不同,可以分为常量标签和变量标签。 [0034] Depending on the content of the label, the label can be divided into constant and variable labels. 其中常量标签对应的打印内容是固定的,而变量标签则根据每次打印时的取值,打印出对应内容。 Wherein the constants corresponding to the tag print is fixed, and the variable tag is based on the value at the time of each printing, print out the corresponding content.

[0035] 步骤102:在图形界面中预定义打印属性、需要打印的标签内容以及可供设置的标签属性。 [0035] Step 102: the graphical interface in a predefined printing attributes, the contents need to print labels and a label set for the attribute.

[0036] 根据本申请实施例,在标签设置过程中,在图形界面中显示所述预定义的内容是有可能在票据中出现的内容,最终用户可以根据自己需求,把其中不需要的内容隐藏掉,仅打印需要的部分。 [0036] Example embodiments of the present application, is displayed in the graphical interface is provided in the label during the predefined content is likely to occur in the content ticket, end users according to their needs, which does not require the content Hide out, print only part of the need.

[0037] 根据本申请的另一实施例,所述标签属性包括但不限于:标签是否可见、标签的字体、标签在区域中的位置。 [0037] According to another embodiment of the present disclosure, the tag attributes include, but are not limited to: the label is visible, the label fonts, label position in the region. 通过复选框来控制可见,通过在预览页面中拖动各项标签内容来调整标签在区域中的位置,字体只能设置加粗,支持的字体由打印机决定,不能增加或者删除标签。 Controlled by the check box is visible by dragging the label content in the preview page to adjust the label position in the region, can only be set bold font, font support is determined by the printer, you can not add or remove labels. 其中,常量标签在图形界面中显示的就是该标签内容本身,而变量标签在图形界面中显示的是该标签的代码,在实际打印时,该代码所在位置替换为实际要打印的内容。 Wherein the constant tag displayed in the graphical interface is the label content itself, and the variable labels displayed in the graphical interface is the code of the tag, in the actual printing, the code replacement location contents to be actually printed.

[0038] 步骤103:将设置好的标签属性按照自定义的格式保存成配置文件。 [0038] Step 103: set a good property tag to save customized profile in accordance with the format.

[0039] 图2为本申请实施例提供的通过可视化界面设置配置文件的示意图。 [0039] FIG. 2 is a profile provided by the visual interface provided by an embodiment schematic view of the application. 图2中最右一列给出了配置文件中包含的配置信息。 FIG 2 rightmost column shows the configuration file contains the configuration information. 其中前7行给出了打印属性,包括打印纸大小、打印纸边距、标题字体大小、正文字体大小,标题高度、内容高度和注解高度。 7 in which the front line gives the printing attributes, including the size of printing paper, printing paper margins, headline font size, the font size of the text, header height, the height of the content and height annotations. 其中每项标签内容前面的对勾“ V ”或叉号“ X ”分别表示该项打印属性是否生效。 Where each label content check mark in front of the "V" or a cross "X" represent the Print Properties is in effect. 第8-26行为常量标签内容,每项标签内容前面的对勾“ V”或叉号“ X ”分别表示该项标签内容是否可见。 8-26 behavior constants label content, label content of each check mark in front of the "V" or a cross "X" represent the label content is visible. 从第27行起往后为变量标签,每项标签内容前面的对勾“ V ”或叉号“ X ”分别表示该项标签内容是否可见。 From the 27th row next to the variable label, the label content of each check mark in front of the "V" or a cross "X" represent the label content is visible. 图2的中间位置显示出所要打印页面的预览页面。 Figure 2 shows the intermediate position of the preview pages of the page to be printed. 该预览页面的页面大小及页边距即为所述打印纸大小及打印纸边距,而其中显示的各项内容也与各项打印属性相符。 The preview page and the page size is the margin of the paper size and the paper margins while the display contents are also consistent with the printing attributes.

[0040] 以下示出了配置文件的一个示例: [0040] The following illustrates an example configuration file:

[0041] >酒水单>BillAuto//酒水单打印窗体名称 [0041]> wine list> BillAuto // Wine List Print Form Name

[0042] &CSetPaper_S [0042] & CSetPaper_S

[0043]打印纸大小 # 打印纸大小#01# (284,378) #0#0#0#0#0#0 [0043] The size of the printing paper size of printing paper # # # 01 (284,378) # 0 # 0 # 0 # 0 # 0 # 0

[0044] &CSetPaper_P [0044] & CSetPaper_P

[0045] 打印纸边距#打印纸边距#01# (O, O) #0#0#0#0#0#0 [0045] The paper margin Margin # paper # 01 # (O, O) # 0 # 0 # 0 # 0 # 0 # 0

[0046] &CSetF_T [0046] & CSetF_T

[0047] 标题字体大小#标题字体大小#01#11#0#0#0#0#0#0 [0047] The title font size headline font size # 01 # # 11 # 0 # 0 # 0 # 0 # 0 # 0

[0048] &CSetF_S [0048] & CSetF_S

[0049] 正文字体大小#正文字体大小#01#11#0#0#0#0#0#0 [0049] body text font size font size # # 01 # 11 # 0 # 0 # 0 # 0 # 0 # 0

[0050] &CSetPnl_H [0050] & CSetPnl_H

[0051]标题高度 #l#pnl_title#144#0#0#0#0#0#0 [0051] The title height # l # pnl_title # 144 # 0 # 0 # 0 # 0 # 0 # 0

[0052] 内容高度#2#pnl_detail#19#0#0#0#0#0#0 [0052] SUMMARY height # 2 # pnl_detail # 19 # 0 # 0 # 0 # 0 # 0 # 0

[0053]注解高度 #3#pnl_summary#188#0#0#0#0#0#0 [0053] Annotations height # 3 # pnl_summary # 188 # 0 # 0 # 0 # 0 # 0 # 0

[0054] &CSetF_N_P [0054] & CSetF_N_P

[0055]包厢名称 # 包厢名称:#Bill_RoomAuto#(5, 40) #-l#pnl_title#2#l#0#0 [0055] # Name box box name: # Bill_RoomAuto # (5, 40) # -l # pnl_title # 2 # l # 0 # 0

[0056]帐单号 # 帐单号:#Bill_Check0utAuto#(130, 40) #-l#pnl_title#2#3#0#0 [0056] Billing number Billing Number #: # Bill_Check0utAuto # (130, 40) # -l # pnl_title # 2 # 3 # 0 # 0

[0057]下单时间 # 下单时间:#Bill_OrderDateTimeAuto#(5,60)#_l#pnl_title#3#l#0#0 [0057] single time in a single time #: # Bill_OrderDateTimeAuto # (5,60) #_ l # pnl_title # 3 # l # 0 # 0

[0058]下单员 # 下单员:#Bill_OperatorNameAuto# (5,80) #_l#pnl_title#4#l#0#0 [0058] Under a single member of the single member #: # Bill_OperatorNameAuto # (5,80) # _l # pnl_title # 4 # l # 0 # 0

[0059]酒水单号 # 酒水单号:#Bill_WineListAuto#(5, 100)#-l#pnl_title#5#l#0#09 [0059] No single wine wine list number #: # Bill_WineListAuto # (5, 100) # - l # pnl_title # 5 # l # 0 # 09

T#z#LO#oo#UTn ①! T # z # LO # oo # UTn ①! 3 3

IIUd#T-#(g<g8T)#osvi\n3N3I^SST3UT3s,IIS#l} 0 ^ ^ 0 411 〔OOOOQST#zss#UTn8PJUd#T-#(g <ST) #o+JnviuTno^sosIIIS# 騷斓井騷斓RooosT#9# 寸s#UTn8PJUd#T-#(gos)ttog<>SJJJ+JncppolplnTa# _}4/f符# _}4/f符〔900QSTS#cos#UTn8PJUd#T-#(g <LO二)ttog<>J3qe^J3PJoJ=g# 〔Lnoo。 IIUd # T - # (g <g8T) #osvi \ n3N3I ^ SST3UT3s, IIS # l} 0 ^ ^ 0 411 [OOOOQST # zss # UTn8PJUd # T - # (g <ST) # o + JnviuTno ^ sosIIIS # Sao lan well Sao Lan RooosT # 9 # inch s # UTn8PJUd # T - # (gos) ttog <> SJJJ + JncppolplnTa # _} 4 / f symbol # _} 4 / f symbol [900QSTS # cos # UTn8PJUd # T - # (g <LO two) ttog <> J3qe ^ J3PJoJ = g # [Lnoo. . 〕T#9ss#u38PJUd#T-#(g <LO卜)tt〇g<>su 曰T3JJfnllnTa# 攰# 归符〔SOS ] T # 9ss # u38PJUd # T - # (g <LO Bu) tt〇g <> su said normalized character T3JJfnllnTa # # [Gui SOS

τ#9τ#τ#8#ΐϊτηΘ-ο τ # 9τ # τ # 8 # ΐϊτηΘ-ο

IIUd#TI#(gs#0+Jnvi\n^JfnT3s,IIS# # 卻ns柜# 卻ns柜WgQS IIUd # TI # (gs # 0 + Jnvi \ n ^ JfnT3s, IIS # # # but it ns ns cabinet cabinet WgQS

0#lot#z#z#9uu 0 # lot # z # z # 9uu

IIUd#T-#(0H *LOz)#o+Jnvi\osxauslnTa# 「SR軚符'¾;# 幽「SR救符,¾ // 〔_〕 IIUd # T - # (0H * LOz) # o + Jnvi \ osxauslnTa # "symbol SR Hand Drive '¾; # quiet" SR save operator, ¾ // [_]

0#ST#f#smnpTP 0 # ST # f # smnpTP

IIUd#TI#SOTo6T)#o+Jnvi\n^aJ^SST3UT3s,IITa# 蝈^柃獅细# 蝈^柃獅细 IIUd # TI # SOTo6T) # o + Jnvi \ n ^ aJ ^ SST3UT3s, IITa # Guo Guo ^ # ^ Eurya fine lion lion fine Eurya

0#lot#z#lo#9uu 0 # lot # z # lo # 9uu

IIUd#T#(02*LOz)#〇+Jnviusns^TnTa# ♦符^藤社蝈♦符^藤S800〕 IIUd # T # (02 * LOz) # billion + Jnviusns ^ TnTa # ♦ symbol character ^ ^ ♦ Guo Co. vine Vine S800]

0±±0T±±z±±17±±eTU 0 ±± 0T ±± z ±± 17 ±± eTU

Jud#T-#(09 *LOz)#o+Jnvi\ITXfnT3agpJ0Jua# IIIfe符i IIIfe符i 〔8卜00〕Jud#TI# (0寸02) _}♦符省# _}♦符省Uzos0#2ss#9UUJUd#T-#(0寸*9ζ)#0ρηνΛΕ00^,πϊρ3# _}#卻皞攰# _}#卻Sf 攰〔9/00〕0#0f#T#T#9nnJ 巨#1# (£1 *Tco)#o+Jnv®UTXJUg# 符^藤归符踔罠# 鬮遐〔In卜。 Jud # T - # (09 * LOz) # o + Jnvi \ ITXfnT3agpJ0Jua # IIIfe character i IIIfe symbol i [8 Bu 00] Jud # TI # (0 inches 02) _} ♦ symbol Province # _} ♦ symbol Province Uzos0 # 2ss # 9UUJUd # T - # (0 inches * 9ζ) # 0ρηνΛΕ00 ^, πϊρ3 # _} # # Gui Hao but it #} _ [9/00] Sf Gui 0 # 0f # T # T # 9nnJ giant # 1 # (£ 1 * Tco) # o + Jnv®UTXJUg # ^ vine normalized character symbol inspectors Wana lot # ya [In BU. . ]

dlt ① S3=a dlt ① S3 = a

0#0#1#2#!>,白目泛 0 # 0 # 1 # 2 #!>, White head pan

IIUd#T-#sLOs#OSVIT^SJSJUa#:蚱摊.騄摊.,011 〔ε§〕0#0#T#^#^^™msJud#T-#(s <g)tto^<>f 想姝# 想姝〔CSI卜。 . IIUd # T- # sLOs # OSVIT ^ SJSJUa #:. Luk stalls share grasshopper, [011] ε§ 0 # 0 # T # ^ # ^^ ™ msJud # T - # (s <g) tto ^ <> f Shu Shu [# want to think CSI BU. S S

0#0#co#n#^^™msJud#T-#(0co02)tto^<JO+JT3J3a0IIIS#: Y唣S # Ynss 口卜00〕 0 # 0 # co # n # ^^ ™ msJud # T - # (0co02) tto ^ <JO + JT3J3a0IIIS #: Y Zao Bu S # Ynss port 00]

0#0#T#n#^^™msJud#T-#(0co<g)tto€<iil=s#:1tlfe符fc # Itlfe符fc 〔0/00〕 0 # 0 # T # n # ^^ ™ msJud # T - # (0co <g) tto € <iil = s #: 1tlfe symbol character fc fc # Itlfe [0/00]

0#0#co#2#^^™msJud#T-#(0Ton) #0+JnvsTlplJua#: 5^¾¾ # 雎! 0 # 0 # co # 2 # ^^ ™ msJud # T - # (0Ton) # 0 + JnvsTlplJua #: 5 ^ ¾¾ # Ju! /lnss 〔is0#0#T#2#^^™msJud#T-#(0TS#0+JnvT30XIIIS#:騷斓44<0井騷斓44<0〔009QS / Lnss [is0 # 0 # T # 2 # ^^ ™ msJud # T - # (0TS # 0 + JnvT30XIIIS #: Sao Lan 44 <0 Lan Sao wells 44 <0 [009QS

0#Z#9#6# ① UU 0 # Z # 9 # 6 # ① UU

IIUd#T#(g2Tog)#osvfloH-^ssJua# S 每后S # S 每^S \\ 〔卜-O。 IIUd # T # (g2Tog) # osvfloH- ^ ssJua # S after every S # S ^ S \\ [BU each -O. . 〕0# 卜#LOu#9nnJ 巨#11# (Lozl: *LO8O#OSVTTno^sosIIIS# 騷斓井騷斓〔9900〕0S#寸#z#9UUIIUd#T-#(g2T *091) #OSVSIJdscppolplnTa# 冬符# 〔SB〕0#LO#£#i#as「lud#ll# (gzl <gn)#osvgq§NgpJOJUa#w^#w^〔300〕0s#z#z#9UUJUd#T-#(g2To8)#osv+JTun3JfnllnTa# 归符# 归符〔CO9QSo#si#T#i# ① ηη—ϊ 巨#11# (SZT *LO)#o+JnvolNJfnT3sJua# 麁卻ns柜# 麁卻ns柜〔300〕0#0#T#z#9UUJUd#T-#SZT *LO)#o+JnvosxauslnTa#: fOR^K符'¾;# fOR^K符'¾;// 口900〕 ] 0 # Bu # LOu # 9nnJ Giant # 11 # (Lozl: * LO8O # OSVTTno ^ sosIIIS # Sao Lan wells Sao Lan [9900] 0S # inch # z # 9UUIIUd # T - # (g2T * 091) # OSVSIJdscppolplnTa # Winter [SB] symbol # 0 # LO # £ # i # as "lud # ll # (gzl <gn) # osvgq§NgpJOJUa # w ^ # w ^ [300] 0s # z # z # 9UUJUd # T - # (g2To8 ) # osv + JTun3JfnllnTa # normalized character # normalized character [CO9QSo # si # T # i # ① ηη-ϊ giant # 11 # (SZT * LO) # o + JnvolNJfnT3sJua # Cu was ns cabinet # Cu was ns counters [300] 0 # 0 # T # z # 9UUJUd # T- # SZT * LO) # o + JnvosxauslnTa #: fOR ^ K symbol '¾; # fOR ^ K symbol' ¾; // port 900]

0#0#£#lo#9sp 0 # 0 # £ # lo # 9sp

IIUd#T-#s2on)#o+Jnvn^aJ^SST3UT3s,IIS#:牯柃獅细#1^^獅细SgsK9A < 8ZT86LO寸OT Zo IIUd # T- # s2on) # o + Jnvn ^ aJ ^ SST3UT3s, IIS #: # 1 revolves Eurya ^^ Lion Lion fine fine SgsK9A <8ZT86LO inch OT Zo

[0089] // 附加说明值# 附加说明值#BiIl_MaterRemarkVAuto# (220, 5)#-l#pnl_detail#10#6#7#l [0089] Additional Description Value # @ annotated value # BiIl_MaterRemarkVAuto # (220, 5) # - l # pnl_detail # 10 # 6 # 7 # l

[0090]合计金额值 #合计金额值#Bill_TotalVAuto#(75, 10)#-l#pnl_summary#10#2#10#0 [0090] Total amount Total amount value value # # Bill_TotalVAuto # (75, 10) # - l # pnl_summary # 10 # 2 # 10 # 0

[0091]出品机器值 #出品机器值#Bill_machineVAuto#(200, 10)#-l#pnl_summary#10#4#10#0 [0091] Publisher machines produced machine value value # # Bill_machineVAuto # (200, 10) # - l # pnl_summary # 10 # 4 # 10 # 0

[0092]打单时间值#打单时间值 #Bill_TimeVAuto#(75,30)#-l#pnl_summary#I1#2#I3#0 [0092] playing a single time value to play a single time value # # Bill_TimeVAuto # (75,30) # - l # pnl_summary # I1 # 2 # I3 # 0

[0093] 出品人值# 出品人值#Bill—0peratorVAuto#(200,30)#-l#pnl—summary#ll#4#7#0 [0093] Produced by producer value value # # Bill-0peratorVAuto # (200,30) # - l # pnl-summary # ll # 4 # 7 # 0

[0094]备注值 # 备注值#Bill_RemarkVAuto# (54,55) #-l#pnl_summary#12#2#13#0 [0094] Memo Memo value value # # Bill_RemarkVAuto # (54,55) # -l # pnl_summary # 12 # 2 # 13 # 0

[0095] [补打]#[补打]#Bill_PrintVAuto#(6, 110)#_l#pnl_summary#13#l#0#0 [0095] [complement play] # [complement playing] # Bill_PrintVAuto # (6, 110) #_ l # pnl_summary # 13 # l # 0 # 0

[0096]联数 # 联数#Bill_PrintNumVAuto# (121,162) #-l#pnl_summary#14#l#0#0 [0096] associated with the number number # # Bill_PrintNumVAuto # (121,162) # -l # pnl_summary # 14 # l # 0 # 0

[0097] &CSetLine [0097] & CSetLine

[0098]分割线 1# 分割线l#Bill_Shapel#(5, 121,265)#0#pnl_title#6#l#40#0 [0098] parting line dividing line 1 # l # Bill_Shapel # (5, 121,265) # 0 # pnl_title # 6 # l # 40 # 0

[0099]分割线 2# 分割线2#Bill_Shape2#(5, 5,265) #0#pnl_summary#9#l#40#0 [0099] parting line dividing line 2 # 2 # Bill_Shape2 # (5, 5,265) # 0 # pnl_summary # 9 # l # 40 # 0

[0100] 步骤104:打印机通过打印端口接收所要打印的内容,加载所述配置文件,将所要打印的内容替换到标签对应的位置,并根据配置文件打印整个页面。 [0100] Step 104: the printer to print the content receiving port to be printed, loading the configuration file to replace the contents to be printed to a position corresponding to the tag, and print the entire page based on the profile.

[0101] 本申请另一实施例还提供了一种端口打印装置,如图3所示,包括: [0101] Another embodiment of the present application further provides a printing interface apparatus, as shown in FIG 3, comprising:

[0102] 分区模块301,用于把打印页面分成至少一个区域,对于每个区域设置至少一个标签,每个标签固定在一个区域内显示; [0102] Partition module 301 is configured to print the page into at least one region, the at least one label is provided for each zone, each label in a fixed display region;

[0103] 预定义模块302,用于在图形界面中预定义打印属性、需要打印的标签内容以及可供设置的标签属性; [0103] predefined module 302, a predefined printing attributes in a graphical interface, and the need to print the contents of the tag label set for the attribute;

[0104] 配置文件生成模块303,用于将设置好的标签属性按照自定义的格式保存成配置文件; [0104] profile generating module 303, configured to set a good profile tag attributes to save customized according to the format;

[0105] 打印驱动模块304,用于驱动打印机通过打印端口接收所要打印的内容,加载所述配置文件,将所要打印的内容替换到标签对应的位置,并根据配置文件依次打印页面中的各个区域。 [0105] Print driver module 304 for driving a printer through the contents of the print port receiver to be printed, loading the configuration file to replace the contents to be printed to a position corresponding to the label, and sequentially prints each area of ​​a page in accordance with the profile .

[0106] 根据本申请另一实施例,所述标签包括常量标签和变量标签;常量标签对应固定的打印内容;变量标签根据每次打印时的取值,打印出相应的内容。 [0106] According to another embodiment of the present application, the tag comprising a tag and the constant variable labels; fixed constants corresponding to the tag print content; tag variable based on the value at the time of each printing, print out the corresponding content.

[0107] 根据本申请另一实施例,所述标签属性包括:标签是否可见、标签的字体、标签在区域中的位置。 [0107] According to another embodiment of the present application, the tag attribute comprises: label is visible, the label fonts, label position in the region.

[0108] 根据本申请另一实施例,通过复选框来控制标签是否可见,通过在预览页面中拖动各项标签内容来调整标签在区域中的位置。 [0108] According to another embodiment of the present application, the label is controlled by the check box is visible, the label position is adjusted in the region of the tag by dragging the preview page content.

[0109] 根据本申请另一实施例,所述打印属性包括打印纸大小、打印纸边距、标题字体大小、正文字体大小,标题高度、内容高度和注解高度。 [0109] According to another embodiment of the present application, the printing attributes include the size of the printing paper, printing paper margins, headline font size, the font size of the text, header height, the height of the content and height annotations.

[0110] 以下结合出品小票给出一个本申请方案的应用实例: [0110] The following examples in conjunction with the application of small ticket produced gives a solution of the present application:

[0111] 该出品小票如图的纸张宽度设置为75丽,高度设置为9(MM(其中页头高度为38丽、单行数据区域高度为7丽、页尾高度为45MM),左边距和上边距都为0丽,标题和正文的字体大小都为11号,标题加粗。 [0111] The produced small paper ticket in FIG. 75 is set to a width of Korea, the height is set to 9 (MM (wherein Li header height is 38, the height of a single row of the data region 7 Li, footer height 45MM), left margin, and the margins are 0 Li, title and text font size are No. 11, the title bold.

[0112] 出品小票的打印页面被分为三个打印区域,依次为:页头、数据区域、页尾。 [0112] produced small ticket printed pages printed is divided into three regions, as follows: header, a data region, the footer.

[0113] 页头区域包含14个标签和I条分割线,其中常量标签9个(如:商品名称、单位、数量等),变量标签5个(如:标题、包厢名称值、下单时间值等)。 [0113] The header area comprises 14 tag and article I dividing lines, wherein the constant tag 9 (eg: trade name, unit, quantity), the variable tag 5 (such as: the title, box names, and place orders time value Wait).

[0114] 数据区域包含5个变量标签(如:商品名称值、单位值、数量值等)。 [0114] Data area comprises five variable tags (eg: trade name value, the unit value, the number of values, etc.).

[0115] 页尾区域包含12个标签和I条分割线,其中常量标签5个(如:合计金额、出品人、出品机器等),变量标签7个(如:合计金额值、出品人值、出品机器值等)。 P [0115] tail region comprising 12 tags and I dividing lines, wherein the constant tag 5 (such as: total amount, producer, production machines, etc.), the variable tag 7 (such as: total amount value, producer value, Publisher machine values, etc.).

[0116] 本申请实施例提供的打印出品小票的实现步骤如图5所示,包括如下步骤: Printing provided [0116] embodiment of the present application is produced small ticket implementation of step 5, comprising the steps of:

[0117] 步骤501:读取并解析打印配置文件。 [0117] Step 501: reading and parsing print configuration file.

[0118] 步骤502:通过查询数据库返回两个数据集,页头和页尾的变量值放在一个数据集A里返回,数量区域的商品信息放在一个数据集B里返回。 [0118] Step 502: the database query returns through the two sets of data, header and footer variable values ​​in a data set A in return, the commodity information on a number of regions of the data set B in return.

[0119] 步骤503:打开端口准备打印。 [0119] Step 503: Open the port ready to print.

[0120] 步骤504:根据数据集A的值填充页头的变量标签,发送到打印机进行打印。 [0120] Step 504: The value of the variable labels filling the header data set A, is sent to the printer.

[0121] 步骤505:根据数据集B的记录数计算数据区域的高度,依次取出数据集B的每一条记录来填充数据区域的变量标签,生成每一行需要打印的内容进行打印。 [0121] Step 505: The number of records in the data set is calculated height data area B are sequentially extracted data set B each record to populate variable tag data area, generating a need to print each line of print.

[0122] 步骤506:根据数据集A的值填充页尾的变量标签,发送到打印机进行打印。 [0122] Step 506: The value of the variable tail tag filled pages of data set A, is sent to the printer.

[0123] 步骤507:关闭端口结束打印。 [0123] Step 507: End close port printing.

[0124] 通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的硬件平台的方式来实现,当然也可以全部通过硬件来实施,但很多情况下前者是更佳的实施方式。 [0124] By the above described embodiments, those skilled in the art may clearly understand that the present invention may be by means of software plus a necessary hardware platform, and definitely may all be implemented by hardware, but in most circumstances, It is a better implementation. 基于这样的理解,本发明的技术方案对背景技术做出贡献的全部或者部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。 Based on such understanding, the technical solutions of the present invention contributes to the prior art all or part may be embodied in a software product, which computer software product may be stored in a storage medium such as ROM / RAM, magnetic disk, optical disk, etc. , including several instructions for instructing a computer device (may be a personal computer, a server, or network device) to perform various method embodiments or some parts of the embodiment of the present invention.

[0125] 以上所述仅为本申请的较佳实施例而已,并不用以限制本申请的保护范围,凡在本申请技术方案的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。 [0125] The foregoing is only preferred embodiments of the present disclosure but are not intended to limit the scope of the present disclosure, within the spirit and principle of the technical solution of the present application, made any modifications, equivalent replacements and improvements etc., should be included within the scope of protection of the present application.

Claims (10)

1.一种端口打印方法,其特征在于,包括: 把打印页面分成至少一个区域,对于每个区域设置至少一个标签,每个标签固定在一个区域内显示; 在图形界面中预定义打印属性、需要打印的标签内容以及可供设置的标签属性; 将设置好的标签属性按照自定义的格式保存成配置文件; 打印机通过打印端口接收所要打印的内容,加载所述配置文件,将所要打印的内容替换到标签对应的位置,并根据配置文件依次打印页面中的各个区域。 Port A printing method comprising: printing the page into at least one region, the at least one label is provided for each zone, each label in a fixed display region; predefined print attributes in a graphical interface, label content to be printed and a label set for the attribute; good set properties are saved into the profile tags according to the custom format; printer through printer port receiving the content to be printed, the configuration file is loaded, the contents to be printed Alternatively to a position corresponding to the tag, and the respective areas are sequentially printed pages according to the configuration file.
2.根据权利要求1所述的方法,其特征在于,所述标签包括常量标签和变量标签;常量标签对应固定的打印内容;变量标签根据每次打印时的取值,将所要打印的内容替换到变量标签对应的位置,打印出相应的内容。 2. The method according to claim 1, wherein said label comprises a label and constant variable labels; fixed constants corresponding to the tag print content; tag variable based on the value at the time of each print content to be printed to replace the variable corresponding to the tag location to print out the corresponding content.
3.根据权利要求1所述的方法,其特征在于,所述标签属性包括:标签是否可见、标签的字体、标签在区域中的位置。 3. The method according to claim 1, wherein said label attributes includes: label is visible, the label fonts, label position in the region.
4.根据权利要求3所述的方法,其特征在于,通过复选框来控制标签是否可见,通过在预览页面中拖动各项标签内容来调整标签在区域中的位置。 4. The method according to claim 3, characterized in that the box is controlled by the label is visible, the label position is adjusted in the region of the tag by dragging the preview page content.
5.根据权利要求1所述的方法,其特征在于,所述打印属性包括打印纸大小、打印纸边距、标题字体大小、正文字体大小,标题高度、内容高度和注解高度。 5. The method according to claim 1, wherein said printing attributes include the size of the printing paper, printing paper margins, headline font size, the font size of the text, header height, the height of the content and height annotations.
6.一种端口打印装置,其特征在于,包括: 分区模块,用于把打印页面分成至少一个区域,对于每个区域设置至少一个标签,每个标签固定在一个区域内显示; 预定义模块,用于在图形界面中预定义打印属性、需要打印的标签内容以及可供设置的标签属性; 配置文件生成模块,用于将设置好的标签属性按照自定义的格式保存成配置文件; 打印驱动模块,用于驱动打印机通过打印端口接收所要打印的内容,加载所述配置文件,将所要打印的内容替换到标签对应的位置,并根据配置文件依次打印页面中的各个区域。 Port A printing apparatus comprising: partitioning means for the printed page into at least one region, the at least one label is provided for each zone, each label in a fixed display region; predefined module, printing the predefined attributes in a graphical interface, and the need to print the contents of the tag label set for the attribute; profile generating module, configured to set a good preservation property tag according to the custom configuration file format; print driver module for driving a printer through printer port receiving the content to be printed, loading the configuration file to replace the contents to be printed to a position corresponding to the label, and the respective areas are sequentially printed pages according to the configuration file.
7.根据权利要求6所述的装置,其特征在于,所述标签包括常量标签和变量标签;常量标签对应固定的打印内容;变量标签根据每次打印时的取值,将所要打印的内容替换到变量标签对应的位置,打印出相应的内容。 7. The device according to claim 6, wherein said label comprises a label and constant variable labels; fixed constants corresponding to the tag print content; tag variable based on the value at the time of each print content to be printed to replace the variable corresponding to the tag location to print out the corresponding content.
8.根据权利要求6所述的装置,其特征在于,所述标签属性包括:标签是否可见、标签的字体、标签在区域中的位置。 8. The apparatus according to claim 6, wherein said label attributes includes: label is visible, the label fonts, label position in the region.
9.根据权利要求8所述的装置,其特征在于,通过复选框来控制标签是否可见,通过在预览页面中拖动各项标签内容来调整标签在区域中的位置。 9. The apparatus according to claim 8, characterized in that the box is controlled by the label is visible, the label position is adjusted in the region of the tag by dragging the preview page content.
10.根据权利要求6所述的装置,其特征在于,所述打印属性包括打印纸大小、打印纸边距、标题字体大小、正文字体大小,标题高度、内容高度和注解高度。 10. The apparatus according to claim 6, wherein said printing attributes include the size of the printing paper, printing paper margins, headline font size, the font size of the text, header height, the height of the content and height annotations.
CN201410839656.2A 2014-12-30 2014-12-30 Species printing method and device port CN104598178B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410839656.2A CN104598178B (en) 2014-12-30 2014-12-30 Species printing method and device port

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410839656.2A CN104598178B (en) 2014-12-30 2014-12-30 Species printing method and device port

Publications (2)

Publication Number Publication Date
CN104598178A true CN104598178A (en) 2015-05-06
CN104598178B CN104598178B (en) 2018-08-10

Family

ID=53124004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410839656.2A CN104598178B (en) 2014-12-30 2014-12-30 Species printing method and device port

Country Status (1)

Country Link
CN (1) CN104598178B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105353998A (en) * 2015-12-03 2016-02-24 黑龙江省国家税务局票证站 Bill printing method for multiple title sponsors
CN106598510A (en) * 2016-11-18 2017-04-26 福建星网视易信息系统有限公司 Method and device compatible with two print modes
CN106934958A (en) * 2017-03-10 2017-07-07 东软集团股份有限公司 Pos machine printing setting method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174350A (en) * 2007-11-15 2008-05-07 北大方正集团有限公司;北京大学;北京北大方正电子有限公司 Bill processing equipment and method
CN101477449A (en) * 2009-01-20 2009-07-08 北京展鹏电子技术有限公司 Printing management system and method
CN101788892A (en) * 2009-01-22 2010-07-28 英业达股份有限公司 Label printing system
US20110063677A1 (en) * 2007-01-16 2011-03-17 Shah Pradip K Print workflow automation
CN102789372A (en) * 2011-05-16 2012-11-21 腾讯科技(深圳)有限公司 Printing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110063677A1 (en) * 2007-01-16 2011-03-17 Shah Pradip K Print workflow automation
CN101174350A (en) * 2007-11-15 2008-05-07 北大方正集团有限公司;北京大学;北京北大方正电子有限公司 Bill processing equipment and method
CN101477449A (en) * 2009-01-20 2009-07-08 北京展鹏电子技术有限公司 Printing management system and method
CN101788892A (en) * 2009-01-22 2010-07-28 英业达股份有限公司 Label printing system
CN102789372A (en) * 2011-05-16 2012-11-21 腾讯科技(深圳)有限公司 Printing method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105353998A (en) * 2015-12-03 2016-02-24 黑龙江省国家税务局票证站 Bill printing method for multiple title sponsors
CN106598510A (en) * 2016-11-18 2017-04-26 福建星网视易信息系统有限公司 Method and device compatible with two print modes
CN106934958A (en) * 2017-03-10 2017-07-07 东软集团股份有限公司 Pos machine printing setting method and device

Also Published As

Publication number Publication date
CN104598178B (en) 2018-08-10

Similar Documents

Publication Publication Date Title
US7434157B2 (en) Programmable object model for namespace or schema library support in a software application
US7200816B2 (en) Method and system for automating creation of multiple stylesheet formats using an integrated visual design environment
US7251778B1 (en) Method and system for dynamically adapting the layout of a document to an output device
EP1232447B1 (en) Computer generation of documents using layout elements and content elements
JP5042436B2 (en) The creation of any of the xml document using Dhtml and xslt
US6613098B1 (en) Storage of application specific data in HTML
JP4161314B2 (en) Xml printer system
Holzner Inside XML
US20060174199A1 (en) Web-based design system
US6565609B1 (en) Translating data into HTML while retaining formatting and functionality for returning the translated data to a parent application
EP2482198A1 (en) System and method for identifying line breaks
US20070136363A1 (en) Systems and methods for report design and generation
EP1153351B1 (en) Script embedded in electronic documents
US8375293B2 (en) Method and apparatus for defining documents
US20040153974A1 (en) Markup language store-and-paste
JP5380289B2 (en) Method and apparatus for font subsetting
EP1452966A2 (en) Method and system for enhancing the paste functionality of a software application
US7272789B2 (en) Method of formatting documents
CN101288067B (en) Methods and apparatuses to assemble, extract and deploy content from electronic documents
AU2011240738B2 (en) Rich browser-based word processor
US20050063010A1 (en) Multiple flow rendering using dynamic content
EP1538534A2 (en) Generation of a PPML template from a PDF document
Lie et al. Cascading style sheets
JP4344693B2 (en) System and method for the browser of the document editing
US7583410B1 (en) System to create image transparency in a file generated utilizing a print stream

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
GR01 Patent grant