JP2015149077A - Program for changing printer, method for changing printer, and host device - Google Patents

Program for changing printer, method for changing printer, and host device Download PDF

Info

Publication number
JP2015149077A
JP2015149077A JP2015043111A JP2015043111A JP2015149077A JP 2015149077 A JP2015149077 A JP 2015149077A JP 2015043111 A JP2015043111 A JP 2015043111A JP 2015043111 A JP2015043111 A JP 2015043111A JP 2015149077 A JP2015149077 A JP 2015149077A
Authority
JP
Japan
Prior art keywords
printer
application
driver
data
program
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
JP2015043111A
Other languages
Japanese (ja)
Inventor
明男 高本
Akio Takamoto
明男 高本
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2015043111A priority Critical patent/JP2015149077A/en
Publication of JP2015149077A publication Critical patent/JP2015149077A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a program for changing a printer, for changing an output destination of a printed material to be outputted from an application, the program capable of easily changing an output destination to various types of printers without modifying the application program.SOLUTION: A program configured to allow a computer to execute a method for changing a printer of an output destination, the computer operating by an operating system of an OS kernel layer and allowing the printer to print a printed material by an application of an application layer, the method comprises the steps of: obtaining printing data to be outputted from the application to a first printer, from the OS kernel layer; converting the obtained printing data into standard data that can be processed by a printer driver, in the application layer; and outputting the converted data to a driver for a second printer.

Description

本発明は、アプリケーションから出力される印刷物の出力先を変更するためのプログラム等に関し、特に、様々なタイプのプリンターへの出力先変更を、アプリケーションプログラムを変更することなしに容易に行うことができるプリンター変更用プログラム等に関する。   The present invention relates to a program or the like for changing the output destination of a printed matter output from an application, and in particular, the output destination can be easily changed to various types of printers without changing the application program. It relates to a printer change program.

スーパーマーケットなどの小売販売業においては販売管理システムであるPOSシステムが普及しており、当該システムでは、サーバーとネットワークで接続される複数の端末装置(レジ)が当該装置に備えられるアプリケーションに従って動作し各種の処理を実行する。また、通常、当該端末装置には、それぞれ、プリンターが設けられ、上記アプリケーションの指示によりレシートやクーポンの出力を実行する。また、このような出力を伴うPOSシステムと類似した構成のシステムとしては、病院で用いられるシステム、運送会社で用いられるシステムなどがある。   In retail sales businesses such as supermarkets, a POS system, which is a sales management system, has become widespread, and in this system, a plurality of terminal devices (registers) connected to a server via a network operate according to applications provided in the device. Execute the process. Also, normally, each terminal device is provided with a printer, and outputs a receipt or a coupon according to an instruction from the application. As a system having a configuration similar to the POS system with such output, there are a system used in a hospital, a system used in a transportation company, and the like.

このようなプリンターを用いた業務システムでは、導入後にプリンターを置き換える必要が出てくる場合があるが、例えば、既存のモノクロプリンターをカラープリンターに変更したい、異なるメーカーのプリンターに置き換えたい、異なる印刷方式のプリンターに変更したいなどの要望が出る場合があるが、この置き換えを行うためには上記アプリケーションのプログラムを変更する必要があった。   In a business system using such a printer, it may be necessary to replace the printer after installation. For example, if you want to change an existing monochrome printer to a color printer, or replace it with a printer from a different manufacturer, use a different printing method. There is a case where it is desired to change to a new printer. However, in order to perform this replacement, it is necessary to change the program of the application.

しかし、かかるシステムは一般に業務の中枢として常時利用されているものであり、また、他のシステムとも複雑に連携している場合も多いため、そのアプリケーションを改変することは通常容易ではない。   However, such a system is generally used as a business center at all times, and is often complicatedly linked with other systems. Therefore, it is usually not easy to modify the application.

このアプリケーションプログラムの変更が必要であるという課題について、従来技術として以下のような提案がなされている。   Regarding the problem that the application program needs to be changed, the following proposals have been made as conventional techniques.

下記特許文献1では、すでに存在するアプリケーションプログラムを修正する必要なしに、従来のモデムに必要とされていたマイクロプロセッサおよびメモリを除去することが可能なパーソナルコンピュータ中でモデム機能を実行する装置について記載されている。   The following Patent Document 1 describes a device that performs a modem function in a personal computer that can remove the microprocessor and memory required for a conventional modem without having to modify an existing application program. Has been.

また、下記特許文献2には、アプリケーションを変更することなく、1つの通信ポートにアクセスすることにより、他の通信ポートに接続されているプリンターへも同時に印刷を実行させることができ、複製印刷を可能にする装置について記載されている。   Further, in Patent Document 2 below, by accessing one communication port without changing the application, it is possible to cause a printer connected to another communication port to execute printing simultaneously. A device is described that enables it.

特開平8−69427号公報JP-A-8-69427 特開2006−338443号公報JP 2006-338443 A

しかしながら、上記特許文献1及び2に記載の内容は、モデム機能、複製印刷機能に関するものであり、上述したプリンターの置き換えを解決するものではない。また、上記特許文献2では、OSカーネル層での処理であるため、一般に機能構築(プログラム開発等)が容易ではないという課題がある。   However, the contents described in Patent Documents 1 and 2 relate to the modem function and the duplicate printing function, and do not solve the above-described replacement of the printer. Further, in Patent Document 2, since the processing is performed in the OS kernel layer, there is a problem that function construction (program development or the like) is generally not easy.

従って、既存のアプリケーションを変更することなく容易にプリンターの置き換えが可能な技術が望まれている。   Therefore, there is a demand for a technology that can easily replace a printer without changing an existing application.

