JP2012174094A - Electronic apparatus, control method for electronic apparatus, and program - Google Patents

Electronic apparatus, control method for electronic apparatus, and program Download PDF

Info

Publication number
JP2012174094A
JP2012174094A JP2011036816A JP2011036816A JP2012174094A JP 2012174094 A JP2012174094 A JP 2012174094A JP 2011036816 A JP2011036816 A JP 2011036816A JP 2011036816 A JP2011036816 A JP 2011036816A JP 2012174094 A JP2012174094 A JP 2012174094A
Authority
JP
Japan
Prior art keywords
image
source
program
recorded
recording
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.)
Withdrawn
Application number
JP2011036816A
Other languages
Japanese (ja)
Inventor
Hiroshi Jintsugawa
啓 神通川
Kyoji Hirayama
恭士 平山
Masatoshi Nakazawa
雅俊 中澤
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 JP2011036816A priority Critical patent/JP2012174094A/en
Publication of JP2012174094A publication Critical patent/JP2012174094A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To facilitate development of a program related to control of a recording device.SOLUTION: An electronic apparatus 1 for supporting development of a program related to control of a recording device for performing recording on a recording medium, comprises: a user interface to which a layout of an image to be recorded on the recording medium is input; and a source generation unit 19 for generating a source of a program related to control for causing the recording device to record an image based on data generated according to the input to the user interface.

Description

本発明は、記録媒体に記録を行う記録装置の制御に係るプログラムの開発を支援する電子機器、当該電子機器の制御方法、及び、当該電子機器を制御するためのプログラムに関する。   The present invention relates to an electronic device that supports development of a program related to control of a recording apparatus that records on a recording medium, a control method for the electronic device, and a program for controlling the electronic device.

従来、プリンターの制御に係るプログラム(プリンタードライバー)がインストールされた制御装置と、この制御装置に接続された記録装置とを備え、当該プログラムの機能により、制御装置が記録装置を制御する記録システムが知られている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, there is a recording system that includes a control device in which a program (printer driver) related to printer control is installed and a recording device connected to the control device, and the control device controls the recording device by the function of the program. It is known (see, for example, Patent Document 1).

特開2006−72525号公報JP 2006-72525 A

上述したプログラムは、開発者によって開発されるのが一般的であるが、できるだけ容易に開発できるようにし、開発に係るコストを削減し、また、開発にかかる時間を短縮したいとするニーズがある。
本発明は、上述した事情に鑑みてなされたものであり、記録装置の制御に係るプログラムの開発を容易化することを目的とする。
The above-described program is generally developed by a developer, but there is a need to make it possible to develop it as easily as possible, to reduce development costs, and to shorten development time.
SUMMARY An advantage of some aspects of the invention is that it facilitates development of a program related to control of a recording apparatus.

上記目的を達成するために、本発明は、記録媒体に記録を行う記録装置の制御に係るプログラムの開発を支援する電子機器であって、前記記録媒体に記録させる画像のレイアウトが入力されるユーザーインターフェイスと、前記ユーザーインターフェイスへの入力に応じて生成されたデータに基づいて、前記記録装置に画像を記録させる制御に係るプログラムのソースを生成するソース生成部と、を備えることを特徴とする。
この構成によれば、開発者は、提供されたユーザーインターフェイスに画像のレイアウトを入力するという簡易な手段により、レイアウトに準じて記録装置に画像を記録させる制御に係るプログラムのソースを容易に開発可能である。
In order to achieve the above object, the present invention provides an electronic device that supports development of a program related to control of a recording apparatus that records on a recording medium, and a user who inputs a layout of an image to be recorded on the recording medium An interface and a source generation unit that generates a source of a program related to control for causing the recording apparatus to record an image based on data generated in response to an input to the user interface.
According to this configuration, the developer can easily develop the source of the program related to the control for recording the image on the recording device according to the layout by a simple means of inputting the image layout to the provided user interface. It is.

また、上記発明の電子機器であって、本発明は、前記ソース生成部は、前記ユーザーインターフェイスに入力された前記レイアウトに基づいて画像データを生成し、生成した画像データを分析して、ソースを生成することを特徴とする。
この構成によれば、ソース生成部は、入力されたレイアウトを反映した画像データに基づいて、適切にプログラムのソースを生成可能である。
In the electronic device according to the invention, the source generation unit generates image data based on the layout input to the user interface, analyzes the generated image data, and selects a source. It is characterized by generating.
According to this configuration, the source generation unit can appropriately generate the program source based on the image data reflecting the input layout.

また、上記発明の電子機器であって、本発明は、前記記録装置は、ロール紙を搬送し、該ロール紙に画像を記録し、前記画像を記録した前記ロールを切断して、帳票を出力するものであり、前記ユーザーインターフェイスは、前記帳票において所定の画像が記録される範囲が入力され、前記ソース生成部は、前記ユーザーインターフェイスへの入力に基づいて、前記帳票における前記範囲に前記所定の画像を記録させるように、前記ロール紙搬送を搬送させ、前記所定の画像を記録させ、前記ロール紙を切断させる制御に係るプログラムのソースを生成することを特徴とする。
この構成によれば、開発者は、提供されたユーザーインターフェイスに、帳票において所定の画像が記録される範囲を入力するという簡易な手段により、帳票の出力に係るプログラムのソースを容易に開発可能である。
Also, in the electronic device according to the invention described above, the recording apparatus may be configured to convey a roll paper, record an image on the roll paper, cut the roll on which the image has been recorded, and output a form. A range in which a predetermined image is recorded in the form is input to the user interface, and the source generation unit is configured to add the predetermined range to the range in the form based on an input to the user interface. In order to record an image, the roll paper conveyance is conveyed, the predetermined image is recorded, and a source of a program related to control for cutting the roll paper is generated.
According to this configuration, the developer can easily develop the source of the program related to the output of the form by a simple means of inputting the range in which the predetermined image is recorded in the form to the provided user interface. is there.

また、上記発明の電子機器であって、本発明は、前記帳票は、その先頭に先頭画像が記録されるものであり、前記記録装置は、前記ロール紙に画像を記録する記録部と、該記録部の下流に前記ロール紙を切断する切断部とが配置されるものであり、前記ソース生成部は、前記ユーザーインターフェイスへの入力に基づいて、前記帳票における前記先頭画像の範囲を検出し、前記記録部と前記切断部との距離が、前記帳票の先端と前記先端画像の先端との距離よりも大きい場合は、前記ロール紙の切断位置の上流側に前記先頭画像を記録させつつ、前記切断位置が前記切断部に対応する位置に至るまで前記ロール紙を搬送させて前記ロール紙を切断させる制御に係るプログラムのソースを生成することを特徴とする。
この構成によれば、ソース生成部は、帳票の先頭に先頭画像が記録されるという特徴を利用して、先頭画像を記録すべき範囲としてユーザーインターフェイスに入力された範囲に、当該先頭画像を記録させる動作を行わせるプログラムのソースを生成可能である。
Further, in the electronic device according to the invention described above, the present invention is such that the form has a head image recorded at the head of the form, and the recording device includes a recording unit for recording an image on the roll paper, A cutting unit that cuts the roll paper downstream of the recording unit, and the source generation unit detects a range of the top image in the form based on an input to the user interface, When the distance between the recording unit and the cutting unit is larger than the distance between the leading end of the form and the leading end image, while recording the leading image on the upstream side of the cutting position of the roll paper, A source of a program relating to control for causing the roll paper to be conveyed and cutting the roll paper until a cutting position reaches a position corresponding to the cutting unit is generated.
According to this configuration, the source generation unit records the first image in a range input to the user interface as a range to be recorded using the feature that the first image is recorded at the beginning of the form. It is possible to generate a source of a program that performs the operation to be performed.

また、上記発明の電子機器であって、本発明は、前記記録装置は、前記記録媒体に記録すべき所定の画像に係る画像データ、及び、前記所定の画像に係る画像データのデータサイズを含む付加情報に基づいて、前記記録媒体に前記所定の画像を記録するものであり、前記ユーザーインターフェイスには、前記所定の画像と、前記記録媒体において前記所定の画像が記録される範囲と、が入力され、前記ソース生成部は、前記ユーザーインターフェイスへの入力に基づいて、前記所定の画像に係る画像データと前記付加情報とを前記記録装置に記憶させる制御に係るプログラムのソースを生成することを特徴とする。
この構成によれば、開発者は、提供されたユーザーインターフェイスに、所定の画像と、記録媒体において所定の画像が記録される範囲を入力するという簡易な手段により、所定の画像に係る画像データ、及び、付加情報を記録装置に記憶させる制御に係るプログラムのソースを生成可能である。
Further, in the electronic device according to the invention, the recording device includes image data relating to a predetermined image to be recorded on the recording medium, and a data size of the image data relating to the predetermined image. The predetermined image is recorded on the recording medium based on additional information, and the predetermined image and a range in which the predetermined image is recorded on the recording medium are input to the user interface. The source generation unit generates a source of a program related to control for storing the image data related to the predetermined image and the additional information in the recording device based on an input to the user interface. And
According to this configuration, the developer can input image data related to the predetermined image to the provided user interface by a simple means of inputting the predetermined image and a range in which the predetermined image is recorded on the recording medium. In addition, it is possible to generate a source of a program related to control for storing additional information in the recording device.

また、上記目的を達成するために、本発明は、記録媒体に記録を行う記録装置の制御に係るプログラムの開発を支援する電子機器の制御方法であって、前記記録媒体に記録させる画像のレイアウトのユーザーインターフェイスへの入力に応じて生成されたデータに基づいて、前記記録装置に画像を記録させる制御に係るプログラムのソースを生成することを特徴とする。
この制御方法によれば、開発者は、提供されたユーザーインターフェイスに画像のレイアウトを入力するという簡易な手段により、レイアウトに準じて記録装置に画像を記録させる制御に係るプログラムのソースを容易に開発可能である。
In order to achieve the above object, the present invention provides a method for controlling an electronic device that supports development of a program related to control of a recording apparatus that records on a recording medium, and the layout of images to be recorded on the recording medium Based on data generated in response to an input to the user interface, a source of a program related to control for causing the recording apparatus to record an image is generated.
According to this control method, a developer can easily develop a source of a program related to control for causing a recording device to record an image according to the layout by a simple means of inputting the image layout to the provided user interface. Is possible.

また、上記目的を達成するために、本発明は、記録媒体に記録を行う記録装置の制御に係るプログラムの開発を支援する電子機器を制御する制御部により実行されるプログラムであって、前記制御部に、前記記録媒体に記録させる画像のレイアウトのユーザーインターフェイスへの入力に応じて生成されたデータに基づいて、前記記録装置に画像を記録させる制御に係るプログラムのソースを生成させることを特徴とする。
このプログラムを実行すれば、開発者は、提供されたユーザーインターフェイスに画像のレイアウトを入力するという簡易な手段により、レイアウトに準じて記録装置に画像を記録させる制御に係るプログラムのソースを容易に開発可能である。
In order to achieve the above object, the present invention provides a program executed by a control unit that controls an electronic device that supports development of a program related to control of a recording apparatus that performs recording on a recording medium. Generating a source of a program related to control for causing the recording apparatus to record an image based on data generated in response to an input to a user interface of an image layout to be recorded on the recording medium. To do.
If this program is executed, the developer can easily develop the source of the program related to the control that causes the recording device to record the image according to the layout by a simple means of inputting the image layout to the provided user interface. Is possible.

