WO2017114188A1 - 一种打印装置及打印方法 - Google Patents

一种打印装置及打印方法 Download PDF

Info

Publication number
WO2017114188A1
WO2017114188A1 PCT/CN2016/110348 CN2016110348W WO2017114188A1 WO 2017114188 A1 WO2017114188 A1 WO 2017114188A1 CN 2016110348 W CN2016110348 W CN 2016110348W WO 2017114188 A1 WO2017114188 A1 WO 2017114188A1
Authority
WO
WIPO (PCT)
Prior art keywords
print
printing
context
template
interface
Prior art date
Application number
PCT/CN2016/110348
Other languages
English (en)
French (fr)
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 口碑控股有限公司
Publication of WO2017114188A1 publication Critical patent/WO2017114188A1/zh

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/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1206Improving or facilitating administration, e.g. print management resulting in increased flexibility in input data format or job format or job type
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1291Pool of printer devices: self-managing printing devices in a network, e.g. without a server

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a printing apparatus and a printing method.
  • the existing design method is to set a plurality of functional units in the print SDK, each of which independently supports the use of one printing device.
  • Each functional unit integrates the printing context of the printing device supported by it, the printing parameter configuration function, and the function of data parsing during printing. After the user installs the printing SDK on the terminal device, the functional unit corresponding to the target printing device can be directly called. To print.
  • the embodiment of the present invention provides a printing apparatus and a printing method for solving the problem that the existing method of supporting printing is less scalable.
  • the embodiment of the present application provides a printing apparatus, including:
  • a configuration management unit configured to provide a printing device configuration interface, configured for the user to configure the printing device information to be used, and save the printing device information
  • a virtual context interface for saving the print context written by the print context factory and providing a print call interface.
  • the device further includes:
  • the template management unit is configured to configure a customized print template for the user, wherein the print template has the label content and the content attribute information corresponding to the print ticket.
  • the device further includes:
  • a data parser for generating a printable data stream for printing into a small ticket based on the data to be printed and the customized print template configured by the template management unit.
  • the configuration management unit is further configured to provide a print parameter configuration interface, configured by the user to configure print parameter information, and save the print parameter information;
  • the data parser is specifically configured to: generate a printable data stream based on the data to be printed, the customized print template configured by the template management unit, and the print parameter information saved by the configuration management unit.
  • the device further includes:
  • a print interface configured to generate a print job according to the indication of the print UI, and add the generated print task to the print thread pool;
  • the embodiment of the present application provides a printing method, including:
  • the print context corresponding to the print device information saved by the configuration management unit is obtained from the print context library by calling the print context factory, and is written to the virtual context interface; wherein the print context library is stored There is a printing context corresponding to different printing devices; the printing device information saved by the configuration management unit is configured by the user based on the printing device configuration interface provided by the configuration management unit;
  • the application also supports diversification of print styles by setting a template management unit.
  • the template management unit can configure a customized print template for the user, and can print out the print requested by the user by calling a customized print template during printing. style.
  • FIG. 1 is a schematic structural diagram of a printing apparatus according to an embodiment of the present application.
  • Figure 2 is a schematic view of the printed small ticket
  • FIG. 3 is a flowchart of a printing method according to an embodiment of the present application.
  • the embodiment of the present application configures a printing context library to store print contexts corresponding to different printing devices, and configures the printing device through the configuration management unit.
  • the configuration management unit configuration is obtained from the printing context library by calling the printing context factory. Print the print context corresponding to the device and write it to the virtual context interface to print by calling the virtual context interface.
  • the parsing function, the print configuration function, and the like can be shared among different printing apparatuses, and therefore, the manner of supporting printing is highly scalable.
  • embodiments of the present application also provide support for multiple print styles in a printer.
  • the printing style is usually singular.
  • the printing style here does not refer to the difference of the traditional printing configuration parameters (such as print layout, zoom degree), but refers to the specific standard. Sign the difference in content design and content attributes.
  • the embodiment of the present application supports the diversification of the printing style by setting the template management unit.
  • the template management unit can configure a customized printing template for the user, and can print out the required content of the user by calling the customized printing template when printing. Print style.
  • a schematic structural diagram of a printing apparatus 100 provided by an embodiment of the present application includes the following units:
  • a user interface (UI) 11 is provided for receiving a print instruction of the user.
  • a print interface 12 is configured to generate a print job according to the instruction of the print UI 11, and add the generated print job to the print thread pool.
  • a Print Task Pool 13 is used to store print jobs.
  • a configuration management unit 14 is configured to provide a printing device configuration interface, configured for the user to configure the printing device information to be used, and save the printing device information; here, the configuration management unit provides the printing device configuration interface to the user, and the user can pass The unit configures printing device information such as a printing device name, an identification ID, and the like.
  • a print Context factory 15 for obtaining a print context corresponding to the print device information saved by the configuration management unit 14 from the print context library after receiving the call instruction of the print job, and writing the print context to the virtual context interface.
  • a print context library 16 is used to store print contexts corresponding to different print devices.
  • Bluetooth Printer Context For example, Bluetooth Printer Context, com Printer Context, USB Printer Context, General Printer Context.
  • a virtual context interface 17 is used to save the print context written by the print context factory 15 and provide a print call interface.
  • the data to be printed is printed as a small ticket, and the specific printing device details can be masked, so that the upper layer can support the printing of the printing device without any perception.
  • the print process after receiving the print instruction of the user through the print user interface UI 11, the print process generates a print job based on the print instruction by calling the print interface 12, and The generated print job is added to the print thread pool 13; the current print job to be processed is retrieved from the print thread pool 13, and the print job contains data to be printed.
  • the print context corresponding to the print device information saved by the configuration management unit 14 is obtained from the print context library 16 by calling the print context factory 15, and written to the virtual context interface 17; by calling the virtual context interface 17. Print the data to be printed indicated by the print job as a small ticket.
  • the printing process can generate a printable data stream by calling a data parser, based on the data to be printed, the preset print template, and the print parameter information, and then by calling the virtual context interface 17
  • the print data stream is printed as a small ticket.
  • the print parameter information herein may be preset or configured by the configuration management unit 14.
  • the embodiment of the present application further provides a template management unit 18 to support the diversification of the printing style, that is, the printing apparatus further includes:
  • the template management unit 18 is configured to configure a customized print template for the user, wherein the print template has the label content and the content attribute information corresponding to the print ticket.
  • the template management unit 18 can provide the user with a print template that can be edited, and the user can edit the customized print template based on actual needs.
  • the data parser 19 is configured to generate a printable data stream based on the data to be printed, the customized print template configured by the template management unit 18, and the print parameter information configured by the configuration management unit 14.
  • the printing process by calling the data parser 19, based on the data to be printed, the customized printing template configured by the template management unit 18, and the printing parameter information configured by the configuration management unit 14 (including, for example, the number of print copies, the print layout) Etc., of course, these print parameters can also be default) to generate a printable data stream; then, the print process prints the printable data stream generated by the data parser 19 into a small ticket by calling the virtual context interface 17.
  • the template management unit 18 can define a print template using the xml language as follows:
  • the template is defined as follows:
  • Font font 1/2 digit n, set the print font, currently supports 1, 2, size two;
  • Align alignment, left, center, right
  • ⁇ template/> template root node can set attributes including id
  • ⁇ text/> output text content can set properties: font, bold, dw, dh, datasrc, align, padding, the default is not to wrap
  • ⁇ list/> list content can contain child node datasrc
  • the printing apparatus may further include a platform development kit (Platform SDK) 20, which includes software code for various printing context calls.
  • FIG. 2 it is a schematic diagram of the printed ticket.
  • the information in the dotted line frame is the data to be printed indicated in the print task, and other words such as point menu, serial number, ordering time, buyer, telephone, order number, subtotal, total, etc., and spaces, line breaks, etc.
  • the content of the label, the font type, font size, alignment, etc. displayed in the figure are attribute information.
  • a flowchart of a printing method includes the following steps:
  • S301 After obtaining the print job, obtain a print context corresponding to the print device information saved by the configuration management unit from the print context library by calling the print context factory, and write the print context to the virtual context interface; wherein the print context library Having a print context corresponding to different print devices; the print device information saved by the configuration management unit is configured by the user based on the print device configuration interface provided by the configuration management unit;
  • S302 Print the data to be printed indicated by the print task into a small ticket by calling a virtual context interface.
  • the method further includes:
  • the printing the data to be printed into a small ticket by calling a virtual context interface including:
  • the to-be-printed data is printed into a small ticket based on the customized print template by invoking a virtual context interface.
  • the printing the data to be printed based on the customized print template into a small ticket by calling a virtual context interface including:
  • the printable data stream generated by the data parser is printed as a small ticket by invoking the virtual context interface.
  • the generating, by the data parser, the printable data stream is generated based on the to-be-printed data and the customized print template configured by the template management unit, including:
  • a printable data stream is generated by invoking a data parser based on the data to be printed, the customized print template configured by the template management unit, and the print parameter information held by the configuration management unit.
  • the print task is obtained according to the following steps:
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the computer readable memory is
  • the instructions in the memory produce an article of manufacture comprising an instruction device that implements the functions specified in one or more blocks of the flowchart or in a flow or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

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)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