そこで、本発明の目的は、アプリケーションから出力される印刷物の出力先を変更するためのプログラムであって、様々なタイプのプリンターへの出力先変更を、アプリケーションプログラムを変更することなしに容易に行うことができるプリンター変更用プログラム、等を提供することである。   Therefore, an object of the present invention is a program for changing the output destination of a printed matter output from an application, and easily changing the output destination to various types of printers without changing the application program. It is to provide a printer changing program, etc.

上記の目的を達成するために、本発明の一つの側面は、OSカーネル層のオペレーティングシステムによって動作しアプリケーション層に備えられるアプリケーションによってプリンターから印刷物を出力させるコンピューターに、出力先プリンターを変更するための処理を実行させるプリンター変更用プログラムが、前記アプリケーションから第一のプリンターへ出力される印刷データを前記OSカーネル層で取得する工程と、前記アプリケーション層で、前記取得された印刷データを、プリンタードライバーが処理可能な標準データに変換する工程と、前記変換後のデータを第二のプリンター用のドライバーへ出力する工程と、を前記コンピューターに実行させる、ことである。   In order to achieve the above object, one aspect of the present invention is to change an output destination printer to a computer that is operated by an operating system of the OS kernel layer and outputs a printed matter from the printer by an application provided in the application layer. A printer change program for executing processing acquires the print data output from the application to the first printer in the OS kernel layer, and the printer driver receives the print data acquired in the application layer. And causing the computer to execute a step of converting into standard data that can be processed and a step of outputting the converted data to a driver for a second printer.

更に、上記発明において、一つの態様は、更に、前記第二のプリンター用のドライバーへ出力する前に、前記アプリケーション層で、前記取得された印刷データを加工する工程を前記コンピューターに実行させる、ことを特徴とする。   Furthermore, in the above invention, according to one aspect, the computer further executes a process of processing the acquired print data in the application layer before outputting to the driver for the second printer. It is characterized by.

また、上記発明において、一つの態様は、前記第二のプリンターとして複数のプリンターを選択可能である場合に、更に、前記第二のプリンター用のドライバーへ出力する前に、前記アプリケーション層で、前記第二のプリンターを決定する工程を前記コンピューターに実行させる、ことを特徴とする。   Further, in the above invention, in one aspect, when a plurality of printers can be selected as the second printer, before outputting to the driver for the second printer, in the application layer, The step of determining a second printer is executed by the computer.

上記の目的を達成するために、本発明の別の側面は、OSカーネル層のオペレーティングシステムによって動作しアプリケーション層に備えられるアプリケーションによってプリンターから印刷物を出力させるコンピューターにおける、プリンター変更方法が、前記コンピューターが、前記アプリケーションから第一のプリンターへ出力される印刷データを前記OSカーネル層で取得する工程と、前記コンピューターが、前記アプリケーション層で、前記取得された印刷データを、プリンタードライバーが処理可能な標準データに変換する工程と、前記コンピューターが、前記変換後のデータを第二のプリンター用のドライバーへ出力する工程と、を有する、ことである。   In order to achieve the above object, another aspect of the present invention provides a method for changing a printer in a computer that is operated by an operating system of an OS kernel layer and outputs a printed matter from a printer by an application provided in the application layer. Obtaining print data output from the application to the first printer in the OS kernel layer, and standard data that allows the printer driver to process the obtained print data in the application layer by the computer. And a step of outputting the converted data to a driver for a second printer by the computer.

上記の目的を達成するために、本発明の更に別の側面は、OSカーネル層のオペレーティングシステムによって動作しアプリケーション層に備えられるアプリケーションによってプリンターから印刷物を出力させる、プリンターのホスト装置が、前記アプリケーションから第一のプリンターへ出力される印刷データを前記OSカーネル層で取得するデータ取得部と、前記アプリケーション層で、前記取得された印刷データを、プリンタードライバーが処理可能な標準データに変換し、当該変換後のデータを第二のプリンター用のドライバーへ出力する変換部と、を有することである。   In order to achieve the above object, according to still another aspect of the present invention, there is provided a printer host device that outputs a printed matter from a printer by an application that is operated by an operating system of the OS kernel layer and is provided in the application layer. A data acquisition unit that acquires print data to be output to the first printer in the OS kernel layer, and the application layer converts the acquired print data into standard data that can be processed by a printer driver. And a conversion unit that outputs subsequent data to a driver for the second printer.

本発明の更なる目的及び、特徴は、以下に説明する発明の実施の形態から明らかになる。   Further objects and features of the present invention will become apparent from the embodiments of the invention described below.

本発明を適用したPOS端末装置の実施の形態例に係る概略構成図である。It is a schematic block diagram which concerns on the embodiment of the POS terminal device to which this invention is applied. POS端末装置の概略機能構成図である。It is a schematic function block diagram of a POS terminal device. 印刷出力時の処理手順を例示したフローチャートである。It is the flowchart which illustrated the processing procedure at the time of print output. POSシステムの改良を説明するための図である。It is a figure for demonstrating the improvement of a POS system.

以下、図面を参照して本発明の実施の形態例を説明する。しかしながら、かかる実施の形態例が、本発明の技術的範囲を限定するものではない。なお、図において、同一又は類似のものには同一の参照番号又は参照記号を付して説明する。   Embodiments of the present invention will be described below with reference to the drawings. However, such an embodiment does not limit the technical scope of the present invention. In the drawings, the same or similar elements are denoted by the same reference numerals or reference symbols.