本発明によれば、記録装置の制御に係るプログラムの開発が容易化する。   According to the present invention, development of a program related to control of a recording apparatus is facilitated.

本実施形態に係る開発用端末の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the terminal for development which concerns on this embodiment. 記録システムの機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of a recording system. レシートの一例を示す図である。It is a figure which shows an example of a receipt. レイアウト入力ウインドウを示す図である。It is a figure which shows a layout input window. レイアウト画像データを示す図である。It is a figure which shows layout image data. プリンターの構造を模式的に示す図である。FIG. 2 is a diagram schematically illustrating the structure of a printer. トップロゴの記録に係る処理を説明するための図である。It is a figure for demonstrating the process which concerns on the recording of a top logo. ソース生成部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of a source production | generation part.

以下、図面を参照して本発明の実施形態について説明する。
図1は、本実施形態に係る開発用端末1(電子機器)の機能的構成を示すブロック図である。
この開発用端末1は、後述する記録システム10のホストコンピューター11にインストールされるプリンタードライバー12に含まれるプログラムの開発に利用される端末である。開発者、例えば、プログラム開発を含む各種システムの開発、構築を業務の目的の1つとするシステムインテグレーターに属する者は、この開発用端末1を利用して、プリンタードライバー12に含まれるプログラムのソースを開発可能である。
本実施形態の例では、開発者は、開発用端末1を利用してUPOS(UnifiedPOS)の規格に準拠したプログラムを開発するものとする。UPOSは、世界標準の規格であり、後述する記録システム10等のPOSシステムを構成するデバイスに係るインターフェイスの標準化を定義し、POSシステムにおいて各種デバイスを制御する制御装置(後述するホストコンピューター11等)上でサポートされているOLEコントロールを使用して、プログラムを容易に開発するためのAPI関数を提供している。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating a functional configuration of a development terminal 1 (electronic device) according to the present embodiment.
The development terminal 1 is a terminal used for developing a program included in a printer driver 12 installed in a host computer 11 of a recording system 10 to be described later. A developer, for example, a person who belongs to a system integrator whose purpose is the development and construction of various systems including program development, uses the development terminal 1 to obtain the source of the program included in the printer driver 12. It can be developed.
In the example of this embodiment, it is assumed that the developer uses the development terminal 1 to develop a program that complies with the UPOS (Unified POS) standard. The UPOS is a global standard, and defines standardization of interfaces related to devices constituting the POS system such as the recording system 10 described later, and a control device (host computer 11 described later) for controlling various devices in the POS system. Using the OLE controls supported above, API functions are provided to easily develop programs.

図1に示すように、開発用端末1は、端末側制御部15と、端末側入力部16と、端末側表示部17と、端末側記憶部18と、を備えている。
端末側制御部15は、開発用端末1の各部を中枢的に制御するものであり、演算実行部としてのCPUや、このCPUに実行される基本制御プログラムや、この基本制御プログラムに係るデータ等を不揮発的に記憶するROM、CPUに実行されるプログラムやこのプログラムに係るデータ等を一時的に記憶するRAM、その他の周辺回路等を備えている。端末側制御部15は、ソース生成部19を備えているが、これについては後述する。
端末側入力部16は、キーボードや、マウス等の入力デバイスに接続され、これら入力デバイスに対する操作を検出し、端末側制御部15に出力する。開発者は、キーボードやマウス等を操作して、プログラムのソースを記述する。
端末側表示部17は、液晶表示パネル等の表示パネル20を備え、端末側制御部15の制御の下、表示パネル20に各種情報を表示する。
端末側記憶部18は、ハードディスクや、EEPROM等の不揮発性メモリーを備え、各種データを書き換え可能に記憶する。端末側記憶部18に記憶されたAPI関数データベース21については、後述する。
なお、開発用端末1は、LANを介して、他の開発用端末1や、開発に利用するサーバーと通信可能に接続されている。
As shown in FIG. 1, the development terminal 1 includes a terminal-side control unit 15, a terminal-side input unit 16, a terminal-side display unit 17, and a terminal-side storage unit 18.
The terminal-side control unit 15 centrally controls each unit of the development terminal 1, and includes a CPU as a calculation execution unit, a basic control program executed by the CPU, data related to the basic control program, and the like ROM, a program executed by the CPU, a RAM that temporarily stores data related to the program, and other peripheral circuits. The terminal side control unit 15 includes a source generation unit 19, which will be described later.
The terminal side input unit 16 is connected to input devices such as a keyboard and a mouse, detects operations on these input devices, and outputs them to the terminal side control unit 15. The developer describes the source of the program by operating the keyboard and mouse.
The terminal side display unit 17 includes a display panel 20 such as a liquid crystal display panel, and displays various types of information on the display panel 20 under the control of the terminal side control unit 15.
The terminal-side storage unit 18 includes a hard disk and a nonvolatile memory such as an EEPROM, and stores various data in a rewritable manner. The API function database 21 stored in the terminal side storage unit 18 will be described later.
The development terminal 1 is communicably connected to another development terminal 1 and a server used for development via a LAN.

次いで、開発用端末1によって開発されるプリンタードライバー12が適用されるシステムである記録システム10について説明する。   Next, the recording system 10 that is a system to which the printer driver 12 developed by the development terminal 1 is applied will be described.

図2は、記録システム10の機能的構成を示すブロック図である。
記録システム10は、スーパーマーケットやコンビニエンスストア等の店舗に適用され、店舗に来店した顧客の代金の支払いに応じてレシート24(図3)を発行するシステムであり、図2に示すように、ホストコンピューター11と、POSサーバー25と、プリンター26(記録装置)とを備えている。
FIG. 2 is a block diagram showing a functional configuration of the recording system 10.
The recording system 10 is a system that is applied to a store such as a supermarket or a convenience store, and issues a receipt 24 (FIG. 3) in response to payment for a customer who has visited the store. As shown in FIG. 11, a POS server 25, and a printer 26 (recording device).

POSサーバー25は、ネットワークを介してホストコンピューター11に通信可能に接続されており、店舗で販売している商品の商品コードや、名称、金額等のレシート24の発行のために必要となる情報を示すデータをデータベースとして記憶する。ホストコンピューター11は、レシート24の発行に際し、適宜、POSサーバー25に記憶されたデータベースを参照し、必要な情報を取得する。   The POS server 25 is communicably connected to the host computer 11 via a network, and stores information necessary for issuing a receipt 24 such as a product code of a product sold at a store, a name, and an amount of money. The indicated data is stored as a database. When the receipt computer 24 issues the receipt 24, the host computer 11 refers to a database stored in the POS server 25 as appropriate, and acquires necessary information.

ホストコンピューター11は、ホスト側制御部28と、ホスト側表示部29と、ホスト側入力部30と、インターフェイス部31と、ホスト側記憶部32と、を備えている。
ホスト側制御部28は、ホストコンピューター11の各部を中枢的に制御するものであり、CPUや、ROM、RAM、その他の周辺回路等を備えている。
図2に示すように、ホスト側制御部28は、POSアプリケーション実行部34と、プリンタードライバー実行部35と、を備えているが、これらについては後述する。
The host computer 11 includes a host side control unit 28, a host side display unit 29, a host side input unit 30, an interface unit 31, and a host side storage unit 32.
The host-side control unit 28 centrally controls each unit of the host computer 11 and includes a CPU, ROM, RAM, and other peripheral circuits.
As shown in FIG. 2, the host-side control unit 28 includes a POS application execution unit 34 and a printer driver execution unit 35, which will be described later.

ホスト側表示部29は、液晶表示パネル等の表示パネルを備え、ホスト側制御部28の制御の下、表示パネルに各種情報を表示する。
ホスト側入力部30は、キーボードや、マウス、バーコードリーダー、カードリーダー等の入力デバイスに接続され、これら入力デバイスの出力信号をホスト側制御部28に出力する。バーコードリーダーは商品の包装紙等に記録されたバーコードの読み取りに利用され、カードリーダーはクレジットカードや、会員カード等に記録された情報の読み取りに利用される。バーコードリーダーやカードリーダー等の入力デバイスを用いて取得した情報は、レシート24の発行に係る処理に用いられる。
インターフェイス部31は、ホスト側制御部28の制御の下、プリンター26との間で通信規格に準拠した通信を行う。
ホスト側記憶部32は、各種データを書き換え可能に記憶する部位であり、ハードディスクや、EEPROM等の記憶装置を備えている。ホスト側記憶部32には、プリンタードライバー12が記憶されている。開発者は、上述した開発用端末1を利用して、このプリンタードライバー12に含まれる各種プログラムを開発することとなる。
The host side display unit 29 includes a display panel such as a liquid crystal display panel, and displays various types of information on the display panel under the control of the host side control unit 28.
The host-side input unit 30 is connected to input devices such as a keyboard, a mouse, a barcode reader, and a card reader, and outputs output signals from these input devices to the host-side control unit 28. The bar code reader is used for reading a bar code recorded on a product wrapping paper or the like, and the card reader is used for reading information recorded on a credit card, a member card or the like. Information acquired using an input device such as a barcode reader or a card reader is used for processing related to the receipt 24 issuance.
The interface unit 31 performs communication based on the communication standard with the printer 26 under the control of the host-side control unit 28.
The host-side storage unit 32 is a part that stores various data in a rewritable manner, and includes a storage device such as a hard disk or an EEPROM. The host-side storage unit 32 stores the printer driver 12. The developer uses the development terminal 1 described above to develop various programs included in the printer driver 12.

一方、プリンター26は、ロール状に巻かれた感熱ロール紙を、ローラー状のプラテンにより搬送し、この感熱ロール紙の記録面に、発熱素子を備えたラインサーマルヘッド37(記録部)(図6)によって熱を与えることにより画像を記録した上で、切断機構38(切断部)(図6)により所定の位置で感熱ロール紙を切断することにより、レシート24を発行するサーマルヘッド式プリンターである。
図1に示すように、プリンター26は、プリンター側制御部40と、プリンター側表示部41と、プリンター側入力部42と、プリントエンジン43と、プリンター側記憶部44と、インターフェイス部45と、を備えている。
プリンター側制御部40は、プリンター26を中枢的に制御するものであり、上述したホスト側制御部28と同様、CPUやROM、RAMその他の周辺回路等を備えている。
On the other hand, the printer 26 transports the thermal roll paper wound in a roll shape by a roller-shaped platen, and a line thermal head 37 (recording unit) (FIG. 6) provided with a heating element on the recording surface of the thermal roll paper. ) Is a thermal head type printer that issues a receipt 24 by recording an image by applying heat and cutting a thermal roll paper at a predetermined position by a cutting mechanism 38 (cutting unit) (FIG. 6). .
As shown in FIG. 1, the printer 26 includes a printer-side control unit 40, a printer-side display unit 41, a printer-side input unit 42, a print engine 43, a printer-side storage unit 44, and an interface unit 45. I have.
The printer-side control unit 40 centrally controls the printer 26, and includes a CPU, a ROM, a RAM, and other peripheral circuits, like the host-side control unit 28 described above.

