JP6015077B2 - Printing control apparatus, printing system, and printing control method - Google Patents

Printing control apparatus, printing system, and printing control method Download PDF

Info

Publication number
JP6015077B2
JP6015077B2 JP2012084631A JP2012084631A JP6015077B2 JP 6015077 B2 JP6015077 B2 JP 6015077B2 JP 2012084631 A JP2012084631 A JP 2012084631A JP 2012084631 A JP2012084631 A JP 2012084631A JP 6015077 B2 JP6015077 B2 JP 6015077B2
Authority
JP
Japan
Prior art keywords
print
command
printing
image
data
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.)
Active
Application number
JP2012084631A
Other languages
Japanese (ja)
Other versions
JP2013214228A5 (en
JP2013214228A (en
Inventor
英雄 中村
英雄 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2012084631A priority Critical patent/JP6015077B2/en
Priority to CN201310093903.4A priority patent/CN103365607B/en
Priority to CN201510716383.7A priority patent/CN105278895B/en
Priority to CN201510716374.8A priority patent/CN105278894B/en
Priority to TW102110757A priority patent/TWI523766B/en
Priority to RU2014143782/08A priority patent/RU2599535C2/en
Priority to KR1020157009658A priority patent/KR101547094B1/en
Priority to KR1020147000135A priority patent/KR20140018430A/en
Priority to EP13718917.1A priority patent/EP2695048A1/en
Priority to KR1020157016746A priority patent/KR101606335B1/en
Priority to PCT/JP2013/060141 priority patent/WO2013147314A1/en
Priority to US14/384,364 priority patent/US10019204B2/en
Publication of JP2013214228A publication Critical patent/JP2013214228A/en
Publication of JP2013214228A5 publication Critical patent/JP2013214228A5/ja
Application granted granted Critical
Publication of JP6015077B2 publication Critical patent/JP6015077B2/en
Priority to US16/029,183 priority patent/US10459668B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、1:1接続が前提の印刷制御コマンドで印刷装置を制御する印刷制御装置、印刷システムおよび印刷制御方法に関する。   The present invention relates to a printing control apparatus, a printing system, and a printing control method for controlling a printing apparatus with a printing control command based on a 1: 1 connection.

通常、印刷装置は、特定のカラーモードや画像形式に対応したコマンドで制御される。アプリケーションプログラマーにとって、様々なカラーモード(モノクロ画像印刷コマンド、グレースケール印刷コマンド、カラー画像印刷コマンドなど)や画像形式(ビットイメージコマンド、ラスターグラフィックスコマンド)の画像データを、印刷装置のコマンド体系に合わせて作成するのは、煩雑で開発効率が低い。このため、通常はプリンタードライバーを使用することで、コマンドの違いを意識せずに印刷プログラムを作成している(例えば、特許文献1)。例えば、POS(Point Of Sales)用周辺機器を制御するOPOSドライバーを使用すると、OPOSドライバーで、画像データをラスターグラフィックコマンドに変換するため、アプリケーションプログラマーは、画像ファイルを指定するだけで、その画像を印刷することができる。   Usually, the printing apparatus is controlled by a command corresponding to a specific color mode or image format. For application programmers, image data in various color modes (monochrome image print commands, grayscale print commands, color image print commands, etc.) and image formats (bit image commands, raster graphics commands) are matched to the command system of the printing device. It is complicated and low in development efficiency. For this reason, a printing program is usually created by using a printer driver without being aware of the difference in commands (for example, Patent Document 1). For example, when an OPOS driver that controls a POS (Point Of Sales) peripheral device is used, the OPOS driver converts image data into a raster graphic command. Therefore, an application programmer simply designates an image file and converts the image data. Can be printed.

特開2002−269550号公報JP 2002-269550 A

ところが、ホストが、ドライバーが提供されていないプラットフォーム(組込み機器、スマートフォンなどのタブレット端末、Webブラウザーのスクリプトやプラグイン等)上で動作する場合、コマンド体系を意識せずに印刷プログラムを作成することができない。その対応策として、印刷装置にドライバー機能を搭載させることが考えられるが、印刷装置にドライバーを動作させるための十分なスペックを必要とするため、合理的ではない。   However, if the host runs on a platform that does not provide a driver (such as embedded devices, tablet devices such as smartphones, web browser scripts and plug-ins, etc.), create a print program without being aware of the command system. I can't. As a countermeasure, it is conceivable to install a driver function in the printing apparatus, but it is not reasonable because the printing apparatus requires sufficient specifications for operating the driver.

本発明は、上記の問題点に鑑み、ドライバーレスのプラットフォーム上で動作するホストを用いる場合でも、アプリケーションプログラマーが、印刷装置のコマンド体系を意識することなく画像印刷プログラムを作成することが可能な印刷制御装置、印刷システムおよび印刷制御方法を提供することを課題とする。   In view of the above-described problems, the present invention enables printing that allows an application programmer to create an image printing program without being aware of the command system of the printing apparatus even when using a host that operates on a driverless platform. It is an object to provide a control device, a printing system, and a printing control method.

本発明の印刷制御装置は、カラーモードおよび画像サイズを指定する属性が付加された画像データを含む印刷データを受信する印刷データ受信部と、カラーモードおよび画像サイズに基づいて、画像データの妥当性を判定する妥当性判定部と、画像データが妥当と判定された場合、画像データを、カラーモードに対応した制御コマンドに変換し、画像印刷コマンドを生成するコマンド生成部と、画像印刷コマンドを、印刷装置に送信するコマンド送信部と、を備えたことを特徴とする。
The print control apparatus according to the present invention includes a print data receiving unit that receives print data including image data to which an attribute that specifies a color mode and an image size is added, and the validity of the image data based on the color mode and the image size. A validity determination unit that determines the image data, and if the image data is determined to be valid, the image data is converted into a control command corresponding to the color mode, and a command generation unit that generates an image print command, and an image print command, And a command transmission unit for transmitting to the printing apparatus.

本発明の印刷制御方法は、カラーモードおよび画像サイズを指定する属性が付加された画像データを含む印刷データを受信し、カラーモードおよび画像サイズに基づいて、画像データの妥当性を判定し、画像データが妥当と判定された場合、画像データを、カラーモードに対応した制御コマンドに変換して画像印刷コマンドを生成し、画像印刷コマンドを、印刷装置に送信することを特徴とする。
The print control method of the present invention receives print data including image data to which an attribute specifying a color mode and an image size is added, determines the validity of the image data based on the color mode and the image size, and When it is determined that the data is valid, the image data is converted into a control command corresponding to the color mode to generate an image print command, and the image print command is transmitted to the printing apparatus.

これらの構成によれば、印刷制御装置により、カラーモードおよび画像サイズを指定する属性が付加された画像データを含む印刷データを受信し、当該画像データを、カラーモードに対応した印刷装置用の制御コマンドに変換するため、ドライバーレスのプラットフォーム上で動作するホストを用いた場合でも、カラーモードや画像形式によって異なるコマンドの違いを印刷制御装置で吸収することができる。これにより、アプリケーションプログラマーは、印刷装置のコマンド体系を意識することなく画像を印刷させることができる。また、カラーモードおよび画像サイズに基づいて画像データの妥当性を判定するため、不正な画像データを排除し、信頼性の高い印刷結果を得ることができる。
なお、本構成は、ドライバーレスのプラットフォーム上で動作するホストを用いた場合に好適である。「ドライバーレスのプラットフォーム上で動作するホスト」とは、例えば組み込み機器や、タブレット端末などドライバーの概念が存在しない電子機器、並びにWebブラウザーのスクリプトやプラグインを用いて動作するホストなどを指す。
According to these configurations, the print control apparatus receives the print data including the image data to which the attribute specifying the color mode and the image size is added, and the image data is controlled for the printing apparatus corresponding to the color mode. Even when a host that operates on a driverless platform is used for conversion to commands, the difference in commands that differ depending on the color mode and image format can be absorbed by the print control apparatus. Thereby, the application programmer can print an image without being aware of the command system of the printing apparatus. Further, since the validity of the image data is determined based on the color mode and the image size, it is possible to eliminate illegal image data and obtain a highly reliable print result.
This configuration is suitable when a host operating on a driverless platform is used. The “host that operates on a driverless platform” refers to, for example, an embedded device, an electronic device that does not have a driver concept such as a tablet terminal, and a host that operates using a Web browser script or plug-in.

上記の印刷制御装置において、印刷データは、マークアップ言語で記述され、 妥当性判定部は、画像データのデータ量が、カラーモードに応じた1画素あたりのデータ量と、画像サイズとの乗算値に等しい場合、画像データが妥当であると判定することを特徴とする。
In the above-described print control apparatus, the print data is described in a markup language, and the validity determination unit determines that the data amount of the image data is a product of the data amount per pixel corresponding to the color mode and the image size. If the image data is equal to, it is determined that the image data is valid.

この構成によれば、容易且つ正確に画像データの妥当性を判定することができる。また、ホストは、互換性の高いマークアップ言語(XML、HTML、XHTMLなど)で印刷データを記述するため、ホストのプラットフォームを問わない。例えば、各種タブレット端末や組み込み機器など、ドライバーレスのプラットフォームで動作するホストを用いることができる。
なお、妥当性判定部の判定前に、マークアップスキーマによる印刷データの判定を行っても良い。この構成によれば、2段階のデータ判定によって、より信頼性の高い印刷結果を得ることができる。
According to this configuration, the validity of the image data can be determined easily and accurately. In addition, since the host describes the print data in a highly compatible markup language (XML, HTML, XHTML, etc.), the host platform is not limited. For example, a host that operates on a driverless platform such as various tablet terminals and embedded devices can be used.
Note that the print data may be determined by the markup schema before the determination by the validity determination unit. According to this configuration, a more reliable printing result can be obtained by two-stage data determination.

上記の印刷制御装置において、画像サイズおよびカラーモードがマークアップ言語の要素の属性として記述され、画像データが要素の内容として記述されることを特徴とする。   In the above-described print control apparatus, the image size and the color mode are described as element attributes of a markup language, and the image data is described as element contents.

この構成によれば、要素の属性と内容の関係で、画像サイズおよびカラーモードと画像データを記述するため、複雑な構造の印刷データを簡潔に記述することができる。   According to this configuration, since the image size, the color mode, and the image data are described based on the relationship between the element attributes and the contents, it is possible to simply describe the print data having a complicated structure.

上記の印刷制御装置において、コマンド生成部は、画像データが送信されたとき、画像印刷コマンドの生成前に、所定の印刷データに印刷装置の状態を取得するための状態取得コマンドを付加した印刷前コマンドを生成し、コマンド送信部は、印刷前コマンドを、印刷装置に送信し、印刷前コマンドに対する応答に基づいて、印刷装置が印刷不可能な状態であると判定した場合、印刷中止処理を行う印刷中止処理部と、を備え、印刷中止処理は、印刷中止を印刷データの送信元に通知する処理と、印刷装置への画像印刷コマンドの送信を中止する処理が含まれることを特徴とする。
In the above print control apparatus, the command generation unit adds a status acquisition command for acquiring the status of the printing apparatus to predetermined print data before generating the image print command when the image data is transmitted. A command is generated, and the command transmission unit transmits a pre-print command to the printing apparatus, and performs a print cancel process when it is determined that the printing apparatus is in a non-printable state based on a response to the pre-print command. A print cancel processing unit, and the print cancel process includes a process of notifying the transmission source of the print data of the print cancel and a process of canceling the transmission of the image print command to the printing apparatus.

この構成によれば、印刷実行前に、印刷装置が印刷可能であるか否かを判別することができる。これにより、印刷装置が印刷不可能な状態である場合、印刷中止処理を容易に行うことができる。また、印刷中止をホストに知らせるため、ホスト側で印刷装置の状態を把握することができる。
なお、印刷装置が複数台接続されている場合であって、ホストが指定した印刷装置が存在しない場合も、印刷中止処理を行うことが好ましい。
According to this configuration, it is possible to determine whether or not the printing apparatus can print before executing printing. As a result, when the printing apparatus is in a state in which printing is not possible, the print cancellation process can be easily performed. In addition, since the host is informed of the cancellation of printing, the state of the printing apparatus can be grasped on the host side.
Even when a plurality of printing apparatuses are connected and there is no printing apparatus designated by the host, it is preferable to perform the print canceling process.

この構成によれば、Webブラウザーで印刷データを生成するため、本発明をクラウドコンピューティング(パブリッククラウド・プライベートクラウド)に適用できる。
なお、印刷制御装置にHTTPサーバーを備え、且つ一連の処理をWebサービスで実装することにより、ホスト環境をネイティブアプリケーションとしても良い(組み込み機器や、タブレット端末など)。この構成によれば、ホストのプラットフォームを不問とすることができる。
According to this configuration, since the print data is generated by the Web browser, the present invention can be applied to cloud computing (public cloud / private cloud).
Note that the host environment may be a native application (embedded device, tablet terminal, etc.) by providing the print control apparatus with an HTTP server and implementing a series of processes using a Web service. According to this configuration, the host platform can be made unquestioned.

本発明の印刷システムは、カラーモードおよび画像サイズを指定する属性が付加された画像データを含む印刷データを送信するホストと、印刷データを印刷する印刷装置と、ホストから印刷データを受信する印刷データ受信部、カラーモードおよび画像サイズに基づいて画像データの妥当性を判定する妥当性判定部、画像データが妥当と判定された場合は画像データをカラーモードに対応した制御コマンドに変換して画像印刷コマンドを生成するコマンド生成部、及び画像印刷コマンドを印刷装置に送信するコマンド送信部を有する印刷制御装置と、を備えたことを特徴とする。
上記の印刷システムにおいて、ホストは、Webブラウザーを動作させるブラウザー制御部を備えると共に、印刷制御装置は、HTTPサーバーを備え、ホストは、Webブラウザーで動作するスクリプトまたはプラグインを用いて画像データを生成し、印刷制御装置に対してHTTPによる印刷要求を行うことを特徴とする。
A printing system according to the present invention includes a host that transmits print data including image data to which attributes specifying a color mode and an image size are added, a printing apparatus that prints the print data, and print data that receives the print data from the host. Validity determination unit that determines the validity of the image data based on the receiving unit, color mode, and image size. If the image data is determined to be valid, the image data is converted into a control command corresponding to the color mode and the image is printed. And a print control apparatus having a command generation section for generating a command and a command transmission section for transmitting an image print command to the printing apparatus.
In the above printing system, the host includes a browser control unit that operates a Web browser, the print control apparatus includes an HTTP server, and the host generates image data using a script or plug-in that operates on the Web browser. And a print request by HTTP is made to the print control apparatus.

この構成によれば、ドライバーレスのプラットフォーム上で動作するホストを用いる場合でも、アプリケーションプログラマーが、印刷装置のコマンド体系を意識することなく画像印刷プログラムを作成することが可能な印刷システムを実現できる。   According to this configuration, it is possible to realize a printing system that allows an application programmer to create an image printing program without being aware of the command system of the printing apparatus even when using a host that operates on a driverless platform.

なお、以下の構成を採用可能である。上記の印刷制御装置において、コマンド生成部は、画像印刷コマンドのデータ長が所定長さを超える場合、画像データを分割して、複数の画像印刷コマンドを生成することが好ましい。この構成によれば、印刷装置が印刷不可能な状態である場合など、印刷中止処理を行う場合、その処理を容易に行うことができる。例えば、画像印刷コマンドが、データ長を示す情報と、コマンド本体と、から成る場合、長大なコマンドの送信を始めた後に印刷を中止すると、そのコマンドを終了させるために(指定したデータ長分の印刷を実行させるために)、ダミーデータを送信し続ける必要があり、その分の時間と印刷用紙を無駄になるが、画像データを分割することで、その無駄を抑えることができる。
また、上記の印刷制御装置において、コマンド生成部は、複数の画像印刷コマンドのそれぞれの前に、印刷位置を移動させるための印刷位置移動コマンドを付加することが好ましい。この構成によれば、例えば印刷装置がページモードに設定されている場合など、画像印刷によって印刷位置が移動しない印刷モードの場合でも、垂直方向の印刷位置を揃えることができる。なお、「ページモード」とは、印刷領域を設定して印刷データを展開し、一括印刷するモードを指す。
また、上記の印刷制御装置において、コマンド生成部は、画像印刷コマンドの前に、印刷装置のバッファー容量を超える所定長さ以上のダミーデータを含む初期化コマンドを付加することが好ましい。この構成によれば、直前の印刷中止処理によって途切れたコマンドを補完し、処理させることができる。つまり、直前の印刷中止処理により、印刷装置のバッファー内に、当該バッファーをクリアにするためのリアルタイムコマンドであるバッファークリアコマンドが記憶されている場合でも、ダミーデータによってバッファー内が満たされるため、今回の印刷処理を正常に処理させることができる。
また、上記の印刷制御装置において、印刷中止処理には、印刷装置のバッファーをクリアにするためのリアルタイムコマンドであるバッファークリアコマンドを印刷装置に送信する処理が含まれることが好ましい。この構成によれば、前回の印刷が正常終了せず、バッファー内にコマンドが残っている場合でも、次の印刷を正常に処理させることができる。
また、上記の印刷制御装置において、複数の印刷装置と接続可能であり、ホストから送信される印刷データには、印刷対象となる印刷装置を指定する印刷装置指定情報が付加されており、コマンド送信部は、画像印刷コマンドを、印刷装置指定情報によって指定された印刷装置に送信することが好ましい。この構成によれば、印刷装置が複数台接続されているネットワーク環境下で、本発明を適用することができる。また、印刷制御装置でカラーモードや画像形式の違いを吸収できるため、複数の印刷装置として、コマンド体系の異なる複数の機種を混在させることができる。また、印刷装置の入れ替えの際も、異なる機種への変更が可能である。
また、上記の印刷制御装置において、接続されている各印刷装置から、各印刷装置の機種またはカラーモードに関する情報を含む印刷装置情報を取得する印刷装置情報取得部と、取得した各印刷装置の印刷装置情報を、ホストに通知する印刷装置情報通知部と、をさらに備え、ホストは、通知された各印刷装置の印刷装置情報を表示し、その中から印刷対象となる印刷装置を指定することが好ましい。この構成によれば、ホストに対し、印刷装置情報の取得・通知手段と、印刷装置の指定手段を提供できる。つまり、ホストによるこれらの処理を不要とすることができる。
The following configuration can be adopted. In the print control apparatus, the command generation unit preferably generates a plurality of image print commands by dividing the image data when the data length of the image print command exceeds a predetermined length. According to this configuration, when the print cancel process is performed, such as when the printing apparatus is in a non-printable state, the process can be easily performed. For example, if the image print command is composed of information indicating the data length and the command body, when printing is stopped after starting transmission of a long command, the command is terminated (for the specified data length). In order to execute printing, it is necessary to continue to transmit dummy data, and the time and printing paper for that amount are wasted. However, by dividing the image data, the waste can be suppressed.
In the above-described print control apparatus, the command generation unit preferably adds a print position movement command for moving the print position before each of the plurality of image print commands. According to this configuration, even in the print mode in which the print position does not move by image printing, for example, when the printing apparatus is set to the page mode, the vertical print positions can be aligned. The “page mode” refers to a mode in which a print area is set, print data is expanded, and batch printing is performed.
In the above print control apparatus, the command generation unit preferably adds an initialization command including dummy data having a predetermined length or more exceeding the buffer capacity of the printing apparatus before the image print command. According to this configuration, it is possible to supplement and process a command that was interrupted by the immediately preceding print cancellation process. In other words, even if a buffer clear command, which is a real-time command for clearing the buffer, is stored in the buffer of the printing device by the previous print cancellation process, the buffer is filled with dummy data. Can be processed normally.
In the above-described print control apparatus, it is preferable that the print cancellation process includes a process of transmitting a buffer clear command, which is a real-time command for clearing the buffer of the printing apparatus, to the printing apparatus. According to this configuration, even when the previous printing does not end normally and a command remains in the buffer, the next printing can be processed normally.
Further, in the above print control device, it is possible to connect to a plurality of printing devices, and printing device designation information for designating a printing device to be printed is added to the print data transmitted from the host, and a command is transmitted. The unit preferably transmits the image print command to the printing device designated by the printing device designation information. According to this configuration, the present invention can be applied in a network environment in which a plurality of printing apparatuses are connected. In addition, since the print control apparatus can absorb differences in color mode and image format, a plurality of models having different command systems can be mixed as a plurality of printing apparatuses. In addition, when changing the printing apparatus, it is possible to change to a different model.
In the printing control apparatus, a printing apparatus information acquisition unit that acquires printing apparatus information including information about the model or color mode of each printing apparatus from each connected printing apparatus, and printing of each acquired printing apparatus A printing device information notifying unit for notifying the device of the device information to the host, and the host may display the notified printing device information of each printing device and specify a printing device to be printed from among them. preferable. According to this configuration, printing device information acquisition / notification means and printing device designation means can be provided to the host. That is, these processes by the host can be made unnecessary.

本発明の一実施形態に係る印刷システムのシステム構成図である。1 is a system configuration diagram of a printing system according to an embodiment of the present invention. (a)は、Webアプリケーションサーバーの制御ブロック図であり、(b)は、ホストの制御ブロック図である。(A) is a control block diagram of the Web application server, and (b) is a control block diagram of the host. インテリジェント機能付き印刷装置の制御ブロック図である。It is a control block diagram of a printing apparatus with an intelligent function. 印刷制御装置の実装レイヤーを示す図である。It is a figure which shows the mounting layer of a printing control apparatus. 第1実施形態に係る印刷システムの機能ブロック図である。1 is a functional block diagram of a printing system according to a first embodiment. (a)は、第1実施形態に係る印刷指示コマンドのコマンド列を示す図であり、(b)は、印刷前コマンドのコマンド列を示す図である。(A) is a figure which shows the command sequence of the printing instruction command which concerns on 1st Embodiment, (b) is a figure which shows the command sequence of the command before printing. 第1実施形態に係る印刷制御の流れを示すフローチャートである。4 is a flowchart illustrating a flow of print control according to the first embodiment. 第2実施形態に係る印刷システムの機能ブロック図である。It is a functional block diagram of the printing system which concerns on 2nd Embodiment. 第2実施形態に係る空印刷コマンドのコマンド列を示す図である。It is a figure which shows the command sequence of the blank printing command which concerns on 2nd Embodiment. 第3実施形態に係る印刷システムの機能ブロック図である。It is a functional block diagram of the printing system which concerns on 3rd Embodiment. (a)は、印刷装置の仕様、搭載文字および文字コードの関係を示す表であり、(b)は、言語属性および文字コード切り替えコマンドの関係を示す表である。(A) is a table | surface which shows the relationship between the specification of a printing apparatus, a mounted character, and a character code, (b) is a table | surface which shows the relationship between a language attribute and a character code switching command. 第3実施形態に係る印刷指示コマンドのコマンド列を示す図である。It is a figure which shows the command sequence of the printing instruction command which concerns on 3rd Embodiment. 第3実施形態に係る印刷データの一例を示す図である。It is a figure which shows an example of the print data which concerns on 3rd Embodiment. (a)〜(c)は、図13の印刷データを、それぞれ日本語仕様、韓国語仕様、ANK仕様の印刷装置を用いて印刷した場合の印刷結果を示す図である。(A)-(c) is a figure which shows the printing result at the time of printing the printing data of FIG. 13 using the printing apparatus of Japanese specification, Korean specification, and ANK specification, respectively. 第3実施形態に係る印刷制御の流れを示すフローチャートである。10 is a flowchart illustrating a flow of print control according to a third embodiment. 第4実施形態に係る印刷システムの機能ブロック図である。It is a functional block diagram of the printing system which concerns on 4th Embodiment. (a)は、ラスターグラフィックスコマンドのデータ並びを示す図であり、(b)は、ビットイメージコマンドのデータ並びを示す図である。(A) is a figure which shows the data arrangement | sequence of a raster graphics command, (b) is a figure which shows the data arrangement | sequence of a bit image command. (a)〜(d)は、それぞれノーマルモード・モノクロ・分割なし、ノーマルモード・モノクロ・分割あり、ページモード・モノクロ・分割なし、ページモード・モノクロ・分割あり、の場合の印刷指示コマンドのコマンド列を示す図である。(A) to (d) are commands for print instruction commands in the normal mode, monochrome, no division, normal mode, monochrome, division, page mode, monochrome, no division, page mode, monochrome, division, respectively. It is a figure which shows a column. (a)〜(d)は、それぞれノーマルモード・グレースケール・分割なし、ノーマルモード・グレースケール・分割あり、ページモード・グレースケール・分割なし、ページモード・グレースケール・分割あり、の場合の印刷指示コマンドのコマンド列を示す図である。(A) to (d) are printing in normal mode, grayscale, no division, normal mode, grayscale, division, page mode, grayscale, no division, page mode, grayscale, division, respectively. It is a figure which shows the command sequence of an instruction command. (a)〜(d)は、それぞれノーマルモード・カラー・分割なし、ノーマルモード・カラー・分割あり、ページモード・カラー・分割なし、ページモード・カラー・分割あり、の場合の印刷指示コマンドのコマンド列を示す図である。(A) to (d) are commands for print instruction commands in the normal mode, color, no division, normal mode, color, division, page mode, color, no division, page mode, color, division, respectively. It is a figure which shows a column. 第4実施形態に係る印刷データの一例を示す図である。It is a figure which shows an example of the print data which concerns on 4th Embodiment. (a)は、画像ファイルの一例を示す図であり、(b),(c)は、図21の印刷データを、それぞれモノクロ印刷対応、モノクロ印刷・4ビットグレースケール対応の印刷装置を用いて印刷した場合の印刷結果を示す図である。(A) is a figure which shows an example of an image file, (b), (c) is the printing data of FIG. 21 using the printing apparatus corresponding to monochrome printing and monochrome printing / 4-bit gray scale, respectively. It is a figure which shows the printing result at the time of printing. 第4実施形態に係る印刷制御の流れを示すフローチャートである。10 is a flowchart illustrating a flow of print control according to a fourth embodiment. (a)は、インテリジェント機能付き印刷装置を親機とし、インテリジェント機能を搭載していない複数台の印刷装置を子機とした場合のシステム構成を示す図であり、(b)は、複数の印刷制御装置で複数の印刷装置を共有した場合のシステム構成を示す図である。(A) is a diagram showing a system configuration when a printing apparatus with an intelligent function is a master unit and a plurality of printing apparatuses not equipped with an intelligent function are slave units, (b) is a diagram showing a plurality of printing FIG. 3 is a diagram illustrating a system configuration when a plurality of printing apparatuses are shared by a control apparatus.

以下、添付の図面を参照し、本発明に係る印刷システムSYについて説明する。通常、タブレット端末やスマートフォンから印刷を行う場合、端末のOSに準拠した印刷アプリケーションや印刷ドライバーを、OS毎に準備する必要がある。これに対し、本発明の印刷システムSYでは、印刷ドライバーに相当するXML(Extensible Markup Language) Webサービスプリント機能(印刷制御装置)を印刷装置に搭載しているため、OSに依存することなく印刷を行うことができる。つまり、ホスト側に、専用の印刷ドライバーをインストールすることなく、Webブラウザーを用いて印刷装置を動作させるができる。以下、XML Webサービスプリント機能を搭載した印刷装置を「インテリジェント機能付き印刷装置」と称する。これに対し、XML Webサービスプリント機能を搭載していない印刷装置を、単に「印刷装置」と称する。   Hereinafter, a printing system SY according to the present invention will be described with reference to the accompanying drawings. Usually, when printing is performed from a tablet terminal or a smartphone, it is necessary to prepare a print application and a print driver compliant with the OS of the terminal for each OS. On the other hand, in the printing system SY of the present invention, an XML (Extensible Markup Language) Web service print function (print control device) corresponding to a print driver is installed in the printing device, so that printing can be performed without depending on the OS. It can be carried out. That is, the printing apparatus can be operated using a Web browser without installing a dedicated print driver on the host side. Hereinafter, a printing apparatus equipped with the XML Web service print function is referred to as a “printing apparatus with an intelligent function”. On the other hand, a printing apparatus not equipped with the XML Web service print function is simply referred to as “printing apparatus”.

[全体構成]
図1〜図4を参照し、各実施形態の説明に先立ち、印刷システムSYの全体構成から説明する。図1は、印刷システムSYのシステム構成図である。印刷システムSYは、Webアプリケーションサーバー10と、複数台のホスト20ホストa、ホストb)と、印刷制御装置31と、複数台の印刷装置32(印刷装置A、印刷装置B)と、から成る。なお、印刷制御装置31と1台の印刷装置32(印刷装置A)は、インテリジェント機能付き印刷装置30として印刷システムSY内に組み込まれている。したがって、印刷装置Aと印刷装置Bは、親機−子機の関係となる。
[overall structure]
The overall configuration of the printing system SY will be described with reference to FIGS. FIG. 1 is a system configuration diagram of the printing system SY. The printing system SY includes a Web application server 10, a plurality of hosts 20 (host a, host b), a print control device 31, and a plurality of printing devices 32 (printing device A and printing device B). The printing control device 31 and one printing device 32 (printing device A) are incorporated in the printing system SY as the printing device 30 with an intelligent function. Therefore, the printing apparatus A and the printing apparatus B have a parent machine-child machine relationship.

Webアプリケーションサーバー10とホスト20は、インターネット等のネットワークを介して接続される。また、ホスト20と印刷制御装置31は、有線/無線LAN等のネットワークを介して接続される。なお、ホスト20は、例えば小売店のレジカウンターに設置されるPOS(Point Of Sales)端末である。また、インテリジェント機能付き印刷装置30および印刷装置32は、例えば会計レシートを発行するレシートプリンター、または厨房に設置されるキッチンプリンターである。   The web application server 10 and the host 20 are connected via a network such as the Internet. The host 20 and the print control apparatus 31 are connected via a network such as a wired / wireless LAN. The host 20 is a POS (Point Of Sales) terminal installed at a cash register counter of a retail store, for example. The intelligent function-equipped printing device 30 and the printing device 32 are, for example, a receipt printer that issues an accounting receipt, or a kitchen printer installed in a kitchen.

続いて、図2および図3を参照し、Webアプリケーションサーバー10、ホスト20およびインテリジェント機能付き印刷装置30の制御構成について説明する。図2(a)は、Webアプリケーションサーバー10の制御構成を示す図である。Webアプリケーションサーバー10は、制御部11、通信部12および記憶部13の他、一般的なコンピューターに搭載される不図示のハードウェア構成を有している。制御部11は、CPU(Central Processing Unit)、ROM(Read Only Memory)およびRAM(Random Access Memory)等により構成される。記憶部13は、例えばHDD(Hard Disk Drive)であり、HTTPサーバー15およびWebアプリケーション16を記憶している。   Next, the control configuration of the Web application server 10, the host 20, and the intelligent function printing apparatus 30 will be described with reference to FIGS. FIG. 2A is a diagram illustrating a control configuration of the Web application server 10. The Web application server 10 has a hardware configuration (not shown) mounted on a general computer, in addition to the control unit 11, the communication unit 12, and the storage unit 13. The control unit 11 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. The storage unit 13 is, for example, an HDD (Hard Disk Drive), and stores an HTTP server 15 and a Web application 16.

通信部12は、ホスト20(Webブラウザー27)と通信を行なうためのインターフェースである。このWebアプリケーションサーバー10とホスト20との通信は、HTTPサーバー15によりHTTP(Hypertext Transfer Protocol)に基づいて行なわれる。すなわち、Webアプリケーションサーバー10は、ホスト20(Webブラウザー27)からのHTTPリクエストを受け付け、このHTTPリクエストに含まれるURL(Uniform Resource Locator)に基づいて、Webアプリケーション16が提供するWebページ40(図1参照)をホスト20に送信する。   The communication unit 12 is an interface for communicating with the host 20 (Web browser 27). Communication between the Web application server 10 and the host 20 is performed by the HTTP server 15 based on HTTP (Hypertext Transfer Protocol). That is, the Web application server 10 receives an HTTP request from the host 20 (Web browser 27), and the Web page 40 (FIG. 1) provided by the Web application 16 based on a URL (Uniform Resource Locator) included in the HTTP request. Reference) is transmitted to the host 20.

