JP5533382B2 - Printer driver, information processing apparatus, and computer-readable recording medium recording printer driver - Google Patents
Printer driver, information processing apparatus, and computer-readable recording medium recording printer driver Download PDFInfo
- Publication number
- JP5533382B2 JP5533382B2 JP2010159896A JP2010159896A JP5533382B2 JP 5533382 B2 JP5533382 B2 JP 5533382B2 JP 2010159896 A JP2010159896 A JP 2010159896A JP 2010159896 A JP2010159896 A JP 2010159896A JP 5533382 B2 JP5533382 B2 JP 5533382B2
- Authority
- JP
- Japan
- Prior art keywords
- printer driver
- setting value
- data structure
- information
- program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は、プリンタドライバ、情報処理装置、およびプリンタドライバを記録したコンピュータ読み取り可能な記録媒体に関する。 The present invention relates to a printer driver, an information processing apparatus, and a computer-readable recording medium that records the printer driver.
プリンタドライバは、アプリケーションからの指示を受けて印刷を実行する。その際、アプリケーションからの印刷指示は、例えば、MS Windows(登録商標)環境では、DEVMODE構造体と呼ばれるデータ構造体を利用することで、プリンタドライバへ伝達される。このDEVMODE構造体には、プリンタドライバが備える印刷機能を余すことなくその設定情報を保持することができる。 The printer driver executes printing in response to an instruction from the application. At this time, a print instruction from the application is transmitted to the printer driver by using a data structure called a DEVMODE structure in, for example, an MS Windows (registered trademark) environment. This DEVMODE structure can hold the setting information without leaving the printing function of the printer driver.
ところで、プリンタは、バージョンアップやオプションの追加によって機能が拡張される場合がある。例えば、プリンタ本体にフィニッシャーなどを取り付けたり、取り外したりすると利用できる機能が増減する。このような機能の増減があると、プリンタドライバが保持しなければならない設定値等の情報も変化する。 By the way, the function of a printer may be expanded by upgrading or adding options. For example, the number of functions that can be used increases or decreases when a finisher or the like is attached to or removed from the printer body. When the function increases or decreases, information such as setting values that the printer driver must hold also changes.
このような状況に対して、印刷装置の機能拡張に依らずに印刷装置が処理可能なデータを生成することができるようにした技術が提案されている。例えば、特許文献1に開示された技術では、まず、印刷設定を格納するためのデータ構造体(例えば、DEVMODE構造体)に、印刷装置の機能に関する機能設定情報に基づき設定される印刷設定値を割り当てるための領域を確保して、この領域に印刷設定値を割り当てている。そして、上記機能設定情報を参照することによってデータ構造体に割り当てられた印刷設定値から印刷装置が処理可能なデータを生成している。特許文献1の技術では、このような構成をとることにより、印刷装置の機能拡張に依らずに印刷装置が処理可能なデータを生成することができるようにしている。
In response to such a situation, a technique has been proposed in which data that can be processed by the printing apparatus can be generated without depending on the function expansion of the printing apparatus. For example, in the technique disclosed in
このように、従来のプリンタドライバでは、上記特許文献1でもそうであるが、設定値はDEVMODE構造体のようなデータ構造体という形式で保存するのが一般的である。
As described above, in the conventional printer driver, as is the case with
ところで、DEVMODE構造体は、プログラム上でデータを格納する形式であり、コーディング時にそのデータ構造が静的に決定するものである。よって、プリンタドライバに機能が拡張されるようなバージョンアップが行われその機能が増減すると、特に機能が増えたときには、増えた機能をアプリケーションから利用できるように、このデータ構造体を更新(再設計)しなければならない。つまり再度コーディングおよびコンパイルをして印刷設定を格納するデータ構造体を拡張しなければならない。 Incidentally, the DEVMODE structure is a format for storing data on a program, and the data structure is statically determined at the time of coding. Therefore, when a version upgrade that expands the functions of the printer driver is performed and the functions increase or decrease, this data structure is updated (redesigned) so that the increased functions can be used from the application, especially when the functions increase. )Must. In other words, the data structure that stores the print settings must be extended by coding and compiling again.
他方、DEVMODE構造体には複数の機能の設定情報(各設定情報は基本的には独立している)を値として保持することができるものであるが、ある機能が有効な場合、排他的に別の機能は無効にしなければならない、等の機能間の排他制御が必要になる場合がある。プリンタドライバのバージョンアップ等により機能拡張を行うと、この排他制御の数も、同時に増えることが知られている。そのため、設定値を保存するDEVMODE構造体の拡張と同時に、DEVMODE構造体に格納されている設定値の排他制御を行う処理も同時に拡張しなければならない。 On the other hand, in the DEVMODE structure, setting information of a plurality of functions (each setting information is basically independent) can be stored as a value. There may be a need for exclusive control between functions, such as another function must be disabled. It is known that the number of exclusive controls increases at the same time when the function is expanded by upgrading the printer driver version or the like. Therefore, at the same time as the expansion of the DEVMODE structure for storing the setting value, the process for performing exclusive control of the setting value stored in the DEVMODE structure must be expanded at the same time.
しかし、プリンタドライバには、アプリケーションからバージョンアップ前(機能拡張前)の古いDEVMODE構造体を受け取り、印刷指示を受けることがある。これはアプリケーション自身がDEVMODE構造体を保持することができることに起因する(例えば、アプリケーションによって作成されたファイル中にDEVMODE構造体が保持され、ファイルを開いたときに保持されているDEVMODE構造体が利用される場合がある)。 However, the printer driver may receive an old DEVMODE structure before upgrading (before function expansion) from an application and receive a print instruction. This is because the application itself can hold the DEVMODE structure (for example, the DEVMODE structure is held in the file created by the application, and the DEVMODE structure held when the file is opened is used. May be.)
その場合、プリンタドライバは古い形式のDEVMODE構造体を受け取り、その受け取ったDEVMODE構造体に対して、適切な排他制御や設定値の妥当性検証を行うValidation処理を実施しなければならない。ところが、従来の方法では、古いDEVMODE構造体と新しいValidation処理の間で不整合が生じて、正確な排他制御ができなくなるという問題があった。 In that case, the printer driver must receive an old-format DEVMODE structure and perform validation processing for performing appropriate exclusive control and validity verification of the set value on the received DEVMODE structure. However, in the conventional method, there is a problem that inconsistency occurs between the old DEVMODE structure and the new validation process, and accurate exclusive control cannot be performed.
本発明は、上記に鑑みてなされたものであって、プリンタドライバのバージョンアップ等により機能の変更があっても、印刷に係る諸設定値(印刷設定情報)が設定されるデータ構造体と、印刷設定情報を適正化するための印刷設定値適正化プログラムとの間に生じる不整合を解消して、適切な印刷設定値適正化処理を実施できるようにした、プリンタドライバ、情報処理装置、およびプリンタドライバを記録したコンピュータ読み取り可能な記録媒体を提供することを目的とする。 The present invention has been made in view of the above, and a data structure in which various setting values (print setting information) related to printing are set even when the function is changed due to a version upgrade of a printer driver, and the like. A printer driver, an information processing apparatus, and an information processing apparatus, which are capable of performing an appropriate print setting value optimization process by eliminating inconsistencies that occur with a print setting value optimization program for optimizing print setting information An object of the present invention is to provide a computer-readable recording medium in which a printer driver is recorded.
上述した課題を解決し、目的を達成するために、本発明は、外部プログラムとの間で印刷設定情報の授受を行うためのデータ構造体を介して印刷設定を行うことができるプリンタドライバにおいて、コンピュータを、前記データ構造体に、印刷設定情報および印刷設定値適正化プログラムを格納する格納手段と、前記データ構造体に格納された印刷設定値適正化プログラムを利用して、前記データ構造体に格納された設定値情報を適正化する設定値適性化手段として機能させることを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides a printer driver capable of performing print settings via a data structure for exchanging print setting information with an external program. Using the storage means for storing print setting information and a print setting value optimization program in the data structure, and the print setting value optimization program stored in the data structure, It is characterized by functioning as set value suitability means for optimizing stored set value information.
また、本発明は、外部プログラムとの間で印刷設定情報の授受を行うためのデータ構造体を介して印刷設定を行うことができるプリンタドライバを実装する情報処理装置において、前記データ構造体に、印刷設定情報および印刷設定値適正化プログラムを格納する格納手段と、前記データ構造体に格納された印刷設定値適正化プログラムを利用して、前記データ構造体に格納された設定値情報を適正化する設定値適性化手段と、を備えることを特徴とする。 In addition, the present invention provides an information processing apparatus equipped with a printer driver capable of performing print settings via a data structure for transferring print setting information to and from an external program. Using the storage means for storing the print setting information and the print setting value optimization program and the print setting value optimization program stored in the data structure, the setting value information stored in the data structure is optimized. And a set value suitability means for performing.
また、本発明は、上記プリンタドライバを記録したコンピュータ読み取り可能な記録媒体である。 The present invention is also a computer-readable recording medium on which the printer driver is recorded.
本発明によれば、プリンタドライバの機能が拡張(変更)されても、印刷に係る諸設定値が設定されるデータ構造体と、諸設定値を適正化するための印刷設定値適正化処理を行うプログラムとの間に生じる不整合を解消することができる。その結果、適切な印刷設定値適正化処理を実施することができる。 According to the present invention, even when the function of the printer driver is expanded (changed), the data structure in which various setting values related to printing are set, and the print setting value optimization processing for optimizing the various setting values are performed. It is possible to eliminate inconsistencies that occur between programs to be executed. As a result, an appropriate print setting value optimization process can be performed.
以下に添付図面を参照して、この発明にかかるプリンタシステムの一実施の形態を詳細に説明する。なお、共通する構成要素には共通の符号を附している。 Hereinafter, an embodiment of a printer system according to the present invention will be described in detail with reference to the accompanying drawings. In addition, the common code | symbol is attached | subjected to the common component.
(プリンタシステムの全体構成)
図1は、本発明の一実施の形態にかかるプリンタシステムの全体構成図を示した図である。図1に示すように、本実施の形態ではPC100とプリンタ150とがネットワーク160を介して接続されているものとする。そして、PC100からの印刷要求に応じて、プリンタ150が印刷処理を行う。
(Overall configuration of printer system)
FIG. 1 is a diagram showing the overall configuration of a printer system according to an embodiment of the present invention. As shown in FIG. 1, in this embodiment, it is assumed that a PC 100 and a
(PC100の構成)
図2は、PC100の構成を示すブロック図である。図2に示すように、PC100は、処理部101と、記憶部102と、通信部103とを備えている。処理部101は、図示しない制御手段としてのCPU(Central Processing Unit)と、ROMおよびメインメモリとなるRAMを有するメモリ群とを含んで構成されている。PC100の起動・実行時には、ROMおよび記憶部102からアプリケーション104と、OS105と、各種ドライバ(図2においては、プリンタドライバ106のみ記載)が、メインメモリ上にロードされ展開されて、これらがCPUにより実行される。なお、PC100は、キーボードやマウスなどの入力装置やディスプレイなどの出力装置等を備える通常のコンピュータを利用したハードウェア構成を有するが、図2においては説明の簡単のため省略している。
(Configuration of PC100)
FIG. 2 is a block diagram showing the configuration of the PC 100. As illustrated in FIG. 2, the PC 100 includes a processing unit 101, a
図2に示すプリンタドライバ106内の機能ブロックは、プリンタ150の制御を実現するための主要部となる機能又は手段である。特に、コアドライバ111は、プリンタドライバ106の核となる部分であり、プリンタドライバとしての基本的な機能を有する。これに対し、各プラグイン(図2では、プラグインA・113およびプラグインB・114のみ例示)は、コアドライバ111のみからなるプリンタドライバ106に対してその機能を拡張するためのプログラムであり、コアドライバ111と組み合わさって(機能拡張された)プリンタドライバ106を構成する。
The functional blocks in the
通信部103は、図1に示したネットワーク160を介して接続されたプリンタ150と情報の送受信を行う。
The
アプリケーション104は、ユーザが印刷指示をすることができるソフトウェアとする。ユーザはアプリケーション104で編集したデータを印刷したい場合、アプリケーション104が、ユーザによる印刷指示を受け付ける。この場合、アプリケーション104は、単体でプリンタ150に対する印刷データの生成を行わず、上記印刷指示に応じた印刷要求と共に、印刷対象の情報をOS105に渡す。
The
OS105は、PC100のハードウェアとソフトウェアとを管理するプログラムである。OS105は、プログラムの起動、情報の読み込みや保存の制御等を行う。OSのうち代表的なものとしては、MS Windows(登録商標)等が知られている。また、OS105は、アプリケーション104から渡された印刷要求と共に、印刷対象の情報(ドキュメントデータ、画像データ等)を、プリンタドライバ106に渡す。
The
記憶部102は、様々な情報を記憶する記憶手段である。具体的にはHDD等である。記憶される情報には、コアドライバ111や各プラグインが有する所定の機能を実現するための処理に関する情報(処理に用いる設定値や、設定値の変更をするための表示情報など、処理に必要なあらゆる情報)を定義した設定情報がある。この設定情報の例としては、レイアウト情報、保存先情報、機能情報、及びプラグイン情報等が挙げられる(下記)。
The
その他、OS105により提供されるDEVMODE構造体やレジストリ等や、初期の標準機能についてValidation処理を行うためのValidationプログラムや、プリンタドライバ106のバージョンアップに伴い追加されるバージョンアップ用Validationプログラムや、プラグインの追加に伴い追加される追加機能用Validationプログラムも記憶部102に記憶される。なお、本明細書において、上記各Validationプログラムを、Validation用プログラム(印刷設定値適正化プログラム)と総称する。
In addition, a DEVMODE structure provided by the
レイアウト情報は、設定画面に表示されるGUIコンポーネントのレイアウトが記述された情報である。保存先情報は、各設定値の保存場所についての情報が記述された情報である。機能情報は、接続されたプリンタの機能(仕様)に関する情報等が記述された情報である。プラグイン情報は、追加されたプラグインに関して記述された情報である。 The layout information is information describing the layout of the GUI component displayed on the setting screen. The storage destination information is information describing information about the storage location of each setting value. The function information is information describing information on the function (specification) of the connected printer. The plug-in information is information described about the added plug-in.
プリンタドライバ106は、このドライバが有する機能を果たすためのモジュール群として、コアドライバ111と、インターフェース部112と、プラグインとして、プラグインA・113と、プラグインB・114とを備えている。もちろん、図2の例は一例であって、プラグインは任意に追加および削除することができる。
The
コアドライバ111は、プリンタドライバ106としての標準機能を有する。また、コアドライバ111は、プリンタドライバ106としての機能を果たすためのモジュール群として、UIの制御を行う印刷設定部120、描画の制御を行う描画部130、およびValidation用の各プログラム(スクリプト)を実行するインタプリタであるValidationプログラム実行環境140を備える。なお、印刷設定部120及び描画部130は、インストールされたプラグインを確認する際に、上記プラグイン情報を参照する。これにより、コアドライバ111は、インストールされているプラグインを確認できる。
The
また、コアドライバ111に含まれる上記モジュール群は、標準的な印刷処理のみならず、インストールされたプラグインに含まれるモジュールではできない部分的な処理を、上述した設定情報(レイアウト情報、保存先情報、機能情報、プラグイン情報)に従って代行する。そして、記憶部102に記憶される設定情報が、プラグインのインストーラにより書き込まれ、コアドライバ111の印刷設定部120及び描画部130が、書き込まれた設定情報を参照することで、代行することを可能としている。なお、レイアウト情報、保存先情報、プラグイン情報については、各プラグインについての各情報がコアドライバ111のレイアウト情報、保存先情報、プラグイン情報に追記され、機能情報については、コアドライバ111および各プラグイン用の機能情報が、独立したファイルとして記憶部102に記憶される。
The module group included in the
印刷設定部120は、設定画面表示部121、振分部122、文字列化部123、圧縮部124、圧縮データ保存部125、圧縮データ取得部126、および解凍部127を有している。
The
設定画面表示部121は、UIとしてモニタ画面に表示するGUI(印刷設定画面)の表示制御をする。本実施形態にかかる設定画面表示部121は、記憶部102に記憶されたレイアウト情報および機能情報に基づいて印刷設定画面を表示する。また、印刷設定画面の表示時には、Validationプログラム実行環境140にて実行されるValidation用プログラムによる処理結果を受け、禁則に従った使用可能な機能、および設定可能な設定(設定範囲、設定値)についてのみGUIコンポーネントの表示を行う。
The setting screen display unit 121 controls display of a GUI (print setting screen) displayed on the monitor screen as a UI. The setting screen display unit 121 according to the present embodiment displays a print setting screen based on the layout information and function information stored in the
なお、Validation用プログラムは、前述のように印刷処理に用いられる諸設定値の妥当性や各設定間の禁則などを検証し管理するためのプログラムである。本実施形態では、例えばLUA(ルア)形式のスクリプトからなるValidation用プログラムを、そのインタプリタであるValidationプログラム実行環境(設定値適性化手段)140が実行することによって、DEVMODE構造体に設定された設定値や、その各設定間の禁則等を管理するようにしている。本実施形態では、ValidationプログラムとしてLUAスクリプトを利用することで、プログラムのコンパイルを不要としている。また、このスクリプトをバイトコード化した場合は、処理を高速化することができる。なお、本実施形態において特徴的なDEVMODE構造体の構成の詳細は後述する。 The validation program is a program for verifying and managing the validity of various setting values used in the printing process and the prohibition between the settings as described above. In the present embodiment, the setting set in the DEVMODE structure is executed by the validation program execution environment (setting value suiting means) 140, which is an interpreter, of a validation program composed of, for example, an LUA script. It manages the value and the prohibition between each setting. In this embodiment, the use of an LUA script as a validation program eliminates the need for program compilation. In addition, when this script is converted into a byte code, the processing speed can be increased. Details of the structure of the DEVMODE structure that is characteristic in the present embodiment will be described later.
振分部122は、保存先情報を参照し、各設定値を保存先情報で指定された保存先毎に振分ける処理を行う。
The
文字列化部123は、振分部122によって振分けられた設定値を、保存先毎に、各設定値を設定名と設定値の組みからなる可変長の文字列とする文字列化を行う。例えば、{“Duplex”:“on”,“Orientation”:“portrait”,…}といった文字列を生成する。この文字列においては、設定名が各設定値を識別するための識別子あるいは設定値のアドレスとして機能するものとなる。このように設定情報を文字列化することにより、設定値の増減に柔軟に対応することができる。
The character
圧縮部124は、文字列化部123によって生成された保存先毎の各文字列に対しZip圧縮等の圧縮処理を施し、保存先毎の圧縮データを生成する。この圧縮処理によってデータサイズを削減することにより、設定値が増加したとしても、固定サイズのデータ構造体であるDEVMODE構造体に格納する圧縮データの増加量を抑えることができる。なお、ここで用いる圧縮方式は任意である。また、この圧縮部124は、Validation用プログラムの圧縮も行う。
The
圧縮データ保存部(格納手段)125は、圧縮部124により生成された各圧縮データをそれぞれの保存先(レジストリまたはDEVMODE構造体の設定値保存領域)に保存し、圧縮されたValidation用プログラムはDEVMODE構造体のプログラム領域に格納し保存する。なお、DEVMODE構造体は、図3に示すように、OS105によって用途が定められた固定領域となるPublic領域と、ドライバ作成者側が自由に情報を管理できる自由領域となるPrivate領域とからなっている。本実施形態では、DEVMODE構造体に格納する圧縮データは、DEVMODE構造体のPrivate領域に保存するものとする(詳細は後述)。
The compressed data storage unit (storage unit) 125 stores each compressed data generated by the
圧縮データ取得部126は、レジストリおよびDEVMODE構造体から保存されている圧縮データを読み取る。
The compressed
解凍部127は、圧縮データ取得部126によりレジストリおよびDEVMODE構造体から取得された圧縮データを解凍し、内部メモリに展開する。
The
一方、描画部130は、圧縮データ取得部131、解凍部132および印刷データ生成部133を有している。
On the other hand, the
圧縮データ取得部131は、レジストリおよびDEVMODE構造体から保存されている圧縮データを読み取る。 The compressed data acquisition unit 131 reads the compressed data stored from the registry and the DEVMODE structure.
解凍部132は、圧縮データ取得部131により、レジストリおよびDEVMODE構造体から取得された圧縮データを解凍し、内部メモリに展開する。
The
印刷データ生成部133は、解凍後の印刷設定(現在値)について、Validationプログラム実行環境140にて実行される解凍後のValidation用プログラムによる処理結果を受け、この設定値が禁則に従っているかどうか、および印刷設定の妥当性の確認を行い、妥当性が確認された印刷設定と、アプリケーション104から印刷を要求された描画データとからプリンタ150が解釈可能な印刷データを生成する。そして生成された印刷データを、通信部103を介して、プリンタ150に送信する。
The print data generation unit 133 receives the processing result by the validation program after decompression executed in the validation
インターフェース(I/F)部112は、プラグインの追加を受け付けるインターフェースである。プリンタドライバ106にプラグインが追加された場合、コアドライバ111は、当該インターフェース部112を介して、追加されたプラグインの各モジュールを呼び出すことができる。また、追加されたプラグインも、当該インターフェース部112を介して、コアドライバ111の各モジュールを呼び出すことが可能となる。
The interface (I / F)
図中破線で囲まれたプラグインA・113及びプラグインB・114は、コアドライバ111に機能を追加するダイナミック・リンク・ライブラリとして構成されたプラグインとする。これらのプラグインは、所定の機能を実現するために、一つ以上のモジュールで構成されている。同図に示すプラグインは、印刷設定部及び描画部を備えたものとなっているが、一般的にはその構成は任意である。
Plug-ins A and 113 and plug-ins B and 114 surrounded by broken lines in the figure are plug-ins configured as a dynamic link library that adds functions to the
そして、各プラグインの印刷設定部は、インターフェース部112を介して行われたコアドライバ111の印刷設定部120からの表示命令に従って、各プラグインが有する機能についての設定画面を表示する。一方、各プラグインの描画部は、インターフェース部112を介して行われたコアドライバ111の描画部130からの描画命令に従って、プラグインが有する機能を用いてなされる描画機能を実行する。
Then, the print setting unit of each plug-in displays a setting screen for the function of each plug-in in accordance with a display command from the
つまり、コアドライバ111の印刷設定部120の拡張部分がプラグインの印刷設定部となる。そして、コアドライバ111の描画部130の拡張部分がプラグインの描画部となる。
That is, the extended part of the
また、追加するプラグインによっては、コアドライバ111のモジュール(印刷設定部120、描画部130)の機能を利用することで、すなわち、コアドライバ111が機能代行することで、プラグインに全てのモジュールを作成する必要がなくなった。これにより、プラグインの開発負担を軽減できる。
In addition, depending on the plug-in to be added, all the modules are included in the plug-in by using the functions of the modules (
プラグインに必要な機能の一部をコアドライバ111のモジュールに代行させるために、コアドライバ111の各モジュールが参照する外部ファイルを更新する必要がある。つまり、プラグインは、コアドライバ111にはない機能を有する当該プラグインに固有のモジュールの追加と、コアドライバ111の各モジュールが参照する設定情報を更新するだけで、プラグインとして動作することができる。
In order to substitute a part of the functions necessary for the plug-in by the module of the
なお、本実施形態にかかるプリンタドライバ106に対するプラグインの追加は、プラグイン自身のダイナミック・リンク・ライブラリおよび追加機能用Validationプログラムの追加と、さらに、レイアウト情報、保存先情報、及びプラグイン情報のいずれか一つ以上に対する記述の追加ならびに機能情報の追加をすることで行う。これにより、PC100にインストール済みのプリンタドライバ106に対して、プラグインの追加を容易に行うことが可能となる。つまり、ユーザはプリンタドライバ自体の再インストールをする必要がなくなる。
The addition of the plug-in to the
ここで、本実施形態で用いるDEVMODE構造体について図3、4を用いて説明する。図3は、DEVMODE構造体について説明する図であり、図4は、アプリケーション104とプリンタドライバ106間で行われるDEVMODE構造体のハンドリングについて説明する図である。
Here, the DEVMODE structure used in the present embodiment will be described with reference to FIGS. FIG. 3 is a diagram for explaining the DEVMODE structure, and FIG. 4 is a diagram for explaining the handling of the DEVMODE structure performed between the
アプリケーション104とプリンタドライバ106は、DEVMODE構造体と呼ばれるデータ構造体で、印刷設定のやり取りを行う。このDEVMODE構造体は、すべてのプリンタドライバで共通のデータ形式である。しかし、プリンタドライバが備える機能は、それぞれ異なるのが常である。よって、DEVMODE構造体には、どのプリンタドライバでも共通に具備している機能に関する設定値と、プリンタドライバ毎に異なる機能に関する設定値を格納するための2つの領域(Public領域301、Private領域302)が存在する。
The
Public領域301は、どのプリンタドライバでも共通の機能に関する設定値を格納する領域である。一方、Private領域302は、プリンタドライバ毎に異なる機能に関する設定値を格納する領域である。プリンタドライバのベンダーは、Private領域302を自由に定義して、利用することができる。
The
アプリケーション104は、Public領域301の設定値を取得し、またその設定をすることができる。しかし、Private領域302の設定値を取得したり、設定したりすることはできない。Private領域302は、プリンタドライバ106のみが参照することができる。
The
アプリケーション104からプリンタドライバ106へ印刷設定を指示するときには、先述のPublic領域301の印刷設定をアプリケーション104が変更して、プリンタドライバ106に対して変更済みのDEVMODE構造体(入力DEVMODE)を入力することで行う。
When instructing print settings from the
しかし、Public領域301で設定できる機能は少なく、アプリケーション利用者は、Private領域302に存在する設定値を変更しなければ、プリンタドライバ106の具備する機能を十分に設定することができない。そこで、一般的にプリンタドライバは、Private領域302に存在する設定値を変更することができるようにするGUI表示を行う機能をアプリケーション104に提供する。このGUIにより、Public領域301とPrivate領域302に存在するすべての設定値について設定をすることができるように、アプリケーション利用者に対して便宜を図っている。
However, there are few functions that can be set in the
なお、アプリケーション104は、上記のようにPublic領域301のみアクセスできるが、DEVMODE構造体の全体(Public領域301およびPrivate領域302)を取得して、それを保持することができる。本実施形態では、Private領域302に、設定値のみならず、Validation用プログラム(スクリプト)を格納し、プリンタドライバ106のバージョンアップや、プラグインによる機能拡張があっても、このDEVMODE構造体に格納されたValidation用プログラムを用いてValidation処理を行えるようにする。なお、Private領域302では、設定値は設定値保存領域303に格納され、Validation用プログラムはプログラム領域304に格納される。
Although the
アプリケーション104とプリンタドライバ106間でDEVMODE構造体を用いて、印刷設定のやり取りを行っていることは前述した。アプリケーション104は、プリンタドライバ106に対して、そのプリンタドライバ固有のDEVMODE構造体を取得する要求をすることができる。この取得要求によって得られるのが出力DEVMODE402である。
As described above, the print settings are exchanged between the
アプリケーション104が取得した出力DEVMODE402は、以下に示す3つの方法によって、再度プリンタドライバ106に印刷設定を伝達するための入力DEVMODE401とすることができる。出力DEVMODE402を入力DEVMODE401にするためのアプリケーション104側の動作は以下の3つである。
The
(1)プリンタドライバ106に対して行った取得要求で得られた出力DEVMODE402をそのまま、入力DEVMODE401とする。
(1) The
(2)プリンタドライバ106に対して行った取得要求で得られた出力DEVMODE402をプリンタドライバ106が具備するGUIを表示することにより、そのPublic領域およびPrivate領域に存在する、すべての機能に関する設定を行い、変更を行った出力DEVMODE402を入力DEVMODE401とする。
(2) By displaying the GUI provided in the
(3)プリンタドライバ106に対して行った取得要求で得られた出力DEVMODE402のPublic領域の設定値のみを変更して、入力DEVMODE401とする。
(3) Only the setting value of the public area of the
いずれにせよ、アプリケーション104は、プリンタドライバ106に対してDEVMODE構造体の取得要求を行い、得られたDEVMODE構造体の内容を変更することにより、任意の印刷設定をプリンタドライバ106へと伝達する。
In any case, the
ところで、アプリケーション104は前述の通り、プリンタドライバ106から得られたDEVMODE構造体(出力DEVMODE402)を保持することができる。そのため、アプリケーション104がDEVMODE構造体を保持している間に、プリンタドライバ106のみがバージョンアップされてしまうことが多々ある。この場合、アプリケーション104はプリンタドライバ106のバージョンアップを知ることができないため、古い互換性のないDEVMODE構造体(入力DEVMODE401)を、バージョンアップしたプリンタドライバ106に伝達してしまう不都合が生じる。
As described above, the
プリンタドライバ106は、このようなDEVMODE構造体の不整合を生じる状況を考慮して、プリンタドライバ106は、その入力情報となる入力DEVMODE401に格納されている各設定値を検証し、出力DEVMODE402として、現在の正しい設定状況を反映したDEVMODE構造体をアプリケーション104に渡さなければならない。そのために、Validation処理を行う。
The
Validation処理は、Public領域に設定された各設定値およびPrivate領域に設定された各設定値の間に、不整合が生じた場合、それを解決する責務と、設定された値自体の妥当性検証(例えば、入力範囲が0〜100の場合に、−1や101は不正値になるため、補正しなければならない)が主な責務となる。このValidation処理は、入力DEVMODE401ではPublic領域の設定値がPrivate領域の設定値に対して作用する。出力DEVMODE402ではPrivate領域の設定値がPublic領域の設定値に対して作用する。ここまでがプリンタドライバ106を含む一般的なプリンタドライバが備えるDEVMODE構造体のハンドリング方法の説明である。
In the validation process, if a mismatch occurs between each setting value set in the Public area and each setting value set in the Private area, the responsibility for solving the inconsistency and the validity verification of the set value itself (For example, when the input range is 0 to 100, -1 and 101 are incorrect values and must be corrected). In this validation process, in the input DEVMODE 401, the setting value in the Public area acts on the setting value in the Private area. In the
続いて、本実施形態におけるDEVMODE構造体の構成について、図4を用いてさらに説明する。 Subsequently, the configuration of the DEVMODE structure in the present embodiment will be further described with reference to FIG.
本実施形態では、DEVMODE構造体に、Validation用プログラム(Validationプログラム403、バージョンアップ用Validationプログラム404、追加機能用Validationプログラム群(405,406等)を格納して、それをプリンタドライバ106が実行することが特徴である。Validation用プログラムは、入力DEVMODE用、出力DEVMODE用の2つのValidation機能を実現できるプログラム(スクリプト)である。
In the present embodiment, a validation program (
プリンタドライバ106は、入力DEVMODE401に格納されたプログラム領域からValidation用プログラムを取得し、入力DEVMODE401に対してValidation処理を実行する。通常は同様に、出力DEVMODE402に対して、入力DEVMODE401に格納されたValidation用プログラムを実行することでValidation処理を行う。
The
例外的な動作としておよびアプリケーション104からプリンタドライバ106に対してDEVMODE構造体の取得要求があった場合など、アプリケーション104から入力DEVMODEを受け取らない場合には、入力DEVMODE401が存在しない。このため、プリンタドライバ106は、出力DEVMODE402をアプリケーション104に渡す際に、保持しているValidation用プログラム403〜406を、出力DEVMODE402のプログラム領域に圧縮して格納し、このValidation用プログラム403〜406によりValidation処理を行う。また、バージョンアップ等によりValidation用プログラムが変更されている場合も同様である。
If the input DEVMODE is not received from the
プリンタドライバ106がバージョンアップしているときには、出力DEVMODE402に対してバージョンアップ用Validationプログラム404の差分も実行されることになる。バージョンアップ用Validationプログラム404は入力DEVMODE401に格納されているValidation用プログラムを補完する。つまり、バージョンアップによって、利用できる機能が増加したとき、その増加分(差分)は入力DEVMODE401に格納されているValidation用プログラムには存在しない。バージョンアップ用Validationプログラム404は、拡張された機能と既存機能との間にValidationを行う必要がある時に呼び出す。バージョンアップによって、Validationを拡張しなくてもいい場合には、バージョンアップ用Validationプログラム404が存在しない場合もある。
When the
また、バージョンアップ以外にも、プリンタドライバ106の機能が拡張されることがある。具体的にはプラグイン拡張など、既存プリンタドライバに対して、機能をアドオンするような機構を備える、プリンタドライバ106などのプリンタドライバで機能拡張が起こりうる。プラグイン拡張は、動的な機能追加であるため、機能の脱着が行われる。また、プラグインは単数ではなく、複数存在することがある。そのため、拡張される機能に追従して、Validation処理が変化する可能性がある。追加機能用Validationプログラム1・405や、追加機能用Validationプログラム2・406は、このような動的な機能拡張に追従したValidation処理を補完するプログラムである。本実施形態では、Validation用プログラムはLuaスクリプトを用いて構成されるものとするが、プリンタドライバ106が実行可能なプログラムであれば、その形態は問わない。また、プリンタドライバ106の印刷設定部120および描画部130が直接Validation用プログラムを実行する場合は、これらが設定値適性化手段となる。
Besides the version upgrade, the function of the
次に、上記設定情報(レイアウト情報、保存先情報、および機能情報)の具体例を挙げ説明する。 Next, a specific example of the setting information (layout information, storage destination information, and function information) will be described.
(レイアウト情報)
図5は、レイアウト情報の一例を示した図である。なお、図5では、一部のみを例示している。また、図5に示すレイアウト情報は、JSON形式で記述しているが他の形式でも良い。
(Layout information)
FIG. 5 is a diagram showing an example of layout information. In FIG. 5, only a part is illustrated. Further, the layout information shown in FIG. 5 is described in the JSON format, but may be in other formats.
図5に示すように、レイアウト情報には、印刷設定画面に表示するGUIコンポーネント毎のレイアウトデータが記述されている。このレイアウトデータは、属性としてtype,name,axisを有している。 As shown in FIG. 5, the layout information describes the layout data for each GUI component displayed on the print setting screen. This layout data has type, name, and axis as attributes.
typeは、GUIコンポーネントの種類を表している。typeの値であるCheckBoxは、チェックボックスコンポーネントで表示することを示している。ComboBoxはコンボボックスコンポーネントで表示することを示している。また、SpinBoxは、スピンボックスコンポーネントで表示することを示している。図示しないが、その他にもEditBoxやListBoxなどを記述することにより、エディットボックスコンポーネントやリストボックスコンポーネント等でGUIコンポーネントを表示することもできる。 “type” represents the type of GUI component. CheckBox, which is the value of type, indicates that the check box component is used for display. ComboBox indicates that a combo box component is used for display. Also, SpinBox indicates that display is performed by a spin box component. Although not shown, a GUI component can also be displayed by an edit box component, a list box component, or the like by describing EditBox, ListBox, or the like.
nameは、設定の名前を表している。nameの値のうち、duplexは両面印刷設定であることを示している。orientationは、印刷の向き設定であることを示している。また、copiesは、部数設定であることを示している。図示しないが、papersizeやlayoutなどを記述することにより、用紙サイズ設定や集約設定等を指定することもできる。 name represents the name of the setting. Of the value of name, “duplex” indicates that duplex printing is set. Orientation indicates that the print orientation is set. “Copies” indicates that the number of copies is set. Although not shown, paper size setting, aggregation setting, and the like can also be specified by describing papersize, layout, and the like.
axisは、GUIコンポーネントの表示位置の座標を表している。axisの属性である、xはダイアログボックスの左上原点からの水平方向座標を示し、yはダイアログボックスの左上原点からの垂直方向座標を示している。例えば、図5に示す両面印刷設定(duplex)のaxisには、属性typeで指定されたチェックボックスコンポーネントを水平位置25、垂直位置30に表示することが記述されている。
Axis represents the coordinates of the display position of the GUI component. The attribute of axis, x indicates the horizontal coordinate from the upper left origin of the dialog box, and y indicates the vertical coordinate from the upper left origin of the dialog box. For example, the double-sided print setting (duplex) axis shown in FIG. 5 describes that the check box component specified by the attribute type is displayed at the
そして、設定画面表示部121は、記憶部102からレイアウト情報を読み込み、読み込んだレイアウト情報に従って設定画面を生成し、PC100の表示装置(図示せず)に生成した印刷設定画面を表示する。なお、このとき、印刷設定部120は、レイアウト情報に記述されている各GUIコンポーネントのうち、後述の機能情報を基に設定可能な項目のみを表示する。
The setting screen display unit 121 reads layout information from the
図6は、図5のレイアウト情報および後述の図8に示す機能情報を読み込んだ場合に、プリンタドライバ106の設定画面表示部121が表示する印刷設定画面の例を示した図である。図6に示すように、両面印刷設定用に表示名“Duplex”と共にチェックボックスコンポーネントが配置され、印刷の向き設定用に表示名“Orientation”と共にコンボボックスコンポーネントが配置され、部数設定用に表示名“Copies”と共にスピンボックスボックスコンポーネントが配置されている(印刷の向き設定および部数設定のデフォルトの設定値は後述の機能情報による)。なお、図6に示す、OKボタンは、変更された印刷設定を保存するボタンであり、Cancelボタンは、変更をキャンセルするボタンである。
6 is a diagram showing an example of a print setting screen displayed by the setting screen display unit 121 of the
(保存先情報)
保存先情報は、各設定値の保存場所を指定する情報が記述されている。図7は、保存先情報の一部のみを例示している。なお、図7に示す例では、保存先情報はJSON形式で記述されているが他の形式であっても良い。
(Save destination information)
In the storage destination information, information for specifying the storage location of each setting value is described. FIG. 7 illustrates only a part of the storage destination information. In the example shown in FIG. 7, the storage destination information is described in the JSON format, but may be in another format.
保存先情報のregistoryとdevmodeというキーで指定される部分に記述された各設定名は、レイアウト情報および機能情報に記述されている各設定名と対応関係を有している。そして、registoryというキー内に記述された各設定名(図7の例では、finisher,hdd,fold…)に対応する設定値は、レジストリに保存される。一方、devmodeというキー内に記述された各設定名(図7の例では、duplex,orientation,…)に対応する設定値は、DEVMODE構造体に格納される。なお、finisher,hdd,foldはそれぞれ、プリンタ150がもつ機能のフィニッシャー、ハーディスク、紙折り機を表わしている。
Each setting name described in the portion specified by the registry and devmode keys of the storage destination information has a corresponding relationship with each setting name described in the layout information and function information. Then, the setting values corresponding to the setting names described in the key “registry” (finisher, hdd, fold... In the example of FIG. 7) are stored in the registry. On the other hand, the setting value corresponding to each setting name (duplex, orientation,... In the example of FIG. 7) described in the key “devmode” is stored in the DEVMODE structure. Note that finisher, hdd, and fold respectively represent a finisher, a hard disk, and a paper folding machine that have the functions of the
(機能情報)
図8は、機能情報の一例を示した図である。図8では、説明の簡単のため、両面印刷設定(duplex)と印刷の向き設定(orientation)と部数設定(copies)のみ例示するが、実際には、用紙サイズ設定やステープル設定など印刷に係わる種々の設定について記述される。なお、図8に示す機能情報は、XML形式で記述するが他の形式(例えば、JSON等)でも良い。
(Function information)
FIG. 8 is a diagram showing an example of the function information. In FIG. 8, only duplex printing setting (duplex), printing orientation setting (orientation), and number of copies setting (copies) are illustrated for simplicity of explanation. Describes the setting of. The function information shown in FIG. 8 is described in the XML format, but may be in another format (for example, JSON).
図8に示す機能情報の例では、各設定の情報を、featureタグ毎に定義している。このfeatureタグは、nameとdefaultとtypeの属性を持っている。もちろん、図8に示す例は一例であって、その他の属性を定義し利用することができる。 In the example of the function information illustrated in FIG. 8, information on each setting is defined for each feature tag. This feature tag has attributes of name, default, and type. Of course, the example shown in FIG. 8 is an example, and other attributes can be defined and used.
属性nameは、設定の名前であり、レイアウト情報のnameと対応している。図8の例では、属性nameの値であるduplexは両面印刷設定であることを、orientationは印刷の向き設定であることを、copiesは部数設定であることを指定している。また、属性defaultは、選択肢の初期値を表わしている。また、属性typeは、入力される設定値の形式を表している。typeの値である、pickoneは、選択肢形式を指定している。このpickoneの他にも、文字列入力形式を指定するstringや、数値入力形式を指定するnumber等がある。 The attribute name is the name of the setting and corresponds to the name of the layout information. In the example of FIG. 8, “duplex” as the value of the attribute name specifies that the duplex printing setting is set, “orientation” indicates the print orientation setting, and “copyes” specifies the number of copies setting. The attribute default represents the initial value of the option. The attribute type represents the format of the input set value. The value of type, pickone, specifies an option format. In addition to this pickone, there are a string for specifying a character string input format, a number for specifying a numeric input format, and the like.
pickoneタグは、選択可能な設定値を表すものであり、pickoneタグ内の属性nameで、設定値が設定されている。pickoneの属性であるnameの値は、印刷の向き設定においては、portraitが縦向き、landscapeが横向きを表わしている。両面印刷設定においては、offが機能オフ、onが機能オンを表している。また、部数設定においては、minが最小部数、maxが最大部数を表している。 The pickone tag represents a selectable set value, and the set value is set by the attribute name in the pickone tag. The value of name, which is an attribute of pickone, indicates that portrait is vertical and landscape is horizontal in the print orientation setting. In the duplex printing setting, off represents function off and on represents function on. In setting the number of copies, min represents the minimum number of copies and max represents the maximum number of copies.
featureタグで囲まれる部分には、図示しないがconstraintタグを記述することができる。このconstraintタグを用いて記述された部分は、親タグであるfeatureタグの設定についての禁則情報を表わす(一例:<constraint fixvalue=”off”>)。また、このconstraintタグ内の属性であるfixvalueを用いて、禁則条件が合致している場合に強制的に変更される設定値(上記例では”off”)を設定することができる。 Although not shown, a constraint tag can be described in a portion surrounded by the feature tag. The portion described using the constraint tag represents prohibition information regarding the setting of the feature tag that is the parent tag (example: <constant fixvalue = “off”>). Also, a fix value that is an attribute in the constraint tag can be used to set a setting value ("off" in the above example) that is forcibly changed when the prohibition condition is met.
禁則条件は、constraintタグで囲まれる部分に、conditionタグを用いて記述することができる(一例:<condition expression=”AAAA!=”on”>。このconditionタグは親タグであるconstraintタグの禁則条件を表し、属性であるexpressionを用いて、その条件を指定することができる(上記例では、設定AAAAがon以外のとき条件を満たすこととなる)。なお、pickoneタグに対しても、このタグで囲まれる部分にconstraintタグを記述することができ、pickoneタグ自体、すなわち選択肢自身も禁則情報を持つことができる。 The prohibition condition can be described by using a condition tag in a portion surrounded by the constraint tag (example: <condition expression = “AAAAA! =“ On ”>). This condition tag is a prohibition of the constraint tag that is a parent tag. It represents the condition and can specify the condition using the expression expression (in the above example, the condition is satisfied when the setting AAAA is other than on) This also applies to the pickone tag A constraint tag can be described in a portion surrounded by the tags, and the pickone tag itself, that is, the option itself can also have prohibition information.
以上のように、機能情報は、そのオプションを含めて各プリンタが備えるすべての機能についての記述がなされ、サポートするプリンタの機種毎に用意される。 As described above, the function information describes all functions provided in each printer including the option, and is prepared for each supported printer model.
(印刷設定に係る処理)
次に、アプリケーションとプリンタドライバ間におけるDEVMODE構造体を用いた印刷設定に係る処理について、図9のフローチャートを用いて説明する。図9は、アプリケーションとプリンタドライバ間におけるDEVMODE構造体を用いた印刷設定に係る処理の概要を示すフローチャートである。
(Processing related to print settings)
Next, processing related to print setting using the DEVMODE structure between the application and the printer driver will be described with reference to the flowchart of FIG. FIG. 9 is a flowchart showing an outline of processing related to print setting using the DEVMODE structure between the application and the printer driver.
プリンタドライバ106は、アプリケーション104から入力DEVMODEを受け取ると、入力DEVMODE処理(ステップS901)として、Validation処理により入力DEVMODEが適切な設定情報になっているか検証を行い、不整合や妥当性に問題があればその解決を行う。
When the
その後、プリンタドライバ106は、アプリケーション104からの指示により、印刷設定変更処理(ステップS902)を実行する。具体的には、先述の通り、プリンタドライバ106が具備するGUI(印刷設定画面)を表示することにより、エンドユーザに対して、印刷設定の変更手段を提供し、その設定入力を受け付ける。このとき表示されるGUIには、入力DEVMODE処理後の入力DEVMODEの設定状況を反映したGUIが表示される。エンドユーザが上記GUIを操作し、決定した印刷設定は出力DEVMODEとして得ることができる。
Thereafter, the
次いで、この出力DEVMODEに対し、出力DEVMODE処理(ステップS903)として、Validation処理により出力DEVMODEが適切な設定情報になっているか検証を行い、不整合や妥当性に問題があればその解決を行う。そして、出力DEVMODE処理後の出力DEVMODEが、アプリケーション104に渡される。
Next, as an output DEVMODE process (step S903), the output DEVMODE is verified by the validation process to determine whether the output DEVMODE is appropriate setting information, and if there is a problem with inconsistency or validity, it is resolved. Then, the output DEVMODE after the output DEVMODE process is passed to the
(入力DEVMODE処理)
続いて、図9に示した入力DEVMODE処理の詳細を、図10のフローチャートを用いて説明する。図10は、入力DEVMODE処理の詳細を説明するためのフローチャートである。なお、以下の処理は、アプリケーション104から入力DEVMODE構造体が渡される場合の処理である。アプリケーション104から入力DEVMODE構造体が渡されない場合は、以下の一連の処理は省略される。
(Input DEVMODE processing)
Next, details of the input DEVMODE process shown in FIG. 9 will be described using the flowchart of FIG. FIG. 10 is a flowchart for explaining the details of the input DEVMODE process. The following processing is processing when the input DEVMODE structure is passed from the
プリンタドライバ106は、DEVMODE構造体(入力DEVMODE)をアプリケーション104から受け取る(ステップS1001)。
The
次いで、DEVMODE構造体のプログラム領域から、Validation用プログラムを取得する(ステップS1002)。 Next, a validation program is acquired from the program area of the DEVMODE structure (step S1002).
Validationプログラムは圧縮形式で格納されているため、圧縮データの伸長を行い復元させる(ステップS1003)。このとき、標準機能についてValidation処理を行うValidationプログラムと、バージョンアップ用Validationプログラムおよび追加機能用Validationプログラムが内部メモリに展開される。ただし、バージョンアップ用Validationプログラムおよび追加機能用Validationプログラムは、それらが存在する場合にのみ展開される。 Since the Validation program is stored in a compressed format, the compressed data is decompressed and restored (step S1003). At this time, a validation program for performing validation processing on the standard function, a validation program for upgrading, and a validation program for additional functions are expanded in the internal memory. However, the version upgrade validation program and the additional function validation program are expanded only when they exist.
そして、標準機能についてValidationプログラムを実行して入力DEVMODEに対してValidation処理を実行する(ステップS1004)。 Then, the validation program is executed for the standard function to perform validation processing on the input DEVMODE (step S1004).
次に、プリンタドライバ106がバージョンアップされているとバージョンアップ用Validationプログラムが存在するため、その存在の有無を確認する(ステップS1005)。なお、バージョンアップ用Validationプログラムがある場合は、ステップS1003での圧縮データの復元時に内部メモリの所定のディレクトリ領域に各バージョンアップ用Validationプログラムが保存されるものとする。したがって、このディレクトリ領域を確認することにより、バージョンアップ用Validationプログラムの存在の有無を確認することができる。
Next, if the
ここでバージョンアップ用Validationプログラムが存在する場合(ステップS1005でYes)、バージョンアップ用の追加のValidation処理が必要なため、バージョンアップ用Validationプログラムを呼び出し実行する(ステップS1006)。一方、バージョンアップ用Validationプログラムが存在しない場合(ステップS1005でNo)、ステップS1007へ移行する。 If there is an upgrade validation program (Yes in step S1005), an additional validation process for upgrade is required, so the upgrade validation program is called and executed (step S1006). On the other hand, if there is no version upgrade validation program (No in step S1005), the process proceeds to step S1007.
次に、プラグインなどの動的機能拡張がおこなわれている時、追加機能用Validationプログラムが存在するため、その存在の有無を確認する(ステップS1007)。この追加機能用Validationプログラムも、ステップS1003での復元時に内部メモリの所定のディレクトリ領域に各追加機能用Validationプログラムが保存されるものとする。したがって、このディレクトリ領域を確認することにより、追加機能用Validationプログラムの存在の有無を確認することができる。 Next, when a dynamic function expansion such as a plug-in is performed, since there is a validation program for an additional function, the presence or absence is confirmed (step S1007). It is assumed that each additional function validation program is also stored in a predetermined directory area of the internal memory at the time of restoration in step S1003. Therefore, by confirming this directory area, it is possible to confirm whether or not the validation program for the additional function exists.
ここで追加機能用Validationプログラムが存在する場合(ステップS1007でYes)、追加機能に応じた追加のValidation処理が必要なため、各追加機能用Validationプログラムを呼び出し実行する(ステップS1008)。一方、追加機能用Validationプログラムが存在しない場合は(ステップS1007でNo)、一連の処理を終了する。 If there is an additional function validation program (Yes in step S1007), additional validation processing according to the additional function is required, and each additional function validation program is called and executed (step S1008). On the other hand, if there is no validation program for additional functions (No in step S1007), the series of processing ends.
(出力DEVMODE処理)
続いて、図9に示した出力DEVMODE処理の詳細を、図11に示すフローチャートを用いて説明する。図11は、出力DEVMODE処理の詳細を説明するためのフローチャートである。
(Output DEVMODE processing)
Next, details of the output DEVMODE process shown in FIG. 9 will be described with reference to the flowchart shown in FIG. FIG. 11 is a flowchart for explaining details of the output DEVMODE processing.
出力DEVMODE処理では、アプリケーション104から入力された入力DEVMODEの応答として、出力DEVMODEをアプリケーション104に返す場合と、アプリケーション104がプリンタドライバ106に対して、プリンタドライバ固有のDEVMODE構造体の取得要求に応えて出力DEVMODEを返す場合の2つのケースが考えられる。以下の処理フローは、この2つのケースに対応している。
In the output DEVMODE processing, when the output DEVMODE is returned to the
はじめに、プリンタドライバ106は、入力DEVMODEがあるか、すなわち、アプリケーション104から入力DEVMODEを受けたか確認する(ステップS1101)。
First, the
入力DEVMODEが存在しない場合は(ステップS1101でNo)、記憶部102に格納されているValidation用プログラム(標準機能についてのValidationプログラム、バージョンアップ用Validationプログラム、および追加機能用Validationプログラム)を参照し、これらを内部メモリに展開する(ステップS1102)。
If the input DEVMODE does not exist (No in step S1101), refer to a validation program (a validation program for standard functions, a validation program for upgrading, and a validation program for additional functions) stored in the
次いで、上記Validation用プログラムを圧縮して、出力DEVMODEのプログラム領域に格納する(ステップS1103)。ここで、Validation用プログラムを圧縮することにより、プログラム領域の使用量を削減することができる。なお、これに先立ち、例えば、さらなるバージョンアップまたはプラグインの追加による機能追加またはプラグインの削除による機能の削除が行われていた場合、図12にその一部を示すValidation用プログラム(スクリプト)に、追加のスクリプト(差分)が付加された図13に示すValidation用プログラムがプログラム領域に上書きされ格納されることになる(なお、図12,13では、設定値の妥当性検証用のプログラム例を示しており、これらの図に示した関数では、パラメータとして、テーブル(tbl)に設定された値以外の値が渡された場合や所定の範囲外の値が渡された場合にはデフォルトの値を返し、そうでない場合はテーブル上の対応する値を返している)。このように、バージョンアップ等によりValidation用プログラムに変更がなされていた場合、その変更(差分)は出力DEVMODE構造体にも反映される。 Next, the validation program is compressed and stored in the program area of the output DEVMODE (step S1103). Here, the amount of use of the program area can be reduced by compressing the validation program. Prior to this, for example, when a function has been deleted by further upgrading or adding a plug-in or deleting a function by deleting a plug-in, a validation program (script), part of which is shown in FIG. The validation program shown in FIG. 13 to which the additional script (difference) is added is overwritten and stored in the program area (in FIG. 12 and FIG. 13, an example of a program for verifying the validity of the set value) In the functions shown in these figures, the default value is used when a value other than the value set in the table (tbl) is passed as a parameter or when a value outside the specified range is passed. Otherwise, the corresponding value on the table is returned). As described above, when the validation program is changed due to version upgrade or the like, the change (difference) is also reflected in the output DEVMODE structure.
一方、入力DEVMODEが存在する場合は(ステップS1101でYes)、保持されている入力DEVMODEのプログラム領域にあったValidation用プログラムを参照する(ステップS1104)。なお、このValidation用プログラムは、前述のステップS1003で内部メモリに展開されている。 On the other hand, if the input DEVMODE exists (Yes in step S1101), the validation program in the program area of the held input DEVMODE is referred to (step S1104). The validation program is expanded in the internal memory in step S1003 described above.
次いで、記憶部102に格納されているValidation用プログラムを参照する(ステップS1105)。
Next, the validation program stored in the
次に、Validation用プログラムに変更があるか確認する(ステップS1106)。具体的には、内部メモリに展開されている上記入力DEVMODEのプログラム領域にあったValidationプログラムと、記憶部102に格納されているValidationプログラムとを比較し、比較の結果、同一である場合、Validation用プログラムに変更は無いと判定し(ステップS1106でNo)、ステップS1107へ移行する。一方、比較の結果、異なっている場合、Validation用プログラムに変更があったと判定し(ステップS1106でYes)、上記ステップS1103の処理を実行する。この結果、Validation用プログラムの変更が出力DEVMODEに反映される。
Next, it is confirmed whether there is a change in the validation program (step S1106). Specifically, the validation program stored in the program area of the input DEVMODE expanded in the internal memory is compared with the validation program stored in the
次いで、内部メモリに展開されている、Validationプログラムを実行して、前述の図9のステップS902で実行された印刷設定変更処理後の出力DEVMODEに対してValidation処理を実行する(ステップS1107)。 Next, the validation program developed in the internal memory is executed, and validation processing is executed on the output DEVMODE after the print setting change processing executed in step S902 in FIG. 9 (step S1107).
次に、プリンタドライバ106がバージョンアップされている場合はバージョンアップ用Validationプログラムも内部メモリに展開され存在するため、その存在の有無を確認する(ステップS1008)。ここでの処理は、前述の図10のステップS1005の場合と同様にして行われる。
Next, if the
ここでバージョンアップ用Validationプログラムが存在する場合は(ステップS1008でYes)、バージョンアップ用の追加のValidation処理が必要なため、バージョンアップ用Validationプログラムを実行する(ステップS1109)。一方、バージョンアップ用Validationプログラムが存在しない場合は(ステップS1008でNo)、ステップS1110へ移行する。 If an upgrade validation program exists (Yes in step S1008), an additional validation process for upgrade is necessary, so the upgrade validation program is executed (step S1109). On the other hand, if there is no version upgrade validation program (No in step S1008), the process proceeds to step S1110.
次いで、プラグインなどの動的機能拡張がおこなわれている場合、追加機能用Validationプログラムも内部メモリに展開され存在するため、その存在の有無を確認する(ステップS1110)。ここでの確認は、前述の図10のステップS1007の場合と同様にして行われる。 Next, when dynamic function expansion such as plug-in is performed, since the validation program for additional functions is also expanded and present in the internal memory, the presence or absence is confirmed (step S1110). The confirmation here is performed in the same manner as in step S1007 in FIG.
ここで追加機能用Validationプログラムが存在する場合は(ステップS1110でYes)、追加機能に応じた追加のValidation処理が必要なため、追加機能用Validationプログラムを実行する(ステップS1111)。一方、追加機能用Validationプログラムが存在しない場合は(ステップS1110でNo)、ステップS1112へ移行する。 If there is an additional function validation program (Yes in step S1110), the additional function validation program is executed because the additional validation process corresponding to the additional function is required (step S1111). On the other hand, when the validation program for additional functions does not exist (No in step S1110), the process proceeds to step S1112.
以上の処理後、出力DEVMODEをアプリケーション104に渡す(ステップS1112)。 After the above processing, the output DEVMODE is passed to the application 104 (step S1112).
(各プログラム間の処理の流れ)
続いて、図10のステップS1004〜S1008および図11のステップS1107〜S1111に示したValidation処理に係わる各プログラム間の処理の流れについて、図14を用いて概説する。図14は、Validation処理に係わる各プログラム間の処理の流れについて、その概要を説明するための概略図である。
(Processing flow between programs)
Next, the process flow between the programs related to the validation process shown in steps S1004 to S1008 in FIG. 10 and steps S1107 to S1111 in FIG. 11 will be outlined with reference to FIG. FIG. 14 is a schematic diagram for explaining the outline of the flow of processing between the programs related to the validation processing.
プリンタドライバ106のコアドライバ111は、前述のように、印刷設定部120および描画部130を含むメインプログラム1401と、Validation処理にて実行するプログラムを動作させるための、Validationプログラム実行環境140を備える。本実施形態では、Validation用プログラムはLuaスクリプトを採用しており、Validationプログラム実行環境140はLuaスクリプト実行環境である。
As described above, the
標準機能についてのValidationプログラム403は、アプリケーション104から渡される入力DEVMODEのプログラム領域に格納されたプログラム、もしくはプリンタドライバ106が具備するプログラムのいずれかであり、Validationプログラム実行環境140にて実行され、実行結果は、メインプログラム1401へと通知される。
The
Validationプログラム403は、(それが存在すれば内部メモリに展開されている)バージョンアップ用Validationプログラム(404)を格納するディテクトリ1402を検索して、ディテクトリ1402内にバージョンアップ用Validationプログラム(404)の有無を確認し、再帰的に複数のプログラムを呼び出す。呼び出されたプログラムは、Validationプログラム実行環境140にて実行される。この動作により、バージョンアップ用Validationプログラムが複数存在する場合(複数回にわたるバージョンアップがあった場合など)にもそのプログラムを実行することができる。
The
バージョンアップ用Validationプログラム(404)は、それが存在すれば、Validationプログラム403によるValidation処理の後に実行され、実行結果は結合されて、メインプログラム701に通知される。
The version upgrade validation program (404), if present, is executed after validation processing by the
さらに、プリンタドライバ106をプラグイン機構のような動的機能追加機能で追加した場合に対応するため、(それが存在すれば内部メモリに展開されている)追加機能用Validationプログラム(405)を格納するディレクトリ1403を検索して、バージョンアップ用Validationプログラムと同様に処理を実行する。
Furthermore, in order to cope with the case where the
以上、本実施形態についてその詳細を説明した。上述したように、本実施形態では、印刷設定に係る設定情報とValidation用プログラムとをセットにしてDEVMODE構造体に格納するようにし、このDEVMODE構造体に格納したまたは格納されるValidation用プログラムを使って設定情報に対するValidation処理を実行するようにしたので、従来起こりえた設定値とこの設定値に対してValidation処理を行うプログラム間の不整合を解消することができる。 The details of the present embodiment have been described above. As described above, in this embodiment, setting information related to print settings and a validation program are set and stored in the DEVMODE structure, and the validation program stored or stored in the DEVMODE structure is used. Thus, the validation process for the setting information is executed, so that it is possible to eliminate the inconsistency between the setting value that could occur in the past and the program that performs the validation process for the setting value.
なお、上述した実施形態のプリンタドライバ106は、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されて提供される。
The
また、これらのプログラムは、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成しても良い。 These programs may be stored on a computer connected to a network such as the Internet and provided by being downloaded via the network.
100…PC
101…処理部
102…記憶部
103…通信部
104…アプリケーション
105…OS
106…プリンタドライバ
111…コアドライバ
112…I/F部
113…プラグインA
114…プラグインB
120…印刷設定部
121…設定画面表示部
122…振分部
123…文字列化部
124…圧縮部
125…圧縮データ保存部
126…圧縮データ取得部
127…解凍部
130…描画部
131…圧縮データ取得部
132…解凍部
133…印刷データ生成部
140…Validationプログラム実行環境
150…プリンタ
160…ネットワーク
301…Public領域
302…Private領域
303…設定値保存領域
304…プログラム領域
401…入力DEVMODE
402…出力DEVMODE
403…Validationプログラム
404…バージョンアップ用Validationプログラム
405…追加機能用Validationプログラム1
406…追加機能用Validationプログラム2
100 ... PC
101 ...
106:
114 ... Plug-in B
DESCRIPTION OF
402: Output DEVMODE
403 ...
406 ...
Claims (15)
コンピュータを、
前記データ構造体に、印刷設定情報および印刷設定値適正化プログラムを格納する格納手段と、
前記データ構造体に格納された印刷設定値適正化プログラムを利用して、前記データ構造体に格納された設定値情報を適正化する設定値適性化手段として機能させる
ことを特徴とするプリンタドライバ。 In a printer driver that can perform print settings via a data structure for exchanging print setting information with an external program,
Computer
Storage means for storing print setting information and a print setting value optimization program in the data structure;
A printer driver that functions as a setting value optimization unit that optimizes setting value information stored in the data structure using a print setting value optimization program stored in the data structure.
前記データ構造体に、印刷設定情報および印刷設定値適正化プログラムを格納する格納手段と、
前記データ構造体に格納された印刷設定値適正化プログラムを利用して、前記データ構造体に格納された設定値情報を適正化する設定値適性化手段と、
を備えることを特徴とする情報処理装置。 In an information processing apparatus that implements a printer driver capable of performing print settings via a data structure for transferring print setting information to and from an external program,
Storage means for storing print setting information and a print setting value optimization program in the data structure;
Setting value optimization means for optimizing setting value information stored in the data structure using a print setting value optimization program stored in the data structure;
An information processing apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010159896A JP5533382B2 (en) | 2010-07-14 | 2010-07-14 | Printer driver, information processing apparatus, and computer-readable recording medium recording printer driver |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010159896A JP5533382B2 (en) | 2010-07-14 | 2010-07-14 | Printer driver, information processing apparatus, and computer-readable recording medium recording printer driver |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012022523A JP2012022523A (en) | 2012-02-02 |
JP5533382B2 true JP5533382B2 (en) | 2014-06-25 |
Family
ID=45776766
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010159896A Expired - Fee Related JP5533382B2 (en) | 2010-07-14 | 2010-07-14 | Printer driver, information processing apparatus, and computer-readable recording medium recording printer driver |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5533382B2 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4350565B2 (en) * | 2003-03-27 | 2009-10-21 | キヤノン株式会社 | Information processing apparatus and method |
JP2006285870A (en) * | 2005-04-04 | 2006-10-19 | Canon Inc | Print controller, print control method and program |
JP2008310495A (en) * | 2007-06-13 | 2008-12-25 | Canon Inc | Print control unit, print control method, and storage medium |
-
2010
- 2010-07-14 JP JP2010159896A patent/JP5533382B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2012022523A (en) | 2012-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5267337B2 (en) | Program, storage medium, information processing apparatus, printer apparatus, and system | |
JP5446625B2 (en) | Printer driver, information processing apparatus, and computer-readable recording medium recording printer driver | |
US9052850B2 (en) | Printer driver, storage medium, and information processing apparatus | |
US9329825B2 (en) | Information processing apparatus, computer-readable storage medium, and method that generate a screen based on stored screen information and functional information | |
JP5499584B2 (en) | Print control program, information processing apparatus, and recording medium | |
JP6552189B2 (en) | Information processing apparatus, control method and driver installation program | |
JP2003084984A (en) | Information processor, information processing method, control program, and recording medium storing control program | |
JP5391844B2 (en) | Print control program, storage medium, and information processing apparatus | |
JP2007272763A (en) | Module installation method and device | |
JP2006164240A (en) | Data processing apparatus, print setting processing method, storage medium storing computer-readable control program, and control program | |
JP5581793B2 (en) | Information processing apparatus, program, and storage medium | |
JP2010198299A (en) | Image processing apparatus, information processing apparatus, user interface providing method, image processing system, and program | |
JP5533382B2 (en) | Printer driver, information processing apparatus, and computer-readable recording medium recording printer driver | |
JP4425808B2 (en) | Print information processing apparatus, print information processing program, and recording medium | |
JP5879807B2 (en) | Print control apparatus, control program, and recording medium | |
JP2020009055A (en) | Information processing device and program | |
JP2010287055A (en) | Information processing apparatus, data conversion method, and program | |
JP5673730B2 (en) | Information processing device | |
JP4903064B2 (en) | Print control apparatus, print control method, and print control program | |
JP2021093699A (en) | Initial installation system and control method of the same | |
JP2019072918A (en) | Image forming apparatus, installation data management device, and information processing method and program | |
JP2013084185A (en) | Driver software installation method | |
JP2018132999A (en) | Driver program, information processing apparatus and control method therefor | |
JP2008234466A (en) | Information processor, version management method, and version management program | |
JP2019008673A (en) | Information processing apparatus and driver installing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130523 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140226 |
|
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: 20140401 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5533382 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140414 |
|
LAPS | Cancellation because of no payment of annual fees |