プリンター側表示部41は、プリンター26の動作状態等の各種情報を表示する液晶表示パネル等の表示パネルを備え、プリンター側制御部40の制御の下、当該表示パネルに各種情報を表示する。また、プリンター側表示部41は、LEDを備え、このLEDを点灯/消灯して、プリンター26の状態を報知する。
プリンター側入力部42は、プリンター26に設けられた操作スイッチに接続され、操作スイッチに対する操作を検出し、プリンター側制御部40に出力する。
プリントエンジン43は、プリンター側制御部40の制御の下、用紙端センサーや用紙残量センサー等の各種センサーの検出値を監視しながら、上述したラインサーマルヘッド37のほか、感熱ロール紙を搬送するプラテンローラーを駆動するための搬送モーターや、上述した切断機構38が備えるカッターを駆動するためのカッター駆動モーターを動作させて、感熱ロール紙に画像を記録し、画像を記録した感熱ロール紙を切断することによりレシート24を発行する。
インターフェイス部45は、プリンター側制御部40の制御の下、プリンター26との間で通信規格に準拠した通信を行う。
プリンター側記憶部44は、ハードディスクやEEPROM等の不揮発性メモリーを備え、各種データを書き換え可能に記憶する。プリンター側記憶部44には、プリンター26の動作を制御するためのファームウェアが記憶されるほか、トップロゴ画像データ46(所定の画像に係る画像データ)、及び、付加情報47が記憶される。これらデータについては、後述する。
The printer-side display unit 41 includes a display panel such as a liquid crystal display panel that displays various types of information such as the operating state of the printer 26, and displays various types of information on the display panel under the control of the printer-side control unit 40. The printer-side display unit 41 includes an LED, and turns on / off the LED to notify the state of the printer 26.
The printer-side input unit 42 is connected to an operation switch provided in the printer 26, detects an operation on the operation switch, and outputs it to the printer-side control unit 40.
The print engine 43 conveys thermal roll paper in addition to the above-described line thermal head 37 while monitoring detection values of various sensors such as a paper edge sensor and a paper remaining amount sensor under the control of the printer-side control unit 40. The conveyance motor for driving the platen roller and the cutter drive motor for driving the cutter provided in the above-described cutting mechanism 38 are operated to record an image on the thermal roll paper, and the thermal roll paper on which the image has been recorded is cut. As a result, a receipt 24 is issued.
The interface unit 45 performs communication based on the communication standard with the printer 26 under the control of the printer-side control unit 40.
The printer-side storage unit 44 includes a nonvolatile memory such as a hard disk or an EEPROM, and stores various data in a rewritable manner. The printer-side storage unit 44 stores firmware for controlling the operation of the printer 26, and stores top logo image data 46 (image data related to a predetermined image) and additional information 47. These data will be described later.

次いで、POSアプリケーション実行部34及びプリンタードライバー実行部35の説明を通して、記録システム10がレシート24を発行する際の基本的な動作について説明する。
POSアプリケーション実行部34は、ホストコンピューター11に予めインストールされたPOSアプリケーションを実行することにより、取引毎に、適宜、POSサーバー25にアクセスした上で、取引において購入された商品を示す情報や、商品の単価を示す情報、購入金額を示す情報等のレシート24に記載すべき情報を取得し、取得した情報に基づいて、レシート24に記録すべき画像に係る記録データを生成し、プリンタードライバー実行部35に出力する。
プリンタードライバー実行部35は、ホストコンピューター11に予めインストールされたプリンタードライバー12を実行することにより、POSアプリケーション実行部34から入力された記録データに基づいて、プリンター26のコマンド仕様に対応した制御コマンドを生成し、プリンター側制御部40に出力する。この制御コマンドには、搬送機構に感熱ロール紙を搬送させるコマンドや、ラインサーマルヘッド37を駆動させるコマンド、切断機構38に感熱ロール紙を切断させるコマンド等の、プリンター26にレシート24を発行させるためのコマンドが含まれている。
制御コマンドが入力されたプリンター側制御部40は、この制御コマンドに基づいて各部を制御し、レシート24を発行する。
Next, basic operations when the recording system 10 issues the receipt 24 will be described through the description of the POS application execution unit 34 and the printer driver execution unit 35.
The POS application execution unit 34 accesses the POS server 25 as appropriate for each transaction by executing a POS application installed in the host computer 11 in advance, and information indicating a product purchased in the transaction, Information to be recorded on the receipt 24, such as information indicating the unit price of the product, information indicating the purchase price, etc., and based on the acquired information, recording data relating to an image to be recorded on the receipt 24 is generated, and a printer driver execution unit 35.
The printer driver execution unit 35 executes a printer driver 12 pre-installed in the host computer 11, thereby executing a control command corresponding to the command specification of the printer 26 based on the recording data input from the POS application execution unit 34. Generate and output to the printer-side control unit 40. This control command includes a command for causing the transport mechanism to transport the thermal roll paper, a command for driving the line thermal head 37, a command for causing the cutting mechanism 38 to cut the thermal roll paper, and the like for causing the printer 26 to issue the receipt 24. Commands are included.
The printer-side control unit 40 to which the control command is input controls each unit based on the control command and issues a receipt 24.

図3は、本実施形態に係るプリンター26により発行されるレシート24の一例を示す図である。
本実施形態では、プリンター26が発行するレシート24の先頭には必ずトップロゴ50(所定の画像、先頭画像)が記録される。トップロゴ50は、プリンター26が設置された店舗に係るロゴや、店舗の名称、その他の情報が定型化された画像である。トップロゴ50は、トップロゴ50が記録される領域として予め規定されたトップロゴ領域A1内に記録され。
また、レシート24において、トップロゴ50の下方には、レシート情報52が記録される。レシート情報52とは、商品の名称や、商品の単価、税に関する情報、支払金額、その他の一般にレシート24に記録される情報のことである。このレシート情報52は、予め規定された領域であるレシート情報領域A2内に記録される。
FIG. 3 is a diagram illustrating an example of a receipt 24 issued by the printer 26 according to the present embodiment.
In the present embodiment, a top logo 50 (predetermined image, top image) is always recorded at the top of the receipt 24 issued by the printer 26. The top logo 50 is an image in which a logo related to a store where the printer 26 is installed, a store name, and other information are standardized. The top logo 50 is recorded in a top logo area A1 defined in advance as an area where the top logo 50 is recorded.
In the receipt 24, receipt information 52 is recorded below the top logo 50. The receipt information 52 is the name of the product, the unit price of the product, information on tax, the amount of payment, and other information generally recorded on the receipt 24. The receipt information 52 is recorded in a receipt information area A2 that is a predetermined area.

次いで、プリンター26のプリンター側記憶部44に記憶されたトップロゴ画像データ46、及び、付加情報47について説明する。
上述したように、レシート24には、トップロゴ50が必ず記録される。そして、本実施形態では、トップロゴ50の画像を示す画像データが、トップロゴ画像データ46として、予め、プリンター側記憶部44に記憶された構成となっている。
このトップロゴ画像データ46は、付加情報47と対応づけられてプリンター側記憶部44に記憶される。付加情報47とは、トップロゴ画像データ46を一意に識別するための識別番号、及び、トップロゴ画像データ46のデータサイズを含む情報である。
本実施形態では、プリンター26によってトップロゴ50が記録される際、RAMに形成された所定の画像バッファーに、トップロゴ50を含むレシート24全体の画像を示す画像データ(例えば、ビットマップ形式のデータ)が展開された上で、展開された画像データに基づいて、ラインサーマルヘッド37が駆動され、感熱ロール紙にトップロゴ50を含む画像が記録される構成となっている。そして、付加情報47に含まれるデータサイズは、画像バッファーにトップロゴ画像データ46を展開する際に必要となるデータである。
レシート24の発行に際し、感熱ロール紙にトップロゴ50を記録する際は、ホストコンピューター11からプリンター26に対して、トップロゴ50の識別番号を示すコマンド、及び、トップロゴ50に係る画像を記録させるコマンドが出力される。このコマンドが入力されたプリンター26のプリンター側制御部40は、プリンター側記憶部44に記憶されたトップロゴ画像データ46を、付加情報47に基づいて所定の画像バッファーに展開し、展開したトップロゴ画像データ46に基づいて、プリントエンジン43を制御して、感熱ロール紙に対してトップロゴ50の記録を行う。
Next, the top logo image data 46 and the additional information 47 stored in the printer-side storage unit 44 of the printer 26 will be described.
As described above, the top logo 50 is always recorded on the receipt 24. In the present embodiment, image data indicating an image of the top logo 50 is stored in the printer-side storage unit 44 in advance as the top logo image data 46.
The top logo image data 46 is stored in the printer-side storage unit 44 in association with the additional information 47. The additional information 47 is information including an identification number for uniquely identifying the top logo image data 46 and the data size of the top logo image data 46.
In this embodiment, when the top logo 50 is recorded by the printer 26, image data (for example, bitmap format data) indicating an image of the entire receipt 24 including the top logo 50 in a predetermined image buffer formed in the RAM. ) Is developed, the line thermal head 37 is driven based on the developed image data, and an image including the top logo 50 is recorded on the thermal roll paper. The data size included in the additional information 47 is data required when the top logo image data 46 is developed in the image buffer.
When the top logo 50 is recorded on the thermal roll paper when the receipt 24 is issued, the host computer 11 causes the printer 26 to record a command indicating the identification number of the top logo 50 and an image related to the top logo 50. The command is output. The printer-side control unit 40 of the printer 26 to which this command is input develops the top logo image data 46 stored in the printer-side storage unit 44 in a predetermined image buffer based on the additional information 47, and develops the developed top logo. Based on the image data 46, the print engine 43 is controlled to record the top logo 50 on the thermal roll paper.

さて、上述したように、開発者は、開発用端末1を利用して、プリンタードライバー12に含まれるプログラムを開発するが、本実施形態では、開発用端末1のソース生成部19の機能により、所定のプログラムの開発の容易化が図られており、これにより、開発にかかるコストの削減、及び、開発にかかる時間の短縮が図られている。なお、ソース生成部19の機能は、CPUがプログラムを読み出して実行する等、ハードウェアとソフトウェアとの協働により実現される。
より具体的には、ソース生成部19は、開発者に対して後述する所定のユーザーインターフェイスを提供し、当該ユーザーインターフェイスに対する入力に基づいて、1.所望のレイアウトに準じてレシート24上にトップロゴ50、及び、レシート情報52が記録されるようにプリンター26を制御するための制御コマンドを出力する機能に係るプログラム(以下、便宜的に「プログラムA」という)、2.レシート24に記録すべきトップロゴ50のトップロゴ画像データ46を登録させる機能に係るプログラム(以下、便宜的に「プログラムB」という)、の2つのソースを生成する。トップロゴ画像データ46を登録させるとは、上述した付加情報47と対応づけて、トップロゴ画像データ46をプリンター側記憶部44に記憶させることをいう。
開発者は、ソース生成部19により生成されたソースを、必要に応じて改良し、また、生成されたソースをベースとして新たなソースを記述することにより、プログラムの開発が可能となり、プログラムを最初から開発する場合と比較して、容易にプログラムを開発することができる。
以下、ソース生成部19について詳述する。
Now, as described above, the developer uses the development terminal 1 to develop a program included in the printer driver 12, but in this embodiment, the function of the source generation unit 19 of the development terminal 1 The development of a predetermined program is facilitated, thereby reducing the development cost and the development time. The function of the source generation unit 19 is realized by cooperation of hardware and software, such as a CPU reading and executing a program.
More specifically, the source generation unit 19 provides a predetermined user interface, which will be described later, to the developer, and based on input to the user interface, 1. A program related to a function for outputting a control command for controlling the printer 26 so that the top logo 50 and the receipt information 52 are recorded on the receipt 24 in accordance with a desired layout (hereinafter referred to as “program A” for convenience. 2). Two sources of a program related to a function for registering the top logo image data 46 of the top logo 50 to be recorded on the receipt 24 (hereinafter referred to as “program B” for convenience) are generated. Registering the top logo image data 46 means storing the top logo image data 46 in the printer-side storage unit 44 in association with the additional information 47 described above.
The developer improves the source generated by the source generation unit 19 as necessary, and describes a new source based on the generated source, so that the program can be developed. Compared to the case of developing from the beginning, the program can be easily developed.
Hereinafter, the source generation unit 19 will be described in detail.