図1は、本発明を適用したPOS端末装置の実施の形態例に係る概略構成図である。また、図2は、当該POS端末装置の概略機能構成図である。図1及び図2に示すPOS端末装置2が本発明を適用した装置であり、当該装置では、POSアプリケーション201からプリンター3Aに対して出力される印刷データをOSカーネル層230の仮想ポート203(データ取得部)で取得する。そして、取得したデータをアプリケーション層220のコマンド変換部204(変換部)で、一般のプリンタードライバーが処理可能な標準データ形式に変換し、変換後のデータをプリンター3B用のドライバー205に引き渡す。本POS端末装置2は、かかる処理を実行することにより、POSアプリケーション201のプログラムを変更することなく、出力先プリンター3の変更を実現する。すなわち、アプリケーションを変更することなく、プリンターの置き換えが可能になる。   FIG. 1 is a schematic configuration diagram according to an embodiment of a POS terminal device to which the present invention is applied. FIG. 2 is a schematic functional configuration diagram of the POS terminal apparatus. A POS terminal apparatus 2 shown in FIGS. 1 and 2 is an apparatus to which the present invention is applied. In this apparatus, print data output from the POS application 201 to the printer 3A is transferred to the virtual port 203 (data of the OS kernel layer 230). Acquired by the acquisition unit). Then, the command conversion unit 204 (conversion unit) of the application layer 220 converts the acquired data into a standard data format that can be processed by a general printer driver, and passes the converted data to the driver 205 for the printer 3B. The POS terminal device 2 executes such processing, thereby realizing the change of the output destination printer 3 without changing the program of the POS application 201. That is, the printer can be replaced without changing the application.

本実施の形態例では、スーパーマーケットなどで用いられるPOSシステムを想定しており、図1に示すように、POSサーバー1にネットワーク4を介して複数のPOS端末装置2が接続される構成をしている。POSサーバー1は、コンピューターシステムで構成され、上記複数のPOS端末装置2の管理とそれらのPOS端末装置2から取得される各種データの集計、管理等の処理を実行する。   In this embodiment, a POS system used in a supermarket or the like is assumed, and a plurality of POS terminal devices 2 are connected to a POS server 1 via a network 4 as shown in FIG. Yes. The POS server 1 is constituted by a computer system, and executes processing such as management of the plurality of POS terminal devices 2 and aggregation and management of various data acquired from the POS terminal devices 2.

POS端末装置2は各レジに設置され、それぞれ、プリンター3と接続される。プリンター3は、POS端末装置2から出力される印刷データに従って、レシートやクーポンを出力する。従って、POS端末装置2はプリンター3のホスト装置と位置づけられる。   The POS terminal device 2 is installed at each cash register and is connected to the printer 3. The printer 3 outputs a receipt or a coupon according to the print data output from the POS terminal device 2. Therefore, the POS terminal device 2 is positioned as the host device of the printer 3.

各POS端末装置2は、図1に示すように、POS端末本体21、ディスプレイ22、キーボード23、バーコードリーダー24、及びカードリーダー25等を備える。ディスプレイ22は、顧客に商品の金額等を表示し、キーボード23は、価格や商品コードなどの商品情報、性別、年代などの顧客情報をオペレーターが入力するために用いられる。また、バーコードリーダー24は、商品に付されたバーコードを読み取って商品情報を取得し、カードリーダー25は、各種カードに記憶された情報を読み取って、清算に必要な情報などを取得する。   As shown in FIG. 1, each POS terminal device 2 includes a POS terminal main body 21, a display 22, a keyboard 23, a barcode reader 24, a card reader 25, and the like. The display 22 displays the price of the product to the customer, and the keyboard 23 is used by the operator to input product information such as price and product code, and customer information such as sex and age. Further, the barcode reader 24 reads the barcode attached to the product to acquire product information, and the card reader 25 reads the information stored in various cards to acquire information necessary for settlement.

POS端末本体21は、上述したキーボード23、バーコードリーダー24、及びカードリーダー25から取得される情報に基づいて、レシートやクーポンに印刷する情報を生成して、プリンター3へ出力する。当該POS端末本体21は、コンピューターで構成され、図示していないが、CPU、RAM、ROM、HDDなどを備えている。後述するPOSアプリケーション201のプログラムやコマンド変換処理のためのプログラムは、ROMに記憶され、それらのプログラムに従ってCPUが動作することにより各処理が実行される。   The POS terminal main body 21 generates information to be printed on a receipt or a coupon based on information acquired from the keyboard 23, the barcode reader 24, and the card reader 25 described above, and outputs the information to the printer 3. The POS terminal main body 21 is configured by a computer and includes a CPU, a RAM, a ROM, an HDD and the like (not shown). A POS application 201 program and a command conversion process program, which will be described later, are stored in the ROM, and each process is executed by the CPU operating in accordance with these programs.

また、POS端末装置2は、図2に示すような機能構成となっている。POSアプリケーション201は、上述したレシートやクーポンに印刷する情報を生成して出力する処理を行うが、ここで生成されるデータはプリンター3Aから出力することを前提としている。また、生成されるデータは、そのままプリンター3Aへ出力できる形式のデータ(プリンター3A用のコマンドで表現されたデータ)、あるいは、プリンター3A用ドライバー202に渡す形式のデータである。前者は、テキストだけの印刷など簡単な印刷データの場合に生成される。   Further, the POS terminal device 2 has a functional configuration as shown in FIG. The POS application 201 performs processing for generating and outputting information to be printed on the receipt and coupon described above, and it is assumed that the data generated here is output from the printer 3A. The generated data is data in a format that can be output to the printer 3A as it is (data expressed by a command for the printer 3A) or data that is passed to the printer 3A driver 202. The former is generated in the case of simple print data such as printing of text only.

