JP2007280148A - Printer and printing method - Google Patents
Printer and printing method Download PDFInfo
- Publication number
- JP2007280148A JP2007280148A JP2006106933A JP2006106933A JP2007280148A JP 2007280148 A JP2007280148 A JP 2007280148A JP 2006106933 A JP2006106933 A JP 2006106933A JP 2006106933 A JP2006106933 A JP 2006106933A JP 2007280148 A JP2007280148 A JP 2007280148A
- Authority
- JP
- Japan
- Prior art keywords
- program
- command generation
- printer command
- generation program
- printer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Stored Programmes (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
Description
本発明は印刷装置、印刷方法及びコンピュータプログラムに関し、例えば、プリンタコマンド生成プログラムの置き換えに用いて好適な技術に関する。 The present invention relates to a printing apparatus, a printing method, and a computer program, for example, a technique suitable for use in replacing a printer command generation program.
従来、Unix(登録商標)系のOS上で動作するアプリケーションプログラムから印刷する場合、アプリケーションプログラムは先ず印刷データを生成する。そして、それをOSが用意しているスプーリング・システムに印刷要求として投入して、その後はスプーリング・システムによって処理がなされるのが通常である。 Conventionally, when printing from an application program that runs on a UNIX (registered trademark) OS, the application program first generates print data. Then, it is usually submitted as a print request to a spooling system prepared by the OS, and thereafter, processing is performed by the spooling system.
図2を用いてそれを説明する。アプリケーションプログラム201が生成した印刷データは、スプーリング・システム202に対して印刷要求として渡される。スプーリング・システム202は、印刷要求として投入された印刷データを、プリンタを制御するためのプリンタコマンドに変換するために、レンダラプログラム203を起動する。レンダラプログラム203は通常、印刷データを読み込んで解析する印刷データ解析プログラム204と、解析した結果をプリンタコマンドに変換するプリンタコマンド生成プログラム205とから構成されている。
This will be described with reference to FIG. The print data generated by the
印刷データ解析プログラム204は、受け取った印刷データを順次解析しそれらをプリンタコマンドに変換するために、プリンタコマンド生成プログラムが用意する直線描画や矩形描画、矩形塗り、多角形塗り、画像描画など様々な描画APIを適宜呼び出す。プリンタコマンド生成プログラム205には、描画APIの各々に対応した直線描画や矩形描画、矩形塗り、多角形塗り、画像描画用の個別プリンタコマンド生成プログラム206が用意されている。そして、印刷データ解析プログラム204によって順次呼び出されたAPIに対応する個別プリンタコマンド生成プログラム206が実行されることによってプリンタコマンドが順次生成され、生成されたプリンタコマンドがプリンタに対して出力される。
The print
このような、印刷データ解析プログラム204とプリンタコマンド生成プログラム205およびプリンタコマンドに含まれる個別プリンタコマンド生成プログラム206は、一体のレンダラプログラム203として提供されるのが一般的であった。
The print
しかし、プリンタコマンド生成プログラム205はプリンタの種類や機種毎に用意しなければならない。このことから、印刷データ解析プログラム204とプリンタコマンド生成プログラム205が一体となっている構成の場合、多くのプリンタの種類や機種に対応するレンダラプログラム203を用意しようとすると、レンダラプログラム全体のサイズが肥大する。そして、結果として唯一つのプリンタを使用するためのプログラムを配布する場合でも、配布用のメディアを多く消費したり、ユーザがレンダラプログラムをサーバからダウンロードするために要する時間が長くなったりしてしまう問題点があった。
However, the printer
また、近年では図3のように、レンダラプログラム303とプリンタコマンド生成プログラム305とを別々に構成し、印刷データ解析プログラム304のみがレンダラプログラム303に含まれる方式もとられるようになってきた。この場合、レンダラプログラム303がその実行時にプリンタコマンド生成プログラム305をメモリにロードし、動的にリンクする。その後、レンダラプログラム303に含まれる印刷データ解析プログラム304が、受け取った印刷データを順次解析しそれらをプリンタコマンドに変換するために、プリンタコマンド生成プログラム305が用意する直線描画や矩形描画、矩形塗り、多角形塗り、画像描画など様々な描画APIを適宜呼び出す。
In recent years, as shown in FIG. 3, the
プリンタコマンド生成プログラム305には、描画APIの各々に対応した直線描画や矩形描画、矩形塗り、多角形塗り、画像描画用の個別プリンタコマンド生成プログラム306が用意されている。そして、印刷データ解析プログラム304によって順次呼び出されたAPIに対応する個別プリンタコマンド生成プログラム306が実行されることによってプリンタコマンドが順次生成され、生成されたプリンタコマンドがプリンタに対して出力される。
In the printer
このような構成では、ユーザはレンダラプログラム303とプリンタコマンド生成プログラム305を別々に、配布用のメディアもしくはサーバからダウンロードしてインストールする。これによって、配布用のメディアの消費を少なくすることが可能となった。また、一旦レンダラプログラム303とプリンタコマンド生成プログラム305をサーバからダウンロードしてインストールした後、別の機種用のプリンタコマンド生成プログラム305のみをサーバからダウンロードしてインストールする。これによって、ダウンロード時間を短縮することが可能となった。
In such a configuration, the user downloads and installs the
しかし、一方で、ユーザは先ずレンダラプログラム303とプリンタコマンド生成プログラム305とを別々にインストールせねばならない。どちらか一方のインストールの方法を間違えたりインストールを忘れたりすると、アプリケーション301が生成した印刷データがスプーリング・システム302に印刷要求として渡されても印刷データ解析プログラム304を含むレンダラプログラム303が無い。このため印刷データを解析できなかったり、プリンタコマンド生成プログラム305が無いためにプリンタを制御するためのプリンタコマンドを生成することができず、結果として印刷できなかったりすることになり、ユーザビリティの視点から問題が生じていた。
However, on the other hand, the user must first install the
また、プリンタコマンド生成プログラム305に不具合があった場合に、本構成ではN個全ての個別プリンタコマンド生成プログラム306を含んだプリンタコマンド生成プログラム305全体を入れ替えなければならない。このため、プリンタコマンド生成プログラムのサイズが大きい場合に問題となっていた。
Further, when there is a problem with the printer
さらに、プログラム開発の観点からは、プリンタコマンド生成プログラム305のデバグ作業において効率的なデバグを可能とするためには、プリンタの動作を一部変更して動作を確認する際に、レンダラプログラム303全体をコンパイルしたりリンクし直したりすることなく、プリンタコマンド生成プログラム305の中の一部の個別プリンタコマンド生成プログラム306を入れ替えたり、入れ替えた機能を元に戻したりする方法が求められていた。
Further, from the viewpoint of program development, in order to enable efficient debugging in the debugging work of the printer
本発明は前述の問題点に鑑み、プリンタコマンド生成プログラムの置き換えを行うことができるようにすることを目的としている。 An object of the present invention is to make it possible to replace a printer command generation program in view of the above-described problems.
そこで本発明では、前記アプリケーションプログラムから出力される印刷データを変換してプリンタに対してプリンタコマンドを出力する印刷方法であって、修正プリンタコマンド生成プログラムの有無を判定する判定工程と、前記レンダラプログラムと共に提供されるプリンタコマンド生成プログラムのバージョン番号を取得する第1の番号取得工程と、前記修正プリンタコマンド生成プログラムを実行メモリにロードし、前記レンダラプログラムと動的にリンクする動的リンク工程と、前記修正プリンタコマンド生成プログラムのバージョン番号を取得する第2の番号取得工程と、前記プリンタコマンド生成プログラムのバージョン番号と前記修正プリンタコマンド生成プログラムのバージョン番号とを比較する比較工程と、前記比較工程における比較結果に基づいて前記プリンタコマンドを生成するプリンタコマンド生成工程とを有することを特徴とする印刷方法等、を提供する。 Therefore, in the present invention, there is provided a printing method for converting print data output from the application program and outputting a printer command to a printer, a determination step for determining the presence or absence of a modified printer command generation program, and the renderer program A first number acquisition step of acquiring a version number of a printer command generation program provided together with the dynamic link step of loading the modified printer command generation program into an execution memory and dynamically linking with the renderer program; A second number acquisition step of acquiring a version number of the modified printer command generation program; a comparison step of comparing the version number of the printer command generation program with the version number of the modified printer command generation program; To provide a printing method or the like, characterized in that it comprises a printer command generating process of generating the printer command based on the comparison result in.
本発明によれば、レンダラプログラムと一体となったプリンタコマンド生成プログラムの配布が可能となると同時に、当該プリンタコマンド生成プログラムの機能の全部または一部の修正プリンタコマンド生成プログラムによる置き換えが可能となる。また、必要最小限の修正を行う修正プリンタコマンド生成プログラムを提供することによって、置き換えの必要がないプログラムが配布用のメディアを消費したり余計なダウンロード時間を要したりすることなく、効率的なプリンタコマンド生成プログラムの置き換えが可能となる。さらに、レンダラプログラム全体をコンパイルしたりリンクし直したりすることなく、プリンタコマンド生成プログラムの機能の全部または一部の置き換えを可能とし、プログラム開発の観点からも、効率的なプログラムのデバグが可能となる。 According to the present invention, it is possible to distribute a printer command generation program integrated with a renderer program, and at the same time, it is possible to replace all or part of the functions of the printer command generation program with a modified printer command generation program. In addition, by providing a modified printer command generation program that performs the minimum necessary corrections, programs that do not need to be replaced are efficient without consuming media for distribution or requiring extra download time. It is possible to replace the printer command generation program. In addition, it is possible to replace all or part of the functions of the printer command generation program without compiling or re-linking the entire renderer program, enabling efficient program debugging from the viewpoint of program development. Become.
(第1の実施形態)
以下、図面に基づいて、本発明の実施形態を詳細に、かつ具体的に説明する。
図1は、本実施形態のプログラムの構成例を示すブロック図である。
101はアプリケーションプログラムであり、102はスプーリング・システムである。また、103はレンダラプログラムであり、104はレンダラプログラム103に含まれる印刷データ解析プログラムである。
(First embodiment)
Hereinafter, embodiments of the present invention will be described in detail and specifically based on the drawings.
FIG. 1 is a block diagram illustrating a configuration example of a program according to the present embodiment.
105はプリンタコマンド生成プログラムであり、106はプリンタコマンド生成プログラムに含まれる個別プリンタコマンド生成プログラムである。また、107は修正プリンタコマンド生成プログラムであり、108は修正プリンタコマンド生成プログラムに含まれる個別プリンタコマンド生成プログラムである。
さらに、110は印刷データ解析プログラムに含まれる関数テーブルである。関数テーブル110は、プリンタコマンド生成プログラム105に含まれる個別プリンタコマンド生成プログラム106の各々のASCII文字列による関数名と先頭アドレスを格納するテーブルである。また、関数テーブル110の要素数は、個別プリンタコマンド生成プログラム106の数分だけ予め用意するものとする。なお、関数テーブル110の関数名を格納する領域は、個別プリンタコマンド生成プログラム106の関数名を格納するのに十分な長さの固定バイト数の領域とする。そして、その領域にASCIIコードおよび0で終端された文字列を格納するものとする。
図6は、本実施形態におけるコンピュータシステム構成例を示すブロック図である。
CPU601は制御を司る中央処理装置である。RAM602はプログラムをロードして動作させると共にデータを一時的に格納しておくメモリである。外部記憶装置603は、ハードディスク等の外部記憶装置によって構成され、プログラムを格納する。I/O604は、プリンタと接続するためのUSB等の物理インタフェースである。
FIG. 6 is a block diagram illustrating a configuration example of a computer system according to the present embodiment.
A
図4−1、図4−2及び図4−3は、本実施形態における印刷装置の処理手順を示すフローチャートである。図1及び図4−1〜図4−3に示すフローチャートを参照しながら、本装置の動作を以下に説明する。 4A, 4B, and 4C are flowcharts illustrating a processing procedure of the printing apparatus according to the present exemplary embodiment. The operation of this apparatus will be described below with reference to the flowcharts shown in FIG. 1 and FIGS. 4-1 to 4-3.
まず、図1のアプリケーションプログラム101が印刷データを生成し、それをスプーリング・システム102に対して印刷要求として投入するによって、印刷処理が開始される。当該印刷処理の開始が、図4−1のフローチャートの印刷開始に相当する。
First, when the
印刷処理が開始されると、ステップS401ではスプーリング・システム102がレンダラプログラム103をメモリ上にロードして起動する。レンダラプログラム103とスプーリング・システム102はOS上における別の実行単位、即ち別のプロセスとして実行され、スプーリング・システム102からレンダラプログラム103への印刷データの受け渡しは、OSに備わるパイプの機能を用いて行う。
When the printing process is started, the
レンダラプログラム103は起動されると、ステップS402において、プリンタコマンド生成プログラム105をメモリ上にロードしてリンクする。この時、レンダラプログラム103とプリンタコマンド生成プログラム105はOS上における同じ実行単位、即ち同一プロセスとして実行される。
When the
次に、ステップS403において、レンダラプログラム103はリンクしたプリンタコマンド生成プログラム105のデータ領域に記録されているバージョン番号を取得してそれをレジスタR1にセットする。
In step S403, the
次に、ステップS404において、レンダラプログラム103がプリンタコマンド生成プログラム105に含まれる各々の個別プリンタコマンド生成プログラム106の関数名と先頭アドレスを、関数テーブル110にセットする。この時点で、関数テーブル110の全ての要素には、プリンタコマンド生成プログラム105に含まれる何れかの個別プリンタコマンド生成プログラム106の関数名および先頭アドレスがセットされることになる。
In step S <b> 404, the
次に、ステップS405において、修正プリンタコマンド生成プログラム107の有無をチェックする。修正プリンタコマンド生成プログラム107は、予めハードディスクのような外部記憶装置603の専用のディレクトリに予め記録されているものとする。そして、修正プリンタコマンド生成プログラム107の有無のチェックは、外部記憶装置603の専用のディレクトリに、プログラムが存在するか否かによって行う。
Next, in step S405, the presence or absence of the modified printer
このチェックの結果、前記ディレクトリにプログラムが存在しない場合は、修正プリンタコマンド生成プログラムが一切用意されていないものと判断し、図4−3におけるステップS420に進む。一方、ステップS405のチェックの結果、前記ディレクトリにプログラムが存在する場合は、ステップS411に進む。前記ディレクトリにプログラムが存在する場合についての詳細な説明は後述する。 As a result of this check, if there is no program in the directory, it is determined that no modified printer command generation program is prepared, and the process proceeds to step S420 in FIG. 4-3. On the other hand, if it is determined in step S405 that the program exists in the directory, the process proceeds to step S411. A detailed description of the case where the program exists in the directory will be described later.
ステップS420では、レンダラプログラム103がOSが用意するパイプ経由でスプーリング・システム102から印刷データを順次読み込んでレンダラプログラム103のバッファに格納し、そのデータを印刷データ解析プログラム104に渡す。それと並行して、レンダラプログラム103とは別のプロセスであるスプーリング・システム102は、順次印刷データをパイプに書き込むが、全ての印刷データをパイプ経由でレンダラプログラム103に送付し終えるとパイプをクローズする。レンダラプログラム103はパイプがクローズされたことを検知することによって、全ての印刷データの読み込みが完了したか否かを判別する。
In step S420, the
この判別の結果、レンダラプログラム103がスプーリング・システム102から全ての印刷データの読み込みの完了した場合は、ステップS423に進み、完了していない場合は、ステップS421に進む。なお、印刷データ解析プログラム104はレンダラプログラム103に含まれるプログラムであることから、レンダラプログラム103から印刷データ解析プログラム104への印刷データの受け渡しはレンダラプログラム103のバッファを介して行う。
As a result of the determination, if the
次に、ステップS421では、印刷データ解析プログラム104が印刷データを解析する。そして、印刷データの種類に応じて直線描画や矩形描画、矩形塗り、多角形塗り、画像描画用の個別プリンタコマンド生成プログラム106を実行するために、各々のプログラムの先頭アドレスが格納されている関数テーブル110を参照する。これにより、各プログラムの先頭アドレスを取得し、そのアドレスから個別プリンタコマンド生成プログラム106実行することによって個々のプリンタコマンドを生成する。
Next, in step S421, the print
次に、ステップS422では、生成したプリンタコマンドをプリンタに出力してプリンタを駆動し、ステップS420に戻って処理を繰り返す。一方、ステップS423において、レンダラプログラム103がリンクしていたプリンタコマンド生成プログラム105を解放し、レンダラプログラム103自身のプロセスの実行を終了して、全体の印刷処理を終了する。
In step S422, the generated printer command is output to the printer to drive the printer, and the process returns to step S420 to repeat the process. On the other hand, in step S423, the printer
以上の処理のように、アプリケーションが生成した印刷データが複数のプリンタコマンド生成プログラム105によってプリンタコマンドに変換されてプリンタに出力されることによってプリンタが駆動され、印刷結果がプリンタから出力される。
As described above, the print data generated by the application is converted into a printer command by a plurality of printer
次に、修正プリンタコマンド生成プログラム107によって、プリンタコマンドの生成プログラムの一部を置き換える処理について説明する。図1のアプリケーションプログラム101が印刷データを生成し、それをスプーリング・システム102に対して印刷要求として投入するによって、印刷処理が開始される点においては、修正プリンタコマンド生成プログラム107が無い場合と同様である。また、ステップS401からステップS404までの処理についても同様である。
Next, processing for replacing a part of the printer command generation program by the modified printer
次に、ステップS405では、修正プリンタコマンド生成プログラム107の有無をチェックする。修正プリンタコマンド生成プログラム107の有無のチェックは、同様に外部記憶装置603の専用のディレクトリに、プログラムが存在するか否かによって行う。上記ディレクトリにプログラムが存在する場合は、修正プリンタコマンド生成プログラム107が存在すると判断して、図4−2のステップS411に処理を進める。
In step S405, the presence / absence of the modified printer
ステップS411では、まず修正プリンタコマンド生成プログラム107のプログラム名の一覧を作成する。プログラム名の一覧は、外部記憶装置603の専用のディレクトリに格納されているプログラムの名前を1つずつ取り出して、図5のようなリスト構造を用いて作成することにより行う。
In step S411, a list of program names of the modified printer
図5では、修正プリンタコマンド生成プログラム107の名前リストのポインタ501に、最初のプログラム名を格納するための要素511の先頭アドレスを格納する。なお、修正プリンタコマンド生成プログラム107の名前リストのポインタ501は、RAM602に用意するものとする。
In FIG. 5, the head address of the
要素511中のポインタ"next"には、次のプログラム名を格納するための要素512の先頭アドレスを格納し、要素511中のポインタ"str"には、要素511が格納するプログラム名の文字列521の先頭アドレスを格納する。文字列はASCIIコード等の一般的な文字コードで表現され、その終端は値0の文字コードによって表す。以下、専用のディレクトリに格納されているプログラムの名前を1つずつ要素512、513、514と格納し、最後の要素のポインタ"next"にはNULL値(ゼロ)を格納して、最後の要素であることを明示する。
The pointer “next” in the
なお、図5は要素が4つ、即ち専用のディレクトリに格納されているプログラムの数が4つで、それらの名前4つをリスト構造に格納した場合となっているが、プログラムの数は4つに制限されるものではない。専用ディレクトリに格納されている1つ以上のプログラムの個数と同じ要素数を持つリスト構造を作るものとする。 FIG. 5 shows a case in which there are four elements, that is, the number of programs stored in the dedicated directory is four, and four names thereof are stored in the list structure, but the number of programs is four. It is not limited to one. Assume that a list structure having the same number of elements as the number of one or more programs stored in a dedicated directory is created.
次に、ステップS412では、図5に示す修正プリンタコマンド生成プログラム107の名前の先頭アドレスを指すポインタ501を用いて、リストの最初の要素511に格納されているプログラム名を指定する。そして、最初の修正プリンタコマンド生成プログラム107を外部記憶装置603の専用ディレクトリからメモリ上にロードしてリンクする。
Next, in step S412, the program name stored in the
次に、ステップS413では、ステップS412にてリンクした修正プリンタコマンド生成プログラム107のデータ領域に記録されているバージョン番号を取得してそれをレジスタR2にセットする。
In step S413, the version number recorded in the data area of the modified printer
次にステップS414では、レジスタR1とレジスタR2にセットされている2つのバージョン番号を比較して、レジスタR2のバージョン番号の方がレジスタR1のバージョン番号よりも新しいか否かを判断する。この判断の結果、レジスタR2のバージョン番号の方が新しい場合は、ステップS415に進み、それ以外の場合はステップS416に進む。 Next, in step S414, the two version numbers set in the registers R1 and R2 are compared, and it is determined whether or not the version number of the register R2 is newer than the version number of the register R1. As a result of the determination, if the version number of the register R2 is newer, the process proceeds to step S415. Otherwise, the process proceeds to step S416.
ステップS415では、修正プリンタコマンド生成プログラム107に含まれる個別プリンタコマンド生成プログラム108の先頭アドレスを、関数テーブル110中の対応する個別プリンタコマンド生成プログラム106の要素に対して上書きする。なお、個別プリンタコマンド生成プログラム108に対応する関数テーブル110中の要素の選択は、個別プリンタコマンド生成プログラムの関数名を関数テーブル110のN個の要素に格納されている関数名と一つ一つ照合する。そして、一致した要素X(1≦X≦N)を選択すればよい。
In step S415, the head address of the individual printer
本処理よって、元々プリンタコマンド生成プログラム105において用意されていた個別プリンタコマンド生成プログラム106は、もはや印刷データ解析プログラム104からは呼び出されることはなくなる。そして、修正プリンタコマンド生成プログラム107によって提供される新しい個別プリンタコマンド生成プログラム108が代わって呼び出され実行されることとなる。一方、ステップS416では、メモリ上にロードしてリンクした修正プリンタコマンド生成プログラム107のリンクを解除しメモリから解放してステップS417へ処理を進める。
By this processing, the individual printer
次にステップS417では、図5のリスト構造の要素中のポインタ"next"を参照して、NULL値が格納されているか否かを判断する。この判断の結果、NULL値が格納されていなければ次の要素があるものと判断して、ステップS418に進み、NULL値が格納されていた場合は次の要素はないと判断して、図4−3のステップS420に進む。 In step S417, it is determined whether or not a NULL value is stored with reference to the pointer “next” in the elements of the list structure of FIG. If a NULL value is not stored as a result of this determination, it is determined that there is a next element, and the process proceeds to step S418. If a NULL value is stored, it is determined that there is no next element, and FIG. -3.
ステップS418では、次の要素に格納されているプログラム名を指定して、その修正プリンタコマンド生成プログラム107をメモリ上にロードしリンクして、ステップS413に戻る。
In step S418, the program name stored in the next element is designated, the corrected printer
以上の一連の処理によって、外部記憶装置603の専用のディレクトリに格納されている修正プリンタコマンド生成プログラム107のうち、プリンタコマンド生成プログラム105のバージョン番号よりも新しいバージョン番号を持つ修正プリンタコマンド生成プログラム107がメモリ上にロードかつリンクされる。それらのプログラムに含まれている個別プリンタコマンド生成プログラム108の先頭アドレスが関数テーブル110にセットされた後に、ステップS420に処理が進められることになる。
Through the series of processes described above, the modified printer
ステップS420では、修正プリンタコマンド生成プログラム107が無い場合と同様に、レンダラプログラム103がOSが用意するパイプ経由で印刷データを順次読み込んでレンダラプログラム103のバッファに格納する。そして、そのデータを印刷データ解析プログラム104に渡す。
In step S420, as in the case where there is no modified printer
それと並行して、スプーリング・システム102が、順次印刷データをパイプに書き込み、全ての印刷データを送付し終えるとパイプをクローズし、レンダラプログラム103はパイプがクローズされたことを検知する。これによって、全ての印刷データの読み込みが完了したか否かを判別する。この判別の結果、全ての印刷データの読み込みの完了した場合は、ステップS423に進み、完了していない場合は、ステップS421に進む。
At the same time, the
次に、ステップS421では、関数テーブル110の幾つかの要素には、修正プリンタコマンド生成プログラム107内の個別プリンタコマンド生成プログラム108の先頭アドレスがセットされている。また、残りの要素には、プリンタコマンド生成プログラム105内の個別プリンタコマンド生成プログラム106の先頭アドレスがセットされたままとなっている。
In step S421, the top address of the individual printer
この状態で、印刷データ解析プログラム104が印刷データを解析する。印刷データの種類に応じて、直線描画や矩形描画、矩形塗り、多角形塗り、画像描画用の個別プリンタコマンド生成プログラムを実行するために、各々のプログラムの先頭アドレスが格納されている関数テーブル110を参照する。そして、各プログラムの先頭アドレスを取得する。
In this state, the print
次に、そのアドレスから個別プリンタコマンド生成プログラムを実行することによって、修正プリンタコマンド生成プログラム107によって置き換えられたプリンタコマンド生成は個別プリンタコマンド生成プログラム108によって行われる。それ以外のプリンタコマンド生成は、元のプリンタコマンド生成プログラム105内の個別プリンタコマンド生成プログラム106によって行われる。
Next, by executing the individual printer command generation program from the address, the printer command generation replaced by the modified printer
次に、ステップS422では、生成したプリンタコマンドをプリンタに出力しプリンタを駆動して、ステップS420に戻って処理を繰り返す。最後に、ステップS420からステップS422までの一連の処理によって全ての印刷データの読み込みとそれによるプリンタコマンドの生成およびプリンタへの出力が完了すると、ステップS423に処理を進める。 In step S422, the generated printer command is output to the printer to drive the printer, and the process returns to step S420 to repeat the process. Finally, when reading of all print data, generation of a printer command and output to the printer are completed by a series of processes from step S420 to step S422, the process proceeds to step S423.
ステップS423において、レンダラプログラム103がリンクしていたプリンタコマンド生成プログラムおよび全ての修正プリンタコマンド生成プログラムを解放し、レンダラプログラム103自身のプロセスの実行を終了して、全体の印刷処理を終了する。
In step S423, the printer command generation program linked to the
以上の処理のように、アプリケーションが生成した印刷データがプリンタコマンドに変換される際に、修正プリンタコマンド生成プログラム107によって提供される個別プリンタコマンド生成プログラム108によって、任意かつ複数のプリンタコマンド生成プログラム105が置き換えられた上でプリンタコマンドが生成され、プリンタに出力されることによってプリンタが駆動され、印刷結果がプリンタから出力される。
As described above, when the print data generated by the application is converted into a printer command, the individual printer
以上の説明では、プリンタコマンド生成プログラム105内の個別プリンタコマンド生成プログラム106を、別の個別プリンタコマンド生成プログラム108によって置き換える場合の処理の流れについて説明してきた。しかしながら、プリンタコマンド生成プログラム105内のどの個別プリンタコマンド生成プログラム106を置き換えるかは、外部記憶装置603の専用のディレクトリに格納する修正プリンタコマンド生成プログラム107の数やそれらが提供する個別プリンタコマンド生成プログラム108によって、いかようにも変更可能であるという点が重要である。
In the above description, the flow of processing when the individual printer
この特性によって、例えば、プリンタコマンドの生成プログラムの一部をデバグするために、デバグ用の個別プリンタコマンド生成プログラム108を含んだ修正プリンタコマンド生成プログラム107を用意し、それを専用ディレクトリに格納する。その後アプリケーションから印刷要求を発行させるだけで、プリンタコマンド生成プログラム105を再コンパイルおよび再リンクすることなく、その機能の一部を置き換えるデバグ用の個別プリンタコマンド生成プログラムを容易に実行させることが可能となる。
Based on this characteristic, for example, in order to debug a part of the printer command generation program, a modified printer
さらに、デバグが完了した時点で、専用ディレクトリから修正プリンタコマンド生成プログラム107を削除するだけで、元のプリンタコマンド生成プログラム105の処理に簡単に戻すことができる。これだけでなく、デバグの結果、プリンタコマンド生成プログラム105の一部の機能を置き換える必要が発生した場合には、それ用の修正プリンタコマンド生成プログラム107を専用ディレクトリに格納する。これだけで、プリンタコマンド生成プログラム105を再コンパイルおよび再リンクすることなく、所望の個別プリンタ生成プログラムのみを置き換えることが可能となる。
Further, when the debugging is completed, it is possible to easily return to the processing of the original printer
さらに本実施形態では、ユーザが新しいバージョンのプリンタコマンド生成プログラム105をインストールした場合には、それよりも古いバージョンを持つ修正プリンタコマンド生成プログラム107が実行されないようにすることが可能となる。この特性によって、プリンタコマンド生成プログラム105の全体を入れ替える必要がある場合には、バージョンの新しいプリンタコマンド生成プログラム105を提供する。プリンタコマンド生成プログラム105の一部の機能のみを入れ替える必要がある場合には、バージョンの新しい修正プリンタコマンド生成プログラム107提供する。これにより、入れ替えるプログラムを必要最小限に抑えつつ、プリンタコマンド生成プログラム105の全体の入れ替えも矛盾無く行うことが可能となる。
Furthermore, in the present embodiment, when the user installs a new version of the printer
(本発明に係る他の実施形態)
前述した本発明の実施形態における印刷装置を構成する各手段、並びに印刷方法の各工程は、コンピュータのRAMやROMなどに記憶されたプログラムが動作することによって実現できる。このプログラム及び前記プログラムを記録したコンピュータ読み取り可能な記録媒体は本発明に含まれる。
(Other embodiments according to the present invention)
Each means constituting the printing apparatus and each process of the printing method in the embodiment of the present invention described above can be realized by operating a program stored in a RAM or ROM of a computer. This program and a computer-readable recording medium recording the program are included in the present invention.
また、本発明は、例えば、システム、装置、方法、プログラムもしくは記録媒体等としての実施形態も可能であり、具体的には、複数の機器から構成されるシステムに適用してもよいし、また、一つの機器からなる装置に適用してもよい。 In addition, the present invention can be implemented as, for example, a system, apparatus, method, program, or recording medium. Specifically, the present invention may be applied to a system including a plurality of devices. The present invention may be applied to an apparatus composed of a single device.
なお、本発明は、前述した実施形態の機能を実現するソフトウェアのプログラム(実施形態では図4−1〜図4−3に示すフローチャートに対応したプログラム)を、システムまたは装置に直接、または遠隔から供給する。そして、そのシステムまたは装置のコンピュータが前記供給されたプログラムコードを読み出して実行することによっても達成される場合を含む。 In the present invention, a software program (in the embodiment, a program corresponding to the flowcharts shown in FIGS. 4-1 to 4-3) that realizes the functions of the above-described embodiments is directly or remotely transmitted to the system or apparatus. Supply. In addition, this includes a case where the system or the computer of the apparatus is also achieved by reading and executing the supplied program code.
したがって、本発明の機能処理をコンピュータで実現するために、前記コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明は、本発明の機能処理を実現するためのコンピュータプログラム自体も含まれる。 Accordingly, since the functions of the present invention are implemented by computer, the program code installed in the computer also implements the present invention. In other words, the present invention includes a computer program itself for realizing the functional processing of the present invention.
その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等の形態であってもよい。 In that case, as long as it has the function of a program, it may be in the form of object code, a program executed by an interpreter, script data supplied to the OS, and the like.
プログラムを供給するための記録媒体としては、例えば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスクなどがある。さらに、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM、DVD−R)などもある。 Examples of the recording medium for supplying the program include a floppy (registered trademark) disk, a hard disk, an optical disk, and a magneto-optical disk. Further, there are MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD-R) and the like.
その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続する方法がある。そして、前記ホームページから本発明のコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルをハードディスク等の記録媒体にダウンロードすることによっても供給できる。 As another program supply method, there is a method of connecting to a homepage on the Internet using a browser of a client computer. The computer program itself of the present invention or a compressed file including an automatic installation function can be downloaded from the homepage by downloading it to a recording medium such as a hard disk.
また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明に含まれるものである。 It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the present invention.
また、その他の方法として、本発明のプログラムを暗号化してCD−ROM等の記録媒体に格納してユーザに配布し、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせる。そして、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。 As another method, the program of the present invention is encrypted, stored in a recording medium such as a CD-ROM, distributed to users, and encrypted from a homepage via the Internet to users who have cleared predetermined conditions. Download the key information to be solved. It is also possible to execute the encrypted program by using the key information and install the program on a computer.
また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される。さらに、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行い、その処理によっても前述した実施形態の機能が実現され得る。 Further, the functions of the above-described embodiments are realized by the computer executing the read program. Furthermore, based on the instructions of the program, an OS or the like running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments can be realized by the processing.
さらに、その他の方法として、まず記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。そして、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によっても前述した実施形態の機能が実現される。 As another method, the program read from the recording medium is first written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Then, based on the instructions of the program, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are also realized by the processing.
101 アプリケーションプログラム
102 スプーリング・システム
103 レンダラプログラム
104 印刷データ解析プログラム
105 プリンタコマンド生成プログラム
106 個別プリンタコマンド生成プログラム
107 修正プリンタコマンド生成プログラム
108 個別プリンタコマンド生成プログラム
110 関数テーブル
201 アプリケーションプログラム
202 スプーリング・システム
203 レンダラプログラム
204 印刷データ解析プログラム
205 プリンタコマンド生成プログラム
206 個別プリンタコマンド生成プログラム
301 アプリケーションプログラム
302 スプーリング・システム
303 レンダラプログラム
304 印刷データ解析プログラム
305 プリンタコマンド生成プログラム
306 個別プリンタコマンド生成プログラム
501 ポインタ
511〜514 要素
521 プログラム名の文字列
601 CPU
602 RAM
603 外部記憶装置
604 物理インタフェース
DESCRIPTION OF
602 RAM
603
Claims (4)
特定のディレクトリ中の修正プリンタコマンド生成プログラムの有無を判定する判定手段と、
レンダラプログラムと共に提供されるプリンタコマンド生成プログラムのバージョン番号を取得する第1の番号取得手段と、
前記修正プリンタコマンド生成プログラムを実行メモリにロードし、前記レンダラプログラムと動的にリンクする動的リンク手段と、
前記修正プリンタコマンド生成プログラムのバージョン番号を取得する第2の番号取得手段と、
前記レンダラプログラムと共に提供されるプリンタコマンド生成プログラムのバージョン番号と、前記修正プリンタコマンド生成プログラムのバージョン番号とを比較する比較手段とを有し、
前記レンダラプログラムと共に提供されるプリンタコマンド生成プログラムのバージョン番号の方が前記修正プリンタコマンド生成プログラムのバージョン番号よりも新しい番号であれば、前記レンダラプログラムと共に提供されるプリンタコマンド生成プログラムを使用して前記プリンタコマンドの生成を行い、前記レンダラプログラムと共に提供されるプリンタコマンド生成プログラムのバージョン番号の方が前記修正プリンタコマンド生成プログラムのバージョン番号よりも古い番号であれば、前記修正プリンタコマンド生成プログラムを使用して前記プリンタコマンドの生成を行い、前記レンダラプログラムと共に提供されるプリンタコマンド生成プログラムのバージョン番号と前記修正プリンタコマンド生成プログラムのバージョン番号とが等しい番号であれば、前記レンダラプログラムと共に提供されるプリンタコマンド生成プログラムまたは前記修正プリンタコマンド生成プログラムの何れか一方を使用して前記プリンタコマンドの生成を行うことを特徴とする印刷装置。 A printing apparatus that converts print data output from an application program and outputs a printer command to a printer.
Determining means for determining the presence or absence of a modified printer command generation program in a specific directory;
First number acquisition means for acquiring a version number of a printer command generation program provided together with the renderer program;
Dynamic link means for loading the modified printer command generation program into an execution memory and dynamically linking with the renderer program;
Second number acquisition means for acquiring a version number of the modified printer command generation program;
Comparing means for comparing the version number of the printer command generation program provided together with the renderer program and the version number of the modified printer command generation program;
If the version number of the printer command generation program provided with the renderer program is newer than the version number of the modified printer command generation program, the printer command generation program provided with the renderer program is used to If the version number of the printer command generation program provided with the renderer program is older than the version number of the modified printer command generation program, the modified printer command generation program is used. The printer command is generated, the version number of the printer command generation program provided together with the renderer program, and the version of the modified printer command generation program. If numbers are equal numbers, printing apparatus characterized by using either the printer command generation program or the modified printer command generation program is provided with the renderer program for generating the printer commands.
修正プリンタコマンド生成プログラムの有無を判定する判定工程と、
前記レンダラプログラムと共に提供されるプリンタコマンド生成プログラムのバージョン番号を取得する第1の番号取得工程と、
前記修正プリンタコマンド生成プログラムを実行メモリにロードし、前記レンダラプログラムと動的にリンクする動的リンク工程と、
前記修正プリンタコマンド生成プログラムのバージョン番号を取得する第2の番号取得工程と、
前記プリンタコマンド生成プログラムのバージョン番号と前記修正プリンタコマンド生成プログラムのバージョン番号とを比較する比較工程と、
前記比較工程における比較結果に基づいて前記プリンタコマンドを生成するプリンタコマンド生成工程とを有することを特徴とする印刷方法。 A printing method for converting print data output from the application program and outputting a printer command to a printer,
A determination step of determining the presence or absence of a modified printer command generation program;
A first number acquisition step of acquiring a version number of a printer command generation program provided together with the renderer program;
A dynamic link step of loading the modified printer command generation program into an execution memory and dynamically linking with the renderer program;
A second number acquisition step of acquiring a version number of the modified printer command generation program;
A comparison step of comparing the version number of the printer command generation program with the version number of the modified printer command generation program;
And a printer command generation step of generating the printer command based on a comparison result in the comparison step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006106933A JP2007280148A (en) | 2006-04-07 | 2006-04-07 | Printer and printing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006106933A JP2007280148A (en) | 2006-04-07 | 2006-04-07 | Printer and printing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007280148A true JP2007280148A (en) | 2007-10-25 |
Family
ID=38681520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006106933A Pending JP2007280148A (en) | 2006-04-07 | 2006-04-07 | Printer and printing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007280148A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021049717A (en) * | 2019-09-25 | 2021-04-01 | 東芝テック株式会社 | Controller of printer head |
-
2006
- 2006-04-07 JP JP2006106933A patent/JP2007280148A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021049717A (en) * | 2019-09-25 | 2021-04-01 | 東芝テック株式会社 | Controller of printer head |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4979287B2 (en) | Image processing apparatus and program | |
US8392872B2 (en) | Pseudo translation within integrated development environment | |
JP5007046B2 (en) | Maintaining component-based software products | |
JP2008234673A (en) | System and method for managing application installation for mobile device | |
US8561049B2 (en) | Method and system for updating content stored in a storage device | |
US20020144249A1 (en) | Method and apparatus for installing and upgrading an application in a computer system | |
US5991763A (en) | Method and apparatus for embedding concatenated data files into object files during runtime in a virtual file system | |
US8397055B2 (en) | Method and system for post-build modification of firmware binaries to support different hardware configurations | |
JP2007018175A (en) | Information processor, its method, and program | |
JP2000242501A (en) | Information processor, information processing method and program writing device | |
JP2011096100A (en) | Setting change device and program | |
JP2008502968A (en) | Method for loading software comprising an intermediate object-oriented language onto a portable device | |
JP2011070533A (en) | Code editing program and code editing apparatus | |
JP5014366B2 (en) | Information processing apparatus, method and program | |
JP2007280148A (en) | Printer and printing method | |
JP5380895B2 (en) | Management program, management method and management apparatus | |
JP6597356B2 (en) | Control program, control device, and control method | |
JP2018077690A (en) | Installation considering compatibility depending on difference in application execution environment, and firmware update method | |
JP4484001B2 (en) | Library function version matching method. | |
JP2005251127A (en) | Pattern system construction device and pattern application device | |
JP2010072685A (en) | Operation implementation system, operation implementation device, control device, operation implementation program, and control program | |
JP2006268609A (en) | File update program and file update method | |
JP2004348667A (en) | Program binding support device and program binding support program | |
JP2003015827A (en) | Device, method for processing character, computer program and storage medium | |
WO2012066635A1 (en) | Test method, test device, and test execution program |