図4は、ソース生成部19によって提供されるユーザーインターフェイスであるレイアウト入力ウインドウ60の一例を模式的に示す図である。ソース生成部19は、開発者によってレイアウト入力ウインドウ60を表示することが指示されると、端末側表示部17を制御して、表示パネル20にレイアウト入力ウインドウ60を表示する。
図4に示すレイアウト入力ウインドウ60内の各画像は、表示パネル20において、白と黒との2色によって表現されている。
このレイアウト入力ウインドウ60は、プリンター26によって発行すべきレシート24のレイアウトのイメージを入力するためのウインドウである。レシート24のレイアウトとは、具体的には、レシート24の記録面におけるトップロゴ50、及び、レシート情報52の配置のことである。
図4に示すように、レイアウト入力ウインドウ60の中央には、矩形の枠体であるレシート枠61が表示される。このレシート枠61は、レシート24の外周に対応する枠である。
なお、図4の例では、図4における左右方向と、感熱ロール紙の幅方向とが対応し、かつ、図3における上下方向と、感熱ロール紙の長手方向とが対応するように、レシート枠61が、レイアウト入力ウインドウ60内に表示されている。このレシート枠61の大きさは固定であり、その大きさを変更することはできない。
レシート枠61に囲まれた領域において、上部には、矩形のトップロゴ枠62が設けられている。このトップロゴ枠62は、上述したトップロゴ領域A1に対応する枠であり、他の枠と比較して太さが太い太線によって描画され、これにより、他の領域と明瞭に区分されている。
このトップロゴ枠62の下方には、レシート情報枠63が設けられている。このレシート情報枠63は、上述したレシート情報領域A2に対応する枠であり、枠内に複数の斜線が描画され、これにより、他の領域と明瞭に区別されている。
FIG. 4 is a diagram schematically illustrating an example of a layout input window 60 that is a user interface provided by the source generation unit 19. When the developer is instructed to display the layout input window 60 by the developer, the source generation unit 19 controls the terminal side display unit 17 to display the layout input window 60 on the display panel 20.
Each image in the layout input window 60 shown in FIG. 4 is represented by two colors of white and black on the display panel 20.
The layout input window 60 is a window for inputting an image of the layout of the receipt 24 to be issued by the printer 26. Specifically, the layout of the receipt 24 is an arrangement of the top logo 50 and the receipt information 52 on the recording surface of the receipt 24.
As shown in FIG. 4, a receipt frame 61 that is a rectangular frame is displayed at the center of the layout input window 60. The receipt frame 61 is a frame corresponding to the outer periphery of the receipt 24.
In the example of FIG. 4, the receipt frame is such that the horizontal direction in FIG. 4 corresponds to the width direction of the thermal roll paper, and the vertical direction in FIG. 3 corresponds to the longitudinal direction of the thermal roll paper. 61 is displayed in the layout input window 60. The size of the receipt frame 61 is fixed and cannot be changed.
In the area surrounded by the receipt frame 61, a rectangular top logo frame 62 is provided at the top. The top logo frame 62 is a frame corresponding to the above-described top logo region A1, and is drawn with a thick line that is thicker than other frames, thereby clearly distinguishing from other regions.
A receipt information frame 63 is provided below the top logo frame 62. The receipt information frame 63 is a frame corresponding to the receipt information area A2 described above, and a plurality of oblique lines are drawn in the frame, thereby clearly distinguishing from other areas.

これらトップロゴ枠62、及び、レシート情報枠63のそれぞれは、レシート枠61を超えず、かつ、他の枠と互いに重ならない範囲において、所定の規則に従って、その大きさを変更可能である。
詳細には、ユーザーは、トップロゴ枠62について、上辺、下辺を上下方向に移動させ、また、右辺、左辺を左右方向に移動させることによりその大きさを変更できる。これら上下左右の辺は、トップロゴ枠62の形状が、常に矩形となるように、動きに併せて自動で伸縮する。本実施形態では、トップロゴ50は必ずレシート24の左右方向における中央に記録されるものとされ、これに対応して、トップロゴ枠62がレシート枠61の左右方向における中央に配置された状態が維持されるように、右辺の動きに同期して左辺が動き、逆に左辺の動きに同期して右辺が動く構成となっている。
また、レシート情報枠63は、上辺、下辺を上下方向に移動させ、また、右辺、左辺を左右方向に移動させることによりその大きさを変更できる。本実施形態では、レシート情報領域A2のレシート24における左右方向の位置は必ずしも中央でなくてもよいとされ、右辺、左辺は、同期して動かない。
なお、各枠における各辺の移動は、キーボードやマウスその他の入力デバイスを利用して、専用のカーソル等を動かすことにより、実行可能となっている。
Each of the top logo frame 62 and the receipt information frame 63 can be changed in size in accordance with a predetermined rule as long as it does not exceed the receipt frame 61 and does not overlap with other frames.
Specifically, the user can change the size of the top logo frame 62 by moving the upper side and the lower side in the vertical direction and moving the right side and the left side in the horizontal direction. These top, bottom, left, and right sides automatically expand and contract with the movement so that the shape of the top logo frame 62 is always rectangular. In the present embodiment, the top logo 50 is always recorded at the center in the left-right direction of the receipt 24, and the state where the top logo frame 62 is arranged at the center in the left-right direction of the receipt frame 61 is corresponding to this. In order to be maintained, the left side moves in synchronization with the movement of the right side, and conversely, the right side moves in synchronization with the movement of the left side.
The receipt information frame 63 can be changed in size by moving the upper side and the lower side in the vertical direction and moving the right side and the left side in the horizontal direction. In the present embodiment, the position of the receipt information area A2 in the left-right direction in the receipt 24 is not necessarily centered, and the right side and the left side do not move in synchronization.
The movement of each side in each frame can be executed by moving a dedicated cursor or the like using a keyboard, a mouse, or other input device.

レイアウト入力ウインドウ60において、開発者は、以下の観点から、レシート枠61におけるトップロゴ枠62、及び、レシート情報枠63のそれぞれの大きさを変更する。
すなわち、開発者は、レシート枠61におけるトップロゴ枠62、及び、レシート情報枠63の配置の関係、バランスが、プリンター26によって発行されるレシート24におけるトップロゴ領域A1、及び、レシート情報領域A2の配置の関係、バランスとなるように、各枠の大きさを変更する。
詳細は後述するが、レイアウト入力ウインドウ60における各枠の態様に基づいて、ソース生成部19は、レイアウトに準じてレシート24上にトップロゴ50、及び、レシート情報52が記録されるようにプリンター26を制御するための制御コマンドを出力する機能に係るプログラム(プログラムA)のソースを生成する。
In the layout input window 60, the developer changes the sizes of the top logo frame 62 and the receipt information frame 63 in the receipt frame 61 from the following viewpoints.
That is, the developer determines the relationship between the top logo frame 62 and the receipt information frame 63 in the receipt frame 61 and the balance of the top logo area A1 and the receipt information area A2 in the receipt 24 issued by the printer 26. The size of each frame is changed so that the relationship and balance of the arrangement are achieved.
Although details will be described later, based on the form of each frame in the layout input window 60, the source generation unit 19 causes the printer 26 to record the top logo 50 and the receipt information 52 on the receipt 24 according to the layout. A source of a program (program A) related to the function of outputting a control command for controlling the program is generated.

さらに、図4を参照し、レイアウト入力ウインドウ60において、開発者は、トップロゴ枠62内に、トップロゴ50として実際にレシート24に記録させることを望む画像を表示させることができる。
開発者によるトップロゴ枠62内への画像の表示は、例えば、以下のようにして行われる。
すなわち、レイアウト入力ウインドウ60上でトップロゴ枠62内に画像を描画できる構成とし、開発者は、レイアウト入力ウインドウ60を表示した状態で、各種入力デバイスを操作して、トップロゴ枠62内に直接画像を描画する。この場合、トップロゴ枠62内への画像の表示は、ソース生成部19の機能により実現されることとなる。
また例えば、開発者は、トップロゴ50に係る画像をデザイン可能な他のアプリケーションを予めインストールしておき、当該アプリケーションの機能によりデザインした画像を、コピーアンドペーストその他の手段により、トップロゴ枠62内に表示する。
詳細は、後述するが、ソース生成部19は、トップロゴ枠62に表示された画像に基づいて、レシート24に記録すべきトップロゴ50のトップロゴ画像データ46を登録させる機能に係るプログラム(プログラムB)のソースを生成する。
Further, referring to FIG. 4, in the layout input window 60, the developer can display an image desired to be recorded on the receipt 24 as the top logo 50 in the top logo frame 62.
The display of the image in the top logo frame 62 by the developer is performed as follows, for example.
That is, an image can be drawn in the top logo frame 62 on the layout input window 60, and the developer operates various input devices in a state where the layout input window 60 is displayed, and directly enters the top logo frame 62. Draw an image. In this case, the display of the image in the top logo frame 62 is realized by the function of the source generation unit 19.
Further, for example, the developer installs in advance another application that can design an image related to the top logo 50, and the image designed by the function of the application is copied and pasted in the top logo frame 62 by other means. To display.
Although details will be described later, the source generation unit 19 has a program (program) for registering the top logo image data 46 of the top logo 50 to be recorded on the receipt 24 based on the image displayed in the top logo frame 62. Generate the source of B).

レイアウト入力ウインドウ60において、プリンター26によって発行すべきレシート24におけるトップロゴ領域A1、及び、レシート情報領域A2の関係を踏まえて、トップロゴ枠62、レシート情報枠63のそれぞれの大きさを変更し、かつ、トップロゴ枠62にトップロゴ50に係る画像を表示した後、開発者は、レイアウト入力ウインドウ60の確定スイッチ64をクリックする等して、入力を確定する。
当該入力の確定をトリガーとして、ソース生成部19は、レイアウト画像データ70(図5)を生成する。
In the layout input window 60, the sizes of the top logo frame 62 and the receipt information frame 63 are changed based on the relationship between the top logo area A1 and the receipt information area A2 in the receipt 24 to be issued by the printer 26. In addition, after the image related to the top logo 50 is displayed in the top logo frame 62, the developer confirms the input by clicking the confirmation switch 64 in the layout input window 60.
Using the input confirmation as a trigger, the source generation unit 19 generates layout image data 70 (FIG. 5).