また、プリンター3A用ドライバー202は、プリンター3A用のプリンタードライバーであり、POSアプリケーション201から出力されたデータを、プリンター3Aの機種(デバイス)に依存したコマンドによる、プリンター3Aが受信して印刷可能な印刷データとして出力する。   The printer 3A driver 202 is a printer driver for the printer 3A, and the printer 3A can receive and print data output from the POS application 201 by a command depending on the model (device) of the printer 3A. Output as print data.

なお、POSアプリケーション201とプリンター3A用ドライバー202は、図2に示すように、コンピューターのオペレーティングシステム(OS)に基づきその上でプログラムが各処理を実行するアプリケーション層220に位置する。また、両者は、それぞれの処理内容を指示する上記ROMに格納されたプログラムと当該プログラムに従って処理を実行する上記CPU等によって構成される。   As shown in FIG. 2, the POS application 201 and the printer 3A driver 202 are located in an application layer 220 on which a program executes each process based on an operating system (OS) of a computer. Both are constituted by a program stored in the ROM for instructing each processing content and the CPU for executing processing according to the program.

次に、仮想ポート203は、POSアプリケーション201又はプリンター3A用ドライバー202から出力された印刷データ(ここでは、元印刷データと呼ぶ)を、通信ポート209が受け取る前に上記オペレーティングシステムが位置するOSカーネル層230で受け取る部分である。そして、仮想ポート203は、取得した元印刷データをコマンド変換部204へ引き渡す。   Next, the virtual port 203 is an OS kernel in which the operating system is located before the communication port 209 receives print data (referred to as original print data here) output from the POS application 201 or the printer 3A driver 202. This is the part received by layer 230. Then, the virtual port 203 delivers the acquired original print data to the command conversion unit 204.

次に、コマンド変換部204は、プリンター3A用のコマンドで表現された上記元印刷データを標準データ、すなわち、一般のプリンタードライバーが処理可能な標準フォーマットのデータに変換し、変換後のデータ(ここでは、変換後データと呼ぶ)をプリンター3B用ドライバー205に渡す部分である。標準データの形式としては、例えば、Windows(登録商標)のGDI(Graphics Device Interface)がドライバーに命令を送る際の形式が用いられる。   Next, the command conversion unit 204 converts the original print data expressed by the command for the printer 3A into standard data, that is, data in a standard format that can be processed by a general printer driver. In this case, the data is referred to as post-conversion data) to the printer 3B driver 205. As the format of the standard data, for example, the format used when Windows (registered trademark) GDI (Graphics Device Interface) sends an instruction to the driver is used.

プリンター3B用ドライバー205は、プリンター3B用のプリンタードライバーであり、上記変換後データ(標準データ)を、プリンター3Bの機種(デバイス)に依存したコマンドによる、プリンター3Bが受信して印刷可能な印刷データとして出力する。   The printer 3B driver 205 is a printer driver for the printer 3B, and print data that the printer 3B receives and prints the converted data (standard data) by a command depending on the model (device) of the printer 3B. Output as.

なお、仮想ポート203、コマンド変換部204、及びプリンター3B用ドライバー205は、それぞれ、上記ROMに格納されるプログラムと当該プログラムに従って処理を実行する上記CPU等によって構成される。また、仮想ポート203及びコマンド変換部204に係るプログラムが本発明のプリンター変更用プログラムに相当する。   The virtual port 203, the command conversion unit 204, and the printer 3B driver 205 are each configured by a program stored in the ROM and the CPU that executes processing according to the program. A program related to the virtual port 203 and the command conversion unit 204 corresponds to the printer change program of the present invention.

次に、POS端末装置2には、物理層240に通信ポート206A及び206Bが備えられ、それぞれ、プリンター3A及び3Bに接続される。ここでは、一例として、通信ポート206Aは、シリアル通信のCOM通信ポートであり、通信ポート206Bは、USB通信を行うUSB通信ポートである。   Next, the POS terminal device 2 includes communication ports 206A and 206B in the physical layer 240, which are connected to the printers 3A and 3B, respectively. Here, as an example, the communication port 206A is a COM communication port for serial communication, and the communication port 206B is a USB communication port for performing USB communication.

また、プリンター3A及び3Bは、ここでは、互いに使用するコマンドが異なるプリンターであることと想定している。そして、プリンター3Aは、当該POSシステムが導入された際に設置されたプリンターであり、プリンター3Bは、システム導入後に新たに設置されたプリンターである。また、プリンター3Aは、この時点で実際に設置されていなくても良い。また、一例として、プリンター3AがA社製のモノクロプリンターであり、プリンター3BがB社製のカラープリンターであるとすることができる。また、プリンター3Aがインクジェットプリンターであり、プリンター3Bがレーザープリンターであるとすることができる。   Here, it is assumed that the printers 3A and 3B are printers that use different commands. The printer 3A is a printer installed when the POS system is introduced, and the printer 3B is a printer newly installed after the system introduction. Further, the printer 3A may not be actually installed at this time. As an example, the printer 3A may be a monochrome printer manufactured by A company, and the printer 3B may be a color printer manufactured by B company. Further, it can be assumed that the printer 3A is an ink jet printer and the printer 3B is a laser printer.

なお、ここでは、2つ通信ポート206が備えられ、2つのプリンター3がPOS端末装置2に接続されるが、接続される通信ポート206及びプリンター3の数はこれに限定されることはなく、1でもよいし3以上でもよい。   Here, two communication ports 206 are provided, and two printers 3 are connected to the POS terminal device 2, but the number of communication ports 206 and printers 3 to be connected is not limited to this. It may be 1 or 3 or more.