一种打印装置(100)及打印方法,涉及互联网技术领域,该打印装置(100)包括:配置管理单元(14),用于提供打印设备配置接口,供用户配置需要使用的打印设备信息,并保存该打印设备信息;打印上下文工厂(15),用于从打印上下文库(16)中获取配置管理单元(14)保存的打印设备信息所对应的打印上下文,并将其写入虚拟上下文接口(17);打印上下文库(16),用于存储对应不同打印设备的打印上下文;虚拟上下文接口(17),用于保存所述打印上下文工厂(15)写入的打印上下文,并提供打印调用接口。

Description

一种打印装置及打印方法 技术领域
本申请涉及互联网技术领域,尤其涉及一种打印装置及打印方法。
背景技术
在线下场景中,小票打印是一种很常用的功能。然而,小票打印的使用场景比较复杂,不同用户使用的打印设备存在不同,有的用户使用的是蓝牙打印设备,有的用户使用的是USB打印设备,这就需要打印软件开发工具包(Software Development Kit,SDK)能够支持多种打印设备的使用。
不同的打印设备需要有不同的打印上下文(也即控制打印设备打印的程序)来支持。为了使打印SDK能够支持多种打印设备的使用,现有的设计方式是在打印SDK中设置多个功能单元,每个功能单元独立支持一种打印设备的使用。每个功能单元中集成了其支持的打印设备的打印上下文、打印参数配置功能、打印时数据解析的功能等,用户在终端设备上安装打印SDK后,可以直接调用目标打印设备所对应的功能单元来进行打印。
按照现有的设计方式,每增加一种支持的打印设备,就需要在打印SDK中重新设计一个功能单元来支持该打印设备实现整个打印流程,这种方式可扩展性较差。
发明内容
本申请实施例提供一种打印装置及打印方法,用以解决现有的支持打印的方式可扩展性较差的问题。
本申请实施例提供一种打印装置,包括:
配置管理单元,用于提供打印设备配置接口,供用户配置需要使用的打印设备信息,并保存该打印设备信息;
打印上下文工厂,用于从打印上下文库中获取所述配置管理单元保存 的打印设备信息所对应的打印上下文,并将其写入虚拟上下文接口;
打印上下文库,用于存储对应不同打印设备的打印上下文;
虚拟上下文接口,用于保存所述打印上下文工厂写入的打印上下文,并提供打印调用接口。
可选地,所述装置还包括:
模版管理单元,用于为用户配置定制化的打印模版,其中,所述打印模版中记录有打印小票对应的标签内容及内容属性信息。
可选地,所述装置还包括:
数据解析器,用于基于待打印数据和所述模版管理单元配置的定制化的打印模版,生成可打印数据流,以供被打印成小票。
可选地,所述配置管理单元还用于提供打印参数配置接口,供用户配置打印参数信息,并保存该打印参数信息;
数据解析器具体用于:基于待打印数据、所述模版管理单元配置的定制化的打印模版、和所述配置管理单元保存的打印参数信息,生成可打印数据流。
可选地,所述装置还包括:
打印用户界面UI,用于接收用户的打印指示;
打印接口,用于根据所述打印UI的指示,生成打印任务,并将生成的打印任务加入打印线程池;
打印线程池,用于存储打印任务。
本申请实施例提供一种打印方法,包括:
在获取打印任务后,通过调用打印上下文工厂,从打印上下文库中获取配置管理单元保存的打印设备信息所对应的打印上下文,并将其写入虚拟上下文接口;其中,所述打印上下文库中存储有对应不同打印设备的打印上下文;所述配置管理单元保存的打印设备信息,为用户基于该配置管理单元提供的打印设备配置接口配置的;
通过调用虚拟上下文接口,将所述打印任务指示的待打印数据打印成 小票。
可见,采用上述打印装置及打印方法,当需要打印SDK增加对新的打印设备的支持能力时,只需要将该新的打印设备对应的打印上下文存入打印上下文库,而对于打印时所需的其它功能,如数据解析功能、打印配置功能等,则可以在各个不同的打印设备间共享,这种支持打印的方式的可扩展性较强。
本申请还通过设置模版管理单元来支持打印样式的多样化,模板管理单元可以为用户配置定制化的打印模版,在打印时通过调用用户定制的打印模板,就可以打印出该用户所要求的打印样式。
附图说明
图1为本申请实施例提供的打印装置结构示意图;
图2为打印出的小票示意图;
图3为本申请实施例提供的打印方法流程图。
具体实施方式
本申请实施例通过配置打印上下文库来存储对应不同打印设备的打印上下文,通过配置管理单元来配置打印设备,在执行打印任务时,通过调用打印上下文工厂从打印上下文库中获取配置管理单元配置的打印设备所对应的打印上下文,并将其写入虚拟上下文接口,通过调用虚拟上下文接口来实现打印。采用这种方式,当需要打印SDK增加对新的打印设备的支持能力时,只需要将该新的打印设备对应的打印上下文存入打印上下文库,而对于打印时所需的其它功能,如数据解析功能、打印配置功能等,则可以在各个不同的打印设备间共享,因此,这种支持打印的方式的可扩展性较强。
另外,本申请实施例还提供了对打印机中多种打印样式的支持。在传统的打印方式中,打印样式通常是单一化的,这里的打印样式并不是指传统的打印配置参数(如打印版式、缩放程度)的不同,而是指的具体的标 签内容设计及内容属性的不同。本申请实施例通过设置模版管理单元来支持打印样式的多样化,模板管理单元可以为用户配置定制化的打印模版,在打印时通过调用用户定制的打印模板,就可以打印出该用户所要求的打印样式。
下面结合说明书附图对本申请实施例作进一步详细描述。
如图1所示,为本申请实施例提供的打印装置100结构示意图,包括以下单元:
打印用户界面(User Interface,UI)11,用于接收用户的打印指示。
打印接口(Print Interface)12,用于根据打印UI 11的指示,生成打印任务,并将生成的打印任务加入打印线程池。
打印线程池(Print Task Pool)13,用于存储打印任务。
配置管理(Configuration Management)单元14,用于提供打印设备配置接口,供用户配置需要使用的打印设备信息,并保存该打印设备信息;这里,配置管理单元向用户提供打印设备配置接口,用户可以通过该单元配置打印设备信息,比如打印设备名称、标识ID等。
打印上下文工厂(Print Context factory)15,用于在接收到打印任务的调用指示后,从打印上下文库中获取配置管理单元14保存的打印设备信息所对应的打印上下文,并将其写入虚拟上下文接口。
打印上下文库16,用于存储对应不同打印设备的打印上下文。
比如,蓝牙打印上下文(Bluetooth Printer Context)、com打印上下文(com Printer Context)、USB打印上下文(USB Printer Context)、通用打印上下文(General Printer Context)。
虚拟上下文接口(Virtual Context Interface)17,用于保存所述打印上下文工厂15写入的打印上下文,并提供打印调用接口。这里,通过调用虚拟上下文接口17,将待打印数据打印成小票,同时可以屏蔽具体的打印设备细节,从而上层可以无感知地支持打印设备的打印。
在具体实施中,打印进程在通过打印用户界面UI 11接收到用户的打印指示后,通过调用打印接口12,基于所述打印指示生成打印任务,并将 生成的打印任务加入打印线程池13;从所述打印线程池13中调取当前待处理的打印任务,打印任务中包含待打印数据。在获取打印任务后,通过调用打印上下文工厂15,从打印上下文库16中获取配置管理单元14保存的打印设备信息所对应的打印上下文,并将其写入虚拟上下文接口17;通过调用虚拟上下文接口17,将所述打印任务指示的待打印数据打印成小票。
在上述过程中,打印进程可以通过调用数据解析器(Meta data parser),基于待打印数据、预设的打印模版和打印参数信息,生成可打印数据流,再通过调用虚拟上下文接口17将该可打印数据流打印成小票。这里的打印参数信息可以是预设的,也可以是通过配置管理单元14配置的。
作为一种优选的实施方式,本申请实施例还提供了模版管理单元18来支持打印样式的多样化,即所述打印装置还包括:
模版管理单元18,用于为用户配置定制化的打印模版,其中,所述打印模版中记录有打印小票对应的标签内容及内容属性信息。在具体实施中,模版管理单元18可以向用户提供可供编辑的打印模板,用户基于自身实际需要编辑定制化的打印模板。
数据解析器19,用于基于待打印数据、模版管理单元18配置的定制化的打印模版和配置管理单元14配置的打印参数信息,生成可打印数据流。
在具体实施中,打印进程通过调用数据解析器19,基于待打印数据、模版管理单元18配置的定制化的打印模版、和配置管理单元14配置的打印参数信息(比如包括打印份数、打印版式等,当然,这些打印参数也可以是默认的),生成可打印数据流;然后,打印进程通过调用虚拟上下文接口17,将数据解析器19生成的可打印数据流打印成小票。
在具体实施中,模版管理单元18可以使用xml语言来定义打印模版,如下所示:
Figure PCTCN2016110348-appb-000001
Figure PCTCN2016110348-appb-000002
模板定义如下:
属性列表:
font:字体1/2数字n,设置打印字体,目前支持1,2,大小两种;
bold:粗体,ture flase
dw:双倍宽
dh:双倍高
datasrc:数据源,map<string,dataobj>datasrc;datasrc[orderitem_name]
align:对齐方式,left,center,right
padding:对齐像素
标签列表:
<template/>模板根节点,可设置属性包括id
<text/>输出文本内容,可设置属性:font,bold,dw,dh,datasrc,align,padding,默认是不换行
<list/>列表内容,可包含子节点datasrc
<blankline/>空行,可设置属性font
<br/>换行
<tr/>tab节点
除上述单元外,本申请实施例提供的打印装置中还可以包括平台开发工具包(Platform SDK)20,其中包含供各种打印上下文调用的软件代码。平台应用编程接口(Platform API)21,用于提供执行打印任务的操作系统支持。
如图2所示,为打印出的小票示意图。图中,虚线框内的信息为打印任务中指示的待打印数据,其它如点菜单、序号、点菜时间、买家、电话、订单编号、小计、共计等字样、及空格、换行等为标签内容,图中显示的字体类型、字体大小、对齐方式等为属性信息。
基于上述打印装置,本申请实施例中提供了应用上述打印装置进行打印的打印方法,具体实施与上述描述重复之处不再赘述。
如图3所示,为本申请实施例提供的打印方法流程图,包括以下步骤:
S301:在获取打印任务后,通过调用打印上下文工厂,从打印上下文库中获取配置管理单元保存的打印设备信息所对应的打印上下文,并将其写入虚拟上下文接口;其中,所述打印上下文库中存储有对应不同打印设备的打印上下文;所述配置管理单元保存的打印设备信息,为用户基于该配置管理单元提供的打印设备配置接口配置的;
S302:通过调用虚拟上下文接口,将所述打印任务指示的待打印数据打印成小票。
可选地,所述方法还包括:
通过模版管理单元为用户配置定制化的打印模版,其中,所述打印模版中记录有打印小票对应的标签内容及内容属性信息;
所述通过调用虚拟上下文接口,将所述待打印数据打印成小票,包括:
通过调用虚拟上下文接口,将所述待打印数据基于所述定制化的打印模板打印成小票。
可选地,所述通过调用虚拟上下文接口,将所述待打印数据基于所述定制化的打印模板打印成小票,包括:
通过调用数据解析器,基于所述待打印数据和所述定制化的打印模版,生成可打印数据流;
通过调用所述虚拟上下文接口,将所述数据解析器生成的可打印数据流打印成小票。
可选地,所述通过调用数据解析器,基于所述待打印数据和所述模版管理单元配置的定制化的打印模版,生成可打印数据流,包括:
通过调用数据解析器,基于所述待打印数据、所述模版管理单元配置的定制化的打印模版、和所述配置管理单元保存的打印参数信息,生成可打印数据流。
可选地,根据以下步骤获取所述打印任务:
在通过打印用户界面UI接收到用户的打印指示后,通过调用打印接口,基于所述打印指示生成打印任务,并将生成的打印任务加入打印线程池;
从所述打印线程池中调取当前待处理的打印任务。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、装置(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读 存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (10)

  1. 一种打印装置,其特征在于,该装置包括以下组成部分:
    配置管理单元,用于提供打印设备配置接口,供用户配置需要使用的打印设备信息,并保存该打印设备信息;
    打印上下文工厂,用于从打印上下文库中获取所述配置管理单元保存的打印设备信息所对应的打印上下文,并将其写入虚拟上下文接口;
    打印上下文库,用于存储对应不同打印设备的打印上下文;
    虚拟上下文接口,用于保存所述打印上下文工厂写入的打印上下文,并提供打印调用接口。
  2. 如权利要求1所述的打印装置,其特征在于,所述装置还包括:
    模版管理单元,用于为用户配置定制化的打印模版,其中,所述打印模版中记录有打印小票对应的标签内容及内容属性信息。
  3. 如权利要求2所述的打印装置,其特征在于,所述装置还包括:
    数据解析器,用于基于待打印数据和所述模版管理单元配置的定制化的打印模版,生成可打印数据流,以供被打印成小票。
  4. 如权利要求3所述的打印装置,其特征在于,所述配置管理单元还用于提供打印参数配置接口,供用户配置打印参数信息,并保存该打印参数信息;
    所述数据解析器具体用于:基于待打印数据、所述模版管理单元配置的定制化的打印模版、和所述配置管理单元保存的打印参数信息,生成可打印数据流。
  5. 如权利要求1所述的打印装置,其特征在于,所述装置还包括:
    打印用户界面UI,用于接收用户的打印指示;
    打印接口,用于根据所述打印UI的指示,生成打印任务,并将生成的打印任务加入打印线程池;
    打印线程池,用于存储打印任务。
  6. 一种打印方法,其特征在于,该方法包括:
    在获取打印任务后,通过调用打印上下文工厂,从打印上下文库中获取配置管理单元保存的打印设备信息所对应的打印上下文,并将其写入虚拟上下文接口;其中,所述打印上下文库中存储有对应不同打印设备的打印上下文;所述配置管理单元保存的打印设备信息,为用户基于该配置管理单元提供的打印设备配置接口配置的;
    通过调用虚拟上下文接口,将所述打印任务指示的待打印数据打印成小票。
  7. 如权利要求6所述的方法,其特征在于,所述方法还包括:
    通过模版管理单元为用户配置定制化的打印模版,其中,所述打印模版中记录有打印小票对应的标签内容及内容属性信息;
    所述通过调用虚拟上下文接口,将所述待打印数据打印成小票,包括:
    通过调用虚拟上下文接口,将所述待打印数据基于所述定制化的打印模板打印成小票。
  8. 如权利要求7所述的方法,其特征在于,所述通过调用虚拟上下文接口,将所述待打印数据基于所述定制化的打印模板打印成小票,包括:
    通过调用数据解析器,基于所述待打印数据和所述定制化的打印模版,生成可打印数据流;
    通过调用所述虚拟上下文接口,将所述数据解析器生成的可打印数据流打印成小票。
  9. 如权利要求8所述的方法,其特征在于,所述通过调用数据解析器,基于所述待打印数据和所述模版管理单元配置的定制化的打印模版,生成可打印数据流,包括:
    通过调用数据解析器,基于所述待打印数据、所述模版管理单元配置的定制化的打印模版、和所述配置管理单元保存的打印参数信息,生成可打印数据流。
  10. 如权利要求6所述的方法,其特征在于,根据以下步骤获取所述打印任务:
    在通过打印用户界面UI接收到用户的打印指示后,通过调用打印接口,基于所述打印指示生成打印任务,并将生成的打印任务加入打印线程池;
    从所述打印线程池中调取当前待处理的打印任务。
PCT/CN2016/110348 2015-12-29 2016-12-16 一种打印装置及打印方法 WO2017114188A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201511018562.X 2015-12-29
CN201511018562.XA CN106933518A (zh) 2015-12-29 2015-12-29 一种打印装置及打印方法

Publications (1)

Publication Number Publication Date
WO2017114188A1 true WO2017114188A1 (zh) 2017-07-06

Family

ID=59224450

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/110348 WO2017114188A1 (zh) 2015-12-29 2016-12-16 一种打印装置及打印方法

Country Status (2)

Country Link
CN (1) CN106933518A (zh)
WO (1) WO2017114188A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086038A (zh) * 2018-07-10 2018-12-25 千寻位置网络有限公司 基于Spark的大数据开发方法及装置、终端
CN111124324A (zh) * 2019-12-27 2020-05-08 中国银行股份有限公司 凭证打印方法及装置
CN112558892A (zh) * 2020-12-22 2021-03-26 厦门喵宝科技有限公司 一种便携式智能打印装置及控制方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108052297A (zh) * 2017-11-29 2018-05-18 上海迈外迪网络科技有限公司 一种小票内容修改及打印装置、系统及方法
CN108846448A (zh) * 2018-06-05 2018-11-20 浪潮软件股份有限公司 一种基于数字定位技术的商超价签打印方法
CN109918029A (zh) * 2019-02-14 2019-06-21 西安链接无限区块链产业孵化器有限公司 基于区块链的打印方法、装置及设备
CN111552447B (zh) * 2020-04-30 2024-01-30 中国银行股份有限公司 一种打印方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573805A (zh) * 2003-06-23 2005-02-02 佳能株式会社 根据打印参数的设置进行记录的记录设备和记录控制方法
CN101853144A (zh) * 2009-03-30 2010-10-06 佳能株式会社 打印控制方法及打印控制装置
CN102640424A (zh) * 2010-02-11 2012-08-15 惠普发展公司,有限责任合伙企业 识别打印机
CN102736878A (zh) * 2012-06-27 2012-10-17 北京新媒传信科技有限公司 一种实现web页面部分打印的方法和装置
US20120307291A1 (en) * 2011-06-05 2012-12-06 Apple Inc. Configuration of print jobs based on printer state

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2400928A (en) * 2003-04-22 2004-10-27 Sharp Kk Distributed periperal device control system
JP4166734B2 (ja) * 2004-07-13 2008-10-15 シャープ株式会社 ドライバプログラム、ドライバプログラムを記録した記録媒体、ドライバ制御方法及びドライバ制御装置
CN101788892B (zh) * 2009-01-22 2011-08-24 英业达股份有限公司 标签打印系统
JP5854654B2 (ja) * 2010-09-30 2016-02-09 キヤノン株式会社 プリントシステム、印刷方法、プリントサーバ、制御方法、及びプログラム
CN103488440B (zh) * 2013-09-02 2017-01-11 用友优普信息技术有限公司 单据打印装置和单据打印方法
CN103955346B (zh) * 2014-05-06 2017-10-10 丁四涛 一种网络打印系统和打印方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573805A (zh) * 2003-06-23 2005-02-02 佳能株式会社 根据打印参数的设置进行记录的记录设备和记录控制方法
CN101853144A (zh) * 2009-03-30 2010-10-06 佳能株式会社 打印控制方法及打印控制装置
CN102640424A (zh) * 2010-02-11 2012-08-15 惠普发展公司,有限责任合伙企业 识别打印机
US20120307291A1 (en) * 2011-06-05 2012-12-06 Apple Inc. Configuration of print jobs based on printer state
CN102736878A (zh) * 2012-06-27 2012-10-17 北京新媒传信科技有限公司 一种实现web页面部分打印的方法和装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086038A (zh) * 2018-07-10 2018-12-25 千寻位置网络有限公司 基于Spark的大数据开发方法及装置、终端
CN109086038B (zh) * 2018-07-10 2022-05-31 千寻位置网络有限公司 基于Spark的大数据开发方法及装置、终端
CN111124324A (zh) * 2019-12-27 2020-05-08 中国银行股份有限公司 凭证打印方法及装置
CN112558892A (zh) * 2020-12-22 2021-03-26 厦门喵宝科技有限公司 一种便携式智能打印装置及控制方法
CN112558892B (zh) * 2020-12-22 2022-06-14 厦门喵宝科技有限公司 一种便携式智能打印装置及控制方法

Also Published As

Publication number Publication date
CN106933518A (zh) 2017-07-07

Similar Documents

Publication Publication Date Title
WO2017114188A1 (zh) 一种打印装置及打印方法
US10325012B2 (en) Filtered stylesheets
US20060225094A1 (en) Enabling customization and personalization of views in content aggregation frameworks
US10970052B2 (en) System and method for enhancing component based development models with auto-wiring
US9141596B2 (en) System and method for processing markup language templates from partial input data
US9152619B2 (en) System and method for constructing markup language templates and input data structure specifications
US20180349004A1 (en) Methods for extracting and adapting information to generate custom widgets and devices thereof
US20130107289A1 (en) Rasterization of printing data
US20060225091A1 (en) Customizing and personalizing views in content aggregation frameworks
TW201308108A (zh) 功能表工具條整合系統及方法
US20120260237A1 (en) Portable Business Language and Automated Software Application Development System
US9372837B2 (en) Single view representation of an XLS transformation
JP2017033052A (ja) 画像形成装置における制御装置およびプログラム
US10409575B2 (en) System and method for developing software applications of wearable devices
JP5706306B2 (ja) リンクされたテキストボックスを有する電子文書のレンダリングの方法、レンダリングする指示を含むコンピューターが読み取り可能な記憶媒体及びシステム
US20140092435A1 (en) Applying individual preferences to printed documents
US11663199B1 (en) Application development based on stored data
JP6551082B2 (ja) テスト支援装置、テスト支援方法およびテスト支援プログラム
JP6552162B2 (ja) 情報処理装置、情報処理方法、およびプログラム
TW201828038A (zh) 列印裝置及列印方法
CN108563621B (zh) 一种pdf报表生成方法、装置、设备及存储介质
JP2011233104A (ja) 情報処理システム、情報処理装置、情報処理方法、プログラム、記録媒体
JP6845437B2 (ja) 情報処理装置とその処理方法及びプログラム
US20160085517A1 (en) Program information generating system, program information generating method, and computer program product
JP6341259B2 (ja) 組版装置、組版プログラム及び組版方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16880978

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16880978

Country of ref document: EP

Kind code of ref document: A1