このWebページ40には、Webページ40自体を制御するためのページ制御スクリプト(JavaScript(登録商標))や、印刷制御を行うための印刷制御スクリプト(JavaScript(登録商標))などが組み込まれている。ホスト20は、Webブラウザー27において(Webページ40の内部で)印刷制御スクリプトを実行することにより、印刷処理を行う。   The web page 40 incorporates a page control script (JavaScript (registered trademark)) for controlling the web page 40 itself, a print control script (JavaScript (registered trademark)) for performing print control, and the like. . The host 20 performs a printing process by executing a print control script in the web browser 27 (inside the web page 40).

図2(b)は、ホスト20の制御構成を示す図である。ホスト20は、制御部21、表示部22、通信部23、記憶部24および操作部25を備えている。制御部21は、CPU等を有し、ホスト20全体を制御する。   FIG. 2B is a diagram illustrating a control configuration of the host 20. The host 20 includes a control unit 21, a display unit 22, a communication unit 23, a storage unit 24, and an operation unit 25. The control unit 21 has a CPU and the like and controls the entire host 20.

表示部22は、Webブラウザー27上に、当該Webブラウザー27により取得(ダウンロード)したWebページ40を表示したり、Webブラウザー27の操作に伴う各種通知画面や各種設定画面を表示する。操作部25は、Webブラウザー27で表示したWebページ40において、印刷指示等の各種操作を行うために用いられる。例えば、ホスト20がPOS端末であり、Webアプリケーション16がPOSアプリケーションである場合、Webページ40として、バーコード読取結果(購入商品の商品名、単価、数量等)や、会計結果を表示する。また、ホスト20に設けられた「会計キー」の押下(操作部25の操作)により、印刷指示が行われる。なお、表示部22と操作部25は、別々のハードウェアとして構成しても良いし、タッチパネルとして一体に構成しても良い。   The display unit 22 displays a web page 40 acquired (downloaded) by the web browser 27 on the web browser 27, and displays various notification screens and various setting screens associated with operations of the web browser 27. The operation unit 25 is used to perform various operations such as a print instruction on the Web page 40 displayed by the Web browser 27. For example, when the host 20 is a POS terminal and the Web application 16 is a POS application, the barcode reading result (product name, unit price, quantity, etc. of the purchased product) and the accounting result are displayed as the Web page 40. In addition, a printing instruction is performed by pressing an “accounting key” provided on the host 20 (operation of the operation unit 25). The display unit 22 and the operation unit 25 may be configured as separate hardware, or may be configured integrally as a touch panel.

通信部23は、Webアプリケーションサーバー10および印刷制御装置31と通信を行なうためのインターフェースである。上述のとおり、ホスト20は、Webブラウザー27を用いて、Webアプリケーションサーバー10および印刷制御装置31と通信を行う。   The communication unit 23 is an interface for communicating with the Web application server 10 and the print control device 31. As described above, the host 20 communicates with the Web application server 10 and the print control device 31 using the Web browser 27.