以上説明をしたような構成を有する本POS端末装置2では、プリンター3A向けの元印刷データをプリンター3Bに出力すべく標準フォーマットの変換後データにコマンド変換する処理に特徴があり、以下、その処理を含む印刷出力時の処理手順について説明する。図3は、当該印刷出力時の処理手順を例示したフローチャートである。まず、前述の通り、POSアプリケーション201から直接、又は、プリンター3A用ドライバー202を介して、元印刷データが出力される(ステップS1)。当該元印刷データは、上述のとおり、プリンター3Aから出力することを想定しているレシートの印刷データであり、従って、出力先の通信ポートには通信ポート206Aが指定され、プリンター3Aに依存したコマンドで表現されている。   The present POS terminal device 2 having the above-described configuration is characterized in the process of converting the original print data for the printer 3A into the converted data in the standard format so as to be output to the printer 3B. A processing procedure at the time of print output including will be described. FIG. 3 is a flowchart illustrating a processing procedure at the time of the print output. First, as described above, the original print data is output directly from the POS application 201 or via the printer 3A driver 202 (step S1). As described above, the original print data is print data of a receipt that is assumed to be output from the printer 3A. Therefore, the communication port 206A is designated as the output destination communication port, and the command depending on the printer 3A is used. It is expressed by.

次に、出力された元印刷データは、指定された通信ポートに(ここでは、通信ポート206Aに)届く前に仮想ポート203によって受け取られる(ステップS2)。かかる処理は、いずれの通信ポート206へ向けたデータも、まず、仮想ポート203が受け取るように、レジストリーの(優先度の)設定を変更しておくことで実現され、かかる設定変更はOSの起動時に実行される。その後、受け取られた元印刷データは、仮想ポート203からアプリケーション層220のコマンド変換部204に送付される(ステップS2)。   Next, the output original print data is received by the virtual port 203 before reaching the designated communication port (here, the communication port 206A) (step S2). Such processing is realized by first changing the (priority) setting of the registry so that the virtual port 203 receives data directed to any communication port 206, and such setting change is performed by starting the OS. Sometimes executed. Thereafter, the received original print data is sent from the virtual port 203 to the command conversion unit 204 of the application layer 220 (step S2).

次に、コマンド変換部204は、送付された元印刷データのコマンドを解釈し、当該データの内容を解析する(ステップS3)。そして、コマンド変換部204は、解析された印刷内容を上述した標準データで表現すべく、プリンター3A用の各コマンドを上述した標準フォーマットに変換する処理を実行し、上記変換後データを生成する(ステップS4)。   Next, the command conversion unit 204 interprets the command of the sent original print data and analyzes the content of the data (step S3). Then, the command conversion unit 204 executes a process of converting each command for the printer 3A into the above-described standard format in order to express the analyzed print contents with the above-described standard data, and generates the converted data ( Step S4).

元印刷データの印刷内容が標準フォーマットで表現された当該変換後データは、その後、コマンド変換部204からプリンター3B用ドライバー205へ出力される(ステップS5)。プリンター3B用ドライバー205では、標準フォーマットの変換後データがプリンター3B用のコマンドに変換され、変換後のデータがそこから通信ポート206Bへ出力される(ステップS6)。   The converted data in which the print contents of the original print data are expressed in a standard format is then output from the command conversion unit 204 to the printer 3B driver 205 (step S5). In the printer 3B driver 205, the converted data in the standard format is converted into a command for the printer 3B, and the converted data is output therefrom to the communication port 206B (step S6).

その後、データが通信ポート206Bから接続されるプリンター3Bへ送信され、プリンター3Bにおいて当該印刷データによる印刷が実行され、レシートなどの印刷物が出力される(ステップS7)。   Thereafter, the data is transmitted from the communication port 206B to the connected printer 3B, and printing by the print data is executed in the printer 3B, and a printed matter such as a receipt is output (step S7).

以上説明したような手順で、本POS端末装置2におけるコマンド変換を含む印刷出力処理が実行される。すなわち、POSアプリケーション201で指示される出力先(3A)とは異なる出力先(3B)での印刷が実現される。   The print output process including command conversion in the POS terminal apparatus 2 is executed by the procedure as described above. That is, printing at an output destination (3B) different from the output destination (3A) instructed by the POS application 201 is realized.

なお、上述の説明では、POSアプリケーション201から出力された印刷内容をそのまま印刷することを前提として説明したが、印刷内容を変更するようにしても良い。例えば、POSアプリケーション201からモノクロプリンターであるプリンター3Aに向けて出力されたレシートの印刷データを、カラープリンターであるプリンター3Bから出力する時に、色の付いたレシートとして印刷する場合には、コマンド変換部204が、元印刷データに対して色の情報を付加するデータ加工を実行するようにしてもよい。   In the above description, the print content output from the POS application 201 is assumed to be printed as it is. However, the print content may be changed. For example, when printing the receipt print data output from the POS application 201 to the printer 3A, which is a monochrome printer, as a colored receipt when outputting from the printer 3B, which is a color printer, the command conversion unit A data processing 204 adds color information to the original print data.

この場合、コマンド変換部204は、予め定められたルールに従って、上記コマンド解析時に、色を付加すべき印刷オブジェクトを特定し、そのオブジェクトの印刷コマンドに情報を追加するデータ加工を実行する。当該加工が加えられた印刷データは、上述のとおり、標準データとしてプリンター3B用ドライバー205へ出力される。   In this case, the command conversion unit 204 specifies a print object to which a color is to be added according to a predetermined rule, and executes data processing for adding information to the print command of the object. The print data subjected to the processing is output as standard data to the printer 3B driver 205 as described above.