図5は、レイアウト画像データ70を所定の座標系に展開した様子を模式的に示す図である。
レイアウト画像データ70とは、レイアウト入力ウインドウ60において、レシート枠61に囲まれた領域に対応する画像(以下、「入力画像」という)の画像データのことである。ここでの画像データとは、2値のビットマップ形式のデータであり、データ上でドットマトリクス状に配置された各画素について、画素ごとに、黒色を示す値、又は、白色を示す値を保持している。以下、黒色を示す値を保持する画素を「黒画素」といい、また、白色を示す値を保持する画素を「白画素」という。
レイアウト画像データ70は、各画素がドットマトリクス状に配置されたデータであるため、当該画像データを所定の座標系に展開した場合、各画素の座標は、座標系において原点として定義された位置からの相対的な位置によって一意に定義される。
FIG. 5 is a diagram schematically showing a state in which the layout image data 70 is expanded in a predetermined coordinate system.
The layout image data 70 is image data of an image (hereinafter referred to as “input image”) corresponding to an area surrounded by the receipt frame 61 in the layout input window 60. The image data here is binary bitmap data, and for each pixel arranged in a dot matrix on the data, a value indicating black or a value indicating white is held for each pixel. is doing. Hereinafter, a pixel holding a value indicating black is referred to as a “black pixel”, and a pixel holding a value indicating white is referred to as a “white pixel”.
Since the layout image data 70 is data in which each pixel is arranged in a dot matrix, when the image data is expanded in a predetermined coordinate system, the coordinates of each pixel are from the position defined as the origin in the coordinate system. Is uniquely defined by the relative position of.

レイアウト画像データ70について詳述すると、図5に示すように、レイアウト画像データ70は、レイアウト入力ウインドウ60に表示されていたレシート枠61の縦横比と、レイアウト画像データ70を所定の座標系に展開したときの外周の縦横比と、が略同一となるように、横(x軸方向)nドット×縦(y軸方向)mドットに画素が展開されて形成されたデータである。なお、x軸方向と、レシート24の幅方向とが対応し、かつ、y軸方向と、レシート24の長手方向とが対応するように、所定の座標系にレイアウト画像データ70が展開されているものとする。そして、レイアウト画像データ70を座標系に展開したときに、レイアウト入力ウインドウ60のレシート枠61内に表示された画像が、その縦横比、及び、位置関係を維持したまま、座標系に表現されるように、レイアウト画像データ70の各画素は、黒画素、又は、白画素のいずれかに規定されている。
ソース生成部19は、例えば、表示パネル27にレイアウト入力ウインドウ60を表示するための描画データを取得し、取得した描画データに基づいて、レイアウト画像データ70を生成する。
The layout image data 70 will be described in detail. As shown in FIG. 5, the layout image data 70 expands the aspect ratio of the receipt frame 61 displayed in the layout input window 60 and the layout image data 70 into a predetermined coordinate system. This is data formed by developing pixels in horizontal (x-axis direction) n dots × vertical (y-axis direction) m dots so that the aspect ratio of the outer periphery is substantially the same. The layout image data 70 is developed in a predetermined coordinate system so that the x-axis direction corresponds to the width direction of the receipt 24, and the y-axis direction corresponds to the longitudinal direction of the receipt 24. Shall. When the layout image data 70 is expanded in the coordinate system, the image displayed in the receipt frame 61 of the layout input window 60 is expressed in the coordinate system while maintaining its aspect ratio and positional relationship. As described above, each pixel of the layout image data 70 is defined as either a black pixel or a white pixel.
For example, the source generation unit 19 acquires drawing data for displaying the layout input window 60 on the display panel 27, and generates layout image data 70 based on the acquired drawing data.

レイアウト画像データ70を生成後、ソース生成部19は、レイアウト画像データ70を分析し、分析結果に基づいて、上述したプログラムA、及び、プログラムBのソースを生成する。
詳述すると、まず、ソース生成部19は、プログラムBを以下のようにして生成する。
すなわち、ソース生成部19は、レイアウト画像データ70のうち、トップロゴ枠画像72(図4のトップロゴ枠62に対応する画像)に対応する領域の画像データを切り出す。上述したように、レイアウト入力ウインドウ60において、トップロゴ枠62内にはトップロゴ50として実際にレシート24に記録させるべき画像が表示されており、これに伴って、レイアウト画像データ70において、トップロゴ枠画像72に対応する領域には、トップロゴ50を示す画像の画像データが内包された状態となっている。
トップロゴ枠画像72に対応する領域の画像データを切り出した後、ソース生成部19は、切り出した画像データに対して所定のデータ整形を行って、トップロゴ画像データ46を生成する。次いで、ソース生成部19は、生成したトップロゴ画像データ46に対して、一意な識別番号を付与すると共に、当該データのデータサイズを検出する。
After generating the layout image data 70, the source generation unit 19 analyzes the layout image data 70, and generates the sources of the program A and the program B described above based on the analysis result.
More specifically, first, the source generation unit 19 generates the program B as follows.
That is, the source generation unit 19 cuts out image data of an area corresponding to the top logo frame image 72 (image corresponding to the top logo frame 62 in FIG. 4) from the layout image data 70. As described above, in the layout input window 60, an image to be actually recorded on the receipt 24 is displayed as the top logo 50 in the top logo frame 62. Accordingly, in the layout image data 70, the top logo is displayed. The area corresponding to the frame image 72 is in a state in which image data of an image showing the top logo 50 is included.
After the image data of the area corresponding to the top logo frame image 72 is cut out, the source generation unit 19 performs predetermined data shaping on the cut out image data to generate the top logo image data 46. Next, the source generation unit 19 assigns a unique identification number to the generated top logo image data 46 and detects the data size of the data.

次いで、ソース生成部19は、API関数データベース21を参照し、UPOSが提供するAPI関数を利用したプログラムであって、レシート24に記録すべきトップロゴ50のトップロゴ画像データ46を登録させる機能に係るプログラム(プログラムB)のソースを生成する。ここで生成されたプログラムBは、上述した手段によって生成したトップロゴ画像データ46を、識別番号、及び、データサイズを含む付加情報47と共に、プリンター側記憶部44に記憶させるコマンドを出力する機能を有するプログラムである。このプログラムBのソースがコンパイルされ、実行可能なロードモジュールとされた上で、ホストコンピューター11のホスト側制御部28により実行されると、ホスト側制御部28からプリンター26のプリンター側制御部40へ上記コマンドが出力され、プリンター側記憶部44にトップロゴ画像データ46が付加情報47と対応づけられて記憶されることとなる。   Next, the source generation unit 19 refers to the API function database 21 and is a program that uses the API function provided by UPOS and has a function of registering the top logo image data 46 of the top logo 50 to be recorded on the receipt 24. A source of the program (program B) is generated. The program B generated here has a function of outputting a command for storing the top logo image data 46 generated by the above-described means in the printer-side storage unit 44 together with the additional information 47 including the identification number and the data size. It is a program that has. When the source of the program B is compiled into an executable load module and executed by the host-side control unit 28 of the host computer 11, the host-side control unit 28 sends it to the printer-side control unit 40 of the printer 26. The above command is output, and the top logo image data 46 is stored in the printer-side storage unit 44 in association with the additional information 47.

ここで、本実施形態では、API関数データベース21には、当該プログラムBのソースの雛形となるソース(以下、「雛形ソースB」という)が記述されたデータが格納されている。そして、ソース生成部19は、API関数データベース21を参照して、雛形ソースBを取得し、トップロゴ画像データ46、識別番号、及び、データサイズに基づいて、雛形ソースBを適切に改変することにより、プログラムBのソースを生成可能な構成となっている。
例えば、雛形ソースBでは、トップロゴ画像データ46、識別番号、及び、データサイズに関する複数の変数が定義され、ソース生成部19は、トップロゴ画像データ46、識別番号、及び、データサイズに応じて、定義された変数のそれぞれに適切な値を入力することにより、プログラムBのソースが完成する構成となっている。
さらに、雛形ソースBは、プログラムBの機能を実現する上で最適なAPI関数が選択的に利用されると共に、開発者が属する組織や、プログラムBを成果物として提供する組織によって規定されているソースのローカルな記述ルールに即したものとなっている。
Here, in the present embodiment, the API function database 21 stores data describing a source that is a template of the source of the program B (hereinafter referred to as “model source B”). Then, the source generation unit 19 refers to the API function database 21, acquires the template source B, and appropriately modifies the template source B based on the top logo image data 46, the identification number, and the data size. Thus, the source of the program B can be generated.
For example, in the template source B, a plurality of variables relating to the top logo image data 46, the identification number, and the data size are defined, and the source generation unit 19 determines according to the top logo image data 46, the identification number, and the data size. The source of the program B is completed by inputting an appropriate value to each of the defined variables.
Further, the template source B is specified by the organization to which the developer belongs, and the organization that provides the program B as a deliverable while the API function optimal for realizing the function of the program B is selectively used. It conforms to the local description rules of the source.

このような構成のため、開発者は、レイアウト入力ウインドウ60に入力する、という簡易な作業を行うだけで、最適なAPI関数が利用され、かつ、ローカルな記述ルールに準拠したプログラムBを自動で、容易に生成可能である。特に、UPOSに規定された各規則や、組織によって規定された記述ルールは多岐に亘り、完全に把握することは困難であるが、これらルールを熟知していない者でも、容易、かつ、短時間でプログラムBのソースを生成可能である。
なお、ソース生成部19によるプログラムBのソースの生成方法は、上記に限らない。例えば、API関数データベース21に、UPOSが提供するAPI関数の一覧や、API関数を利用してソースを記述する際の規則、所定の機能を実現するプログラムのソースに利用するAPI関数の最適な組み合わせ、その他API関数を利用してプログラムのソースを生成するために必要な情報を格納する構成とし、さらに、ソース生成部19に、プログラムBのソースの生成に際し、API関数データベース21にアクセスして必要な情報を取得して、取得した情報に基づいてプログラムBのソースを生成するアルゴリズムを組み込む構成とするようにしてもよい。
Due to such a configuration, the developer simply performs a simple operation of inputting in the layout input window 60, and the program API that conforms to the local description rule is automatically used by using the optimum API function. Can be easily generated. In particular, there are a wide variety of rules defined by UPOS and description rules defined by organizations, and it is difficult to fully understand them, but even those who are not familiar with these rules can easily and quickly Can generate the source of program B.
Note that the method for generating the source of the program B by the source generation unit 19 is not limited to the above. For example, in the API function database 21, a list of API functions provided by UPOS, rules for describing sources using API functions, and optimal combinations of API functions used for program sources that realize a predetermined function In addition, it is configured to store information necessary for generating a program source using an API function, and further, the source generating unit 19 is required to access the API function database 21 when generating the source of the program B. It is also possible to adopt a configuration that incorporates an algorithm for acquiring such information and generating the source of the program B based on the acquired information.

さらに、ソース生成部19は、以下のようにしてプログラムAのソースを生成する。
すなわち、まず、ソース生成部19は、レイアウト画像データ70に基づいて、左マージン、右マージン、上端/トップロゴマージン、トップロゴ/レシート情報マージン、レシート情報/下端マージンを検出する。
図3を参照し、左マージンとは、レシート24の左端Lと、レシート情報領域A2の左端A2Lと、の離間量D1のことである。
また、右マージンとは、レシート24の右端Rと、レシート情報領域A2の右端A2Rと、の離間量D2のことである。
上端/トップロゴマージンとは、レシート24の上端Tと、トップロゴ領域A1の上端A1Tと、の離間量D3のことである。
トップロゴ/レシート情報マージンとは、トップロゴ領域A1の下端A1Bと、レシート情報領域A2の上端A2Tと、の離間量D4のことである。
レシート情報/下端マージンとは、レシート情報領域A2の下端A2Bと、レシート24の下端Bとの離間量D5のことである。
これらマージンが定まれば、レシート24におけるトップロゴ領域A1、及び、レシート情報領域A2の範囲が一意に定まることとなる。
Furthermore, the source generation unit 19 generates the source of the program A as follows.
That is, first, the source generation unit 19 detects a left margin, a right margin, a top / top logo margin, a top logo / receipt information margin, and a receipt information / bottom margin based on the layout image data 70.
Referring to FIG. 3, the left margin is a distance D1 between the left end L of the receipt 24 and the left end A2L of the receipt information area A2.
The right margin is a distance D2 between the right end R of the receipt 24 and the right end A2R of the receipt information area A2.
The upper end / top logo margin is the distance D3 between the upper end T of the receipt 24 and the upper end A1T of the top logo area A1.
The top logo / receipt information margin is a distance D4 between the lower end A1B of the top logo area A1 and the upper end A2T of the receipt information area A2.
The receipt information / lower end margin is a distance D5 between the lower end A2B of the receipt information area A2 and the lower end B of the receipt 24.
When these margins are determined, the ranges of the top logo area A1 and the receipt information area A2 in the receipt 24 are uniquely determined.