記憶部24は、例えばHDDであり、Webブラウザー27を記憶している。本実施形態では、Webブラウザー27として、プラグインモジュールをサポートしない単機能ブラウザ(標準のブラウザ)を用いる。制御部21は、このWebブラウザー27により、通信部23を介してWebアプリケーションサーバー10にアクセスし、Webアプリケーション16が提供するWebページ40を取得する。   The storage unit 24 is an HDD, for example, and stores a web browser 27. In the present embodiment, a single function browser (standard browser) that does not support plug-in modules is used as the Web browser 27. The control unit 21 uses the web browser 27 to access the web application server 10 via the communication unit 23 and acquires the web page 40 provided by the web application 16.

また、Webページ40には、上述のとおり、ページ制御スクリプトおよび印刷制御スクリプトが組み込まれている。Webブラウザー27が、Webページ40に組み込まれたページ制御スクリプトによりユーザーの印刷指示操作を受付けると、同じくWebページ40に組み込まれた印刷制御スクリプトを実行して、XML言語で記述した印刷データを生成し、印刷制御装置31に送信する。   Further, as described above, the page control script and the print control script are incorporated in the Web page 40. When the Web browser 27 accepts a user's print instruction operation using the page control script embedded in the Web page 40, the print control script also embedded in the Web page 40 is executed to generate print data described in the XML language. To the print control apparatus 31.

なお、ホスト20は、Webブラウザー27が動作するコンピューターであれば良く、POS端末、タブレット端末、スマートフォンおよびパーソナルコンピューターなど、その種類を問わない。また、上述のとおりドライバーレスの構成であるため、OSの種類も問わない。したがって、異なるプラットフォーム上で動作する複数台のホスト20を、同じ印刷システムSY内で混在させることができる。   The host 20 may be a computer on which the web browser 27 operates, and may be any type such as a POS terminal, a tablet terminal, a smartphone, and a personal computer. Moreover, since it is a driverless structure as described above, the type of OS is not limited. Therefore, a plurality of hosts 20 operating on different platforms can be mixed in the same printing system SY.

図3は、インテリジェント機能付き印刷装置30の制御構成を示す図である。上述のとおり、インテリジェント機能付き印刷装置30は、印刷制御装置31と印刷装置32を組み合わせたものである。また、本実施形態の印刷制御装置31は、インターフェースボードとして、印刷装置32に着脱可能に装着される。なお、印刷制御装置31を別体の制御ボックスとして、印刷装置32に外付け(接続)する構成でも良い。   FIG. 3 is a diagram illustrating a control configuration of the printing apparatus 30 with an intelligent function. As described above, the printing device 30 with the intelligent function is a combination of the printing control device 31 and the printing device 32. Further, the print control device 31 of the present embodiment is detachably attached to the printing device 32 as an interface board. The print control device 31 may be externally connected (connected) to the print device 32 as a separate control box.

印刷制御装置31は、制御部41、ボード側インターフェース42、記憶部43および通信部44を備えている。制御部41は、CPU等を有し、印刷制御装置31全体を制御する。ボード側インターフェース42は、印刷装置32(印刷装置側インターフェース55)との通信を行う。記憶部43は、例えば不揮発性メモリー(フラッシュROM等)であり、HTTPサーバー46および印刷装置リスト47を記憶している。印刷装置リスト47は、各印刷装置32の印刷装置情報57を列記したものである。印刷制御装置31は、接続されている各印刷装置32(印刷装置A、印刷装置B)と通信し、機種名、搭載文字、カラーモード、画像形式等を含む印刷装置情報57を取得して、印刷装置リスト47に格納する。   The print control device 31 includes a control unit 41, a board side interface 42, a storage unit 43, and a communication unit 44. The control unit 41 has a CPU and the like, and controls the entire print control apparatus 31. The board side interface 42 communicates with the printing device 32 (printing device side interface 55). The storage unit 43 is, for example, a non-volatile memory (flash ROM or the like), and stores an HTTP server 46 and a printing device list 47. The printing device list 47 lists the printing device information 57 of each printing device 32. The print control device 31 communicates with each connected printing device 32 (printing device A, printing device B), acquires printing device information 57 including a model name, installed characters, a color mode, an image format, and the like, Stored in the printing device list 47.