また、上記印刷内容の変更はこの色情報の付加のみでなく、新たな画像の挿入(例えば、レシートにおけるロゴの追加)などでもよく、この場合にも、コマンド変換部204が同様のデータ加工を実行する。   Further, the change of the print content is not limited to the addition of the color information, but may be the insertion of a new image (for example, addition of a logo in a receipt). In this case, the command conversion unit 204 performs the same data processing. Run.

また、上述の説明では、コマンド変換後の出力先プリンターが1つであったが、複数であっても構わない。すなわち、POS端末装置2が、プリンター3A、3B以外の1以上のプリンターと接続され、それらに対応する各プリンタードライバーを備える、構成とすることができる。この場合には、コマンド変換部204が、予め定められたルールに基づき、上記コマンド解析時に、印刷物の内容を判断してそれに基づく出力先を決定する処理を行う。そして、上述した標準データへの変換後は、この決定された出力先のプリンタードライバーに変換後データを出力する。例えば、印刷物の内容がレシートであると判断した場合にはモノクロプリンターを出力先として決定し、印刷物の内容がクーポンであると判断した場合にはカラープリンターを出力先として決定する。   In the above description, there is one output destination printer after command conversion, but there may be a plurality of output destination printers. That is, the POS terminal device 2 can be configured to be connected to one or more printers other than the printers 3A and 3B and include respective printer drivers corresponding thereto. In this case, based on a predetermined rule, the command conversion unit 204 performs processing for determining the output destination based on the content of the printed material at the time of the command analysis. After the conversion to the standard data, the converted data is output to the determined output destination printer driver. For example, when it is determined that the content of the printed material is a receipt, the monochrome printer is determined as the output destination, and when it is determined that the content of the printed material is a coupon, the color printer is determined as the output destination.

以上説明したように、本実施の形態例に係るPOS端末装置2では、POSアプリケーション201から出力された印刷データの出力先プリンターを変更する処理を実行することができる。そして、当該変更機能を行わないPOS端末装置及びPOSシステムを、比較的容易な方法で本POS端末装置2及びそれを含むPOSシステムに改良することができる。言い換えれば、既存POSシステムのプリンターの置き換えが容易にできる。   As described above, the POS terminal device 2 according to the present embodiment can execute the process of changing the output destination printer of the print data output from the POS application 201. Then, the POS terminal device and the POS system that do not perform the changing function can be improved to the POS terminal device 2 and the POS system including the POS terminal device 2 by a relatively easy method. In other words, it is possible to easily replace the printer of the existing POS system.

図4は、当該改良を説明するための図である。当該図は、図2と同じ機能構成図であり、実線部分が上述した既存のPOS端末装置及びPOSシステムを示している。すなわち、改良前のシステムは、POSアプリケーション201から直接又はプリンター3A用ドライバー202を介して出力された印刷データが通信ポート206Aで受け取られ、プリンター3Aから出力がなされる構成となっている。そして、このような構成のシステムに対して、破線で示される部分を追加することにより、本POS端末装置2及びそれを含むPOSシステムにすることが可能である。   FIG. 4 is a diagram for explaining the improvement. This figure is the same functional configuration diagram as FIG. 2, and the solid line portion shows the existing POS terminal device and POS system described above. That is, the system before improvement is configured such that print data output directly from the POS application 201 or via the printer 3A driver 202 is received by the communication port 206A and output from the printer 3A. And it is possible to make this POS terminal device 2 and the POS system containing it by adding the part shown with a broken line with respect to the system of such a structure.

すなわち、既存のPOSアプリケーション201を変更することなく、上述した仮想ポート203、コマンド変換部204、プリンター3B用ドライバー205、及びプリンター3Bを追加することにより、既存のPOSシステムの出力先プリンターを変更することが可能となる。すなわち、POSシステムのプリンターをプリンター3Aからプリンター3Bに置き換えることが可能になる。そして、この改良(変更)は、新たなプリンター3Bの設置と上記追加する部分のプログラムとデータを含む当該プリンタードライバーソフトウェアのインストールという作業で実行され得る。   That is, without changing the existing POS application 201, the output destination printer of the existing POS system is changed by adding the above-described virtual port 203, command conversion unit 204, printer 3B driver 205, and printer 3B. It becomes possible. That is, the printer of the POS system can be replaced from the printer 3A to the printer 3B. This improvement (change) can be performed by the operation of installing a new printer 3B and installing the printer driver software including the program and data of the part to be added.

また、仮想ポート203及びコマンド変換部204の追加後、更にプリンターを置き換える場合においては、コマンド変換部204が出力するデータが標準フォーマットでありどのプリンタードライバーも処理可能であるので、変換後データの出力先を新たなプリンタードライバーに変更するだけで対応可能である。   Further, when the printer is replaced after adding the virtual port 203 and the command conversion unit 204, the data output from the command conversion unit 204 is in a standard format and can be processed by any printer driver. Just change the destination to a new printer driver.

以上説明したように、本実施の形態例に係るプリンター変更用プログラムを用いることにより、上述した標準フォーマットでのドライバーへのデータ転送がなされ、そのデータをどのプリンタードライバーも処理可能であるので、元印刷データの出力先をどのようなタイプのプリンターにも変更することが可能になる。   As described above, by using the printer change program according to this embodiment, data is transferred to the driver in the standard format described above, and any printer driver can process the data. The output destination of print data can be changed to any type of printer.