ソース生成部19は、レイアウト画像データ70に基づいて、各マージンを以下のようにして、検出する。
上端/トップロゴマージンを検出する場合を例にして説明すると、所定の座標系に展開したレイアウト画像データ70について、y軸方向で互いに隣接する2つのドットのドット間が、実際の感熱ロール紙ではどれくらいの距離に相当するのかが、実態に即して予め定められている。
これを踏まえ、上端/トップロゴマージンの値の抽出に際し、ソース生成部19は、まず、レイアウト画像データ70におけるレシート枠画像71(図4のレシート枠61に対応する画像)の上辺と、トップロゴ枠画像72(図4のトップロゴ枠62に対応する画像)の上辺との離間量(これら辺と辺との間のドット間の数)を検出し、検出した離間量と、y軸方向で互いに隣接する2つのドットのドット間の実際の感熱ロール紙における距離と、に基づいて、上端/トップロゴマージン(例えば、13mm)を検出する。
なお、このようにレイアウト画像データ70に基づいて各マージンを検出することにより、各マージンの値は、レイアウト入力ウインドウ60に対する入力に即した値となる。
Based on the layout image data 70, the source generation unit 19 detects each margin as follows.
The case of detecting the upper end / top logo margin will be described as an example. With respect to the layout image data 70 developed in a predetermined coordinate system, the distance between two dots adjacent to each other in the y-axis direction is the actual thermal roll paper. The distance corresponding to the distance is predetermined according to the actual situation.
Based on this, when extracting the value of the upper end / top logo margin, the source generation unit 19 firstly, the top side of the receipt frame image 71 (image corresponding to the receipt frame 61 in FIG. 4) in the layout image data 70 and the top logo. The amount of separation from the upper side of the frame image 72 (image corresponding to the top logo frame 62 in FIG. 4) (the number of dots between these sides) is detected, and the detected amount of separation in the y-axis direction The upper end / top logo margin (for example, 13 mm) is detected based on the distance on the actual thermal roll paper between two adjacent dots.
Note that, by detecting each margin based on the layout image data 70 in this way, the value of each margin becomes a value in accordance with the input to the layout input window 60.

以上のようにして各マージンを検出した後、ソース生成部19は、API関数データベース21を参照し、UPOSが提供するAPI関数を利用したプログラムであって、検出した各マージンに即してレシート24にトップロゴ領域A1、及び、レシート情報領域A2が形成されるように、換言すれば、所望のレイアウトに準じてレシート24上にトップロゴ50、及び、レシート情報52が記録されるように、プリンター26を制御してレシート24を発行させる一連の制御コマンドを出力するプログラム(プログラムA)のソースを生成する。このプログラムAのソースがコンパイルされ、実行可能なロードモジュールとされた上で、ホストコンピューター11のホスト側制御部28により実行されると、ホスト側制御部28からプリンター26のプリンター側制御部40へレシート24の発行に係る一連のコマンドが出力され、プリンター26によりレシート24が発行されることとなる。   After detecting each margin as described above, the source generation unit 19 refers to the API function database 21 and is a program that uses the API function provided by UPOS, and receives a receipt 24 corresponding to each detected margin. So that the top logo area A1 and the receipt information area A2 are formed, in other words, the top logo 50 and the receipt information 52 are recorded on the receipt 24 according to a desired layout. The source of the program (program A) that outputs a series of control commands for controlling the H.26 and issuing the receipt 24 is generated. When the source of the program A is compiled and made into an executable load module and executed by the host side control unit 28 of the host computer 11, it is transferred from the host side control unit 28 to the printer side control unit 40 of the printer 26. A series of commands related to issuance of the receipt 24 is output, and the receipt 24 is issued by the printer 26.

さらに、ソース生成部19は、プログラムAのソースの生成に際し、プリンター26の構造を踏まえ、以下のような処理を行う。   Further, the source generation unit 19 performs the following processing based on the structure of the printer 26 when generating the source of the program A.

図6は、プリンター26の機構を模式的に示す図である。
図6に示すように、プリンター26は、感熱ロール紙が搬送方向に搬送される搬送経路Kが形成されると共に、搬送経路K上に上述したラインサーマルヘッド37が設けられ、さらに、このラインサーマルヘッド37の搬送方向下流に感熱ロール紙を切断するための切断機構38が設けられている。
図6に示すように、ラインサーマルヘッド37によって画像が記録される記録位置T1と、切断機構38によって感熱ロール紙が切断されるカット位置T2との間には、ギャップGが形成されている。
FIG. 6 is a diagram schematically illustrating the mechanism of the printer 26.
As shown in FIG. 6, the printer 26 has a conveyance path K in which the thermal roll paper is conveyed in the conveyance direction, and the above-described line thermal head 37 is provided on the conveyance path K. A cutting mechanism 38 for cutting the heat-sensitive roll paper is provided downstream of the head 37 in the transport direction.
As shown in FIG. 6, a gap G is formed between the recording position T <b> 1 where the image is recorded by the line thermal head 37 and the cutting position T <b> 2 where the thermal roll paper is cut by the cutting mechanism 38.

図7は、トップロゴ50の記録に係る処理を説明するため、感熱ロール紙にトップロゴ50が記録される様子を模式的に示す図である。特に、図7(A)は、記録位置T1とカット位置T2との間に形成されるギャップGが、上述した上端/トップロゴマージンよりも小さい場合における処理を説明するための図であり、図7(B)は、ギャップGが、上端/トップロゴマージンよりも大きい場合における処理を説明するための図である。
図7を用いた説明では、今回のレシート24の発行の前に、同一の感熱ロール紙を用いて別のレシート24(以下、「前回のレシート24」という)が発行されているものとする。
ここで、図7(A)に示すように、記録位置T1とカット位置T2との間に形成されるギャップGが、上述した上端/トップロゴマージンよりも小さい場合、前回のレシート24の下端P11(=今回のレシートの上端P12)に対応する位置がカット位置T2に至るまで感熱ロール紙を搬送し、切断機構38により感熱ロール紙を切断した後、新たに、今回のレシート24にトップロゴ50を記録するという動作が可能である。
一方で、図7(B)に示すように、記録位置T1とカット位置T2との間に形成されるギャップGが、上端/トップロゴマージンよりも大きい場合、前回のレシート24を切断した後に、今回のレシート24に対してトップロゴ50を記録したのでは、レシート24の上端と、トップロゴ50の上端との間の距離を、上端/トップロゴマージン分の距離とすることができない。
FIG. 7 is a diagram schematically illustrating a state in which the top logo 50 is recorded on the heat-sensitive roll paper in order to explain processing related to the recording of the top logo 50. In particular, FIG. 7A is a diagram for explaining processing when the gap G formed between the recording position T1 and the cutting position T2 is smaller than the above-described upper end / top logo margin. FIG. 7B is a diagram for explaining processing when the gap G is larger than the upper end / top logo margin.
In the description using FIG. 7, it is assumed that another receipt 24 (hereinafter referred to as “previous receipt 24”) is issued using the same thermal roll paper before the current receipt 24 is issued.
Here, as shown in FIG. 7A, when the gap G formed between the recording position T1 and the cutting position T2 is smaller than the above-mentioned upper end / top logo margin, the lower end P11 of the previous receipt 24. The thermal roll paper is conveyed until the position corresponding to (= the upper end P12 of the current receipt) reaches the cut position T2, and the thermal roll paper is cut by the cutting mechanism 38, and then the top logo 50 is newly added to the current receipt 24. Can be recorded.
On the other hand, as shown in FIG. 7B, when the gap G formed between the recording position T1 and the cutting position T2 is larger than the upper end / top logo margin, after cutting the previous receipt 24, If the top logo 50 is recorded on the receipt 24 this time, the distance between the upper end of the receipt 24 and the upper end of the top logo 50 cannot be the distance corresponding to the upper end / top logo margin.