通信部44は、ホスト20および他の印刷装置32(印刷装置B)との通信を行うものであり、LANインターフェースおよびUSBインターフェース等のインターフェース群から成る。印刷制御装置31とホスト20(Webブラウザー27)との通信は、HTTPサーバー46によりHTTPに基づいて行われる。すなわち、ホスト20から、印刷制御装置31に一意に割り当てられたサービスエンドポイントアドレス(http://x.x.x.x/などのURL)に対して印刷データが送信されると、印刷制御装置31は当該印刷データを受信する。   The communication unit 44 communicates with the host 20 and the other printing device 32 (printing device B), and includes a group of interfaces such as a LAN interface and a USB interface. Communication between the print control device 31 and the host 20 (Web browser 27) is performed by the HTTP server 46 based on HTTP. That is, when print data is transmitted from the host 20 to a service endpoint address (URL such as http: // xxxx /) uniquely assigned to the print control apparatus 31, the print control apparatus 31 receives the print data. Receive.

印刷制御装置31は、受信した印刷データ(XML文書)を、印刷装置32用の印刷制御コマンド(ESC/POS(登録商標)コマンド)に変換し、各印刷装置32に送信する。印刷制御コマンドは、例えばESC(xn・・・)の形式であり、「n」によりデータ長を示している。また、サービスエンドポイントアドレスには、印刷を実行させる印刷装置32の印刷装置ID(印刷装置指定情報)も含まれている。印刷制御装置31は、当該印刷装置IDにより指定された印刷装置32を出力先として、印刷制御コマンドを送信する。なお、印刷制御装置31は、ホスト20のWebブラウザー27上で動作する印刷制御スクリプトから、クロスドメイン(クロスオリジン)通信の要求を受信した場合、これを許可する応答(XML文書)を行う。   The print control device 31 converts the received print data (XML document) into a print control command (ESC / POS (registered trademark) command) for the printing device 32 and transmits it to each printing device 32. The print control command is in the form of, for example, ESC (xn...), And “n” indicates the data length. The service endpoint address also includes the printing device ID (printing device designation information) of the printing device 32 that executes printing. The print control device 31 transmits a print control command using the printing device 32 specified by the printing device ID as an output destination. When the print control apparatus 31 receives a request for cross-domain (cross-origin) communication from a print control script that runs on the web browser 27 of the host 20, the print control apparatus 31 sends a response (XML document) that permits the request.

印刷装置32は、制御部51、記憶部52、印刷機構53、バッファー54および印刷装置側インターフェース55を備えている。制御部51は、CPU等を有し、印刷装置32全体を制御する。記憶部52は、印刷装置情報57(印刷装置32自身の機種名、搭載文字、カラーモード、画像形式等)を記憶している。印刷機構53は、印刷ヘッド、用紙送り機構、用紙切断機構などを含み、制御部51の制御下で印刷動作を行う。なお、印刷方式は、インクジェット方式やレーザー方式など、その種類を問わない。   The printing device 32 includes a control unit 51, a storage unit 52, a printing mechanism 53, a buffer 54, and a printing device side interface 55. The control unit 51 includes a CPU and the like, and controls the entire printing apparatus 32. The storage unit 52 stores printing device information 57 (the model name, installed characters, color mode, image format, etc. of the printing device 32 itself). The printing mechanism 53 includes a print head, a paper feeding mechanism, a paper cutting mechanism, and the like, and performs a printing operation under the control of the control unit 51. In addition, the printing system does not ask | require the kind, such as an inkjet system and a laser system.

バッファー54は、受信データ(印刷制御コマンド)を一時的に格納しておくための受信バッファーである。印刷機構53は、バッファー54に格納されているデータを順次読み出して印刷を行う。印刷装置側インターフェース55は、印刷制御装置31(ボード側インターフェース42)との通信を行う。印刷装置32は、当該印刷装置側インターフェース55を介して印刷制御装置31から印刷制御コマンドを受信し、これに基づいて印刷を行う。また、その印刷結果を、印刷装置側インターフェース55を介して、印刷制御装置31に出力する。さらに、印刷装置32は、印刷制御コマンドとして状態取得コマンドが送信された場合、自装置内の状態(ステータス)を検出し、印刷制御装置31に送信する。印刷制御装置31は、これら印刷結果やステータス(コマンドレスポンス)を、XML文書に変換して、ホスト20に返信する。   The buffer 54 is a reception buffer for temporarily storing reception data (print control command). The printing mechanism 53 sequentially reads out the data stored in the buffer 54 and performs printing. The printing apparatus side interface 55 communicates with the printing control apparatus 31 (board side interface 42). The printing device 32 receives a print control command from the print control device 31 via the printing device-side interface 55, and performs printing based on this command. Further, the printing result is output to the printing control apparatus 31 via the printing apparatus side interface 55. Further, when the status acquisition command is transmitted as the print control command, the printing device 32 detects the status (status) in the own device and transmits it to the print control device 31. The print control device 31 converts these print results and status (command response) into an XML document and sends it back to the host 20.

次に、図4を参照し、印刷制御装置31の実装レイヤーについて説明する。印刷制御装置31の実装レイヤーは、下位相から、ハードウェア、OS、Webサーバー(HTTPサーバー46)、が順に積層され、さらに最上位層として、複数の印刷Webサービス(XML Webサービスプリント機能)およびデバイス登録Webアプリケーションが積層されている。   Next, a mounting layer of the print control apparatus 31 will be described with reference to FIG. The mounting layer of the print control device 31 is a stack of hardware, OS, and Web server (HTTP server 46) in that order from the bottom, and a plurality of print Web services (XML Web service print function) and Device registration Web applications are stacked.

ここで、印刷Webサービスは、XML文書から印刷制御コマンドへの変換など、本実施形態の主要部を為す機能である。この印刷Webサービスを複数備えたことで、複数台のホスト20から印刷データを受信し、複数の印刷装置32に対して印刷を実行させたり、各印刷装置32の印刷結果を印刷データの送信元となる各ホスト20に返信させたりなど、複数の処理を並行して実行することができる。例えば、同図の例では、印刷Webサービスを10プロセス設けているため、10個のプロセス(スレッド)を同時処理可能である。但し、1台の印刷装置32に対して複数の印刷データが送信された場合は、印刷権を獲得した順(印刷ポートを確保した順)に処理を行う。   Here, the print Web service is a function that forms the main part of the present embodiment, such as conversion from an XML document to a print control command. By providing a plurality of print Web services, print data is received from a plurality of hosts 20, and printing is performed on a plurality of printing devices 32, or the printing results of each printing device 32 are transmitted from the print data transmission source. It is possible to execute a plurality of processes in parallel, such as causing each host 20 to reply. For example, in the example of FIG. 10, 10 processes (threads) can be processed simultaneously because 10 print Web services are provided. However, when a plurality of print data is transmitted to one printing apparatus 32, the processing is performed in the order in which the print right is acquired (the order in which the print ports are secured).

また、デバイス登録Webアプリケーションは、印刷装置32のプリンターID、機種名およびポート情報(IPアドレス)を登録するためのアプリケーションである。これらの情報は、HTTPサーバー46によって提供される設定ページ(Webページ)をWebブラウザー27によって表示させ、ユーザーが操作部25を用いて入力を行うことにより登録される。また、登録されたこれらの情報は、印刷装置リスト47(図3参照)に格納される。   The device registration Web application is an application for registering the printer ID, model name, and port information (IP address) of the printing apparatus 32. These pieces of information are registered when a setting page (Web page) provided by the HTTP server 46 is displayed by the Web browser 27 and input by the user using the operation unit 25. The registered information is stored in the printing apparatus list 47 (see FIG. 3).

[第1実施形態]
次に、図5ないし図7を参照し、本発明の第1実施形態について説明する。第1実施形態では、ホスト20と印刷装置32が多:1または多:多の構成でも、1:1接続が前提となる印刷制御コマンド(ESC/POS(登録商標)コマンド)を用いて印刷装置32を制御することを課題とする。そこで、当該課題を解決するための構成について主に説明する。
[First Embodiment]
Next, a first embodiment of the present invention will be described with reference to FIGS. In the first embodiment, even when the host 20 and the printing device 32 are configured in a multi: 1 or multi: many configuration, a printing device that uses a print control command (ESC / POS (registered trademark) command) that assumes a 1: 1 connection is used. It is an object to control 32. Therefore, a configuration for solving the problem will be mainly described.

図5は、第1実施形態に係る印刷システムSY1の機能ブロック図である。同図に示すように、ホスト20は、主な機能構成として、ブラウザー制御部71、印刷データ生成部72、印刷データ送信部73、応答受信部74、印刷装置情報表示部75および印刷装置指定部76を備えている。   FIG. 5 is a functional block diagram of the printing system SY1 according to the first embodiment. As shown in the figure, the host 20 includes a browser control unit 71, a print data generation unit 72, a print data transmission unit 73, a response reception unit 74, a printing device information display unit 75, and a printing device designation unit as main functional configurations. 76.

ブラウザー制御部71は、Webブラウザー27を動作させる。印刷データ生成部72は、Webブラウザー27上で動作する印刷制御スクリプトを用いて、XML言語で記述した印刷データを生成する。印刷データ送信部73は、生成した印刷データに印刷装置IDを付加して、印刷制御装置31に送信する。なお、印刷装置IDは、後述する印刷装置指定部76の指定結果に基づいて付加される。   The browser control unit 71 operates the web browser 27. The print data generation unit 72 generates print data described in the XML language using a print control script that runs on the Web browser 27. The print data transmission unit 73 adds a printing apparatus ID to the generated print data and transmits it to the print control apparatus 31. The printing device ID is added based on the designation result of the printing device designation unit 76 described later.

応答受信部74は、印刷制御装置31から、印刷装置32の印刷結果およびステータスを、XML文書として受信する。印刷装置情報表示部75は、印刷制御装置31から通知された各印刷装置32の印刷装置情報57を、表示部22に表示する。印刷装置指定部76は、印刷装置情報57に基づいて、印刷対象となる印刷装置32を指定する。つまりユーザーは、表示された印刷装置情報57を参照して、所望の印刷装置32を決定し、操作部25を用いて指定する。   The response receiving unit 74 receives the printing result and status of the printing device 32 from the print control device 31 as an XML document. The printing device information display unit 75 displays the printing device information 57 of each printing device 32 notified from the printing control device 31 on the display unit 22. The printing device designation unit 76 designates the printing device 32 to be printed based on the printing device information 57. That is, the user refers to the displayed printing device information 57 to determine a desired printing device 32 and designates it using the operation unit 25.

印刷制御装置31は、主な機能構成として、印刷データ受信部81、コマンド生成部82、コマンド送信部83、応答取得部84、応答返信部85、印刷中止処理部86、印刷装置情報取得部87、印刷装置情報記憶部88および印刷装置情報通知部89を備えている。   The print control apparatus 31 includes a print data reception unit 81, a command generation unit 82, a command transmission unit 83, a response acquisition unit 84, a response return unit 85, a print cancellation processing unit 86, and a printing device information acquisition unit 87 as main functional configurations. , A printing apparatus information storage unit 88 and a printing apparatus information notification unit 89 are provided.

印刷データ受信部81は、ホスト20から、XML言語で記述された印刷データを受信する。コマンド生成部82は、印刷指示コマンドや印刷前コマンド等の印刷制御コマンドを生成する。前者の印刷指示コマンドは、ホスト20から送信された印刷データに基づくコマンドであり、後者の印刷前コマンドは、印刷指示コマンドの生成前に、印刷装置32の状態確認のために生成されるコマンドである。コマンド送信部83は、生成された印刷制御コマンドを、印刷装置32に対して送信する。   The print data receiving unit 81 receives print data described in the XML language from the host 20. The command generation unit 82 generates print control commands such as a print instruction command and a pre-print command. The former print instruction command is a command based on the print data transmitted from the host 20, and the latter pre-print command is a command generated for checking the status of the printing apparatus 32 before generating the print instruction command. is there. The command transmission unit 83 transmits the generated print control command to the printing apparatus 32.

図6(a)は、第1実施形態に係る印刷指示コマンドのコマンド列を示す図である。同図に示すように、印刷指示コマンドは、印刷データの前後に、それぞれ初期化コマンドと状態取得コマンドを付加したものである。   FIG. 6A is a diagram illustrating a command sequence of a print instruction command according to the first embodiment. As shown in the figure, the print instruction command is obtained by adding an initialization command and a status acquisition command respectively before and after the print data.

ここで、初期化コマンドは、ダミーデータ(NULデータ)、設定初期化コマンドおよびASBステータス有効コマンド(有効コマンド)を含む。ダミーデータは、印刷装置32のバッファー54の容量を超える所定長さ以上の空白ファイルである。これにより、直前の印刷中止処理によって途切れたコマンドを補完し、印刷装置32に処理させることができる。また、設定初期化コマンドは、印刷装置32の設定を初期化するためのコマンドである。なお、ダミーデータは、設定初期化コマンドよりも前に付加されることが好ましい。   Here, the initialization command includes dummy data (NUL data), a setting initialization command, and an ASB status valid command (valid command). The dummy data is a blank file having a predetermined length or more that exceeds the capacity of the buffer 54 of the printing device 32. As a result, the command interrupted by the immediately preceding print cancellation process can be supplemented and processed by the printing apparatus 32. The setting initialization command is a command for initializing the setting of the printing apparatus 32. The dummy data is preferably added before the setting initialization command.

また、ASBステータス有効コマンドは、印刷装置32が主体となってステータスを返信するASB(Auto Status Back)ステータスを有効にするためのコマンドである。印刷装置32は、ASBステータスが有効の場合、自身の状態が変化(カバー開閉/用紙なし/印刷完了など)したことを示すASBステータスを自動的に送信する。これにより、印刷制御装置31は、印刷中における印刷装置32のステータスの変化を把握できる。なお、印刷装置32のASBステータスは、初期化コマンドの受信後、ASBステータス無効コマンドの受信後または印刷装置32の電源ON直後の初期状態において「無効」となる。   The ASB status valid command is a command for validating an ASB (Auto Status Back) status in which the printing apparatus 32 is the main body and returns a status. When the ASB status is valid, the printing apparatus 32 automatically transmits an ASB status indicating that its own state has changed (cover open / close / no paper / printing completed, etc.). Thereby, the printing control apparatus 31 can grasp the change in the status of the printing apparatus 32 during printing. The ASB status of the printing apparatus 32 becomes “invalid” in the initial state after receiving the initialization command, after receiving the ASB status invalid command, or immediately after the printing apparatus 32 is turned on.

一方、図6(b)は、印刷前コマンドのコマンド列を示す図である。印刷前コマンドは、ホスト20から印刷データが送信されたとき、印刷指示コマンドの生成に先立って、印刷装置32の状態を確認するために生成されるコマンドである。そのコマンド列は、空印刷データを示す印刷制御コマンドの後に状態取得コマンドを付加したものである。ここで、状態取得コマンドとは、印刷装置32の状態を取得するためのコマンドであり、ステータス送信コマンドまたはプロセスIDレスポンスコマンド(直前の印刷処理が完了した時点で指定したIDを返すコマンド)を指す。なお、印刷装置32の状態とは、印刷装置の用紙の有無、オンライン/オフライン、インク/トナー残量、バッテリー残量などのステータス情報を指す。このように、印刷データに基づく印刷指示コマンドの送信前に、印刷前コマンドを送信することで、印刷装置32が印刷不可能な状態の場合、印刷中止処理を容易に行うことができる。   On the other hand, FIG. 6B is a diagram showing a command sequence of commands before printing. The pre-print command is a command generated to confirm the state of the printing device 32 prior to generation of the print instruction command when print data is transmitted from the host 20. The command sequence is obtained by adding a status acquisition command after a print control command indicating empty print data. Here, the status acquisition command is a command for acquiring the status of the printing apparatus 32, and indicates a status transmission command or a process ID response command (a command for returning an ID specified when the previous print processing is completed). . The state of the printing device 32 indicates status information such as the presence / absence of paper in the printing device, online / offline, ink / toner remaining amount, battery remaining amount, and the like. As described above, by transmitting the pre-print command before transmitting the print instruction command based on the print data, it is possible to easily perform the print cancellation process when the printing apparatus 32 is in a state incapable of printing.

図5の説明に戻る。応答取得部84は、印刷前コマンドの送信後、当該印刷前コマンドに含まれる状態取得コマンドに基づき、印刷装置32から当該状態取得コマンドに対する応答を取得する。また、応答取得部84は、印刷指示コマンドの送信後、当該印刷指示コマンドに含まれるASBステータス有効コマンドに基づき、印刷指示コマンドの送信から状態取得コマンドに対する応答を受信するまでの間、印刷装置32から自動的に送信されるASBステータスを取得する。また、印刷処理後、印刷指示コマンドに含まれる状態取得コマンドに基づき、印刷装置32から当該状態取得コマンドに対する応答を取得する。応答返信部85は、応答に基づく印刷結果を、印刷データの送信元となるホスト20に返信する。ここで、印刷結果とは、印刷成功/印刷失敗を示すXML文書を指す。なお、印刷結果に代えて、応答内容(印刷装置32の状態)を示すXML文書を返信しても良い。また、応答返信部85は、ASBステータス有効コマンドに対する応答(印刷指示コマンドの送信から状態取得コマンドに対する応答を受信するまでの、最新のステータスを示すXML文書をホスト20に返信する。   Returning to the description of FIG. The response acquisition unit 84 acquires a response to the status acquisition command from the printing apparatus 32 based on the status acquisition command included in the pre-printing command after transmitting the pre-printing command. Further, the response acquisition unit 84, after transmitting the print instruction command, from the transmission of the print instruction command to the reception of the response to the status acquisition command based on the ASB status valid command included in the print instruction command. The ASB status automatically transmitted from is acquired. Also, after the printing process, a response to the status acquisition command is acquired from the printing device 32 based on the status acquisition command included in the print instruction command. The response reply unit 85 returns the print result based on the response to the host 20 that is the transmission source of the print data. Here, the printing result indicates an XML document indicating printing success / printing failure. Instead of the print result, an XML document indicating the response content (state of the printing device 32) may be returned. The response reply unit 85 returns a response to the ASB status valid command (an XML document indicating the latest status from transmission of the print instruction command to reception of a response to the status acquisition command) to the host 20.

印刷中止処理部86は、応答取得部84により取得した応答から、印刷装置32が印刷不可能な状態であると判定した場合、応答取得部84による応答取得がタイムアウトした場合、ホスト20が指定した印刷装置32が存在しない場合などに印刷中止処理を行う。印刷中止処理には、印刷中止を印刷データの送信元となるホスト20に通知する処理の他、必要に応じて、印刷装置32への印刷指示コマンドの送信を中止する処理、印刷装置32のバッファー54をクリアにするためのリアルタイムコマンドであるバッファークリアコマンドを印刷装置32に送信する処理、を行う。ここで、リアルタイムコマンドとは、印刷装置32に対し即時実行を指令するコマンドを指す。   When the print cancellation processing unit 86 determines from the response acquired by the response acquisition unit 84 that the printing apparatus 32 is in a state incapable of printing, when the response acquisition by the response acquisition unit 84 times out, the host 20 specifies When the printing device 32 does not exist, the print cancellation process is performed. The print cancel process includes a process of notifying the host 20 that is the print data transmission source of the print cancel, a process of canceling the transmission of the print instruction command to the print device 32 as necessary, and a buffer of the print device 32. A process of transmitting a buffer clear command, which is a real-time command for clearing 54, to the printing apparatus 32 is performed. Here, the real-time command refers to a command for instructing the printing apparatus 32 to execute immediately.

印刷装置情報取得部87は、接続されている各印刷装置32(印刷装置A、印刷装置B)から、各印刷装置32の印刷装置情報57を取得する。当該印刷装置情報57の取得は、定期的に行っても良いし、電源ON時やホスト20からの情報取得指令があったときに取得しても良い。印刷装置情報記憶部88は、取得した各印刷装置32の印刷装置情報57を、印刷装置リスト47として記憶する。また、印刷装置情報通知部89は、ホスト20に対し、印刷装置リスト47を提供する(各印刷装置32の印刷装置情報57を通知する)。なお、印刷装置リスト47の提供は、印刷装置情報57を取得する度に行っても良いし、電源ON時やホスト20からの通知指令があったときに行っても良い。   The printing device information acquisition unit 87 acquires the printing device information 57 of each printing device 32 from each connected printing device 32 (printing device A, printing device B). The printing device information 57 may be acquired periodically, or may be acquired when the power is turned on or when there is an information acquisition command from the host 20. The printing device information storage unit 88 stores the acquired printing device information 57 of each printing device 32 as a printing device list 47. The printing device information notification unit 89 provides the printing device list 47 to the host 20 (notifies the printing device information 57 of each printing device 32). The printing device list 47 may be provided every time the printing device information 57 is acquired, or may be provided when the power is turned on or when a notification command is issued from the host 20.

一方、印刷装置32は、主な機能構成として、コマンド受信部91、印刷部92、応答送信部93および印刷装置側記憶部94を備えている。コマンド受信部91は、印刷制御装置31から印刷指示コマンドや印刷前コマンドなど、ESC/POS(登録商標)コマンドを受信する。印刷部92は、受信したコマンドに基づいて、印刷用紙に印刷を行う。応答送信部93は、印刷制御装置31に対し、印刷指示コマンドや印刷前コマンドに対する応答を返信する。印刷装置側記憶部94は、記憶部52(図3参照)に相当し、自身の印刷装置情報57を記憶する。   On the other hand, the printing device 32 includes a command reception unit 91, a printing unit 92, a response transmission unit 93, and a printing device side storage unit 94 as main functional configurations. The command receiving unit 91 receives ESC / POS (registered trademark) commands such as a print instruction command and a pre-print command from the print control apparatus 31. The printing unit 92 performs printing on printing paper based on the received command. The response transmission unit 93 returns a response to the print instruction command or the pre-print command to the print control device 31. The printing device side storage unit 94 corresponds to the storage unit 52 (see FIG. 3), and stores its own printing device information 57.

次に、図7のフローチャートを参照し、第1実施形態に係る印刷制御の流れについて説明する。印刷制御装置31は、ホスト20から印刷データを受信すると(S01)、印刷前コマンドを生成して、印刷装置32のステータスを確認する(S02)。その結果から、印刷装置32が印刷可能ではないと判定した場合(S03:No)、ホスト20に対し、ステータスを返信する(S04)。また、印刷装置32が印刷可能と判定した場合は(S03:Yes)、コマンド列(印刷指示コマンド)を生成し(S05)、印刷装置32へ送信する(S06)。   Next, the flow of printing control according to the first embodiment will be described with reference to the flowchart of FIG. Upon receiving print data from the host 20 (S01), the print control device 31 generates a pre-print command and checks the status of the print device 32 (S02). If it is determined from the result that the printing device 32 is not capable of printing (S03: No), a status is returned to the host 20 (S04). If the printing apparatus 32 determines that printing is possible (S03: Yes), a command string (printing instruction command) is generated (S05) and transmitted to the printing apparatus 32 (S06).

その後、印刷装置32からASBステータスやレスポンス(応答)を受信すると(S07)、印刷中止またはタイムアウトを判定し(S08)、「No」と判定した場合は、さらに印刷完了したか否かを判定する(S09)。印刷完了していない場合は(S09:No)、S07に戻り、印刷完了した場合は(S09:Yes)、ホスト20に対しステータスおよび印刷結果を返信する(S04)。また、S08で「Yes」と判定した場合は、印刷装置32へバッファークリアコマンドを送信し(S10)、ホスト20に対し、ステータスおよび印刷結果を返信する(S04,印刷中止を通知する)。   After that, when an ASB status or response (response) is received from the printing device 32 (S07), the print stop or timeout is determined (S08). If “No” is determined, it is further determined whether or not printing is completed. (S09). If the printing is not completed (S09: No), the process returns to S07. If the printing is completed (S09: Yes), the status and the printing result are returned to the host 20 (S04). If “Yes” is determined in S08, a buffer clear command is transmitted to the printing apparatus 32 (S10), and the status and the print result are returned to the host 20 (S04, print cancellation is notified).

以上説明したとおり、第1実施形態によれば、ホスト20から送信された印刷データの前に初期化コマンドを付加するため、ホスト20:印刷装置32が1:1で接続されていることが前提のESC/POS(登録商標)コマンドを用いて、多:1または多:多のネットワーク環境下で印刷装置32を制御できる。つまり、ホストaからの印刷指令に基づく前回の印刷が正常終了していない場合でも、続くホストbからの印刷指令に基づく印刷指示コマンドの前に初期化コマンドを付加するため、当該印刷指示コマンドを正常に処理させることができる。また、ホストaからの指令により印刷装置32の設定変更が行なわれていた場合も、同じく初期化コマンドを付加することにより印刷装置32を初期化状態に戻すため、続くホストbからの印刷指令に基づく印刷指示コマンドを正常に解釈させることができる。このように、従来のコマンド体系を維持しつつ、既存の印刷装置32を複数のホスト20で共有することができる。   As described above, according to the first embodiment, since the initialization command is added before the print data transmitted from the host 20, it is assumed that the host 20: printing device 32 is connected 1: 1. The ESC / POS (registered trademark) commands can be used to control the printing device 32 in a multi: 1 or multi: multi network environment. That is, even if the previous printing based on the printing command from the host a is not normally completed, the initialization command is added before the printing command based on the printing command from the subsequent host b. It can be processed normally. Even when the setting of the printing device 32 is changed by a command from the host a, the initialization command is added to return the printing device 32 to the initialization state. Based on this, it is possible to correctly interpret the print instruction command. As described above, the existing printing apparatus 32 can be shared by the plurality of hosts 20 while maintaining the conventional command system.

また、ホスト20は、Webブラウザー27上で動作するスクリプトを用いて印刷データを生成するため、印刷装置ドライバーやプラグインを必要としない。また、ホスト20のプラットフォームを問わないため、スマートフォンやタブレット端末など、各種OSで動作するホスト20を、同じ印刷システムSY内で混在させることができる。   In addition, since the host 20 generates print data using a script that runs on the Web browser 27, no printer driver or plug-in is required. Moreover, since the platform of the host 20 does not matter, the host 20 that operates on various OSs such as a smartphone and a tablet terminal can be mixed in the same printing system SY.

なお、上記の第1実施形態では、Webブラウザー27として標準ブラウザーを使用し、印刷制御スクリプトを用いて印刷データを生成したが、プラグインやリッチインターネットアプリケーションを用いて印刷データを生成しても良い。   In the first embodiment, a standard browser is used as the Web browser 27 and print data is generated using a print control script. However, print data may be generated using a plug-in or a rich Internet application. .

また、図7に示したフローチャートのS01の後、XMLスキーマ(マークアップスキーマ)により、印刷データの妥当性を検証しても良い(妥当性検証部)。この場合、印刷データが妥当と判定した場合は、S02に進み、妥当でないと判定した場合は、S04またはS10に進んで、印刷中止処理を行うことが好ましい。この構成によれば、マークアップスキーマを用いることにより、印刷データの妥当性を検証した上で、印刷処理を行うことができる。   Further, after S01 in the flowchart shown in FIG. 7, the validity of the print data may be verified by an XML schema (markup schema) (a validity verification unit). In this case, when it is determined that the print data is valid, the process proceeds to S02. When it is determined that the print data is not valid, it is preferable to proceed to S04 or S10 and perform the print cancel process. According to this configuration, by using the markup schema, it is possible to perform print processing after verifying the validity of the print data.

また、上記の第1実施形態では、印刷データをXML言語で記述したが、印刷装置32のコマンド(ESC/POS(登録商標)コマンド)で記述しても良い。この場合、印刷制御装置31におけるコマンド変換は不要である。また、ホスト20に返信する印刷結果も、XML文書ではなく、コマンドレスポンスとなる。このため、ホスト20側で、レスポンスデータを解析し、印刷結果やステータスを抽出する必要がある。但し、印刷制御装置31で解析を行い、XML言語やCSV言語で印刷結果やステータスを記述してからホスト20に通知する構成でも良い。   In the first embodiment, the print data is described in the XML language. However, the print data may be described using a command (ESC / POS (registered trademark) command) of the printing apparatus 32. In this case, command conversion in the print control apparatus 31 is not necessary. In addition, the print result returned to the host 20 is not an XML document but a command response. Therefore, it is necessary for the host 20 side to analyze the response data and extract the print result and status. However, the configuration may be such that the analysis is performed by the print control device 31 and the print result or status is described in the XML language or CSV language and then notified to the host 20.

[第2実施形態]
次に、図8および図9を参照し、本発明の第2実施形態について説明する。上記の第1実施形態では、ホスト20から送信された印刷データの受信に伴ってステータス等の応答を返信したが、本実施形態では、印刷データの受信によらず、ステータス等の応答を返信することを特徴とする。以下、第1実施形態と異なる点のみ説明する。なお、本実施形態において、第1実施形態と同様の構成部分については同様の符号を付し、詳細な説明を省略する。また、第1実施形態と同様の構成部分について適用される変形例は、本実施形態についても同様に適用される。
[Second Embodiment]
Next, a second embodiment of the present invention will be described with reference to FIGS. In the first embodiment, a response such as a status is returned along with reception of print data transmitted from the host 20, but in this embodiment, a response such as a status is returned regardless of reception of print data. It is characterized by that. Only differences from the first embodiment will be described below. In the present embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and detailed description thereof is omitted. Moreover, the modification applied about the component similar to 1st Embodiment is applied similarly about this embodiment.

図8は、第2実施形態に係る印刷システムSY2の機能ブロック図である。同図に示すように、本実施形態は、第1実施形態の機能構成と比較して、ホスト20内に、空印刷データ生成部101および空印刷データ送信部102を追加した構成となっている。   FIG. 8 is a functional block diagram of the printing system SY2 according to the second embodiment. As shown in the figure, the present embodiment has a configuration in which a blank print data generation unit 101 and a blank print data transmission unit 102 are added to the host 20 as compared with the functional configuration of the first embodiment. .

空印刷データ生成部101は、Webブラウザー27上で動作する印刷制御スクリプトを用いて、空印刷データを生成する。また、空印刷データ送信部102は、印刷制御装置31に対し、生成した空印刷データを、HTTPにより送信する。ここで、空印刷データとは、印刷装置32のステータス要求のために生成される空印刷要求である。例えば、ユーザーにより(操作部25により)、印刷装置32のステータス取得指示操作が行われた場合に、空印刷データを生成・送信する。取得したステータスは、ホスト20の表示部22に表示される。   The blank print data generation unit 101 generates blank print data using a print control script that runs on the Web browser 27. The blank print data transmission unit 102 transmits the generated blank print data to the print control apparatus 31 using HTTP. Here, the blank print data is a blank print request generated for a status request of the printing apparatus 32. For example, when a status acquisition instruction operation of the printing apparatus 32 is performed by the user (by the operation unit 25), empty print data is generated and transmitted. The acquired status is displayed on the display unit 22 of the host 20.

一方、印刷制御装置31のコマンド生成部82は、ホスト20から送信された空印刷データに基づいて、空印刷コマンドを生成する。図9は、空印刷コマンドのコマンド列を示す図である。同図に示すように、空印刷コマンドは、空印刷データの前後に、それぞれ初期化コマンドと状態取得コマンドを付加したものである。初期化コマンドに、ダミーデータ、設定初期化コマンドおよびASBステータス取得コマンドが含まれる点は、第1実施形態と同様である。また、コマンド送信部83は、生成された当該空印刷コマンドを印刷装置32に送信し、応答取得部84は、空印刷コマンドに対する応答を取得する。また、応答返信部85は、空印刷コマンドに対する応答を、ホスト20に返信する。   On the other hand, the command generation unit 82 of the print control device 31 generates a blank print command based on the blank print data transmitted from the host 20. FIG. 9 is a diagram illustrating a command string of blank print commands. As shown in the figure, the blank print command is obtained by adding an initialization command and a status acquisition command respectively before and after the blank print data. Similar to the first embodiment, the initialization command includes dummy data, a setting initialization command, and an ASB status acquisition command. The command transmission unit 83 transmits the generated blank print command to the printing apparatus 32, and the response acquisition unit 84 acquires a response to the blank print command. The response reply unit 85 returns a response to the blank print command to the host 20.

なお、空印刷データ送信部102による空印刷データの送信は、対象となる印刷装置32を指定しても良いが、全ての印刷装置32を対象として一括送信しても良い。この場合、空印刷データに、接続されている全ての印刷装置32の印刷装置ID(印刷装置指定情報)を付加して送信しても良いし、印刷装置IDを付加しない構成としても良い。後者の場合、印刷制御装置31は、接続されている(通信可能な)全ての印刷装置32に対し、空印刷データに基づいて生成した空印刷コマンドを一斉送信する。   The blank print data transmission unit 102 may send the blank print data by designating the target printing device 32, or may send all the printing devices 32 as a batch. In this case, the printing apparatus IDs (printing apparatus designation information) of all the connected printing apparatuses 32 may be added to the blank print data for transmission, or the printing apparatus ID may not be added. In the latter case, the print control device 31 simultaneously transmits a blank print command generated based on the blank print data to all connected (communicable) printing devices 32.

また、第2実施形態に係る印刷制御の流れは、図7に示した第1実施形態のフローチャートにおけるS01にて、ホスト20から、「空印刷データ」を受信する点以外は、同フローチャートの流れと同様であるため、説明を省略する。   The flow of print control according to the second embodiment is the same as that shown in FIG. 7 except that “empty print data” is received from the host 20 at S01 in the flowchart of the first embodiment shown in FIG. Since it is the same as that, description is abbreviate | omitted.

以上説明したとおり、第2実施形態によれば、印刷制御装置31により、ホスト20から送信された空印刷データに状態取得コマンドを付加して空印刷コマンドを生成し、印刷装置32に送信するため、印刷装置32からの応答に基づいて、印刷装置32のステータスをホスト20に通知することができる。つまり、印刷を実行する場合と同様の仕組みで、印刷装置32のステータスをホスト20に返すことができる。   As described above, according to the second embodiment, the print control device 31 generates a blank print command by adding a status acquisition command to the blank print data transmitted from the host 20 and transmits it to the printing device 32. Based on the response from the printing apparatus 32, the status of the printing apparatus 32 can be notified to the host 20. That is, the status of the printing device 32 can be returned to the host 20 by the same mechanism as when printing is performed.

なお、上記の第2実施形態では、ホスト20が、ユーザーによるステータス取得指示操作をトリガーとして、空印刷データを送信したが、ホスト20の電源ON時や所定アプリケーションの起動時など、予め定められたタイミングで空印刷データを送信しても良い。また、定期的に空印刷データを送信することで、ホスト20が、印刷装置32のステータスを常に把握することができる。   In the second embodiment described above, the host 20 transmits blank print data triggered by a status acquisition instruction operation by the user. However, the host 20 is predetermined such as when the host 20 is turned on or when a predetermined application is started. The blank print data may be transmitted at the timing. In addition, by periodically sending empty print data, the host 20 can always grasp the status of the printing apparatus 32.

[第3実施形態]
次に、図10ないし図15を参照し、本発明の第3実施形態について説明する。第3実施形態は、上述のとおりドライバーレスのプラットフォーム上で動作するホスト20を用いた場合でも、アプリケーションプログラマーが、印刷装置32の文字コード体系を意識することなく印刷プログラムを作成することを課題とする。以下、第1,2実施形態と異なる点のみ説明する。
[Third Embodiment]
Next, a third embodiment of the present invention will be described with reference to FIGS. The third embodiment has a problem in that even when the host 20 operating on the driverless platform is used as described above, the application programmer creates a printing program without being aware of the character code system of the printing device 32. To do. Only differences from the first and second embodiments will be described below.

図10は、第3実施形態に係る印刷システムSY3の機能ブロック図である。同図に示すように、本実施形態は、第1実施形態の機能構成と比較して、印刷制御装置31内に、文字コード変換部111を追加した構成となっている。文字コード変換部111は、Unicodeなどの汎用文字コード(第1の文字コード)を、印刷装置32用の文字コード(第2の文字コード)に変換する。ここで、「印刷装置32用の文字コード」とは、印刷装置32に搭載されたフォントデータ(ドットマトリクスフォントデータ、ビットマップフォントデータ、スケイラブルフォントデータなど)に対応する文字コードを指す。これに対し、「Unicode」は、1文字ごとに一意のコードが割り当てられた文字コードである。これら「Unicode」と「印刷装置32用の文字コード」が1:1ではなく1:多の関係となる場合があるため、文字コード変換部111によるコード変換が必要となる。詳細については、後述する。   FIG. 10 is a functional block diagram of the printing system SY3 according to the third embodiment. As shown in the figure, the present embodiment has a configuration in which a character code conversion unit 111 is added to the print control device 31 as compared with the functional configuration of the first embodiment. The character code conversion unit 111 converts a general-purpose character code (first character code) such as Unicode into a character code (second character code) for the printing device 32. Here, the “character code for the printing device 32” refers to a character code corresponding to font data (dot matrix font data, bitmap font data, scalable font data, etc.) installed in the printing device 32. On the other hand, “Unicode” is a character code in which a unique code is assigned to each character. Since these “Unicode” and “character code for the printing apparatus 32” may have a 1: multiple relationship instead of 1: 1, code conversion by the character code conversion unit 111 is required. Details will be described later.

第3実施形態では、図11(a)に示すように、印刷装置32によってその仕様および搭載文字が異なることを想定している。例えば、「印刷装置A」が「日本語仕様」の場合、その印刷装置32に搭載されている搭載文字は、英数字、国際文字および日本語であり、使用する文字コードは、例えば漢字モード(Shift_JIS)である。   In the third embodiment, as shown in FIG. 11A, it is assumed that the specifications and installed characters differ depending on the printing device 32. For example, when “printing device A” is “Japanese specification”, the characters installed in the printing device 32 are alphanumeric characters, international characters, and Japanese characters. Shift_JIS).

また、第3実施形態では、ホスト20が、言語属性を付加した汎用文字コードを1個以上含む印刷データを生成・送信する(印刷データ生成部72、印刷データ送信部73)。特に図示しないが、ホスト20側では、Webブラウザー27によって表示される所定のフォーム上で、印刷文字列の入力、対象言語およびフォント種類の指定が可能となっており、これらの入力に基づいて、印刷データ(XML印刷ドキュメント)を生成する。また、文字コード変換部111は、汎用文字コードを、言語属性に対応する文字コードに変換する。さらに、コマンド生成部82は、文字コード変換部111の変換結果を用いて印刷指示コマンドを生成する。   In the third embodiment, the host 20 generates and transmits print data including one or more general-purpose character codes to which a language attribute is added (print data generation unit 72, print data transmission unit 73). Although not particularly illustrated, on the host 20 side, it is possible to input a print character string and specify a target language and font type on a predetermined form displayed by the Web browser 27. Based on these inputs, Print data (XML print document) is generated. The character code conversion unit 111 converts the general-purpose character code into a character code corresponding to the language attribute. Further, the command generation unit 82 generates a print instruction command using the conversion result of the character code conversion unit 111.

図12は、第3実施形態に係る印刷指示コマンドのコマンド列を示す図である。同図に示すように、コマンド生成部82は、「言語属性に基づいて変換した文字コード(印刷装置32用の文字コード)」の前に、印刷装置32の文字コードを言語属性に対応して切り替えるための「文字コード切り替えコマンド」を付加した印刷指示コマンドを生成する。なお、第1実施形態と同様に、コマンド列の前に初期化コマンドを付加したり、コマンド列の後に状態取得コマンドを付加したりしても良い(図6(a)参照)。   FIG. 12 is a diagram showing a command sequence of print instruction commands according to the third embodiment. As shown in the figure, the command generation unit 82 sets the character code of the printing device 32 in correspondence with the language attribute before the “character code converted based on the language attribute (character code for the printing device 32)”. A print instruction command to which a “character code switching command” for switching is added is generated. As in the first embodiment, an initialization command may be added before the command sequence, or a status acquisition command may be added after the command sequence (see FIG. 6A).

ここで、「文字コード切り替えコマンド」は、「文字コードテーブル切り替えコマンド」、「国際文字セット切り替えコマンド」および「漢字モード切り替えコマンド」を含む概念であり、例えばANKモード(ANK仕様に対応するモード)において、文字コード80〜FFの文字の切り替えを行うことができる。ここで、「文字コードテーブル」とは、「印刷装置32用の文字コード」が複数個格納されているテーブルを指す。したがって、文字コードテーブルを示す情報と、文字コードテーブルにおける格納位置を示す情報により、印刷装置32用の文字コードを一意に指定することができる。「文字コードテーブル切り替えコマンド」とは、その文字コードテーブルを切り替えるためのコマンドである。   Here, the “character code switching command” is a concept including “character code table switching command”, “international character set switching command”, and “kanji mode switching command”, for example, ANK mode (mode corresponding to ANK specification). In FIG. 5, the characters of the character codes 80 to FF can be switched. Here, the “character code table” refers to a table in which a plurality of “character codes for the printing device 32” are stored. Therefore, the character code for the printing device 32 can be uniquely specified by the information indicating the character code table and the information indicating the storage position in the character code table. The “character code table switching command” is a command for switching the character code table.

また、「国際文字セット切り替えコマンド」とは、ANKモードにおいて、文字コード20H〜7EHの文字の切り替えを行うコマンドである。英語の「\」と日本語の「¥」、英語の「\」と韓国語のウォン記号、英語の「$」と中国語の「¥」など、同じ文字コードに異なる文字を割り当てている文字を対象としており、「文字コードテーブル切り替えコマンド」と共に用いる。また、「漢字モード切り替えコマンド」とは、ANKモードから漢字モードにするコマンドと、漢字モードを解除してANKモードにするコマンドである。なお、各印刷装置32は、日本語、韓国語、中国語の国際文字セットの共存ができないものとする。   The “international character set switching command” is a command for switching characters of the character codes 20H to 7EH in the ANK mode. Characters with different characters assigned to the same character code, such as English “\” and Japanese “¥”, English “¥” and Korean won symbol, English “$” and Chinese “¥” Is used together with the “character code table switching command”. The “kanji mode switching command” is a command for switching from the ANK mode to the kanji mode, and a command for canceling the kanji mode and switching to the ANK mode. Note that each printing device 32 cannot co-exist Japanese, Korean, and Chinese international character sets.

図11(b)は、各言語属性と、文字コード切り替えコマンドの対応を示している。なお、言語属性「ja」、「ko」、「zn−cn」、「zn−tw」、「en」は、それぞれ印刷装置32の仕様「日本語仕様」、「韓国語使用」、「簡体字中国語仕様」、「繁体字中国語仕様」、「ANKモード」にそれぞれ対応している。例えば、印刷データに言語属性「ja」が付加された汎用文字コード「漢字」が含まれる場合、文字コード変換部111は、この「漢字」を、日本語仕様の文字コードに変換する。また、コマンド生成部82は、印刷装置32の文字コードを、漢字モード、文字コードテーブル=カタカナ、日本語文字セット=日本、文字=Shift_JISへ変換するための文字コード切り替えコマンドを付加する。   FIG. 11B shows the correspondence between each language attribute and a character code switching command. The language attributes “ja”, “ko”, “zn-cn”, “zn-tw”, and “en” are the specifications “Japanese specification”, “Korean use”, “Simplified Chinese” of the printing device 32, respectively. "Word specification", "Traditional Chinese specification", and "ANK mode". For example, when the print data includes a general-purpose character code “Kanji” with the language attribute “ja” added, the character code conversion unit 111 converts the “Kanji” into a character code of Japanese specifications. In addition, the command generation unit 82 adds a character code switching command for converting the character code of the printing device 32 into the kanji mode, the character code table = katakana, the Japanese character set = Japan, and the character = Shift_JIS.

ところで、印刷制御装置31は、各印刷装置32の印刷装置情報57の一覧である印刷装置リスト47を記憶している(図3参照)。そこで、文字コード変換部111は、印刷装置リスト47を参照し、汎用文字コードに付加された言語属性が、印刷装置ID(印刷装置指定情報)によって指定された印刷装置32の機種または搭載文字に対応している場合のみ、その汎用文字コードの変換を行う、言い換えれば、指定された言語属性と印刷装置32の仕様が対応していない場合、その言語属性が付加された汎用文字コードの変換を行わない。これにより、機種や搭載文字の異なる複数の印刷装置32に対して、同じ印刷データを送信した場合でも、各印刷装置32の仕様に応じて、異なる印刷結果を得ることができる。この点については、図14にて後述する。   By the way, the printing control apparatus 31 stores a printing apparatus list 47 that is a list of printing apparatus information 57 of each printing apparatus 32 (see FIG. 3). Therefore, the character code conversion unit 111 refers to the printing device list 47, and the language attribute added to the general-purpose character code is the model or installed character of the printing device 32 designated by the printing device ID (printing device designation information). Only when it corresponds, the general-purpose character code is converted. In other words, when the designated language attribute does not correspond to the specification of the printing device 32, the general-purpose character code to which the language attribute is added is converted. Not performed. As a result, even when the same print data is transmitted to a plurality of printing apparatuses 32 having different models and installed characters, different printing results can be obtained according to the specifications of each printing apparatus 32. This will be described later with reference to FIG.

一方、印刷データ生成部72は、必要に応じて、言語属性の付加を省略することができる。文字コード変換部111は、ホスト20から送信された印刷データに、言語属性が付加されていない汎用文字コードが含まれる場合、当該汎用文字コードの直前に変換した言語属性に基づいて変換を行う。つまり、直前に変換した言語属性を、揮発性または不揮発性の記憶領域に記憶しておく。またこの場合、コマンド生成部82は、文字コード切り替えコマンドの付加を省略する。これにより、印刷データ生成部72は、同じ言語属性の文字コードを続けて印刷する場合、言語属性の付加を省略することができる。また、言語属性が付加されていない場合、コマンド生成部82は、文字コード切り替えコマンドの付加を省略するため、印刷装置32に送信する印刷指示コマンドのデータ量をも減らすことができる。   On the other hand, the print data generation unit 72 can omit the addition of language attributes as necessary. When the print data transmitted from the host 20 includes a general-purpose character code to which no language attribute is added, the character code conversion unit 111 performs conversion based on the language attribute converted immediately before the general-purpose character code. That is, the language attribute converted immediately before is stored in a volatile or non-volatile storage area. In this case, the command generation unit 82 omits the addition of the character code switching command. Accordingly, the print data generation unit 72 can omit the addition of the language attribute when the character code having the same language attribute is continuously printed. Further, when no language attribute is added, the command generation unit 82 omits the addition of the character code switching command, so that the data amount of the print instruction command transmitted to the printing apparatus 32 can also be reduced.

なお、汎用文字コードに言語属性が付加されていない場合、直前に変換した言語属性ではなく、デフォルトの言語属性(例えば、言語属性「en」=ANKモード)に基づいて、汎用文字コードを変換しても良い。また、直前に変換した言語属性が存在しない場合のみ(電源ON後、最初の印刷を行う場合など)、デフォルトの言語属性に基づいて変換を行うようにしても良い。   If no language attribute is added to the general-purpose character code, the general-purpose character code is converted based on the default language attribute (for example, the language attribute “en” = ANK mode) instead of the language attribute converted immediately before. May be. Also, conversion may be performed based on the default language attribute only when the language attribute converted immediately before does not exist (for example, when the first printing is performed after the power is turned on).

図13は、第3実施形態に係る印刷データの一例を示す図である。同図に示すように、印刷データ生成部72は、印刷データを、XML言語(マークアップ言語)で記述する。また、言語属性を、要素の属性として記述し、汎用文字コードを、要素の内容として記述する。図14は、図13の印刷データに基づく印刷結果を示す図である。例えば、図14(a)は、図13の印刷データを、日本語仕様の印刷装置32を用いて印刷した場合の印刷結果を示している。つまり、図13に示した汎用文字コードC1〜C10のうち、日本語仕様の印刷装置32がサポートする搭載文字に対応した汎用文字コードC1〜C7が印刷対象となっている。同様に、図14(b)は、韓国語仕様の印刷装置32を用いて印刷した場合の印刷結果を示しており、韓国語仕様の印刷装置32に対応した汎用文字コードC1〜C6,C8が印刷対象となっている。また、図14(c)は、ANKモードの印刷装置32を用いて印刷した場合の印刷結果を示しており、ANK仕様の印刷装置32に対応した汎用文字コードC1〜C6が印刷対象となっている。   FIG. 13 is a diagram illustrating an example of print data according to the third embodiment. As shown in the figure, the print data generation unit 72 describes the print data in an XML language (markup language). Also, language attributes are described as element attributes, and general-purpose character codes are described as element contents. FIG. 14 is a diagram illustrating a print result based on the print data of FIG. For example, FIG. 14A shows a print result when the print data of FIG. 13 is printed using a Japanese-style printing device 32. That is, among the general-purpose character codes C1 to C10 shown in FIG. 13, the general-purpose character codes C1 to C7 corresponding to the mounted characters supported by the Japanese-specification printing device 32 are to be printed. Similarly, FIG. 14B shows a printing result when printing is performed using the Korean language printing device 32, and the general-purpose character codes C1 to C6 and C8 corresponding to the Korean language printing device 32 are shown. It is a print target. FIG. 14C shows a printing result when printing is performed using the printing apparatus 32 in the ANK mode, and general-purpose character codes C1 to C6 corresponding to the printing apparatus 32 of the ANK specification are to be printed. Yes.

次に、図15のフローチャートを参照し、第3実施形態に係る印刷制御の流れについて説明する。印刷制御装置31は、ホスト20から印刷データを受信すると(S21)、その中に含まれる言語属性と汎用文字コードの組み合わせを取得する(S22)。その後、言語属性に基づいて、汎用文字コードを印刷装置32用の文字コードに変換し(S23)、コマンド列(印刷指示コマンド)を生成する(S24)。最後に、生成したコマンド列を、印刷装置32に送信する(S25)。   Next, the flow of print control according to the third embodiment will be described with reference to the flowchart of FIG. When the print control apparatus 31 receives print data from the host 20 (S21), the print control apparatus 31 acquires a combination of a language attribute and a general-purpose character code included therein (S22). Thereafter, the general-purpose character code is converted into the character code for the printing device 32 based on the language attribute (S23), and a command string (print instruction command) is generated (S24). Finally, the generated command sequence is transmitted to the printing device 32 (S25).

以上説明したとおり、第3実施形態によれば、ホスト20から、言語属性が付加された汎用文字コードを含む印刷データを受信し、汎用文字コードを、言語属性に対応する文字コードに変換し、文字コード切り替えコマンドを付加して印刷装置32に送信するため、アプリケーションプログラマーが、印刷装置32の文字コード体系を意識する必要がない。例えば、Unicode文字の場合、1の汎用文字コードに対して、印刷装置32用の文字コードが複数存在する場合があるが、言語属性が付加されているため、正しい文字コードに変換することができる。   As described above, according to the third embodiment, print data including a general-purpose character code to which a language attribute is added is received from the host 20, and the general-purpose character code is converted into a character code corresponding to the language attribute. Since the character code switching command is added and transmitted to the printing apparatus 32, the application programmer does not need to be aware of the character code system of the printing apparatus 32. For example, in the case of Unicode characters, there may be a plurality of character codes for the printing device 32 for one general-purpose character code, but since a language attribute is added, it can be converted into a correct character code. .

また、印刷制御装置31で文字コードの変換を行うため、接続される複数の印刷装置32の機種や搭載文字を問わない。このため、子機として複数の機種を混在させることができる。例えば、レジカウンターに設置された印刷装置32(レシートプリンター)は、日本語で印刷し、厨房に設置された印刷装置32(キッチンプリンター)は、中国語で印刷する、などの構成が可能である。さらに、印刷装置32の入れ替えの際に、異なる機種へ変更させることも可能である。   Further, since the character code is converted by the print control device 31, any model or installed character of the plurality of connected printing devices 32 may be used. For this reason, a plurality of models can be mixed as slave units. For example, the printing device 32 (receipt printer) installed at the checkout counter can print in Japanese, and the printing device 32 (kitchen printer) installed in the kitchen can print in Chinese. . Further, when the printing device 32 is replaced, it is possible to change to a different model.

なお、第3実施形態の構成は、印刷ドライバーを必要とすることなく文字コードの変換を行うことができるため、ドライバーレスのプラットフォーム上で動作するホスト20を用いた場合に好適である。つまり、本実施形態のように、Webブラウザー27の印刷制御スクリプトを用いる構成の他、Webブラウザー27のプラグインを用いる構成、組み込み機器およびタブレット端末などドライバーの概念が存在しない電子機器をホスト20として用いた構成に適している。   Note that the configuration of the third embodiment is suitable when a host 20 that operates on a driverless platform is used because character code conversion can be performed without the need for a print driver. That is, as in this embodiment, in addition to the configuration using the print control script of the Web browser 27, the configuration using the plug-in of the Web browser 27, and an electronic device having no driver concept such as an embedded device and a tablet terminal is used as the host 20. Suitable for the configuration used.

また、上記の第3実施形態では、汎用文字コードに付加された言語属性が、指定された印刷装置32の搭載文字に対応していない場合、その汎用文字コードを無視するものとしたが、その汎用文字コードを含む印刷データ全体の印刷を中止しても良い。この場合、図13のように、多種類の言語属性が含まれる印刷データが送信されると、図11(a)に示した全ての仕様の印刷装置32で印刷不可となる。また、印刷を中止した場合、その旨をホスト20に通知することが好ましい。   In the third embodiment, when the language attribute added to the general-purpose character code does not correspond to the specified character of the printing device 32, the general-purpose character code is ignored. Printing of the entire print data including the general character code may be stopped. In this case, as shown in FIG. 13, when print data including many kinds of language attributes is transmitted, printing cannot be performed by the printing apparatuses 32 of all specifications shown in FIG. Further, when printing is stopped, it is preferable to notify the host 20 to that effect.

[第4実施形態]
次に、図16ないし図23を参照し、本発明の第4実施形態について説明する。第4実施形態は、上述のとおりドライバーレスのプラットフォーム上で動作するホスト20を用いた場合でも、アプリケーションプログラマーが、印刷装置32のコマンド体系(カラーモードや画像形式の違い)を意識することなく画像印刷プログラムを作成することを課題とする。以下、第1〜3実施形態と異なる点のみ説明する。
[Fourth Embodiment]
Next, a fourth embodiment of the present invention will be described with reference to FIGS. In the fourth embodiment, even when the host 20 operating on the driverless platform is used as described above, the application programmer can recognize the image without being aware of the command system (color mode and image format difference) of the printing apparatus 32. An object is to create a printing program. Only differences from the first to third embodiments will be described below.

図16は、第4実施形態に係る印刷システムSY4の機能ブロック図である。同図に示すように、本実施形態は、第1実施形態の機能構成と比較して、印刷制御装置31内に、妥当性判定部121を追加した構成となっている。妥当性判定部121は、ホスト20から送信された画像データの妥当性を判定する。   FIG. 16 is a functional block diagram of a printing system SY4 according to the fourth embodiment. As shown in the figure, the present embodiment has a configuration in which a validity determination unit 121 is added to the print control apparatus 31 as compared with the functional configuration of the first embodiment. The validity determination unit 121 determines the validity of the image data transmitted from the host 20.

第4実施形態では、各印刷装置32が特定のコマンドに対応していることを想定している。例えば、印刷装置Aは、ビットイメージコマンドのみ対応し、印刷装置Bは、モノクロ画像印刷コマンドのみに対応している、などの状況が考えられる。ここで、印刷装置32のコマンド体系について簡単に説明する。画像印刷時に用いられる印刷制御コマンドには、「モノクロ画像印刷コマンド」、「グレースケール印刷コマンド」、「カラー画像印刷コマンド」などのカラーコマンドや、「ラスターグラフィックスコマンド」、「ビットイメージコマンド」などの画像形式コマンドがある。カラーコマンドは、印刷装置32のカラーモードに応じて使い分けられる。また、画像形式コマンドは、図17に示すように、データの並び順序の違いによって使い分けられる。「ラスターグラフィックスコマンド」は、図17(a)に示すように、データの並び方向が走査方向であり、「ビットイメージコマンド」は、図17(b)に示すように、縦方向が1行分に相当する。   In the fourth embodiment, it is assumed that each printing device 32 supports a specific command. For example, a situation can be considered in which the printing apparatus A supports only a bit image command, and the printing apparatus B supports only a monochrome image printing command. Here, the command system of the printing apparatus 32 will be briefly described. The print control commands used during image printing include color commands such as “monochrome image print command”, “grayscale print command”, “color image print command”, “raster graphics command”, “bit image command”, etc. There are image format commands. The color command is selectively used according to the color mode of the printing apparatus 32. Further, as shown in FIG. 17, the image format commands are selectively used depending on the difference in the data arrangement order. As shown in FIG. 17A, the “raster graphics command” is the scanning direction of the data, and the “bit image command” is one line in the vertical direction as shown in FIG. Corresponds to minutes.

なお、各印刷装置32がサポートするコマンド(カラーモードおよび画像形式)については、印刷制御装置31の印刷装置リスト47に記憶されている。このため、画像形式については、印刷制御装置31が、指定された印刷装置32がサポートする画像形式に応じて、適宜コマンド変換(「ラスターグラフィックスコマンド」から「ビットイメージコマンド」への変換、またはその逆変換)を行う。   Note that commands (color mode and image format) supported by each printing device 32 are stored in the printing device list 47 of the printing control device 31. For this reason, for the image format, the print control device 31 appropriately converts the command according to the image format supported by the designated printing device 32 (from “raster graphics command” to “bit image command”, or The inverse conversion is performed.

また、第4実施形態では、ホスト20が、カラーモードおよび画像サイズを指定する属性が付加された画像データを含む印刷データを生成・送信する(印刷データ生成部72、印刷データ送信部73)。なお、画像データは、バイナリー形式且つbase64方式でエンコードされる。   In the fourth embodiment, the host 20 generates and transmits print data including image data to which attributes for specifying the color mode and the image size are added (print data generation unit 72, print data transmission unit 73). The image data is encoded in a binary format and a base 64 method.

特に図示しないが、ホスト20側では、Webブラウザー27によって表示される所定のフォーム上で、画像ファイルの指定、カラーモードの指定および色指定が可能となっており、これらの入力に基づいて、印刷データ(XML印刷ドキュメント)を生成する。なお、「画像ファイルの指定」により、結果的に画像サイズ(画像の幅および高さを示す情報)が指定されたこととなるが、画像ファイルと画像サイズを個別に指定し、画像サイズに応じて画像ファイルを拡大/縮小する構成でも良い。また、「色指定」とは、カラーモードの一種であり、例えば黒と赤の2色対応の印刷装置32で、モノクロ画像を黒・赤いずれの色で印刷するかを指定するものである。   Although not particularly illustrated, on the host 20 side, it is possible to specify an image file, a color mode, and a color on a predetermined form displayed by the Web browser 27, and print based on these inputs. Data (XML print document) is generated. As a result, the image size (information indicating the width and height of the image) is specified by “Specifying the image file”. However, the image file and the image size are specified separately, and the image size is selected. The image file may be enlarged / reduced. “Color designation” is a kind of color mode, for example, designating whether a monochrome image is printed in black or red by the printing device 32 that supports two colors of black and red.

妥当性判定部121は、画像データに含まれるカラーモードおよび画像サイズを指定する属性に基づいて、画像データの妥当性を判定する。ここで、カラーモードとは、画像の色情報の管理方法を示すものであり、モノクロ2階調、グレースケール、RGB、CMYKなどがある。また、カラーモードごとに、1画素あたりのデータ量が決まっており、例えば、モノクロ2階調では1ビット、グレースケール(16階調)では4ビット、グレースケール(256階調)では8ビット、RGBでは24ビット、CMYKでは32ビットである。   The validity determination unit 121 determines the validity of the image data based on attributes that specify the color mode and the image size included in the image data. Here, the color mode indicates a method for managing color information of an image, and includes monochrome two gradations, gray scale, RGB, CMYK, and the like. In addition, the data amount per pixel is determined for each color mode, for example, 1 bit for monochrome 2 gradations, 4 bits for gray scale (16 gradations), 8 bits for gray scale (256 gradations), It is 24 bits for RGB and 32 bits for CMYK.

妥当性判定部121は、画像データのデータ量が、カラーモードに応じた1画素(1ドット)あたりのデータ量と、画像サイズとの乗算値に等しい場合、画像データが妥当であると判定する。例えば、256階調グレースケール(8ビット/画素)のラスターグラフィックスの場合、幅×高さバイトのデータ長が必要となる。つまり、幅5×高さ5の場合、25バイトのデータ長が必要となる。また、16階調グレースケール(4ビット/画素)のラスターグラフィックスで、1ラインごとにバイト単位に揃えるパディングを行う場合、(幅+1)/2×高さバイト(但し、除算結果の小数点以下は切り捨てる)のデータ長が必要となる。つまり、幅5×高さ5の場合、パディングで幅6×高さ5に揃えて、6/2×5=15バイトのデータ長が必要となる。さらに、モノクロ2階調(1ビット/画素)のラスターグラフィックスで、1ラインごとにバイト単位に揃えるパディングを行う場合、(幅+7)/8×高さバイト(但し、除算結果の小数点以下は切り捨てる)のデータ長が必要となる。つまり、幅5×高さ5の場合、パディングで幅8×高さ5に揃えて、8/8×5=5バイトのデータ長が必要となる。   The validity determination unit 121 determines that the image data is valid when the data amount of the image data is equal to the product of the data amount per pixel (one dot) corresponding to the color mode and the image size. . For example, in the case of raster graphics of 256 gray scales (8 bits / pixel), a data length of width × height byte is required. That is, in the case of width 5 × height 5, a data length of 25 bytes is required. Also, when padding that aligns byte units for each line in raster graphics with 16 gray scales (4 bits / pixel), (width + 1) / 2 x height bytes (however, after the decimal point of the division result) Data length is required. In other words, in the case of width 5 × height 5, the data length of 6/2 × 5 = 15 bytes is required by aligning the width 6 × height 5 by padding. Furthermore, when padding that aligns in byte units for each line in raster graphics of monochrome 2 gradations (1 bit / pixel), (width + 7) / 8 x height bytes (however, the decimal part of the division result is Data length is required. In other words, in the case of width 5 × height 5, the data length of 8/8 × 5 = 5 bytes is required by aligning the width 8 × height 5 by padding.

一方、第4実施形態のコマンド生成部82は、妥当性判定部121により、画像データが妥当と判定された場合、当該画像データを、カラーモードに対応した印刷装置32用の制御コマンドに変換し、画像印刷コマンドを生成する。コマンド送信部83は、生成された画像印刷コマンドを、印刷装置32に送信する。   On the other hand, when the validity determination unit 121 determines that the image data is appropriate, the command generation unit 82 of the fourth embodiment converts the image data into a control command for the printing apparatus 32 corresponding to the color mode. Generate an image print command. The command transmission unit 83 transmits the generated image print command to the printing device 32.

また、本実施形態のコマンド生成部82は、以下の処理も行う。例えば、画像印刷コマンドのデータ長が所定長さを超える場合、画像データを分割して、複数の画像印刷コマンドを生成する。これにより、画像印刷コマンドのデータ長が制限されるため、印刷中止処理を容易に行うことができる。また、複数の画像印刷コマンドを生成した場合、各画像印刷コマンドのそれぞれの前に、印刷位置を垂直方向(レシートの紙送り方向=ラスターグラフィックスコマンドの副走査方向)に移動させるための印刷位置移動コマンドを付加する。これにより、印刷装置32の印刷モードがページモードの場合(画像印刷によって印刷位置が移動しない印刷モードの場合)でも、垂直方向の印刷位置を揃えることができる。さらに、コマンド生成部82は、コマンド列の先頭に(画像印刷コマンドの前に)、印刷装置32のバッファー54の容量を超える所定長さ以上のダミーデータを含む初期化コマンドを付加する。これにより、直前の印刷中止処理によって途切れたコマンドを補完し、印刷装置32に処理させることができる。その他、コマンド生成部82は、指定されたカラーモードに応じて、例えばカラー用/グレースケール用の画像データをモノクロに変換するなど、適宜画像変換を行う。   In addition, the command generation unit 82 of the present embodiment also performs the following processing. For example, when the data length of the image print command exceeds a predetermined length, the image data is divided to generate a plurality of image print commands. Thereby, since the data length of the image print command is limited, the print cancel process can be easily performed. When a plurality of image print commands are generated, a print position for moving the print position in the vertical direction (receipt paper feed direction = raster graphics command sub-scanning direction) before each image print command. Add a move command. Thereby, even when the printing mode of the printing apparatus 32 is the page mode (in the printing mode in which the printing position does not move by image printing), the printing positions in the vertical direction can be aligned. Further, the command generation unit 82 adds an initialization command including dummy data having a predetermined length or more exceeding the capacity of the buffer 54 of the printing apparatus 32 to the top of the command string (before the image print command). As a result, the command interrupted by the immediately preceding print cancellation process can be supplemented and processed by the printing apparatus 32. In addition, the command generation unit 82 appropriately performs image conversion such as converting color / grayscale image data into monochrome according to the designated color mode.

ここで、印刷装置32の印刷モードについて説明する。本実施形態の印刷装置32は、印刷モードとして、「ノーマルモード」および「ページモード」を備えている。「ノーマルモード」とは、1行単位で印刷するモードであり、文字サイズや画像の高さに合わせて改行量を調整する。また、「行の先頭の状態(印刷位置が左端にあり、行バッファーが空の状態)」で動作する機能を有しており、印刷開始時や改行直後は、この状態となる。一方、「ページモード」とは、印刷領域を設定して印刷データを展開し、一括印刷するモードである。指定した印刷位置に文字や画像を展開し、「行の先頭の状態」の制約はない。なお、「ページモード」を指定する場合は、画像印刷コマンドの前にページモード開始コマンドを付加し、画像印刷コマンドの後にページモード終了コマンドを付加する。また、上述の「印刷位置移動コマンド」は、印刷装置32が「ページモード」に設定されている場合のみ有効となる。   Here, the printing mode of the printing apparatus 32 will be described. The printing apparatus 32 according to the present embodiment includes “normal mode” and “page mode” as print modes. “Normal mode” is a mode in which printing is performed in units of one line, and the line feed amount is adjusted in accordance with the character size and the height of the image. Also, it has a function of operating in “the beginning of the line (print position is at the left end and the line buffer is empty)”, and this state is set at the start of printing or immediately after a line feed. On the other hand, the “page mode” is a mode in which a print area is set, print data is expanded, and batch printing is performed. Characters and images are expanded at the specified print position, and there is no restriction on the “state at the beginning of the line”. When “page mode” is designated, a page mode start command is added before the image print command, and a page mode end command is added after the image print command. The “print position movement command” described above is valid only when the printing apparatus 32 is set to “page mode”.

次に、図18ないし図20を参照し、カラーモードおよび印刷モードによって異なる画像印刷コマンドのコマンド列について説明する。図18は、モノクロ印刷の場合の画像印刷コマンドを示している。図18(a)に示すように、「ノーマルモード・分割なし」の場合(画像印刷コマンドのデータ長が所定長さを超えない場合)は、画像印刷コマンドの前に初期化コマンドが付加された構成となる。なお、初期化コマンドは、第1実施形態と同様である(図6(a)参照)。また、第1実施形態と同様に、画像印刷コマンドの後に状態取得コマンドを付加しても良い。   Next, with reference to FIG. 18 to FIG. 20, the command sequence of the image print command that differs depending on the color mode and the print mode will be described. FIG. 18 shows an image print command for monochrome printing. As shown in FIG. 18A, in the case of “normal mode / no division” (when the data length of the image print command does not exceed the predetermined length), an initialization command is added before the image print command. It becomes composition. The initialization command is the same as that in the first embodiment (see FIG. 6A). As in the first embodiment, a status acquisition command may be added after the image print command.

また、図18(b)に示すように、「ノーマルモード・分割あり」の場合は、初期化コマンドの後に複数の画像印刷コマンドが続く構成となる。また、図18(c)に示すように、「ページモード・分割なし」の場合は、初期化コマンドの後にページモード開始コマンド、画像印刷コマンド、ページモード終了コマンドと続く構成となる。さらに、図18(d)に示すように、「ページモード・分割あり」の場合は、初期化コマンドの後にページモード開始コマンド、その後、分割数分の印刷位置移動コマンドおよび画像印刷コマンド、ページモード終了コマンドと続く構成となる。   Further, as shown in FIG. 18B, in the case of “normal mode / with division”, a configuration in which a plurality of image print commands follows the initialization command. As shown in FIG. 18C, in the case of “page mode / no division”, a page mode start command, an image print command, and a page mode end command follow the initialization command. Furthermore, as shown in FIG. 18D, in the case of “page mode / with division”, a page mode start command after the initialization command, and then a print position movement command and an image print command for the number of divisions, page mode Continuing from the end command.

図19は、グレースケール印刷の場合の画像印刷コマンドを示している。グレースケール印刷の場合は、50%、25%、12.5%、6.25%と、各階調を指定した画像印刷コマンドを含む構成となる。その他、印刷モード・分割の有無に応じたコマンド列の構成は、同図に示すとおりである。また、図20は、カラー印刷の場合の画像印刷コマンドを示している。カラー印刷の場合は、Y(イエロー)、M(マゼンタ)、C(シアン)、K(ブラック)と各カラーを指定した画像印刷コマンドを含む構成となる。その他、印刷モード・分割の有無に応じたコマンド列の構成は、同図に示すとおりである。   FIG. 19 shows an image print command in the case of gray scale printing. In the case of gray scale printing, the image print command is designated with 50%, 25%, 12.5%, 6.25% and each gradation. In addition, the configuration of the command sequence according to the print mode and presence / absence of division is as shown in FIG. FIG. 20 shows an image print command in the case of color printing. In the case of color printing, Y (yellow), M (magenta), C (cyan), K (black) and an image print command designating each color are included. In addition, the configuration of the command sequence according to the print mode and presence / absence of division is as shown in FIG.

図21は、第4実施形態に係る印刷データの一例を示す図である。同図に示すように、印刷データ生成部72は、印刷データを、XML言語(マークアップ言語)で記述すると共に、画像サイズおよびカラーモードを要素の属性として記述し、画像データ(AAAA・・・AAAA)を要素の内容として記述する。なお、同図において、カラーモードの指定がない画像データD1は、Webブラウザー27によって表示される所定のフォーム上でカラーモードが指定されなかった場合のプログラム例を示している。本実施形態では、カラーモードが指定されなかった場合、デフォルト設定値である「モノクロ印刷」が指定されたものとして処理する。   FIG. 21 is a diagram illustrating an example of print data according to the fourth embodiment. As shown in the figure, the print data generation unit 72 describes the print data in the XML language (markup language), describes the image size and color mode as element attributes, and outputs image data (AAAAA... AAAA) is described as the content of the element. In the figure, image data D1 for which no color mode is specified indicates a program example when the color mode is not specified on a predetermined form displayed by the Web browser 27. In the present embodiment, when the color mode is not designated, processing is performed assuming that “monochrome printing” which is a default setting value is designated.

図22(b),(c)は、図21の印刷データの印刷結果を示している。なお、上述の画像データ(AAAA・・・AAAA)は、図22(a)に示す画像ファイルを示しているものとする。図22(b)に示すように、印刷装置32が「モノクロ印刷コマンド」に対応している場合、画像データD1,D2に基づく画像が印刷される。また、図22(c)に示すように、印刷装置32が「モノクロ印刷コマンド」および「4ビットグレースケールコマンド」に対応している場合、画像データD1,D2,D3に基づく画像が印刷される。この場合、画像データD3に基づく画像は、グレースケールで印刷される。このように、図21に示した画像データD1〜D6のうち、印刷装置32のカラーモードに対応する画像データのみが印刷対象となり、他の画像データは無視される。   22B and 22C show the print results of the print data in FIG. Note that the image data (AAAAA... AAAA) described above indicates the image file shown in FIG. As shown in FIG. 22B, when the printing device 32 supports the “monochrome print command”, an image based on the image data D1 and D2 is printed. Further, as shown in FIG. 22C, when the printing apparatus 32 supports “monochrome print command” and “4-bit grayscale command”, an image based on the image data D1, D2, D3 is printed. . In this case, the image based on the image data D3 is printed in gray scale. As described above, only the image data corresponding to the color mode of the printing device 32 is to be printed out of the image data D1 to D6 shown in FIG. 21, and the other image data is ignored.

次に、図23のフローチャートを参照し、第4実施形態に係る印刷制御の流れについて説明する。印刷制御装置31は、ホスト20から印刷データを受信すると(S31)、その中に含まれる画像属性(カラーモード属性および画像サイズ属性)と画像データの組み合わせを取得する(S32)。取得したこれらの組み合わせに基づいて、印刷データに含まれる各画像データの妥当性を判定する(S33)。画像データの妥当性は、上述のとおり、画像データのデータ量が、カラーモードに応じた1画素あたりのデータ量と、画像サイズとの乗算値に等しいか否かに応じて判定する。妥当でないと判定した場合は(S34:No)、コマンド列を生成することなく、処理を終了する。なお、S34の判定前に、マークアップスキーマによる印刷データの判定を行っても良い。   Next, the flow of print control according to the fourth embodiment will be described with reference to the flowchart of FIG. When the print control apparatus 31 receives print data from the host 20 (S31), the print control apparatus 31 acquires a combination of image attributes (color mode attribute and image size attribute) and image data included therein (S32). Based on these acquired combinations, the validity of each image data included in the print data is determined (S33). As described above, the validity of the image data is determined based on whether or not the data amount of the image data is equal to the product value of the data amount per pixel corresponding to the color mode and the image size. If it is determined that it is not valid (S34: No), the process is terminated without generating a command string. Note that the print data may be determined based on the markup schema before the determination in S34.

また、画像データが妥当であると判定した場合は(S34:Yes)、画像印刷コマンドのデータ長が所定長さを超えるか否かを判別する(S35)。所定長さを超えない場合は(S35:No)、画像印刷コマンドの前に初期化コマンドを付加してコマンド列(印刷指示コマンド)を生成する(S36)。一方、画像印刷コマンドのデータ長が所定長さを超える場合は(S35:Yes)、画像データを分割してコマンド列を生成し、初期化コマンドを先頭に、且つ各画像印刷コマンドの前に印刷位置移動コマンドを付加してコマンド列(印刷指示コマンド)を生成する(S37)。その後(S36,S37の後)、生成したコマンド列を印刷装置32に送信する(S38)。   If it is determined that the image data is valid (S34: Yes), it is determined whether or not the data length of the image print command exceeds a predetermined length (S35). If it does not exceed the predetermined length (S35: No), an initialization command is added before the image print command to generate a command string (print instruction command) (S36). On the other hand, if the data length of the image print command exceeds the predetermined length (S35: Yes), the image data is divided to generate a command sequence, and the initialization command is printed at the head and before each image print command. A command sequence (print instruction command) is generated by adding the position movement command (S37). Thereafter (after S36 and S37), the generated command sequence is transmitted to the printing device 32 (S38).

以上説明したとおり、第4実施形態によれば、印刷制御装置31により、カラーモードおよび画像サイズを指定する属性が付加された画像データを、カラーモードに対応した印刷装置32用の制御コマンドに変換するため、ドライバーレスのプラットフォーム上で動作するホスト20を用いた場合でも、カラーモードや画像形式によって異なるコマンドの違いを印刷制御装置31で吸収することができる。これにより、アプリケーションプログラマーは、印刷装置32のコマンド体系を意識することなく画像を印刷させることができる。また、印刷制御装置31でカラーモードや画像形式の違いを吸収できるため、複数の印刷装置32として、コマンド体系の異なる複数の機種を混在させることができる。また、印刷装置32の入れ替えの際も、異なる機種への変更が可能である。   As described above, according to the fourth embodiment, the print control device 31 converts the image data to which the attribute specifying the color mode and the image size is added into a control command for the printing device 32 corresponding to the color mode. Therefore, even when the host 20 operating on the driverless platform is used, the print control device 31 can absorb the difference in the commands that differ depending on the color mode and the image format. As a result, the application programmer can print an image without being aware of the command system of the printing apparatus 32. Further, since the print control device 31 can absorb differences in color mode and image format, a plurality of models having different command systems can be mixed as the plurality of printing devices 32. In addition, when the printing device 32 is replaced, it is possible to change to a different model.

また、画像印刷コマンドの生成前に、カラーモードおよび画像サイズに基づいて画像データの妥当性を判定するため、不正な画像データを排除し、信頼性の高い印刷結果を得ることができる。また、マークアップ言語を用いることにより、カラーモードによるコマンドの違いをはじめ、画像印刷コマンドの分割、ページモードにおける印刷位置の移動、初期化コマンドなどを隠蔽することができる。   In addition, since the validity of the image data is determined based on the color mode and the image size before generating the image print command, it is possible to eliminate illegal image data and obtain a highly reliable print result. In addition, by using the markup language, it is possible to hide the difference in commands depending on the color mode, the division of image print commands, the movement of the print position in the page mode, the initialization command, and the like.

また、画像印刷コマンドのデータ長が所定長さを超える場合、画像データを分割して複数の画像印刷コマンドを生成するため、印刷装置32が印刷不可能な状態である場合など、印刷中止処理を行う場合、その処理を容易に行うことができる。例えば、画像印刷コマンドが、データ長を示す情報と、コマンド本体と、から成る場合、長大なコマンドの送信を始めた後に印刷を中止すると、そのコマンドを終了させるために(指定したデータ長分の印刷を実行させるために)、ダミーデータを送信し続ける必要があり、その分の時間と印刷用紙が無駄になるが、画像データを分割することで、その無駄を抑えることができる。   Further, when the data length of the image print command exceeds a predetermined length, the image data is divided to generate a plurality of image print commands. When performing, the process can be performed easily. For example, if the image print command is composed of information indicating the data length and the command body, when printing is stopped after starting transmission of a long command, the command is terminated (for the specified data length). In order to execute printing), it is necessary to continue to transmit dummy data, and the time and printing paper for that time are wasted. However, by dividing the image data, the waste can be suppressed.

なお、第4実施形態の構成は、ホスト20に印刷ドライバーを必要としないため、第3実施形態と同様に、ドライバーレスのプラットフォーム上で動作するホスト20を用いた場合に好適である。また、上記の第4実施形態では、指定されたカラーモードが、指定された印刷装置32のコマンド体系に対応していない場合、そのカラーモードが付加された画像データを無視するものとしたが、画像データを含む印刷データ全体の印刷を中止しても良い。
Note that the configuration of the fourth embodiment does not require a print driver for the host 20 and is therefore suitable when the host 20 operating on a driverless platform is used, as in the third embodiment. In the fourth embodiment, when the designated color mode does not correspond to the command system of the designated printing device 32, the image data to which the color mode is added is ignored. Printing of the entire print data including image data may be stopped.

以上、4つの実施形態を示したが、各実施形態を組み合わせても良い。例えば、第3実施形態および第4実施形態で示した文字列および画像の印刷指示コマンドの生成前に、印刷前コマンドを生成し、印刷装置32のステータスを確認した上で、印刷を実行しても良い。また、ステータス確認により印刷装置32が印刷不可能と判定した場合、第1実施形態で示したバッファークリアコマンドの送信を含む印刷中止処理を行っても良い。さらに、第1実施形態で示したように、印刷実行に伴って印刷装置32のステータスを取得すると共に、第2実施形態で示したように、定期的または所定のトリガーで空印刷データを送信することにより、印刷処理を伴わないステータス取得を行っても良い。   Although the four embodiments have been described above, the embodiments may be combined. For example, before generating the character string and image print instruction commands shown in the third embodiment and the fourth embodiment, a pre-print command is generated, the status of the printing device 32 is confirmed, and printing is executed. Also good. In addition, when the printing apparatus 32 determines that printing is impossible based on the status confirmation, the print cancellation process including the transmission of the buffer clear command described in the first embodiment may be performed. Further, as shown in the first embodiment, the status of the printing apparatus 32 is acquired as printing is performed, and empty print data is transmitted periodically or with a predetermined trigger as shown in the second embodiment. Thus, status acquisition without printing processing may be performed.

また、図24に示すように、システム構成を変形させても良い。例えば、図24(a)は、印刷制御装置31と印刷装置32とを一体化したインテリジェント機能付き印刷装置30に、複数台の印刷装置32(インテリジェント機能が搭載されていない印刷装置)を接続したシステム構成を示している。このように、インテリジェント機能付き印刷装置30に接続する印刷装置32の数(子機の数)は任意である。また、第3実施形態および第4実施形態で、このようなシステム構成を採用した場合も、機種、搭載文字、カラーモード等が異なる印刷装置32を混在させることができる。さらに、印刷装置32の入れ替えの際も、異なる機種、搭載文字、カラーモードへの変更が可能である。   Also, as shown in FIG. 24, the system configuration may be modified. For example, in FIG. 24A, a plurality of printing devices 32 (printing devices not equipped with an intelligent function) are connected to the printing device 30 with an intelligent function in which the printing control device 31 and the printing device 32 are integrated. The system configuration is shown. As described above, the number of printing apparatuses 32 (number of slave units) connected to the printing apparatus 30 with intelligent function is arbitrary. Further, even when such a system configuration is adopted in the third embodiment and the fourth embodiment, printing apparatuses 32 having different models, installed characters, color modes, and the like can be mixed. Furthermore, when the printing device 32 is replaced, it is possible to change to a different model, installed character, and color mode.

また、図24(b)は、複数の印刷制御装置31で複数の印刷装置32を共有した場合のシステム構成を示す図である。このように、印刷制御装置31を冗長化して印刷装置32を共有することで、堅牢な印刷システムSYを構築することができる。なお、図24(b)のシステム構成において、「印刷制御装置ア」と「印刷装置A」および/または「印刷制御装置イ」と「印刷装置B」を、それぞれ1台のインテリジェント機能付き印刷装置30で実現することも可能である。   FIG. 24B is a diagram showing a system configuration when a plurality of printing apparatuses 32 are shared by a plurality of printing control apparatuses 31. In this way, a robust printing system SY can be constructed by making the printing control device 31 redundant and sharing the printing device 32. In the system configuration of FIG. 24B, each of “printing control device A” and “printing device A” and / or “printing control device A” and “printing device B” is a single printing device with an intelligent function. 30 is also possible.

また、上記の各実施形態に示した印刷システムSY(SY1〜SY4)の各構成要素をプログラムとして提供することが可能である。また、そのプログラムを各種記録媒体(CD−ROM、フラッシュメモリー等)に格納して提供することも可能である。すなわち、コンピューターを印刷システムSYの各部として機能させるためのプログラム、またはコンピューターに印刷システムSYの各処理工程を実行させるためのプログラム、並びにそれらを記録した記録媒体も、本発明の権利範囲に含まれる。   Moreover, it is possible to provide each component of the printing system SY (SY1-SY4) shown in each said embodiment as a program. Further, the program can be provided by being stored in various recording media (CD-ROM, flash memory, etc.). That is, a program for causing a computer to function as each part of the printing system SY, a program for causing the computer to execute each processing step of the printing system SY, and a recording medium on which these are recorded are also included in the scope of the present invention. .

また、上記の各実施形態では、印刷装置32としてレシートプリンターを例示したが、レシートプリンター以外の印刷装置にも、本発明を適用可能である。また、印刷装置32以外に、ステータス取得、文字コード変換、画像変換を必要とする種々のデバイスに本発明を適用しても良い。また、上記の実施形態では、スクリプトの一例として、JavaScript(登録商標)を例示したが、これ以外の各種プログラミング言語を用いた場合でも本発明を適用可能である。その他、本発明の要旨を逸脱しない範囲で、適宜変更が可能である。   In each of the above embodiments, a receipt printer is exemplified as the printing device 32. However, the present invention can be applied to printing devices other than the receipt printer. In addition to the printing apparatus 32, the present invention may be applied to various devices that require status acquisition, character code conversion, and image conversion. In the above embodiment, JavaScript (registered trademark) is exemplified as an example of the script. However, the present invention can be applied even when various programming languages are used. Other modifications can be made as appropriate without departing from the scope of the present invention.

10…Webアプリケーションサーバー 15…HTTPサーバー 16…Webアプリケーション 20…ホスト 27…Webブラウザー 30…インテリジェント機能付き印刷装置 31…印刷制御装置 32…印刷装置 40…Webページ 46…HTTPサーバー 47…印刷装置リスト 54…バッファー 57…印刷装置情報 71…ブラウザー制御部 72…印刷データ生成部 73…印刷データ送信部 74…応答受信部 75…印刷装置情報表示部 76…印刷装置指定部 81…印刷データ受信部 82…コマンド生成部 83…コマンド送信部 84…応答取得部 85…応答返信部 86…印刷中止処理部 87…印刷装置情報取得部 88…印刷装置情報記憶部 89…印刷装置情報通知部 91…コマンド受信部 92…印刷部 93…応答送信部 94…印刷装置側記憶部 101…空印刷データ生成部 102…空印刷データ送信部 111…文字コード変換部 121…妥当性判定部 C1〜C10…汎用文字コード D1〜D6…画像データ SY…印刷システム   DESCRIPTION OF SYMBOLS 10 ... Web application server 15 ... HTTP server 16 ... Web application 20 ... Host 27 ... Web browser 30 ... Printing device with intelligent function 31 ... Print control device 32 ... Printing device 40 ... Web page 46 ... HTTP server 47 ... Printing device list 54 ... Buffer 57 ... Printing device information 71 ... Browser control unit 72 ... Print data generation unit 73 ... Print data transmission unit 74 ... Response reception unit 75 ... Printing device information display unit 76 ... Printing device designation unit 81 ... Print data reception unit 82 ... Command generation unit 83 ... Command transmission unit 84 ... Response acquisition unit 85 ... Response reply unit 86 ... Print cancel processing unit 87 ... Printing device information acquisition unit 88 ... Printing device information storage unit 89 ... Printing device information notification unit 91 ... Command reception unit 92 ... Printing section 93 ... Response transmission unit 94 ... Printing device side storage unit 101 ... Blank print data generation unit 102 ... Blank print data transmission unit 111 ... Character code conversion unit 121 ... Validity determination unit C1-C10 ... General-purpose character code D1-D6 ... Image Data SY ... Printing system

Claims (10)

カラーモードおよび画像サイズを指定する属性が付加された画像データを含む印刷データを受信する印刷データ受信部と、
前記カラーモードおよび前記画像サイズに基づいて、前記画像データの妥当性を判定する妥当性判定部と、
前記画像データが妥当と判定された場合、前記画像データを、前記カラーモードに対応した制御コマンドに変換し、画像印刷コマンドを生成するコマンド生成部と、
前記画像印刷コマンドを、印刷装置に送信するコマンド送信部と、を備え、
前記印刷データはマークアップ言語で記述されており、前記カラーモードおよび前記画像サイズは前記マークアップ言語の要素の属性として記述され、前記画像データは前記マークアップ言語の要素の内容として記述されていることを特徴とする印刷制御装置。
A print data receiving unit that receives print data including image data to which attributes for specifying a color mode and an image size are added;
A validity determination unit that determines the validity of the image data based on the color mode and the image size;
A command generation unit that converts the image data into a control command corresponding to the color mode and generates an image print command when the image data is determined to be valid;
A command transmission unit that transmits the image print command to a printing apparatus;
The print data is described in a markup language, the color mode and the image size are described as attributes of the markup language element, and the image data is described as the content of the markup language element. A printing control apparatus characterized by that.
記妥当性判定部は、前記画像データのデータ量が、前記カラーモードに応じた1画素あたりのデータ量と、前記画像サイズとの乗算値に等しい場合、前記画像データが妥当であると判定する請求項1に記載の印刷制御装置。 Determined before Symbol appropriateness determination unit, the data amount of the image data, 1 and the data amount per pixel in accordance with the color mode, equal to the multiplied value of the image size, the image data is valid The printing control apparatus according to claim 1. 前記コマンド生成部は、前記画像データが送信されたとき、前記画像印刷コマンドの生成前に、所定の印刷データに前記印刷装置の状態を取得するための状態取得コマンドを付加した印刷前コマンドを生成し、
前記コマンド送信部は、前記印刷前コマンドを、前記印刷装置に送信し、
前記印刷前コマンドに対する応答に基づいて、前記印刷装置が印刷不可能な状態であると判定した場合、印刷中止処理を行う印刷中止処理部と、を備え、
前記印刷中止処理は、印刷中止を前記印刷データの送信元に通知する処理と、前記印刷装置への前記画像印刷コマンドの送信を中止する処理を含む請求項1または2に記載の印刷制御装置。
The command generation unit generates a pre-print command in which a status acquisition command for acquiring the status of the printing apparatus is added to predetermined print data before the generation of the image print command when the image data is transmitted. And
The command transmission unit transmits the pre-printing command to the printing apparatus;
A print cancel processing unit that performs a print cancel process when it is determined that the printing apparatus is in a non-printable state based on a response to the pre-print command,
3. The print control apparatus according to claim 1, wherein the print cancel process includes a process of notifying the transmission source of the print data of a print stop and a process of canceling transmission of the image print command to the printing apparatus.
カラーモードおよび画像サイズを指定する属性が付加された画像データを含む印刷データを送信するホストと、
前記印刷データを印刷する印刷装置と、
前記ホストから前記印刷データを受信する印刷データ受信部、前記カラーモードおよび前記画像サイズに基づいて前記画像データの妥当性を判定する妥当性判定部、前記画像データが妥当と判定された場合は前記画像データを前記カラーモードに対応した制御コマンドに変換して画像印刷コマンドを生成するコマンド生成部、及び前記画像印刷コマンドを前記印刷装置に送信するコマンド送信部を有する印刷制御装置と、を備え
前記印刷データはマークアップ言語で記述されており、前記カラーモードおよび前記画像サイズは前記マークアップ言語の要素の属性として記述され、前記画像データは前記マークアップ言語の要素の内容として記述されていることを特徴とする印刷システム。
A host that transmits print data including image data to which attributes for specifying a color mode and an image size are added;
A printing device for printing the print data;
A print data receiving unit that receives the print data from the host, a validity determination unit that determines the validity of the image data based on the color mode and the image size, and when the image data is determined to be valid, A command generation unit that converts image data into a control command corresponding to the color mode to generate an image print command, and a print control device that has a command transmission unit that transmits the image print command to the printing device ,
The print data is described in a markup language, the color mode and the image size are described as attributes of the markup language element, and the image data is described as the content of the markup language element. A printing system characterized by that.
記妥当性判定部は、前記画像データのデータ量が、前記カラーモードに応じた1画素あたりのデータ量と、前記画像サイズとの乗算値に等しい場合、前記画像データが妥当であると判定する請求項に記載の印刷システム。 Determined before Symbol appropriateness determination unit, the data amount of the image data, 1 and the data amount per pixel in accordance with the color mode, equal to the multiplied value of the image size, the image data is valid The printing system according to claim 4 . 前記コマンド生成部は、前記ホストから前記画像データが送信されたとき、前記画像印刷コマンドの生成前に、所定の印刷データに前記印刷装置の状態を取得するための状態取得コマンドを付加した印刷前コマンドを生成し、
前記コマンド送信部は、前記印刷前コマンドを、前記印刷装置に送信し、
前記印刷前コマンドに対する応答に基づいて、前記印刷装置が印刷不可能な状態であると判定した場合、印刷中止処理を行う印刷中止処理部と、を備え、
前記印刷中止処理は、印刷中止を前記印刷データの送信元となる前記ホストに通知する処理と、前記印刷装置への前記画像印刷コマンドの送信を中止する処理を含む請求項4または5に記載の印刷システム。
When the image data is transmitted from the host, the command generation unit adds a status acquisition command for acquiring the status of the printing apparatus to predetermined print data before generating the image print command. Generate the command
The command transmission unit transmits the pre-printing command to the printing apparatus;
A print cancel processing unit that performs a print cancel process when it is determined that the printing apparatus is in a non-printable state based on a response to the pre-print command,
The print stop process, a process of notifying a print cancel to the host as a transmission source of the print data, according to claim 4 or 5 comprising a process to stop the transmission of the image print command to the printing device Printing system.
前記ホストは、Webブラウザーを動作させるブラウザー制御部を備えると共に、前記印刷制御装置は、HTTPサーバーを備え、
前記ホストは、
前記Webブラウザーで動作するスクリプトまたはプラグインを用いて前記画像データを生成し、前記印刷制御装置に対してHTTPによる印刷要求を行う請求項ないしのいずれか1項に記載の印刷システム。
The host includes a browser control unit that operates a web browser, and the print control apparatus includes an HTTP server,
The host is
Wherein generating the image data by using a script or plug-in to work with a Web browser, the printing system according to any one of claims 4 to 6 performs printing request by HTTP to the print control apparatus.
カラーモードおよび画像サイズを指定する属性が付加された画像データを含む印刷データを受信し、
前記カラーモードおよび前記画像サイズに基づいて、前記画像データの妥当性を判定し、
前記画像データが妥当と判定された場合、前記画像データを、前記カラーモードに対応した制御コマンドに変換して画像印刷コマンドを生成し、
前記画像印刷コマンドを、印刷装置に送信し、
前記印刷データはマークアップ言語で記述されており、前記カラーモードおよび前記画像サイズは前記マークアップ言語の要素の属性として記述され、前記画像データは前記マークアップ言語の要素の内容として記述されていることを特徴とする印刷制御方法。
Receive print data including image data with attributes that specify color mode and image size,
Determining the validity of the image data based on the color mode and the image size;
When it is determined that the image data is valid, the image data is converted into a control command corresponding to the color mode to generate an image print command,
Sending the image printing command to a printing device ;
The print data is described in a markup language, the color mode and the image size are described as attributes of the markup language element, and the image data is described as the content of the markup language element. And a printing control method.
記画像データの妥当性の判定は、前記画像データのデータ量が、前記カラーモードに応じた1画素あたりのデータ量と、前記画像サイズとの乗算値に等しい場合、前記画像データが妥当であると判定する請求項に記載の印刷制御方法。 The determination of validity of the previous SL image data, data amount of the image data, 1 and the data amount per pixel in accordance with the color mode, equal to the multiplied value of the image size, the image data is valid The print control method according to claim 8 , wherein the print control method is determined to be present. 前記画像印刷コマンドの生成は、前記画像データが送信されたとき、前記画像印刷コマンドの生成前に、所定の印刷データに前記印刷装置の状態を取得するための状態取得コマンドを付加した印刷前コマンドを生成し、
前記画像印刷コマンドの送信は、前記印刷前コマンドを、前記印刷装置に送信し、
前記印刷前コマンドに対する応答に基づいて、前記印刷装置が印刷不可能な状態であると判定した場合、印刷中止処理を行い、
前記印刷中止処理は、印刷中止を前記印刷データの送信元に通知する処理と、前記印刷装置への前記画像印刷コマンドの送信を中止する処理を含む請求項8または9に記載の印刷制御方法。
The generation of the image print command is performed by adding a status acquisition command for acquiring the status of the printing apparatus to predetermined print data before the generation of the image print command when the image data is transmitted. Produces
The image print command is transmitted by transmitting the pre-print command to the printing apparatus,
Based on the response to the pre-printing command, if it is determined that the printing apparatus is in a non-printable state, a print cancellation process is performed,
10. The print control method according to claim 8 , wherein the print canceling process includes a process of notifying the transmission source of the print data of a print stop and a process of canceling the transmission of the image print command to the printing apparatus.
JP2012084631A 2012-03-30 2012-04-03 Printing control apparatus, printing system, and printing control method Active JP6015077B2 (en)

Priority Applications (13)

Application Number Priority Date Filing Date Title
JP2012084631A JP6015077B2 (en) 2012-04-03 2012-04-03 Printing control apparatus, printing system, and printing control method
CN201310093903.4A CN103365607B (en) 2012-03-30 2013-03-22 Print control, print system and printing control method
CN201510716383.7A CN105278895B (en) 2012-03-30 2013-03-22 Print control, print system and printing control method
CN201510716374.8A CN105278894B (en) 2012-03-30 2013-03-22 Print control, print system and printing control method
TW102110757A TWI523766B (en) 2012-03-30 2013-03-26 Print control device, printing system, and print control method
EP13718917.1A EP2695048A1 (en) 2012-03-30 2013-03-27 Print control device, printing system, and print control method
KR1020157009658A KR101547094B1 (en) 2012-03-30 2013-03-27 Print control device
KR1020147000135A KR20140018430A (en) 2012-03-30 2013-03-27 Print control device, printing system, and print control method
RU2014143782/08A RU2599535C2 (en) 2012-03-30 2013-03-27 Print control device, printing system and print control method
KR1020157016746A KR101606335B1 (en) 2012-03-30 2013-03-27 Print control device
PCT/JP2013/060141 WO2013147314A1 (en) 2012-03-30 2013-03-27 Print control device, printing system, and print control method
US14/384,364 US10019204B2 (en) 2012-03-30 2013-03-27 Print control device, printing system, and print control method
US16/029,183 US10459668B2 (en) 2012-03-30 2018-07-06 Print control device, printing system, and print control method for generating image print commands from print data in markup language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012084631A JP6015077B2 (en) 2012-04-03 2012-04-03 Printing control apparatus, printing system, and printing control method

Publications (3)

Publication Number Publication Date
JP2013214228A JP2013214228A (en) 2013-10-17
JP2013214228A5 JP2013214228A5 (en) 2015-04-02
JP6015077B2 true JP6015077B2 (en) 2016-10-26

Family

ID=49587504

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012084631A Active JP6015077B2 (en) 2012-03-30 2012-04-03 Printing control apparatus, printing system, and printing control method

Country Status (1)

Country Link
JP (1) JP6015077B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6171530B2 (en) 2013-04-23 2017-08-02 セイコーエプソン株式会社 Printing control apparatus, printing system, and printing control method
JP6217477B2 (en) * 2014-03-14 2017-10-25 富士ゼロックス株式会社 Information processing apparatus, information processing system, information processing method, and program
JP6459765B2 (en) * 2015-05-11 2019-01-30 京セラドキュメントソリューションズ株式会社 Relay device for image forming apparatus
JP6349618B2 (en) 2015-07-13 2018-07-04 スター精密株式会社 Information provision system by data relay application
JP7099007B2 (en) 2018-03-30 2022-07-12 ブラザー工業株式会社 Application program
JP7339125B2 (en) * 2019-10-30 2023-09-05 シチズン時計株式会社 Printer control device and printer control method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004070521A (en) * 2002-08-02 2004-03-04 Canon Inc Control method for color and monochrome dispersed printing, program, storage medium, and device
JP4347159B2 (en) * 2004-08-05 2009-10-21 キヤノン株式会社 Image forming apparatus, print mode setting method, and printer driver
JP2010176164A (en) * 2009-01-27 2010-08-12 Seiko Epson Corp Server, and data reception method
JP5776156B2 (en) * 2010-09-16 2015-09-09 株式会社リコー Printing apparatus, printing system, printing apparatus control method, control program, and storage medium storing control program

Also Published As

Publication number Publication date
JP2013214228A (en) 2013-10-17

Similar Documents

Publication Publication Date Title
US10459668B2 (en) Print control device, printing system, and print control method for generating image print commands from print data in markup language
JP6123166B2 (en) Printing control apparatus, printing system, and printing control method
JP6015077B2 (en) Printing control apparatus, printing system, and printing control method
US9086832B2 (en) Printer
KR101716615B1 (en) Print control device and print control method
JP2008152545A (en) Print processing system and print method
JP6106939B2 (en) Printing control apparatus, printing apparatus, printing system, and printing control method
JP6031797B2 (en) Printing control apparatus, printing system, and printing system control method
JP5790267B2 (en) Output control system and control method
JP5151766B2 (en) Printing system, host device used in the system, and print processing program
JP6019871B2 (en) Printing apparatus, printing system, and POS system
JP6402575B2 (en) Printing system and printing system control method
JP5614084B2 (en) Information processing apparatus and information processing method
JP2008102704A (en) Device apparatus and its control method, computer program and storage medium
CN111193800A (en) Instruction interaction method, device, server and system based on server analysis
JP2008041018A (en) Peripheral device including printing mechanism and control method thereof
JP2014019113A (en) Printing device, printing system, and pos system
JP2008181250A (en) Data processor, data processing system and data processing program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20150107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150217

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160412

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160603

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20160609

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20160613

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160830

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160912

R150 Certificate of patent or registration of utility model

Ref document number: 6015077

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150