さらに、このプリンターの変更(置き換え)が、既存のPOSアプリケーションプログラムの変更を伴わず、また、置き換え後の各プリンターに関わらず標準フォーマットへの変換という一律な処理で実行され得るので、比較的容易な開発作業で実現できる。   Furthermore, since this printer change (replacement) is not accompanied by a change in the existing POS application program and can be executed by a uniform process of conversion to the standard format regardless of each replaced printer, it is relatively easy. Can be realized by simple development work.

また、POSアプリケーションから出力された印刷データを通信ポートが受け取る前にOSカーネル層で取得する上述の構成により、上述のコマンド変換に合わせてデータ加工も行うことにより、POSアプリケーションプログラムの変更をせずに、印刷物の内容を変更することも可能である。また、複数のプリンターと接続させる場合には、適切な出力先を選択して印刷させることも可能である。   In addition, by the above-described configuration in which the print data output from the POS application is acquired by the OS kernel layer before the communication port receives the data, the POS application program is not changed by performing data processing in accordance with the above-described command conversion. It is also possible to change the contents of the printed matter. Further, when connecting to a plurality of printers, it is possible to select an appropriate output destination for printing.

なお、本実施の形態例では、POSサーバー1が複数のPOS端末装置2と接続されるシステムであったが、本発明は、当該構成に限らず、POS端末装置とプリンターが接続される環境に対して適用することができる。   In the present embodiment, the POS server 1 is a system connected to a plurality of POS terminal devices 2. However, the present invention is not limited to this configuration, and is in an environment where a POS terminal device and a printer are connected. It can be applied to.

また、本実施の形態例ではPOSシステムの例を示したが、本発明は、POSシステムに限らず、病院や運送会社で使用されるシステムなど、プリンターからの印刷物の出力を含む所定のアプリケーションを備えたシステムに適用可能であり、特に、既存のアプリケーションプログラムの改変が困難である場合に有効である。   In the present embodiment, an example of a POS system is shown. However, the present invention is not limited to a POS system, but a predetermined application including output of printed matter from a printer, such as a system used in a hospital or a transportation company. The present invention can be applied to a provided system, and is particularly effective when it is difficult to modify an existing application program.

また、本実施の形態例では、POSアプリケーションのプログラムやコマンド変換処理のためのプログラム等がROMに記憶されている例を示したが、これらプログラムはROMに限らず、RAMやHDD等の記憶媒体に記憶されていてもよい。また、これらプログラムは別々の記憶媒体に記憶されていてもよい。   In this embodiment, an example in which a POS application program, a command conversion processing program, and the like are stored in the ROM is shown. However, these programs are not limited to the ROM, and a storage medium such as a RAM or an HDD. May be stored. These programs may be stored in separate storage media.

本発明の保護範囲は、上記の実施の形態に限定されず、特許請求の範囲に記載された発明とその均等物に及ぶものである。   The protection scope of the present invention is not limited to the above-described embodiment, but covers the invention described in the claims and equivalents thereof.

1 POSサーバー、 2 POS端末装置、 3 プリンター、 4 ネットワーク、 21 POS端末本体、 22 ディスプレイ、 23 キーボード、 24 バーコードリーダー、 25 カードリーダー、 201 POSアプリケーション、 202 プリンター3A用ドライバー、 203 仮想ポート、 204 コマンド変換部、 205 プリンター3B用ドライバー、 206 通信ポート、 220 アプリケーション層、 230 OSカーネル層、 240 物理層   1 POS server, 2 POS terminal device, 3 printer, 4 network, 21 POS terminal body, 22 display, 23 keyboard, 24 barcode reader, 25 card reader, 201 POS application, 202 printer 3A driver, 203 virtual port, 204 Command conversion unit, 205 Printer 3B driver, 206 communication port, 220 application layer, 230 OS kernel layer, 240 physical layer

Claims (5)