これを踏まえ、ソース生成部19は、プログラムAのソースの生成に際し、ギャップGと、上端/トップロゴマージンとを比較する。なお、ギャップGの値は、プリンター26の実態に即した値が予め記憶されているものとする。
そして、ソース生成部19は、ギャップGが、上端/トップロゴマージンよりも大きい場合は、前回のレシート24の切断に際し、感熱ロール紙の切断位置(前回のレシート24の下端に対応し、かつ、今回のレシート24の上端に対応する位置)の上流側にトップロゴ50を記録させつつ、上記切断位置がカット位置T2に対応する位置に至るまで感熱ロール紙を搬送させた後、感熱ロール紙を切断させる制御コマンドを出力する機能を有するプログラムAのソースを生成する。
これにより、ラインサーマルヘッド37の下流に、このラインサーマルヘッド37と離間して切断機構38が設けられているというプリンター26の構成を踏まえた上で、レシート24の先頭にトップロゴ50が必ず記録されるという特徴を利用して、好適なプログラムAのソースの生成が可能となる。
Based on this, the source generation unit 19 compares the gap G with the upper end / top logo margin when generating the source of the program A. It is assumed that a value corresponding to the actual state of the printer 26 is stored in advance as the value of the gap G.
When the gap G is larger than the upper end / top logo margin, the source generation unit 19 corresponds to the cutting position of the thermal roll paper (corresponding to the lower end of the previous receipt 24, and when cutting the previous receipt 24, and The top logo 50 is recorded on the upstream side of the current receipt 24 (the position corresponding to the upper end of the receipt 24), and the thermal roll paper is conveyed until the cutting position reaches the position corresponding to the cut position T2. A source of program A having a function of outputting a control command to be disconnected is generated.
Accordingly, the top logo 50 is always recorded at the top of the receipt 24 in consideration of the configuration of the printer 26 in which the cutting mechanism 38 is provided downstream from the line thermal head 37 and separated from the line thermal head 37. It is possible to generate a suitable program A source by using the feature that

なお、プログラムAのソースの生成は、上述したプログラムBのソースの生成と同様の方法によって行われる。
すなわち、API関数データベース21には、当該プログラムAのソースの雛形となるソース(以下、「雛形ソースA」という)が記述されたデータが格納されている。そして、ソース生成部19は、API関数データベース21を参照して、雛形ソースAを取得し、各マージンの値に基づいて、雛形ソースAを適切に改変することにより、プログラムAのソースを生成可能な構成となっている。なお、雛形ソースAには、ギャップGが上端/トップロゴマージンよりも小さい場合に参照されるソースと、ギャップGが上端/トップロゴマージンよりも小さい場合に参照されるソースと、の2つが用意されており、ソース生成部19は、ギャップGと、上端/トップロゴマージンとの比較結果に応じて、いずれかのソースを選択的に参照する。
例えば、雛形ソースAでは、各マージンに関する複数の変数が定義され、ソース生成部19は、検出した各マージンの値に応じて、定義された変数のそれぞれに適切な値を入力することにより、プログラムAのソースが完成する構成となっている。
さらに、雛形ソースAは、プログラムAの機能を実現する上で最適なAPI関数が選択的に利用されると共に、開発者が属する組織や、プログラムAを成果物として提供する組織によって規定されているソースの記述ルールに即したものとなっている。
このような構成のため、開発者は、レイアウト入力ウインドウ60に入力する、という簡易な作業を行うだけで、最適なAPI関数が利用され、かつ、ローカルな記述ルールに準拠したプログラムAを自動で生成可能である。特に、UPOSに規定された各規則や、組織によって規定された記述ルールは多岐に亘り、完全に把握することは困難であるが、これらルールを熟知していない者でも、容易、かつ、短時間でプログラムAのソースを生成可能である。
なお、ソース生成部19によるプログラムAのソースの生成方法は、上記に限らない。例えば、API関数データベース21に、UPOSが提供するAPI関数の一覧や、API関数を利用してソースを記述する際の規則、所定の機能を実現するプログラムのソースに利用するAPI関数の最適な組み合わせ、その他API関数を利用してプログラムのソースを生成するために必要な情報を格納する構成とし、さらに、ソース生成部19に、プログラムAのソースの生成に際し、API関数データベースにアクセスして必要な情報を取得して、取得した情報に基づいてプログラムAのソースを生成するアルゴリズムを組み込む構成とするようにしてもよい。
Note that the source of the program A is generated by the same method as the generation of the source of the program B described above.
That is, the API function database 21 stores data in which a source that is a template of the program A (hereinafter referred to as “model source A”) is described. The source generation unit 19 can generate the source of the program A by obtaining the template source A with reference to the API function database 21 and appropriately modifying the template source A based on the value of each margin. It has become a structure. The template source A includes two sources: a source that is referred to when the gap G is smaller than the upper end / top logo margin, and a source that is referred to when the gap G is smaller than the upper end / top logo margin. The source generation unit 19 selectively refers to one of the sources according to the comparison result between the gap G and the upper end / top logo margin.
For example, in the template source A, a plurality of variables related to each margin are defined, and the source generation unit 19 inputs an appropriate value to each of the defined variables according to the detected value of each margin, thereby A source is completed.
Further, the template source A is specified by the organization to which the developer belongs, or the organization that provides the program A as a deliverable, while the optimal API function for selectively realizing the function of the program A is selectively used. It conforms to the source description rules.
Due to such a configuration, the developer simply performs a simple operation of inputting in the layout input window 60, and the optimum API function is used, and the program A conforming to the local description rule is automatically generated. Can be generated. In particular, there are a wide variety of rules defined by UPOS and description rules defined by organizations, and it is difficult to fully understand them, but even those who are not familiar with these rules can easily and quickly Can generate the source of program A.
Note that the method for generating the source of the program A by the source generation unit 19 is not limited to the above. For example, in the API function database 21, a list of API functions provided by UPOS, rules for describing sources using API functions, and optimal combinations of API functions used for program sources that realize predetermined functions In addition, it is configured to store information necessary for generating the source of the program using the API function, and further, the source generating unit 19 is required to access the API function database when generating the source of the program A. The information may be acquired and an algorithm for generating the source of the program A based on the acquired information may be incorporated.

図8は、ソース生成部19の動作を示すフローチャートである。
図8のフローチャートの動作の前提として、レイアウト入力ウインドウ60が開かれ、開発者がレイアウト入力ウインドウ60に対する入力を行っているものとする。
ソース生成部19は、レイアウト入力ウインドウ60に対する入力が確定したか否かを監視する(ステップSA1)。入力の確定は、確定スイッチ64がクリックされる等して実行される。
レイアウト入力ウインドウ60に対する入力が確定した場合、ソース生成部19は、レイアウト画像データ70を生成し(ステップSA2)、生成したレイアウト画像データ70を分析してプログラムBのソースを生成する(ステップSA3)。なお、生成されたプログラムBのソースは、例えば、テキスト形式のファイル等、編集可能な態様で開発者に提供される。
次いで、ソース生成部19は、ギャップGと、上端/トップロゴマージンとを比較する(ステップSA4)。
次いで、ソース生成部19は、ギャップGと、上端/トップロゴマージンとの比較結果に基づいて、プログラムAのソースを生成する(ステップSA5)。上述したように、ソース生成部19は、ギャップGが、上端/トップロゴマージンよりも大きい場合は、感熱ロール紙の切断位置(今回のレシート24の上端に対応する位置)の上流側にトップロゴ50を記録させつつ、上記切断位置がカット位置T2に対応する位置に至るまで感熱ロール紙を搬送させた後、感熱ロール紙を切断させる制御コマンドを出力する機能を有するプログラムAのソースを生成する。
FIG. 8 is a flowchart showing the operation of the source generation unit 19.
As a premise of the operation of the flowchart of FIG. 8, it is assumed that the layout input window 60 is opened and the developer inputs to the layout input window 60.
The source generation unit 19 monitors whether or not the input to the layout input window 60 has been confirmed (step SA1). The input is confirmed by clicking the confirmation switch 64 or the like.
When the input to the layout input window 60 is confirmed, the source generation unit 19 generates the layout image data 70 (Step SA2), analyzes the generated layout image data 70, and generates the source of the program B (Step SA3). . The generated source of the program B is provided to the developer in an editable manner such as a text file.
Next, the source generation unit 19 compares the gap G with the upper end / top logo margin (step SA4).
Next, the source generation unit 19 generates the source of the program A based on the comparison result between the gap G and the upper end / top logo margin (step SA5). As described above, when the gap G is larger than the upper end / top logo margin, the source generator 19 sets the top logo upstream of the thermal roll paper cutting position (the position corresponding to the upper end of the current receipt 24). 50 is recorded, the thermal roll paper is conveyed until the cutting position reaches a position corresponding to the cutting position T2, and then the source of program A having a function of outputting a control command for cutting the thermal roll paper is generated. .

以上説明したように、本実施形態によれば、ソース生成部19は、ユーザーインターフェイスたるレイアウト入力ウインドウ60への入力に基づいて生成されたレイアウト画像データ70に基づいて、開発者によって入力されたレイアウトに準じてプリンター26に画像を記録させる制御に係るプログラムA、プログラムBのソースを生成する。
これによれば、開発者は、提供されたレイアウト入力ウインドウ60にレイアウトを入力するという簡易な手段により、レイアウトに準じてプログラムA、プログラムBのソースを容易に開発可能である。
As described above, according to the present embodiment, the source generation unit 19 uses the layout image data 70 generated based on the input to the layout input window 60 that is a user interface, and the layout input by the developer. The source of the program A and the program B related to the control for causing the printer 26 to record an image is generated according to the above.
According to this, the developer can easily develop the sources of the program A and the program B according to the layout by a simple means of inputting the layout into the provided layout input window 60.

また、本実施形態では、ソース生成部19は、レイアウト入力ウインドウ60に入力されたレイアウトに基づいてレイアウト画像データ70を生成し、生成したレイアウト画像データ70を分析して、プログラムA、Bのソースを生成する。
これによれば、ソース生成部19は、入力されたレイアウトを反映したレイアウト画像データ70に基づいて、適切にプログラムA、Bのソースを生成可能である。
In the present embodiment, the source generation unit 19 generates layout image data 70 based on the layout input to the layout input window 60, analyzes the generated layout image data 70, and generates the sources of the programs A and B Is generated.
According to this, the source generation unit 19 can appropriately generate the sources of the programs A and B based on the layout image data 70 reflecting the input layout.

また、本実施形態に係るプリンターは、感熱ロール紙を搬送し、画像を記録し、切断して、帳票たるレシート24を出力するものである。また、レイアウト入力ウインドウ60には、レシート24においてトップロゴ50、及び、レシート情報52が記録される範囲が入力される。そして、ソース生成部19は、レイアウト入力ウインドウ60への入力に基づいて、プログラムAのソースを生成する。
これによれば、開発者は、提供されたレイアウト入力ウインドウ60に、レシート24においてトップロゴ50、及び、レシート情報52が記録される範囲を入力するという簡易な手段により、レシートの出力に係るプログラムAのソースを容易に開発可能である。
In addition, the printer according to the present embodiment conveys a thermal roll paper, records an image, cuts, and outputs a receipt 24 that is a form. Further, the layout input window 60 is inputted with a range in which the top logo 50 and the receipt information 52 are recorded in the receipt 24. The source generation unit 19 generates the source of the program A based on the input to the layout input window 60.
According to this, the developer can use the simple means of inputting the range in which the top logo 50 and the receipt information 52 are recorded in the receipt 24 to the provided layout input window 60, and the program relating to the output of the receipt. The source of A can be easily developed.

また、本実施形態では、レシート24には、その先頭にトップロゴ50が記録される。また、プリンター26では、感熱ロール紙に画像を記録するラインサーマルヘッド37の下流に、感熱ロール紙を切断する切断機構が配置される。そして、ソース生成部19は、レイアウト入力ウインドウ60への入力に基づいて、レシート24におけるトップロゴ50の範囲を検出し、記録位置T1とカット位置T2との距離であるギャップGが、上端/トップロゴマージンよりも大きい場合は、感熱ロール紙の切断位置の上流側にトップロゴ50を記録させつつ、切断位置がカット位置T2に対応する位置に至るまで感熱ロール紙を搬送させて感熱ロール紙を切断させる制御に係るプログラムAのソースを生成する。
これによれば、ソース生成部19は、レシート24の先頭にトップロゴ50が記録されるという特徴を利用して、トップロゴ50を記録すべき範囲としてレイアウト入力ウインドウ60に入力された範囲に、当該トップロゴ50を記録させる動作を行わせるプログラムAのソースを生成可能である。
In the present embodiment, the top logo 50 is recorded at the top of the receipt 24. In the printer 26, a cutting mechanism for cutting the thermal roll paper is disposed downstream of the line thermal head 37 that records an image on the thermal roll paper. Then, the source generation unit 19 detects the range of the top logo 50 in the receipt 24 based on the input to the layout input window 60, and the gap G, which is the distance between the recording position T1 and the cutting position T2, is the top / top. If it is larger than the logo margin, the top logo 50 is recorded on the upstream side of the cutting position of the thermal roll paper, and the thermal roll paper is conveyed until the cutting position reaches a position corresponding to the cutting position T2. A source of the program A related to the control for cutting is generated.
According to this, the source generation unit 19 uses the feature that the top logo 50 is recorded at the top of the receipt 24, and the range that is input to the layout input window 60 as the range to record the top logo 50 is It is possible to generate the source of the program A that performs the operation of recording the top logo 50.

また、本実施形態では、プリンター26は、感熱ロール紙に記録すべきトップロゴ50に係るトップロゴ画像データ46、及び、トップロゴ画像データ46のデータサイズを含む付加情報47に基づいて、感熱ロール紙にトップロゴ50を記録するものである。また、レイアウト入力ウインドウ60には、トップロゴ50と、レシート24においてトップロゴ50が記録される範囲と、が入力される。そして、ソース生成部19は、レイアウト入力ウインドウ60への入力に基づいて、トップロゴ画像データ46、及び、付加情報47を生成し、トップロゴ画像データ46、及び、付加情報47をプリンター26に記憶させる制御に係るプログラムBのソースを生成する。
これによれば、開発者は、提供されたレイアウト入力ウインドウ60に、トップロゴ50に係る画像と、レシート24においてトップロゴ50が記録される範囲を入力するという簡易な手段により、トップロゴ画像データ46、及び、付加情報47をプリンター26に記憶させる制御に係るプログラムBのソースを生成可能である。
Further, in this embodiment, the printer 26 is based on the top logo image data 46 relating to the top logo 50 to be recorded on the thermal roll paper and the additional information 47 including the data size of the top logo image data 46. The top logo 50 is recorded on paper. The layout input window 60 is inputted with the top logo 50 and a range in which the top logo 50 is recorded on the receipt 24. Then, the source generation unit 19 generates top logo image data 46 and additional information 47 based on the input to the layout input window 60, and stores the top logo image data 46 and additional information 47 in the printer 26. The source of the program B related to the control to be generated is generated.
According to this, the developer can input top logo image data into the provided layout input window 60 by a simple means of inputting an image related to the top logo 50 and a range in which the top logo 50 is recorded on the receipt 24. 46 and the source of the program B relating to the control for storing the additional information 47 in the printer 26 can be generated.

なお、上述した実施の形態は、あくまでも本発明の一態様を示すものであり、本発明の範囲内で任意に変形および応用が可能である。
上述した実施形態では、開発用端末1によって開発されるプログラムは、プリンタードライバー12に含まれるプログラムであった。しかしながら、プリンタードライバー12に含まれるプログラムに限らず、プリンター26の制御に係るプログラムの開発に広く本発明を適用可能であり、本発明を適用すれば、開発容易性が向上する。
また、上述した実施形態では、プリンター26は、サーマル式のプリンターであったが、記録装置の形式はサーマル式に限らず、インクジェット式や、ドットインパクト式等であってもよい。
The above-described embodiment is merely an aspect of the present invention, and can be arbitrarily modified and applied within the scope of the present invention.
In the above-described embodiment, the program developed by the development terminal 1 is a program included in the printer driver 12. However, the present invention can be widely applied not only to programs included in the printer driver 12 but also to development of programs related to the control of the printer 26. By applying the present invention, ease of development is improved.
In the above-described embodiment, the printer 26 is a thermal printer. However, the recording apparatus is not limited to the thermal type, and may be an ink jet type or a dot impact type.

1…開発用端末(電子機器)、12…プリンタードライバー(プログラム)、15…端末側制御部(制御部)、19…ソース生成部、24…レシート(帳票)、26…プリンター(記録装置)、37…ラインサーマルヘッド(記録部)、38…切断機構(切断部)、46…トップロゴ画像データ(画像データ)、47…付加情報、50…トップロゴ(先頭画像、所定の画像)、60…レイアウト入力ウインドウ(ユーザーインターフェイス)。   DESCRIPTION OF SYMBOLS 1 ... Development terminal (electronic device), 12 ... Printer driver (program), 15 ... Terminal side control part (control part), 19 ... Source generation part, 24 ... Receipt (form), 26 ... Printer (recording device), 37 ... line thermal head (recording part), 38 ... cutting mechanism (cutting part), 46 ... top logo image data (image data), 47 ... additional information, 50 ... top logo (first image, predetermined image), 60 ... Layout input window (user interface).

Claims (7)

記録媒体に記録を行う記録装置の制御に係るプログラムの開発を支援する電子機器であって、
前記記録媒体に記録させる画像のレイアウトが入力されるユーザーインターフェイスと、
前記ユーザーインターフェイスへの入力に応じて生成されたデータに基づいて、前記記録装置に画像を記録させる制御に係るプログラムのソースを生成するソース生成部と、を備えることを特徴とする電子機器。
An electronic device that supports development of a program related to control of a recording apparatus that records on a recording medium,
A user interface for inputting a layout of an image to be recorded on the recording medium;
An electronic apparatus comprising: a source generation unit configured to generate a source of a program related to control for causing the recording apparatus to record an image based on data generated in response to an input to the user interface.
前記ソース生成部は、
前記ユーザーインターフェイスに入力された前記レイアウトに基づいて画像データを生成し、生成した画像データを分析して、ソースを生成することを特徴とする請求項1に記載の電子機器。
The source generation unit
The electronic apparatus according to claim 1, wherein image data is generated based on the layout input to the user interface, and the generated image data is analyzed to generate a source.
前記記録装置は、ロール紙を搬送し、該ロール紙に画像を記録し、前記画像を記録した前記ロールを切断して、帳票を出力するものであり、
前記ユーザーインターフェイスは、前記帳票において所定の画像が記録される範囲が入力され、
前記ソース生成部は、
前記ユーザーインターフェイスへの入力に基づいて、前記帳票における前記範囲に前記所定の画像を記録させるように、前記ロール紙搬送を搬送させ、前記所定の画像を記録させ、前記ロール紙を切断させる制御に係るプログラムのソースを生成することを特徴とする請求項1又は2に記載の電子機器。
The recording apparatus conveys roll paper, records an image on the roll paper, cuts the roll on which the image is recorded, and outputs a form,
The user interface is inputted with a range in which a predetermined image is recorded in the form,
The source generation unit
Based on the input to the user interface, the roll paper transport is conveyed so that the predetermined image is recorded in the range of the form, the predetermined image is recorded, and the roll paper is cut. The electronic device according to claim 1, wherein a source of the program is generated.
前記帳票は、その先頭に先頭画像が記録されるものであり、
前記記録装置は、前記ロール紙に画像を記録する記録部と、該記録部の下流に前記ロール紙を切断する切断部とが配置されるものであり、
前記ソース生成部は、
前記ユーザーインターフェイスへの入力に基づいて、前記帳票における前記先頭画像の範囲を検出し、前記記録部と前記切断部との距離が、前記帳票の先端と前記先端画像の先端との距離よりも大きい場合は、前記ロール紙の切断位置の上流側に前記先頭画像を記録させつつ、前記切断位置が前記切断部に対応する位置に至るまで前記ロール紙を搬送させて前記ロール紙を切断させる制御に係るプログラムのソースを生成することを特徴とする請求項3に記載の電子機器。
The form is one in which the top image is recorded at the top,
The recording apparatus includes a recording unit that records an image on the roll paper, and a cutting unit that cuts the roll paper downstream of the recording unit,
The source generation unit
Based on the input to the user interface, the range of the leading image in the form is detected, and the distance between the recording unit and the cutting unit is larger than the distance between the leading end of the form and the leading end of the leading image. In this case, while controlling the leading image to be recorded upstream of the cutting position of the roll paper, the roll paper is transported until the cutting position reaches a position corresponding to the cutting unit to cut the roll paper. The electronic device according to claim 3, wherein a source of the program is generated.
前記記録装置は、前記記録媒体に記録すべき所定の画像に係る画像データ、及び、前記所定の画像に係る画像データのデータサイズを含む付加情報に基づいて、前記記録媒体に前記所定の画像を記録するものであり、
前記ユーザーインターフェイスには、前記所定の画像と、前記記録媒体において前記所定の画像が記録される範囲と、が入力され、
前記ソース生成部は、
前記ユーザーインターフェイスへの入力に基づいて、前記所定の画像に係る画像データと前記付加情報とを前記記録装置に記憶させる制御に係るプログラムのソースを生成することを特徴とする請求項1又は2に記載の電子機器。
The recording apparatus records the predetermined image on the recording medium based on image data relating to a predetermined image to be recorded on the recording medium and additional information including a data size of the image data relating to the predetermined image. To record,
The user interface receives the predetermined image and a range in which the predetermined image is recorded on the recording medium,
The source generation unit
The source of a program relating to control for storing the image data relating to the predetermined image and the additional information in the recording device is generated based on an input to the user interface. The electronic device described.
記録媒体に記録を行う記録装置の制御に係るプログラムの開発を支援する電子機器の制御方法であって、
前記記録媒体に記録させる画像のレイアウトのユーザーインターフェイスへの入力に応じて生成されたデータに基づいて、前記記録装置に画像を記録させる制御に係るプログラムのソースを生成することを特徴とする電子機器の制御方法。
A method for controlling an electronic device that supports development of a program related to control of a recording apparatus that records on a recording medium,
An electronic apparatus that generates a source of a program related to control for causing the recording apparatus to record an image based on data generated in response to an input to a user interface of an image layout to be recorded on the recording medium Control method.
記録媒体に記録を行う記録装置の制御に係るプログラムの開発を支援する電子機器を制御する制御部により実行されるプログラムであって、
前記制御部に、
前記記録媒体に記録させる画像のレイアウトのユーザーインターフェイスへの入力に応じて生成されたデータに基づいて、前記記録装置に画像を記録させる制御に係るプログラムのソースを生成させることを特徴とするプログラム。
A program that is executed by a control unit that controls an electronic device that supports development of a program related to control of a recording apparatus that performs recording on a recording medium,
In the control unit,
A program for generating a source of a program related to control for causing the recording apparatus to record an image based on data generated in response to an input to a user interface of an image layout to be recorded on the recording medium.
JP2011036816A 2011-02-23 2011-02-23 Electronic apparatus, control method for electronic apparatus, and program Withdrawn JP2012174094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011036816A JP2012174094A (en) 2011-02-23 2011-02-23 Electronic apparatus, control method for electronic apparatus, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011036816A JP2012174094A (en) 2011-02-23 2011-02-23 Electronic apparatus, control method for electronic apparatus, and program

Publications (1)

Publication Number Publication Date
JP2012174094A true JP2012174094A (en) 2012-09-10

Family

ID=46976937

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011036816A Withdrawn JP2012174094A (en) 2011-02-23 2011-02-23 Electronic apparatus, control method for electronic apparatus, and program

Country Status (1)

Country Link
JP (1) JP2012174094A (en)

Similar Documents

Publication Publication Date Title
JP5810609B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP5909871B2 (en) Recording device
US20130229352A1 (en) POS System, Control System, and Control Method of a Control System
KR101429850B1 (en) Recording device and control method of a recording device
JP5728946B2 (en) CONTROL DEVICE, CONTROL DEVICE CONTROL METHOD, AND PROGRAM
JP2014215865A (en) Control device, control system, control method of control device, and program
JP6065761B2 (en) Control device and control method of control device
JP5842335B2 (en) Image recording apparatus, image recording apparatus control method, and program
US20130318145A1 (en) Media Processing Device and POS System
JP5862045B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
TWI506554B (en) Information processing device, control method of an information processing device, and storage medium storing a program executed by a control unit of the information processing device
JP2014010768A (en) Label printing system, image output program, and image output device
JP6160289B2 (en) Control device and control method of control device
JP2012113608A (en) Control device, recording system, control method of control device, and program
JP2012174094A (en) Electronic apparatus, control method for electronic apparatus, and program
JP2012106431A (en) Recording apparatus, recording system, method for controlling of recording apparatus, and program
JP5754307B2 (en) CONTROL DEVICE, CONTROL DEVICE CONTROL METHOD, AND PROGRAM
JP2012123704A (en) Control apparatus, control method of control apparatus, and program
JP6986948B2 (en) Printer device
JP2013257805A (en) Control device, control method of control device, and program
JP6127638B2 (en) Printing apparatus, printing apparatus control method, and program
JP5838742B2 (en) CONTROL DEVICE, CONTROL DEVICE CONTROL METHOD, AND PROGRAM
JP2013114292A (en) Control device, control method of the same and program
JP2014054846A (en) Control device, control method for control device, and program
JP5906606B2 (en) Control device, recording device, control method of control device, and program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140513