OSカーネル層のオペレーティングシステムによって動作しアプリケーション層に備えられるアプリケーションによってプリンターから印刷物を出力させるコンピューターに、出力先プリンターを変更するための処理を実行させるプリンター変更用プログラムであって、
前記アプリケーションから第一のプリンターへ出力される印刷データを前記OSカーネル層で取得する工程と、
前記アプリケーション層で、前記取得された印刷データを、プリンタードライバーが処理可能な標準データに変換する工程と、
前記変換後のデータを第二のプリンター用のドライバーへ出力する工程と、を前記コンピューターに実行させる
ことを特徴とするプリンター変更用プログラム。
A program for changing a printer that causes a computer that operates by an operating system of an OS kernel layer and outputs a printed matter from a printer by an application provided in an application layer, to execute processing for changing an output destination printer,
Acquiring print data output from the application to the first printer in the OS kernel layer;
In the application layer, converting the acquired print data into standard data that can be processed by a printer driver;
A program for causing the computer to execute the step of outputting the converted data to a driver for a second printer.
請求項1において、更に、
前記第二のプリンター用のドライバーへ出力する前に、前記アプリケーション層で、前記取得された印刷データを加工する工程を前記コンピューターに実行させる
ことを特徴とするプリンター変更用プログラム。
In claim 1, further comprising:
A program for changing a printer, which causes the computer to execute a process of processing the acquired print data in the application layer before outputting to the driver for the second printer.
請求項1あるいは2において、
前記第二のプリンターとして複数のプリンターを選択可能である場合に、更に、
前記第二のプリンター用のドライバーへ出力する前に、前記アプリケーション層で、前記第二のプリンターを決定する工程を前記コンピューターに実行させる
ことを特徴とするプリンター変更用プログラム。
In claim 1 or 2,
When a plurality of printers can be selected as the second printer,
A program for changing a printer, which causes the computer to execute a step of determining the second printer in the application layer before outputting to the driver for the second printer.
OSカーネル層のオペレーティングシステムによって動作しアプリケーション層に備えられるアプリケーションによってプリンターから印刷物を出力させるコンピューターにおける、プリンター変更方法であって、
前記コンピューターが、前記アプリケーションから第一のプリンターへ出力される印刷データを前記OSカーネル層で取得する工程と、
前記コンピューターが、前記アプリケーション層で、前記取得された印刷データを、プリンタードライバーが処理可能な標準データに変換する工程と、
前記コンピューターが、前記変換後のデータを第二のプリンター用のドライバーへ出力する工程と、を有する
ことを特徴とするプリンター変更方法。
A printer changing method in a computer that operates by an operating system of an OS kernel layer and outputs a printed matter from a printer by an application provided in an application layer,
The computer acquiring print data output from the application to a first printer in the OS kernel layer;
Converting the acquired print data into standard data that can be processed by a printer driver in the application layer;
And a step of outputting the converted data to a driver for a second printer by the computer.
OSカーネル層のオペレーティングシステムによって動作しアプリケーション層に備えられるアプリケーションによってプリンターから印刷物を出力させる、プリンターのホスト装置であって、
前記アプリケーションから第一のプリンターへ出力される印刷データを前記OSカーネル層で取得するデータ取得部と、
前記アプリケーション層で、前記取得された印刷データを、プリンタードライバーが処理可能な標準データに変換し、当該変換後のデータを第二のプリンター用のドライバーへ出力する変換部と、を有する
ことを特徴とするホスト装置。
A printer host device that is operated by an operating system of an OS kernel layer and causes a printer to output a printed matter by an application provided in the application layer;
A data acquisition unit for acquiring print data output from the application to the first printer in the OS kernel layer;
A conversion unit that converts the acquired print data into standard data that can be processed by a printer driver in the application layer, and outputs the converted data to a driver for a second printer. A host device.
JP2015043111A 2015-03-05 2015-03-05 Program for changing printer, method for changing printer, and host device Pending JP2015149077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015043111A JP2015149077A (en) 2015-03-05 2015-03-05 Program for changing printer, method for changing printer, and host device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015043111A JP2015149077A (en) 2015-03-05 2015-03-05 Program for changing printer, method for changing printer, and host device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2011035497A Division JP5708012B2 (en) 2011-02-22 2011-02-22 Printer changing program, printer changing method, and host device

Publications (1)

Publication Number Publication Date
JP2015149077A true JP2015149077A (en) 2015-08-20

Family

ID=53892340

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015043111A Pending JP2015149077A (en) 2015-03-05 2015-03-05 Program for changing printer, method for changing printer, and host device

Country Status (1)

Country Link
JP (1) JP2015149077A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006239946A (en) * 2005-03-01 2006-09-14 Canon Inc Printing control unit, control method therefor, and device driver
JP2006338412A (en) * 2005-06-02 2006-12-14 Star Micronics Co Ltd Method of installing print data output program, and program
JP2009226689A (en) * 2008-03-21 2009-10-08 Seiko Epson Corp Printer
JP2010140445A (en) * 2008-12-15 2010-06-24 Canon Inc Document processor and document processing method
JP2010211831A (en) * 2002-09-06 2010-09-24 Canon Inc Information processing apparatus, information processing method and printing control program
JP2012173999A (en) * 2011-02-22 2012-09-10 Seiko Epson Corp Program for changing printer, method for changing printer, and host device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010211831A (en) * 2002-09-06 2010-09-24 Canon Inc Information processing apparatus, information processing method and printing control program
JP2006239946A (en) * 2005-03-01 2006-09-14 Canon Inc Printing control unit, control method therefor, and device driver
JP2006338412A (en) * 2005-06-02 2006-12-14 Star Micronics Co Ltd Method of installing print data output program, and program
JP2009226689A (en) * 2008-03-21 2009-10-08 Seiko Epson Corp Printer
JP2010140445A (en) * 2008-12-15 2010-06-24 Canon Inc Document processor and document processing method
JP2012173999A (en) * 2011-02-22 2012-09-10 Seiko Epson Corp Program for changing printer, method for changing printer, and host device

Similar Documents

Publication Publication Date Title
US9262106B2 (en) Method of adding value to print data, a value-adding device, and a recording medium
KR101364808B1 (en) Function expansion method using print data, function expansion device, and recording medium
US9058139B2 (en) Function expansion method using print data, and function expansion device
JP5768406B2 (en) Device integration program, device integration method, and host apparatus
JP5708012B2 (en) Printer changing program, printer changing method, and host device
JP6064715B2 (en) Print control program, print control apparatus, and print control method
JP2012226413A (en) Advertisement function expansion program, advertisement function expansion method, and host device
JP5867564B2 (en) Print data processing program for distributing output destinations, print data processing apparatus, and print data processing method
JP5867563B2 (en) Function expansion program, function expansion device, and function expansion method using print data
JP2012058846A (en) Print data processing program for distributing output destination, print data processing device, and print data processing method
JP5867565B2 (en) Print data value addition program, value addition apparatus, and value addition method
US8693036B2 (en) Distribution processing method, distribution processing device, print data processing method, print data processing device, and recording medium
JP2015149077A (en) Program for changing printer, method for changing printer, and host device
JP6075427B2 (en) Print control method and printer driver
JP5842971B2 (en) Distributed processing method, distributed processing apparatus, and program
JP2012208765A (en) Print content change program, print content change method, and host device
JP5609453B2 (en) Distributed processing method, distributed processing apparatus, and program
JP6236943B2 (en) Communication control method and information processing apparatus
JP2014182691A (en) Print control program, pring control device, and print control method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160301

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160428

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20160906