JP2009134645A - Data processor, print processing method, storage medium, and program - Google Patents

Data processor, print processing method, storage medium, and program Download PDF

Info

Publication number
JP2009134645A
JP2009134645A JP2007311546A JP2007311546A JP2009134645A JP 2009134645 A JP2009134645 A JP 2009134645A JP 2007311546 A JP2007311546 A JP 2007311546A JP 2007311546 A JP2007311546 A JP 2007311546A JP 2009134645 A JP2009134645 A JP 2009134645A
Authority
JP
Japan
Prior art keywords
data
printer
control command
format
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007311546A
Other languages
Japanese (ja)
Inventor
Hideo Natori
英夫 名取
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2007311546A priority Critical patent/JP2009134645A/en
Publication of JP2009134645A publication Critical patent/JP2009134645A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To normally output to a printer a print control command input from application even when a printer drives has a format of data to be input as a character string. <P>SOLUTION: It is determined whether a format of input data to be input from application is a format of printer control command or a format of character string data (S905). When it is determined that the format is a format of the printer control command, a byte string of the input data to be input is analyzed to convert it into data of the character string (S). Then, structural element of the converted character string data are analyzed and a print command which the printer can analyze is output to the printer (S). When it is determined that it is the format of character string data, the input data are output (S) to the printer. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、アプリケーションソフトからの印刷指示に基づき印刷情報を印刷装置に転送するプリンタドライバを備えるデータ処理装置の印刷処理に関するものである。   The present invention relates to print processing of a data processing apparatus including a printer driver that transfers print information to a printing apparatus based on a print instruction from application software.

従来より、アプリケーションソフトからの印刷指示に基づき印刷情報を印刷装置に転送するプリンタドライバを備えるデータ処理装置を含む印刷システムが知られている。   2. Description of the Related Art Conventionally, a printing system including a data processing apparatus including a printer driver that transfers print information to a printing apparatus based on a printing instruction from application software is known.

この場合において、データ処理装置において、アプリケーションソフトからの印刷指示に基づき、印刷ジョブ毎にスプールファイルを生成して一旦ハードディスク等の記憶装置に中間印刷データを記憶する。そして、記憶装置に記憶された中間印刷データをプリンタ制御コマンドに変換し、プリンタの動作状況に応じてプリンタへ出力する。   In this case, the data processing apparatus generates a spool file for each print job based on a print instruction from the application software, and temporarily stores the intermediate print data in a storage device such as a hard disk. Then, the intermediate print data stored in the storage device is converted into a printer control command and output to the printer in accordance with the operation status of the printer.

この種の印刷システムは、データ処理装置がオペレーティングシステム(以下「OS」と略す)を実行することにより、OSの印刷サポート機能とプリンタドライバにより実現されるのが一般的である。   This type of printing system is generally realized by an OS print support function and a printer driver when a data processing apparatus executes an operating system (hereinafter abbreviated as “OS”).

データ処理装置には、様々なプリンタが接続されるため、OSの印刷サポート機能はプリンタドライバを呼び出し、プリンタの種類に応じたプリンタ制御コマンドを生成する。ここで、OSの印刷サポート機能は、アプリケーションに文書データを描画させることにより、中間印刷データをスプールする。OSの印刷サポート機能はスプールされた中間印刷データをプリンタドライバに供給することで、プリンタ制御コマンドを生成し出力する。そして、プリンタドライバから出力されたプリンタ制御コマンドはプリンタに供給され、プリンタにより印刷処理が実行される。   Since various printers are connected to the data processing apparatus, the print support function of the OS calls a printer driver and generates a printer control command corresponding to the type of printer. Here, the OS print support function spools the intermediate print data by causing the application to draw the document data. The print support function of the OS generates and outputs a printer control command by supplying spooled intermediate print data to the printer driver. The printer control command output from the printer driver is supplied to the printer, and printing processing is executed by the printer.

一方、プリンタ制御コマンドを文書データとするアプリケーションソフトも存在する。   On the other hand, there is application software that uses printer control commands as document data.

つまり、この種のアプリケーションソフトが印刷を行う際は、アプリケーションソフトがプリンタ制御コマンドを出力することを意味する。   That is, when this type of application software performs printing, it means that the application software outputs a printer control command.

ただし、アプリケーションソフト自身がプリンタ制御コマンドを生成することは少なく、プリンタドライバによって生成されたプリンタ制御コマンドを保存して利用することが多い。   However, application software itself rarely generates printer control commands, and often stores and uses printer control commands generated by a printer driver.

この場合、アプケーションソフトが出力したプリンタ制御コマンドは、OSの印刷サポート機能により、記憶装置にそのままスプールされる。そして、OSの印刷サポート機能は、記憶装置にスプールされたプリンタ制御コマンドをプリンタドライバに供給する。   In this case, the printer control command output by the application software is spooled as it is in the storage device by the print support function of the OS. The OS print support function supplies the printer control command spooled in the storage device to the printer driver.

ここで、プリンタドライバはプリンタ制御コマンドをそのまま出力するか、必要に応じ編集処理を行ってプリンタ制御コマンドを出力する。   Here, the printer driver outputs the printer control command as it is, or performs an editing process if necessary and outputs the printer control command.

そして、プリンタドライバから出力されたプリンタ制御コマンドはプリンタに供給され、プリンタに供給され、プリンタにより印刷処理が実行される。   The printer control command output from the printer driver is supplied to the printer, supplied to the printer, and print processing is executed by the printer.

図13は、従来の印刷システムにおける第1の印刷処理例を説明する図である。本例は、例えばマイクロソフト社のOSであるWindows(登録商標)上でアプリケーションソフトが実行され、ユーザがアプリケーションソフトの文書データの印刷を指示した場合のデータの流れを示すものである。   FIG. 13 is a diagram for explaining a first print processing example in a conventional printing system. This example shows the flow of data when application software is executed on, for example, Windows (registered trademark), which is an OS of Microsoft Corporation, and the user instructs printing of document data of the application software.

図13において、アプリケーションソフト(以下、アプリケーションと呼ぶ)101からユーザの操作により印刷指示がなされると、その指示内容はOSの印刷サポート機能103に送られる。   In FIG. 13, when a print instruction is given by user operation from application software (hereinafter referred to as an application) 101, the content of the instruction is sent to the OS print support function 103.

具体的には、図示しないGDI(Graphic DeviceInterface)により、仮想化された印刷領域であるデバイスコンテキスト(以下「DC」と略す)が作成されてアプリケーション101へ供給される。   Specifically, a device context (hereinafter abbreviated as “DC”), which is a virtualized printing area, is created and supplied to the application 101 by GDI (Graphic Device Interface) (not shown).

アプリケーション101により文書データの描画処理がDCに対して行われ、その結果、EMF(Enhanced Meta File)と称される、デバイスに依存しない中間印刷データが生成される。   Document data rendering processing is performed on the DC by the application 101, and as a result, device-independent intermediate print data called EMF (Enhanced Meta File) is generated.

中間印刷データは、OSの印刷サポート機能103によって、印刷ジョブ毎にスプールファイル105として一時的に記憶装置にスプールされる。   The intermediate print data is temporarily spooled in a storage device as a spool file 105 for each print job by the print support function 103 of the OS.

この際、EMF形式のデータがスプールされるため、OSの印刷サポート機能103によりスプールファイル105に「EMF」というデータ型が付与される。その後、スプールファイル105に格納されたデータは、OSの印刷サポート機能103によりデスプールされ、プリンタドライバ111に供給される。   At this time, since the data in the EMF format is spooled, the data type “EMF” is given to the spool file 105 by the print support function 103 of the OS. Thereafter, the data stored in the spool file 105 is despooled by the print support function 103 of the OS and supplied to the printer driver 111.

なお、プリンタドライバ111を構成するモジュールの中で、デスプール時の動作に関連するモジュールは、プリントプロセッサ113、グラフィックモジュール115、ランゲージモニタ117となる。   Of the modules constituting the printer driver 111, the modules related to the operation during despooling are the print processor 113, the graphic module 115, and the language monitor 117.

上述したように、本例は、スプールファイル105のデータ型が「EMF」であることから、プリントプロセッサ113はスプールファイル105に格納されたEMFをページ単位で編集し、グラフィックモジュール115に供給する。   As described above, in this example, since the data type of the spool file 105 is “EMF”, the print processor 113 edits the EMF stored in the spool file 105 in units of pages and supplies it to the graphic module 115.

次に、グラフィックモジュール115は、OSの印刷サポート機能103を利用しながら、供給されたEMFを出力先のプリンタ121に応じたプリンタ制御コマンドに変換して出力する。また、ランゲージモニタ117はプリンタ121と通信を行いながら、プリンタ121の動作状況に応じてプリンタ制御コマンドをプリンタ121に出力する。   Next, the graphic module 115 converts the supplied EMF into a printer control command corresponding to the output destination printer 121 and outputs it while using the OS print support function 103. The language monitor 117 outputs a printer control command to the printer 121 according to the operation status of the printer 121 while communicating with the printer 121.

このようにして、アプリケーション101は文書を描画することにより、デバイス非依存の中間印刷データが一旦スプールされ、プリンタドライバ111によってラスタライズ処理が行われ、最終的にデバイス依存のプリンタ制御コマンドに変換される。   In this way, the application 101 renders the document, whereby the device-independent intermediate print data is temporarily spooled, rasterized by the printer driver 111, and finally converted into a device-dependent printer control command. .

なお、図13に示した印刷処理を行うプリンタドライバを以下GDIプリンタドライバと称する。   The printer driver that performs the printing process shown in FIG. 13 is hereinafter referred to as a GDI printer driver.

一方、プリンタ制御コマンドを文書データとするアプリケーションからの印刷では、データの流れが上記印刷処理とは異なる。   On the other hand, in printing from an application that uses a printer control command as document data, the data flow is different from that in the printing process.

アプリケーション101からユーザ操作により印刷指示がなされると、その印刷指示内容はOSの印刷サポート機能103に送られる。そして、OSの印刷サポート機能103により仮想化されたプリンタであるプリンタハンドルが作成されてアプリケーション101へ供給される。   When a print instruction is issued from the application 101 by a user operation, the contents of the print instruction are sent to the OS print support function 103. Then, a printer handle that is a virtualized printer is created by the print support function 103 of the OS and supplied to the application 101.

アプリケーション101は文書データの内容であるプリンタ制御コマンドの書込み処理をプリンタハンドルに対して行う。この際、アプリケーションは「RAW」というデータ型を指定する。   The application 101 writes a printer control command, which is the content of document data, to the printer handle. At this time, the application designates a data type “RAW”.

プリンタハンドルに書き込まれたプリンタ制御コマンドはOSの印刷サポート機能103により、印刷ジョブ毎にスプールファイル105として一時的に記憶装置にスプールされる。   The printer control command written in the printer handle is temporarily spooled in the storage device as a spool file 105 for each print job by the print support function 103 of the OS.

この際、アプリケーション101により「RAW」というデータ型が指定されているため、OSの印刷サポート機能103によりスプールファイル105に「RAW」というデータ型が付与される。   At this time, since the data type “RAW” is specified by the application 101, the data type “RAW” is given to the spool file 105 by the OS print support function 103.

次に、スプールファイル105に格納されたデータはOSの印刷サポート機能103によりデスプールされ、プリンタドライバ111に供給される。   Next, the data stored in the spool file 105 is despooled by the print support function 103 of the OS and supplied to the printer driver 111.

なお、プリンタ制御コマンドが記憶装置にスプールされた場合、プリンタドライバ111を構成するモジュールの中で、デスプール時の動作に関連するモジュールはプリントプロセッサ113、ランゲージモニタ117となる。   When the printer control command is spooled in the storage device, among the modules constituting the printer driver 111, the modules related to the operation during despooling are the print processor 113 and the language monitor 117.

本例は、スプールファイル105のデータ型が「RAW」であることから、プリントプロセッサ113はスプールファイル105から、プリンタ制御コマンドを読出しランゲージモニタ117に供給する。   In this example, since the data type of the spool file 105 is “RAW”, the print processor 113 reads the printer control command from the spool file 105 and supplies it to the language monitor 117.

そして、ランゲージモニタ117はプリンタ121と通信を行いながら、プリンタの動作状況に応じてプリンタ制御コマンドをプリンタに出力する。   The language monitor 117 outputs a printer control command to the printer according to the operation status of the printer while communicating with the printer 121.

以上のようにGDIプリンタドライバを用いれば、アプリケーション101が印刷内容を描画した場合は中間印刷データがスプールファイル105にスプールされ、プリンタドライバ111によりプリンタ制御コマンドが生成され、プリンタ121に供給される。   As described above, when the GDI printer driver is used, when the application 101 renders the print contents, the intermediate print data is spooled in the spool file 105, and a printer control command is generated by the printer driver 111 and supplied to the printer 121.

また、アプリケーション101がプリンタ制御コマンドを扱う場合には、プリンタ制御コマンドがスプールファイル105にスプールされ、プリンタドライバ111により、プリンタに供給される。   When the application 101 handles a printer control command, the printer control command is spooled in the spool file 105 and supplied to the printer by the printer driver 111.

マイクロソフト社のWindowsファミリーのOSの一つにWindows Vista(登録商標)がある。Windows Vista(登録商標)は、GDIプリンタドライバの他に、XPSプリンタドライバと呼ばれるプリンタドライバを動作させる機能を有している。   Windows Vista (registered trademark) is one of the Windows family OSs of Microsoft Corporation. Windows Vista (registered trademark) has a function of operating a printer driver called an XPS printer driver in addition to a GDI printer driver.

XPSプリンタドライバの特徴の1つに、スプールファイルに格納されるデバイス非依存の中間印刷データの形式がXPSであることが挙げられる。   One of the features of the XPS printer driver is that the device-independent intermediate print data format stored in the spool file is XPS.

ここで、XPSとは、XMLPaperSpecificationの略で、マイクロソフト社が開発したオープン規格の電子文書フォーマット(文字列のデータフォーマット)の一つである。   Here, XPS is an abbreviation for XML Paper Specification, and is one of open standard electronic document formats (character string data formats) developed by Microsoft Corporation.

図14は、従来の印刷システムにおける第2の印刷処理例を説明する図である。本例は、上記XPSプリンタドライバを用いた印刷システム例である。   FIG. 14 is a diagram for explaining a second print processing example in the conventional printing system. This example is an example of a printing system using the XPS printer driver.

図14において、アプリケーション201からユーザ操作により印刷指示がなされると、その指示内容はOSの印刷サポート機能203に送られる。   In FIG. 14, when a print instruction is issued by a user operation from the application 201, the instruction content is sent to the OS print support function 203.

具体的には図示しないGDIにより、仮想化された印刷領域であるDCが作成されてアプリケーション201へ供給される。   Specifically, a virtual print area DC is created by GDI (not shown) and supplied to the application 201.

ここで、アプリケーション101により文書データの描画処理がDCに対して行われる。描画内容は、図示しないMXDC(Microsoft XPS DocumentConverter)によりXPS形式に変換され、その結果、XPS形式の中間印刷データが生成される。   Here, the application 101 performs document data rendering processing on the DC. The drawing content is converted into XPS format by MXDC (Microsoft XPS Document Converter) (not shown), and as a result, intermediate print data in XPS format is generated.

XPS形式の中間印刷データは、OSの印刷サポート機能203によって、印刷ジョブ毎にスプールファイル205として一時的に記憶装置にスプールされる。   The XPS format intermediate print data is temporarily spooled in a storage device as a spool file 205 for each print job by the OS print support function 203.

この際、OSの印刷サポート機能203によりスプールファイル205に「RAW」というデータ型が付与される。   At this time, the OS print support function 203 assigns a data type “RAW” to the spool file 205.

つまり、XPSプリンタドライバを用いた場合、スプールファイル205のデータ型が「RAW」であることは、XPS形式のデータがスプールされていることを意味する。スプールファイル205に格納されたデータはOSの印刷サポート機能203によりデスプールされ、プリンタドライバ211に供給される。   That is, when the XPS printer driver is used, the fact that the data type of the spool file 205 is “RAW” means that XPS format data is spooled. The data stored in the spool file 205 is despooled by the OS print support function 203 and supplied to the printer driver 211.

プリンタドライバ211を構成するモジュールの中で、デスプール時の動作に関連するモジュールはプリンタ制御コマンド生成フィルタ213、ランゲージモニタ217となる。スプールファイル205のデータ型が「RAW」であることから、OSの印刷サポート機能203はスプールファイル205に格納されたXPS形式のデータを、プリンタ制御コマンド生成フィルタ213に供給する。   Among the modules constituting the printer driver 211, the modules related to the operation during despooling are the printer control command generation filter 213 and the language monitor 217. Since the data type of the spool file 205 is “RAW”, the OS print support function 203 supplies the XPS format data stored in the spool file 205 to the printer control command generation filter 213.

プリンタ制御コマンド生成フィルタ213は、供給されたXPSの各ページのレンダリング処理を行い、プリンタ制御コマンドを出力する。ランゲージモニタ217はプリンタ221と通信を行いながら、プリンタの動作状況に応じてプリンタ制御コマンドをプリンタに出力する。   The printer control command generation filter 213 performs rendering processing for each page of the supplied XPS and outputs a printer control command. The language monitor 217 communicates with the printer 221 and outputs a printer control command to the printer in accordance with the operation status of the printer.

このようにして、アプリケーションは文書を描画することにより、XPS形式の中間印刷データとして一旦スプールされ、プリンタドライバによってレンダリングが行われ、最終的にデバイス依存のプリンタ制御コマンドに変換される。   In this way, the application draws the document, and is then spooled as intermediate print data in the XPS format, rendered by the printer driver, and finally converted into a device-dependent printer control command.

XPSプリンタドライバのモジュールは、1つ以上のフィルタで構成される。   The XPS printer driver module is composed of one or more filters.

図14に示す印刷システム例では、フィルタが1つのみ存在するXPSプリンタドライバを例示した。   In the example of the printing system illustrated in FIG. 14, the XPS printer driver having only one filter is illustrated.

XPSプリンタドライバに複数のフィルタが存在する場合、プリンタ制御コマンド生成フィルタの他に、ページのレイアウト処理を担うページレイアウトフィルタを設けることが一般に知られている。なお、複数のフィルタ構成を採用することをパイプラインと称する。   When there are a plurality of filters in the XPS printer driver, it is generally known to provide a page layout filter responsible for page layout processing in addition to the printer control command generation filter. Note that adopting a plurality of filter configurations is referred to as a pipeline.

例えば、ページレイアウトフィルタがスプールファイルのXPSを受け取り、レイアウト処理を行い、レイアウト後のXPSを出力する。   For example, the page layout filter receives the XPS of the spool file, performs layout processing, and outputs the XPS after layout.

プリンタ制御コマンド生成フィルタ213は、ページレイアウトフィルタからレイアウト後のXPSを受け取り、プリンタ制御コマンドをランゲージモニタ217に対して出力する。   The printer control command generation filter 213 receives the XPS after layout from the page layout filter, and outputs the printer control command to the language monitor 217.

また、XPSプリンタドライバの各フィルタは、入力をXPSストリームで受け取るか、XPSパートで受け取るかを指定することができるように構成されている。   Each filter of the XPS printer driver is configured to be able to specify whether input is received as an XPS stream or an XPS part.

ここで、XPSストリームとはXPS文書をバイト列として扱うことを意味し、XPSパートとはXPS文書をXPSの論理構造であるXPSパートとして扱うことを意味する。   Here, the XPS stream means that the XPS document is handled as a byte string, and the XPS part means that the XPS document is handled as an XPS part that is a logical structure of XPS.

このため、入力をXPSストリームで受け取る場合、フィルタがXPS文書のデータ構造の解析を行う必要がある。一方、入力をXPSパートで受け取る場合、OSの印刷サポート機能が解析処理を代行するため、フィルタはXPSの扱いが容易になる利点が有る。
特開2001−216109号公報 特開2005−084898号公報
For this reason, when the input is received as an XPS stream, the filter needs to analyze the data structure of the XPS document. On the other hand, when the input is received by the XPS part, the printing support function of the OS performs the analysis process, so the filter has an advantage that the XPS can be easily handled.
JP 2001-216109 A Japanese Patent Laying-Open No. 2005-084898

前述したように、印刷システムにおいて、プリンタ制御コマンドを文書データとして扱い、印刷を行うアプリケーションが存在する。また、前述したように、XPS文書の扱いを容易にするために、入力をXPSパートで受け取るフィルタを有するXPSプリンタドライバが存在する。   As described above, in the printing system, there is an application that handles printer control commands as document data and performs printing. Further, as described above, there is an XPS printer driver having a filter that receives an input by an XPS part in order to facilitate handling of an XPS document.

このようなアプリケーションとXPSプリンタドライバを組み合わせた場合、次のような解決すべき課題があった。   When such an application and the XPS printer driver are combined, there are problems to be solved as follows.

図14において、アプリケーション201からユーザ操作により印刷指示がなされると、その印刷指示内容はOSの印刷サポート機能203に送られる。OSの印刷サポート機能203により仮想化されたプリンタであるプリンタハンドルが作成されてアプリケーション201へ供給される。   In FIG. 14, when a print instruction is issued from the application 201 by a user operation, the contents of the print instruction are sent to the OS print support function 203. A printer handle that is a virtualized printer is created by the OS print support function 203 and supplied to the application 201.

アプリケーション201は、文書データの内容であるプリンタ制御コマンドの書込み処理をプリンタハンドルに対して行う。この際、アプリケーションは「RAW」というデータ型を指定する。   The application 201 writes a printer control command, which is the content of document data, to the printer handle. At this time, the application designates a data type “RAW”.

プリンタハンドルに書込まれたプリンタ制御コマンドはOSの印刷サポート機能203により、印刷ジョブ毎にスプールファイル205として一時的に記憶装置にスプールされる。   The printer control command written in the printer handle is temporarily spooled in the storage device as a spool file 205 for each print job by the print support function 203 of the OS.

この際、アプリケーション101により「RAW」というデータ型が指定されているため、OSの印刷サポート機能203によりスプールファイル205に「RAW」というデータ型が付与される。   At this time, since the data type “RAW” is designated by the application 101, the data type “RAW” is given to the spool file 205 by the print support function 203 of the OS.

スプールファイル205に格納されたデータはOSの印刷サポート機能203によりデスプールされ、プリンタドライバ211に供給される。   The data stored in the spool file 205 is despooled by the OS print support function 203 and supplied to the printer driver 211.

スプールファイル205のデータ型が「RAW」であることから、OSの印刷サポート機能203は、スプールファイル205に格納されたプリンタ制御コマンド形式のデータを、プリンタ制御コマンド生成フィルタ213に供給する。   Since the data type of the spool file 205 is “RAW”, the print support function 203 of the OS supplies the printer control command format data stored in the spool file 205 to the printer control command generation filter 213.

ところが、プリンタ制御コマンド生成フィルタ213は入力の受け取り方としてXPSパートを指定している。   However, the printer control command generation filter 213 designates the XPS part as a method of receiving input.

しかし、スプールされているデータがプリンタ制御コマンドであるため、プリンタ制御コマンド生成フィルタ213はXPSパートを受け取れない。   However, since the spooled data is a printer control command, the printer control command generation filter 213 cannot receive the XPS part.

従って、プリンタ制御コマンド生成フィルタ213は、入力されたプリンタ制御コマンド形式データを扱うことができない。この結果、アプリケーション201により出力されたプリンタ制御コマンドはプリンタ221に送信されず、印刷が実行されない問題が発生する。   Therefore, the printer control command generation filter 213 cannot handle the input printer control command format data. As a result, the printer control command output by the application 201 is not transmitted to the printer 221 and printing is not executed.

すなわち、プリンタ制御コマンドを文書データとして扱い、印刷を行うアプリケーションが、入力をXPSパートで受け取るフィルタを有するXPSプリンタドライバで印刷を行うと、印刷を実行することが出来ないという課題があった。   That is, when an application that handles printer control commands as document data and performs printing using an XPS printer driver having a filter that receives input by an XPS part, printing cannot be executed.

本発明は、上記の課題を解決するためになされたもので、本発明の目的は、入力されるデータの形式を文字列とするプリンタドライバであっても、アプリケーションから入力される印刷制御コマンドをプリンタに対して正常に出力できる仕組みを提供することである。   The present invention has been made to solve the above problems, and an object of the present invention is to provide a print control command input from an application even if the printer driver has a character string as the format of input data. It is to provide a mechanism that can output normally to a printer.

上記目的を達成する本発明のデータ処理装置は以下に示す構成を備える。   The data processing apparatus of the present invention that achieves the above object has the following configuration.

アプリケーションから入力される入力データをプリンタドライバを介して処理するデータ処理装置であって、前記プリンタドライバは、入力される入力データのバイト列を解析して文字列のデータに変換する変換手段と、前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であるか、又は文字列のデータの形式であるかのいずれであるかを判断する判断手段と、前記判断手段がプリンタ制御コマンド形式であると判断した場合、前記変換手段により変換された文字列のデータの構成要素を解析し前記プリンタが解析できる印刷コマンドをプリンタに出力し、前記判断手段が文字列のデータの形式であると判断した場合、前記入力データをプリンタにする出力する出力手段とを備えたことを特徴とする。   A data processing apparatus that processes input data input from an application via a printer driver, wherein the printer driver analyzes a byte string of input data to be converted into character string data, and Determining means for determining whether the format of input data input from the application is a printer control command format or a character string data format; and the determining means is a printer control command format If it is determined that there is a character string data component converted by the conversion means, the printer outputs a print command that can be analyzed by the printer, and the determination means determines that the character string data format is present. In this case, output means for outputting the input data to a printer is provided.

本発明によれば、入力されるデータの形式を文字列とするプリンタドライバであっても、アプリケーションから入力される印刷制御コマンドをプリンタに対して正常に出力できる。   According to the present invention, a print control command input from an application can be normally output to a printer even if the printer driver uses a character string as the format of input data.

次に本発明を実施するための最良の形態について図面を参照して説明する。   Next, the best mode for carrying out the present invention will be described with reference to the drawings.

<印刷システム構成の説明>   <Description of printing system configuration>

〔第1実施形態〕   [First Embodiment]

図1は、本発明の第1実施形態を示すデータ処理装置を適用する印刷システムの構成を説明するブロック図である。本例は、プリンタ1303がデータ処理装置1305が通信インタフェース1307を介して相互に通信可能な印刷システム例である。また、本例では、プリンタ1303は、画像形成を行うインクジェット方式のプリンタであり、後述するデータ処理装置1305で生成されたプリンタ制御コマンドに基づいて記録媒体1301に画像の形成を行う。本印刷システムでは、プリンタの種類については特に問わないが、ここでは、プリンタ1303がインクジェット方式のカラープリンタを想定して、以下説明する。   FIG. 1 is a block diagram illustrating the configuration of a printing system to which a data processing apparatus according to the first embodiment of the present invention is applied. In this example, the printer 1303 and the data processing device 1305 can communicate with each other via the communication interface 1307. In this example, the printer 1303 is an ink jet printer that forms an image, and forms an image on the recording medium 1301 based on a printer control command generated by a data processing device 1305 described later. In the present printing system, the type of printer is not particularly limited, but here, the printer 1303 is assumed to be an inkjet color printer, and will be described below.

データ処理装置1305は、アプリケーションが印刷ジョブを作成し、プリンタドライバ1315が印刷ジョブのスプールデータから、接続されたプリンタ1303の印刷動作を制御するコマンドの生成を行う。   In the data processing device 1305, an application creates a print job, and the printer driver 1315 generates a command for controlling the printing operation of the connected printer 1303 from the spool data of the print job.

本実施形態ではデータ処理装置1305としてパーソナルコンピュータを用いている。つまり、パーソナルコンピュータとして、CPU、RAM、ROM、入力デバイス、出力デバイス、通信デバイス等を含む各種のハードウエア資源と、ソフトウエア資源を備えているものとする。ここで、ソフトウエア資源とは、OSを含む、各種のアプリケーション、デバイスドライバとして機能するプリンタドライバが含まれる。   In this embodiment, a personal computer is used as the data processing device 1305. That is, it is assumed that the personal computer includes various hardware resources including a CPU, RAM, ROM, input device, output device, communication device, and the like, and software resources. Here, the software resource includes various applications including the OS and a printer driver that functions as a device driver.

特に、プリンタドライバ1315は、従来の印刷システムで説明しているように、入力をXPSパートで受け取るフィルタを有するXPSプリンタドライバで構成されているものとする。したがって、OSとしては、前掲しているように、マイクロソフト社のWindowsファミリーのOSであるWindows Vista(登録商標)を例として説明する。しかしながら、本発明が適用可能なOSとしては、上記Windows Vistaに限定されるものではない。   In particular, it is assumed that the printer driver 1315 is configured by an XPS printer driver having a filter that receives an input by an XPS part as described in the conventional printing system. Therefore, as described above, Windows Vista (registered trademark), which is an OS of the Windows family of Microsoft Corporation, will be described as an example. However, the OS to which the present invention is applicable is not limited to the above Windows Vista.

なお、アプリケーションからの印刷指示に対する印刷の設定に関しては、入力操作部1335を介してユーザからの指示や入力を受付ける構成となっている。ここで、入力操作部1335は、キーボード、ポインティングデバイス等を含むものとする。したがって、ユーザは、プリンタドライバ1315が表示装置を介して提供するユーザインタフェースを介して種々の印刷条件、印刷部数、印刷品位、印刷レイアウト、色味等を設定することができる。   It should be noted that the print setting for the print instruction from the application is configured to accept an instruction or input from the user via the input operation unit 1335. Here, the input operation unit 1335 includes a keyboard, a pointing device, and the like. Therefore, the user can set various print conditions, the number of copies, the print quality, the print layout, the color, and the like via the user interface provided by the printer driver 1315 via the display device.

データ処理装置1305には、データ処理装置1305におけるソフトウエアの動作を制御するOSが組み込まれており、このOS上で各種機能ブロックが動作する。   The data processing device 1305 incorporates an OS that controls the operation of software in the data processing device 1305, and various functional blocks operate on this OS.

通信インタフェース1307は、データ処理装置1305とプリンタ1303を接続する通信インタフェースである。本実施形態ではシリアルインタフェースであるUSBを用いているが、この他に、IEEE1394、Ethernet(登録商標)、IrDA、IEEE802.11、電力線などのシリアルインタフェースや、セントロニクス、SCSIなどのパラレルインタフェースを利用することもできる。   A communication interface 1307 is a communication interface that connects the data processing device 1305 and the printer 1303. In this embodiment, a USB which is a serial interface is used. In addition to this, a serial interface such as IEEE1394, Ethernet (registered trademark), IrDA, IEEE802.11, power line, or a parallel interface such as Centronics or SCSI is used. You can also

また、通信インタフェース1307は、通信を実現するものであれば有線/無線を問わずどのようなインタフェースであっても構わない。   Further, the communication interface 1307 may be any interface regardless of wired / wireless as long as it realizes communication.

このように、本実施形態における印刷システムとは、単体の装置ではなく、データ処理装置1305と画像形成を行うプリンタ1303とが特定の双方向インタフェースで接続された構成をとっているが、この例に限られることなく、このようなデータ処理装置とプリンタの機能が一体となった装置一体型の印刷システムであってもよい。   As described above, the printing system according to the present embodiment is not a single device, but has a configuration in which the data processing device 1305 and the printer 1303 that performs image formation are connected through a specific bidirectional interface. The present invention is not limited to this, and an apparatus-integrated printing system in which the functions of such a data processing apparatus and a printer are integrated may be used.

なお、プリンタ1303及びデータ処理装置1305とも本実施形態の特徴を説明する上で特に必要ないと思われる機能については省略する。   It should be noted that the printer 1303 and the data processing device 1305 are omitted for functions that are not particularly necessary for describing the features of this embodiment.

中央制御部1333は、データ処理装置1305の各種機能を制御し、CPUの持つ機能がこれに該当する。入力操作部1335は、ユーザの意図を汲み取るための各種入力機器から構成される。   The central control unit 1333 controls various functions of the data processing device 1305, and the functions of the CPU correspond to this. The input operation unit 1335 includes various input devices for drawing out the user's intention.

情報通知部1337は、印刷設定をユーザに通知する。ここで、通知方法としては、モニタなどの表示装置を使用する場合や、音声による通知などが考えられる。   The information notification unit 1337 notifies the user of print settings. Here, as a notification method, a case where a display device such as a monitor is used, notification by sound, or the like can be considered.

I/F制御部1331は、データ処理装置1305のインタフェース機能を司る。I/F制御部1331は、例えばUSBのホスト側のコントローラによって構成され、USBホストとしての機能を有する。   The I / F control unit 1331 manages the interface function of the data processing device 1305. The I / F control unit 1331 is configured by a controller on the USB host side, for example, and has a function as a USB host.

また、USBホストとしての機能の一部はOSやドライバなどソフトウエアによっても構成される。記憶部1339はOSやアプリケーションプログラムやプリンタドライバの命令コードを格納したり、ソフトウエアが動作するにあたり一時的にデータを保存・読込みするのに使用される。   Some of the functions as a USB host are also configured by software such as an OS and a driver. The storage unit 1339 is used to store OS, application programs, and printer driver instruction codes, and to temporarily store and read data when the software operates.

記憶部1339は、例えばハードディスクドライブや半導体メモリ(例えばRAM)などで構成される。   The storage unit 1339 is configured by, for example, a hard disk drive or a semiconductor memory (for example, RAM).

プリンタドライバ1311は、印刷のための各種設定や印刷データの生成及びプリンタの制御をデータ処理装置1305上で行うためのソフトウエアである。プリンタドライバ1311は、プリンタ1303に同梱されて提供されるCD−ROMを読み取り、或いは、メーカのホームページからダウンロードされることで、データ処理装置1305の記憶部1339にインストールすることができる。なお、CD−ROMには、インストーラが付属しており、インストーラを起動することで、ユーザが望む環境でプリンタドライバをインストールすることができる。   The printer driver 1311 is software for performing various settings for printing, print data generation, and printer control on the data processing device 1305. The printer driver 1311 can be installed in the storage unit 1339 of the data processing device 1305 by reading a CD-ROM provided with the printer 1303 or by downloading it from the manufacturer's website. Note that an installer is attached to the CD-ROM, and the printer driver can be installed in an environment desired by the user by starting the installer.

中央制御部1333により、プリンタドライバ1315のプログラムが実行されて、コンフィギュレーションモジュール1313や、ランゲージモニタ1317、フィルタパイプラインを構成するXPS文書出力フィルタ1321やプリンタ制御コマンド生成フィルタ1323などの機能が実現される。   The program of the printer driver 1315 is executed by the central control unit 1333, and functions such as the configuration module 1313, the language monitor 1317, the XPS document output filter 1321 constituting the filter pipeline, and the printer control command generation filter 1323 are realized. The

コンフィギュレーションモジュール1313は、用紙の設定や印刷品位の設定などを含む各種印刷設定を行う。また、コンフィギュレーションモジュール1313は、ユーザからの指示や入力を受け付け、設定された内容を表示装置に表示もしくは通知する機能を有する。   The configuration module 1313 performs various print settings including paper settings and print quality settings. In addition, the configuration module 1313 has a function of receiving an instruction or input from a user and displaying or notifying the set content on a display device.

XPS文書出力フィルタ1321は、入力データが印刷コマンドであってもXPS文書を出力するフィルタである。また、XPS文書出力フィルタ1321の出力は、プリンタ制御コマンド生成フィルタ1323の入力となる。プリンタ制御コマンド生成フィルタ1323では、入力されたXPS文書をもとにプリンタ制御コマンドを出力するフィルタである。   The XPS document output filter 1321 is a filter that outputs an XPS document even if the input data is a print command. The output of the XPS document output filter 1321 is input to the printer control command generation filter 1323. The printer control command generation filter 1323 is a filter that outputs a printer control command based on the input XPS document.

プリンタ制御コマンド生成フィルタ1323で作成されたプリンタ制御コマンドは、ランゲージモニタ1317を介してI/F制御部1331に送られ、プリンタ1303に送られる。   The printer control command created by the printer control command generation filter 1323 is sent to the I / F control unit 1331 via the language monitor 1317 and sent to the printer 1303.

<XPS文書の構成>   <Configuration of XPS document>

以下、XPSのデータ構造について説明する。   The XPS data structure will be described below.

図2は、本実施形態を示すデータ処理装置で扱うXPS文書の構成を説明する図である。なお、XPS文書は以下の特徴を備える。   FIG. 2 is a diagram for explaining the configuration of an XPS document handled by the data processing apparatus according to the present embodiment. The XPS document has the following features.

XPS文書はFixedDocumentSequence(以下FDS)をルートとするツリー構造になっている。   The XPS document has a tree structure with a Fixed Document Sequence (hereinafter referred to as FDS) as a root.

FDSは複数のFixedDocument(以下FD)を持ち、FDは複数のFixedPage(以下FP)を持つ。FDSとFDとFPのそれぞれは、XPSパートと呼ばれることがある。   The FDS has a plurality of Fixed Documents (hereinafter referred to as FD), and the FD has a plurality of Fixed Pages (hereinafter referred to as FP). Each of FDS, FD, and FP may be referred to as an XPS part.

FPは文書のページの内容をXML形式で記述しており、実際に表示または印刷される内容を含んでいる。FPのページ内容で使用されるフォントや画像等の資源は複数のFPで共有することができる。   The FP describes the contents of a document page in XML format, and includes contents that are actually displayed or printed. Resources such as fonts and images used in the FP page contents can be shared by a plurality of FPs.

また、FDSとFDとFPははそれぞれ印刷設定をPrintTicket(以下PT)で持つことができる。PTはXPS文書を印刷する際の印刷設定をXML形式で記述したものである。以下、具体的なXPS文書の構造を説明する。   Each of the FDS, FD, and FP can have a print setting as a PrintTicket (hereinafter referred to as PT). PT describes the print settings for printing an XPS document in XML format. A specific XPS document structure will be described below.

図2において、XPS文書501の論理構造は、FDS503がルートとなるツリー構造となっている。   In FIG. 2, the logical structure of the XPS document 501 is a tree structure in which the FDS 503 is the root.

FDS503は、子としてFD511とFD513を有する。また、FD511は、子としてFP521とFP523を有する。さらに、FD513は、子としてFP525を有する。   The FDS 503 includes FD 511 and FD 513 as children. Further, the FD 511 has FP 521 and FP 523 as children. Further, the FD 513 has an FP 525 as a child.

なお、印刷設定を記述したPTについては、FDS503がPT531を、FD511がPT533を、FP521がPT535を、FD513がPT537をそれぞれ保持している。また、FP523とFP525はPTを保持していない。   For the PT describing the print settings, the FDS 503 holds PT531, the FD511 holds PT533, the FP521 holds PT535, and the FD513 holds PT537. Further, FP 523 and FP 525 do not hold PT.

さらに、FP521とFP523がフォントや画像等の資源541を共有しており、FP525はフォントや画像等の資源543を利用している。   Further, the FP 521 and the FP 523 share a resource 541 such as a font or an image, and the FP 525 uses a resource 543 such as a font or an image.

以上説明したように、XPS文書は、論理的にXPSパートという概念を用いると理解が容易になる。ただし、XPS文書自体はバイト列(ストリーム)として取り扱いも可能である。   As described above, an XPS document can be easily understood if the concept of an XPS part is logically used. However, the XPS document itself can be handled as a byte string (stream).

<プリンタドライバの動作>   <Printer driver operation>

図3は、本実施形態を示す第1のプリンタドライバの構成を説明する図である。本例は、プリンタドライバがXPSプリンタドライバによる第1のフィルタ処理と、第2のフィルタ処理の例である。特に、印刷システムをOSの印刷サポート機能とプリンタドライバを中心に示した例である。なお、図1に示したプリンタドライバ1315は、図3において、プリンタドライバ311に対応する。   FIG. 3 is a diagram for explaining the configuration of the first printer driver according to the present embodiment. In this example, the printer driver is an example of the first filter processing and the second filter processing by the XPS printer driver. In particular, the printing system is an example in which an OS print support function and a printer driver are mainly shown. The printer driver 1315 shown in FIG. 1 corresponds to the printer driver 311 in FIG.

図3において、プリンタドライバ311の中で特に重要となるモジュールは、第1のフィルタとして機能するプリンタ制御コマンド格納フィルタ315と第2のフィルタとして機能するプリンタ制御コマンド生成抽出フィルタ313である。   In FIG. 3, modules that are particularly important in the printer driver 311 are a printer control command storage filter 315 that functions as a first filter and a printer control command generation extraction filter 313 that functions as a second filter.

ここで、プリンタ制御コマンド格納フィルタ315は入力をXPSストリームで受け取るように指定している。一方、プリンタ制御コマンド生成抽出フィルタ313は入力をXPSパートで受け取るように指定している。   Here, the printer control command storage filter 315 specifies that the input is received as an XPS stream. On the other hand, the printer control command generation extraction filter 313 specifies that the input is received by the XPS part.

また、ユーザインタフェースの機能を提供するコンフィギュレーションモジュールについては、本発明に関与していないので図示していないことを明記しておく。   It is noted that the configuration module that provides the user interface function is not shown because it is not involved in the present invention.

まず、図3を用いてXPS形式の中間印刷データがスプールされる際のプリンタドライバの処理の流れを説明する。   First, the flow of processing of the printer driver when XPS format intermediate print data is spooled will be described with reference to FIG.

アプリケーション301による印刷指示に応じ、OSの印刷サポート機能303が動作し、スプールファイル305が作成されXPS形式の中間印刷データが記憶装置に格納される。なお、スプール時の詳細な処理は前述しているのでここでは簡潔に説明する。つまり、スプールファイル305のデータ型が「RAW」指定されている。   In response to a print instruction from the application 301, the OS print support function 303 operates, a spool file 305 is created, and intermediate print data in XPS format is stored in the storage device. Since the detailed processing at the time of spooling has been described above, it will be briefly described here. That is, the data type of the spool file 305 is designated as “RAW”.

デスプールにおいて、スプールファイル305のデータ型が「RAW」であることから、OSの印刷サポート機能303はスプールファイル305に格納されたXPS形式のデータを、プリンタ制御コマンド格納フィルタ315に供給する。   In despooling, since the data type of the spool file 305 is “RAW”, the print support function 303 of the OS supplies the XPS format data stored in the spool file 305 to the printer control command storage filter 315.

プリンタ制御コマンド格納フィルタ315は、入力されたデータの形式を解析し、XPS形式と判断する。プリンタ制御コマンド格納フィルタ315が入力されたデータの形式がXPS形式と判断した場合、プリンタ制御コマンド格納フィルタ315は、入力されたデータをそのまま出力する。ここで、プリンタ制御コマンド格納フィルタ315から出力されたデータは、OSの印刷サポート機能303によりプリンタ制御コマンド生成抽出フィルタ313に供給される。   The printer control command storage filter 315 analyzes the format of the input data and determines that it is an XPS format. When the printer control command storage filter 315 determines that the format of the input data is the XPS format, the printer control command storage filter 315 outputs the input data as it is. Here, the data output from the printer control command storage filter 315 is supplied to the printer control command generation extraction filter 313 by the print support function 303 of the OS.

プリンタ制御コマンド生成抽出フィルタ313は、入力されたデータを解析し、プリンタ制御コマンドが格納されているか調査する。   The printer control command generation / extraction filter 313 analyzes the input data and checks whether a printer control command is stored.

ここでは、プリンタ制御コマンドが格納されていないので、入力されたXPS文書の各ページをレンダリングし、最終的にプリンタ制御コマンドをランゲージモニタ317に出力する。   Here, since no printer control command is stored, each page of the input XPS document is rendered, and finally the printer control command is output to the language monitor 317.

ランゲージモニタ317は、プリンタ321と通信を行いながら、プリンタ321の動作状況に応じてプリンタ制御コマンドをプリンタ321に出力する。   The language monitor 317 outputs a printer control command to the printer 321 according to the operation status of the printer 321 while communicating with the printer 321.

続いて、プリンタ制御コマンドがスプールされる際のプリンタドライバの処理の流れを図3を用いて説明する。ここでは、プリンタ制御コマンドがスプールされるので、データ型が「RAW」である。   Next, the processing flow of the printer driver when the printer control command is spooled will be described with reference to FIG. Here, since the printer control command is spooled, the data type is “RAW”.

アプリケーション301による印刷指示に応じ、OSの印刷サポート機能303が動作し、スプールファイル305が作成されプリンタ制御コマンドが記憶装置に格納される。なお、スプール時の詳細な処理は前述しているのでここでは簡潔に説明する。   In response to a print instruction from the application 301, the OS print support function 303 operates, a spool file 305 is created, and a printer control command is stored in the storage device. Since the detailed processing at the time of spooling has been described above, it will be briefly described here.

スプールファイル305のデータ型が「RAW」であることから、OSの印刷サポート機能303はスプールファイル305に格納されたプリンタ制御コマンド形式のデータを、プリンタ制御コマンド格納フィルタ315に供給する。   Since the data type of the spool file 305 is “RAW”, the OS print support function 303 supplies the printer control command format data stored in the spool file 305 to the printer control command storage filter 315.

次に、プリンタ制御コマンド格納フィルタ315は、入力されたデータの形式を解析し、プリンタ制御コマンド形式と判断する。   Next, the printer control command storage filter 315 analyzes the format of the input data and determines that the format is a printer control command format.

プリンタ制御コマンド格納フィルタ315が入力されたデータがプリンタ制御コマンド形式と判断した場合、入力されたプリンタ制御コマンドを記憶部1339にキャッシュし文字列に変換する。   When the printer control command storage filter 315 determines that the input data is in the printer control command format, the input printer control command is cached in the storage unit 1339 and converted into a character string.

そして、プリンタ制御コマンド格納フィルタ315は、変換されたその文字列をプライベートキーワードで格納したPTを作成する。   Then, the printer control command storage filter 315 creates a PT in which the converted character string is stored as a private keyword.

そして、プリンタ制御コマンド格納フィルタ315は、作成したPTを持つFDSを含むXPS文書を作成し、出力する。プリンタ制御コマンド格納フィルタ315から出力されたデータはOSの印刷サポート機能303によりプリンタ制御コマンド生成抽出フィルタ313に供給される。   Then, the printer control command storage filter 315 creates and outputs an XPS document including the FDS having the created PT. The data output from the printer control command storage filter 315 is supplied to the printer control command generation / extraction filter 313 by the OS print support function 303.

プリンタ制御コマンド生成抽出フィルタ313は、入力されたデータ、ここではXPS文書を解析し、FDSのPTにプリンタ制御コマンドが格納されているかを調査する。ここでは、プリンタ制御コマンドが格納されているので、プリンタ制御コマンド生成抽出フィルタ313は、入力されたXPS文書からプリンタ制御コマンドを抽出し、ランゲージモニタ317に出力する。   The printer control command generation / extraction filter 313 analyzes the input data, here the XPS document, and checks whether the printer control command is stored in the PT of the FDS. Here, since the printer control command is stored, the printer control command generation extraction filter 313 extracts the printer control command from the input XPS document and outputs it to the language monitor 317.

次に、ランゲージモニタ317はプリンタ321と通信を行いながら、プリンタ321の動作状況に応じてプリンタ制御コマンドをプリンタ321に出力する。   Next, the language monitor 317 outputs a printer control command to the printer 321 according to the operation status of the printer 321 while communicating with the printer 321.

なお、入力されたデータの形式を解析する処理について、図4を用いて後述する。また、PTへプリンタ制御コマンドを格納した際の例は、図5を用いて後述する。   A process for analyzing the format of the input data will be described later with reference to FIG. An example of storing the printer control command in the PT will be described later with reference to FIG.

以上のように、プリンタ制御コマンド格納フィルタ315でプリンタ制御コマンドを記憶装置に格納したXPS文書を作成し、プリンタ制御コマンド生成抽出フィルタ313でXPS文書からプリンタ制御コマンドを抽出することで、アプリケーションからのプリンタ制御コマンドが記憶装置にスプールされても、XPSプリンタドライバが適切に印刷処理を行うことができる。   As described above, the XPS document storing the printer control command in the storage device is created by the printer control command storage filter 315, and the printer control command is extracted from the XPS document by the printer control command generation extraction filter 313. Even if the printer control command is spooled in the storage device, the XPS printer driver can appropriately perform the printing process.

<データ形式の判定>   <Determination of data format>

本実施形態におけるプリンタ制御コマンド格納フィルタ315は、XPSストリームとして入力されたデータがXPSであるか判別する必要が有る。   The printer control command storage filter 315 in this embodiment needs to determine whether the data input as the XPS stream is XPS.

図4は、図3に示したXPS文書の先頭部分のバイナリ・ダンプの一例を示す図である。   FIG. 4 is a diagram illustrating an example of a binary dump of the head portion of the XPS document illustrated in FIG.

図4に示すように、一般的に、広く用いられている画像や文書のフォーマットは、ヘッダ部分にマジックナンバを格納していることが多い。   As shown in FIG. 4, generally, a widely used image or document format often has a magic number stored in the header portion.

つまり、データの先頭部分を参照すれば、比較的容易に画像や文書の種類を判別することが可能である。   That is, it is possible to determine the type of image or document relatively easily by referring to the head portion of the data.

XPS文書の場合、少なくとも先頭のバイト目が'P'(0x50)、2バイト目が'K'(0x4b)となっている。   In the case of an XPS document, at least the first byte is 'P' (0x50), and the second byte is 'K' (0x4b).

従って、プリンタ制御コマンド格納フィルタ315は、先頭2バイトを参照した時点で、プリンタ制御コマンドとの差異が明らかになれば、XPSであることは判別できる。   Therefore, if the difference from the printer control command becomes clear when the printer control command storage filter 315 refers to the first two bytes, it can be determined that it is XPS.

なお、入力されたデータの形式がプリンタ制御コマンドであるかどうかの判断は、プリンタドライバが動作対象とするプリンタにより異なるため、ここでは詳細を説明しない。しかし、プリンタ制御コマンドの体系には固有のパターンが存在することが一般的であるため、判別することは可能である。   Note that the determination of whether the format of the input data is a printer control command differs depending on the printer that the printer driver is to operate on, and will not be described in detail here. However, since a unique pattern generally exists in the printer control command system, it can be determined.

<PTへのプリンタ制御コマンドの格納>   <Storing printer control commands in PT>

図5は、図2に示したPTへプリンタ制御コマンドを格納する処理を説明する図である。   FIG. 5 is a diagram for explaining processing for storing printer control commands in the PT shown in FIG.

図5に示すように、PTはXML文書であるため、プリンタ制御コマンドはBase64エンコード等を用いて文字列に変換する。また、プリンタ制御コマンドの文字列をPTに格納する際に使用するキーワードは、パブリックのPrintSchemaには定義されていないため、プライベートのキーワードを用いる。   As shown in FIG. 5, since PT is an XML document, the printer control command is converted into a character string using Base64 encoding or the like. In addition, since the keyword used when storing the character string of the printer control command in the PT is not defined in the public PrintSchema, a private keyword is used.

図5に示す例では、PrintTicket要素でプライベートの名前空間を「ns0000」と定義している。そして、Property要素を用い、name属性を「ns0000:RawJobPrintCommand」としている。このProperty要素の子要素であるValue要素を用いて、文字列に変換されたプリンタ制御コマンドを格納している。   In the example illustrated in FIG. 5, the private name space is defined as “ns0000” in the PrintTicket element. The Property element is used and the name attribute is “ns0000: RawJobPrintCommand”. A printer control command converted into a character string is stored using a Value element which is a child element of the Property element.

従って、PTにプリンタ制御コマンドが含まれているかどうかを判断するためには、PT中に存在するProperty要素を列挙し、name属性に上記のプライベートのキーワードを持つProperty要素があるかを調べればよい。   Therefore, in order to determine whether a printer control command is included in the PT, it is only necessary to list the Property elements existing in the PT and check whether there is a Property element having the private keyword in the name attribute. .

なお、厳密に判断するためには、Property要素の子要素であるValue要素が存在し、さらに文字列の値が記載されていることを調べればよいことは言うまでもない。   Needless to say, in order to make a strict judgment, it is sufficient to check that there is a Value element that is a child element of the Property element and that a value of a character string is described.

<プリンタ制御コマンド格納フィルタ>   <Printer control command storage filter>

図6は、本実施形態を示すデータ処理装置における第1のデータ処理手順の一例を示すフローチャートである。なお、S901〜S912は各ステップを示す。また、各ステップは、プリンタ制御コマンド格納フィルタ315により実行される。ここで、プリンタ制御コマンド格納フィルタ315は、XPSドライバであるプリンタドライバ311に含まれるパイプラインフィルタの1つとして機能する。   FIG. 6 is a flowchart illustrating an example of a first data processing procedure in the data processing apparatus according to the present embodiment. In addition, S901-S912 shows each step. Each step is executed by the printer control command storage filter 315. Here, the printer control command storage filter 315 functions as one of the pipeline filters included in the printer driver 311 that is an XPS driver.

図6において、S901からS904では入力されたデータの形式を判別するために入力データを記憶部1339にキャッシュする処理に対応する。   In FIG. 6, steps S901 to S904 correspond to a process of caching the input data in the storage unit 1339 in order to determine the format of the input data.

先ず、S901で、プリンタ制御コマンド格納フィルタ315は、入力データを少なくとも1バイト読み込む。次に、S902で、プリンタ制御コマンド格納フィルタ315は、入力データを読み込めたかどうかを判断する。ここで、プリンタ制御コマンド格納フィルタ315が、入力データを読み込めたと判断した場合は、S903へ進み、入力データを読み込めなかったと判断した場合は、本処理を終了する。   First, in step S901, the printer control command storage filter 315 reads at least one byte of input data. In step S902, the printer control command storage filter 315 determines whether input data has been read. If the printer control command storage filter 315 determines that the input data has been read, the process advances to step S903. If the printer control command storage filter 315 determines that the input data has not been read, the process ends.

次に、S903で、プリンタ制御コマンド格納フィルタ315は、読み込んだデータを記憶部1339にキャッシュする。続いて、S904で、プリンタ制御コマンド格納フィルタ315は、データの形式を判別するのに十分なデータがキャッシュされたか調べる。つまり、プリンタ制御コマンド格納フィルタ315は、入力されたデータのデータ形式を判定することが可能かどうかを判断する。   In step S <b> 903, the printer control command storage filter 315 caches the read data in the storage unit 1339. Subsequently, in step S904, the printer control command storage filter 315 checks whether sufficient data has been cached to determine the data format. That is, the printer control command storage filter 315 determines whether the data format of the input data can be determined.

ここで、プリンタ制御コマンド格納フィルタ315が入力されたデータのデータ形式を判定することができるほどデータの入力が十分でないと判断した場合は、S901へ戻る。   If the printer control command storage filter 315 determines that the data input is not sufficient to determine the data format, the process returns to S901.

一方、S903で、プリンタ制御コマンド格納フィルタ315が入力されたデータのデータ形式を判定することができるほどデータの入力が十分であると判断した場合は、S905へ進む。   On the other hand, if it is determined in S903 that the data input of the printer control command storage filter 315 is sufficient to determine the data format of the input data, the process proceeds to S905.

そして、S905で、プリンタ制御コマンド格納フィルタ315は、入力されたデータが特定形式、例えばプリンタ制御コマンドの形式であるかどうかを判断する。ここで、プリンタ制御コマンド格納フィルタ315がプリンタ制御コマンドの形式であると判断した場合は、S906へ進み、プリンタ制御コマンドの形式でないと判断した場合は、S910に移る。   In step S905, the printer control command storage filter 315 determines whether the input data is in a specific format, for example, a printer control command format. If the printer control command storage filter 315 determines that the printer control command format is used, the process advances to step S906. If the printer control command storage filter 315 determines that the printer control command format is not specified, the process advances to step S910.

以降のS906からS909は、入力されたデータの形式がプリンタ制御コマンドの形式である場合の処理に対応する。   Subsequent steps S906 to S909 correspond to processing when the format of the input data is the format of the printer control command.

S906で、プリンタ制御コマンド格納フィルタ315は、入力されたデータの残りも全て読込み記憶部1339にキャッシュする。   In step S <b> 906, the printer control command storage filter 315 caches all remaining input data in the reading storage unit 1339.

続いて、S907で、プリンタ制御コマンド格納フィルタ315は、PTを作成し、キャッシュしたプリンタ制御コマンドを文字列に変換し、前述した図5に示したXPS文書のようにプライベートキーワードを用いてPTに格納する。   In step S907, the printer control command storage filter 315 creates a PT, converts the cached printer control command into a character string, and uses the private keyword as in the XPS document shown in FIG. Store.

続いて、S908で、プリンタ制御コマンド格納フィルタ315は、XPS文書を作成し、作成したPTをFDSに割り当てるようにして格納する。続く、S909で、プリンタ制御コマンド格納フィルタ315は、作成したXPS文書を出力する。ここで、プリンタ制御コマンド格納フィルタ315は、作成したXPS文書をプリンタ制御コマンド生成抽出フィルタ313に出力する。   In step S908, the printer control command storage filter 315 creates an XPS document and stores the created PT so as to be assigned to the FDS. In step S909, the printer control command storage filter 315 outputs the created XPS document. Here, the printer control command storage filter 315 outputs the created XPS document to the printer control command generation extraction filter 313.

一方、S905からS910へ進んだ場合は、プリンタ制御コマンド格納フィルタ315は、入力されたデータの形式が特定形式、例えばXPSの形式であるかどうか判断する。ここで、プリンタ制御コマンド格納フィルタ315が、入力されたデータの形式がXPSの形式であると判断した場合は、S911に移り、XPS形式でないと判断した場合は、本処理を終了する。   On the other hand, when the processing proceeds from step S905 to step S910, the printer control command storage filter 315 determines whether the format of the input data is a specific format, for example, an XPS format. If the printer control command storage filter 315 determines that the format of the input data is the XPS format, the process proceeds to S911. If the printer control command storage filter 315 determines that the format is not the XPS format, the process ends.

そして、S911で、プリンタ制御コマンド格納フィルタ315は、記憶部1339にキャッシュされているデータ内容をそのまま、ランゲージモニタ317へ出力する。次に、S912で、プリンタ制御コマンド格納フィルタ315は、残りの入力されたデータをキャッシュから読込み全てランゲージモニタ317へ出力したら、本処理を終了する。   In step S911, the printer control command storage filter 315 outputs the data content cached in the storage unit 1339 to the language monitor 317 as it is. In step S912, the printer control command storage filter 315 reads the remaining input data from the cache and outputs all the data to the language monitor 317. Then, the process ends.

以上のように処理することで、プリンタドライバ311は、入力されたデータがプリンタ制御コマンドである場合は、XPS文書を作成し、FDSのPTにプリンタ制御コマンドを埋め込み、作成したXPS文書を出力する。   By performing the above processing, when the input data is a printer control command, the printer driver 311 creates an XPS document, embeds the printer control command in the PT of the FDS, and outputs the created XPS document. .

一方、入力されたデータがXPSである場合は、プリンタドライバ311は、そのまま入力されたデータを出力する。   On the other hand, if the input data is XPS, the printer driver 311 outputs the input data as it is.

従って、プリンタ制御コマンド格納フィルタの出力は、必ずXPS文書となる。これにより、結果的に後続するフィルタの入力にXPSパートが指定されていても、問題なく印刷処理を行うことができるようになる。   Therefore, the output of the printer control command storage filter is always an XPS document. As a result, even if the XPS part is specified as the input of the subsequent filter, the printing process can be performed without any problem.

また、上記実施形態では、図6において、入力されたデータの形がプリンタ制御コマンドの形式であるかどうかを先に判定した後に、XPS形式であるかどうかを判定しているが、この順は逆でも良い。   In the above embodiment, in FIG. 6, it is first determined whether the input data is in the printer control command format, and then it is determined whether it is in the XPS format. The reverse is also acceptable.

また、入力されたデータがプリンタ制御コマンドでもXPSでも無い時は処理を中断しているが、プリンタ制御コマンドと同様にPTに格納してXPSとして出力してもよい。   The process is interrupted when the input data is neither a printer control command nor an XPS, but it may be stored in the PT and output as an XPS as in the case of the printer control command.

つまり入力されたデータの形式がプリンタ制御コマンド格納フィルタにとって未知である場合は、プリンタ制御コマンドと同様に扱ってもよい。   That is, if the format of the input data is unknown to the printer control command storage filter, it may be handled in the same manner as the printer control command.

<プリンタ制御コマンド生成抽出フィルタ>   <Printer control command generation extraction filter>

以下、図7を用いてプリンタ制御コマンド生成抽出フィルタの処理について説明する。   Hereinafter, processing of the printer control command generation extraction filter will be described with reference to FIG.

図7は、本実施形態を示すデータ処理装置における第2のデータ処理手順の一例を示すフローチャートである。   FIG. 7 is a flowchart illustrating an example of a second data processing procedure in the data processing apparatus according to the present embodiment.

なお、S1001〜S1005は各ステップを示す。また、各ステップは、プリンタ制御コマンド生成抽出フィルタ313により実行される。ここで、プリンタ制御コマンド生成抽出フィルタ313は、XPSドライバであるプリンタドライバ311に含まれるパイプラインフィルタの1つとして機能する。   S1001 to S1005 indicate each step. Each step is executed by the printer control command generation extraction filter 313. Here, the printer control command generation extraction filter 313 functions as one of the pipeline filters included in the printer driver 311 that is an XPS driver.

まず、S1001で、プリンタ制御コマンド生成抽出フィルタ313は、入力されたXPS文書のFDSがPTを持っているかどうか判断する。ここで、プリンタ制御コマンド生成抽出フィルタ313がPTを持っていると判断した場合は、S1002に移り、PTを持っていないと判断した場合は、S1011に移る。   First, in step S1001, the printer control command generation extraction filter 313 determines whether the FDS of the input XPS document has PT. If it is determined that the printer control command generation / extraction filter 313 has a PT, the process proceeds to S1002. If it is determined that the printer control command generation / extraction filter 313 does not have a PT, the process proceeds to S1011.

次に、S1002で、プリンタ制御コマンド生成抽出フィルタ313は、プリンタ制御コマンド格納フィルタ315から入力されたXPS文書からFDSのPTを取得する。   In step S <b> 1002, the printer control command generation extraction filter 313 acquires the PT of the FDS from the XPS document input from the printer control command storage filter 315.

続く、S1003で、プリンタ制御コマンド生成抽出フィルタ313は、取得したPTにプリンタ制御コマンドが格納されているか調べる。ここで、プリンタ制御コマンド生成抽出フィルタ313が、取得したPTにプリンタ制御コマンドが格納されていると判断した場合は、S1004に移り、格納されていないと判断した場合は、S1011に移る。   In step S1003, the printer control command generation / extraction filter 313 checks whether a printer control command is stored in the acquired PT. If the printer control command generation / extraction filter 313 determines that the printer control command is stored in the acquired PT, the process proceeds to S1004. If the printer control command generation / extraction filter 313 determines that the printer control command is not stored, the process proceeds to S1011.

そして、S1004で、プリンタ制御コマンド生成抽出フィルタ313は、PTに格納されている文字列形式のプリンタ制御コマンドを抽出し、文字列からバイト列に変換してランゲージモニタ317に出力して、本処理を終了する。   In step S1004, the printer control command generation extraction filter 313 extracts a character string format printer control command stored in the PT, converts the character string into a byte string, and outputs the string to the language monitor 317. Exit.

一方、S1005では、プリンタ制御コマンド生成抽出フィルタ313は、通常のXPS印刷処理を行い、本処理を終了する。具体的には、プリンタ制御コマンド生成抽出フィルタ313は、XPS内のFPを順次レンダリングして画像を作成し、これをプリンタ制御コマンドに変換して、ランゲージモニタ317に出力する。   On the other hand, in step S1005, the printer control command generation / extraction filter 313 performs normal XPS printing processing, and ends this processing. Specifically, the printer control command generation / extraction filter 313 sequentially renders the FPs in the XPS to create an image, converts it into a printer control command, and outputs it to the language monitor 317.

以上のように処理することで、入力されたXPSにプリンタ制御コマンドが格納されている場合は、プリンタ制御コマンドを出力することが可能になる。   By performing the processing as described above, when a printer control command is stored in the input XPS, it is possible to output the printer control command.

また、入力されたXPSにプリンタ制御コマンドが格納されていない場合は、通常通りXPSの描画内容をプリンタ制御コマンドに変換して出力する。   If the printer control command is not stored in the input XPS, the XPS drawing content is converted into a printer control command and output as usual.

従って、プリンタ制御コマンド生成抽出フィルタの出力は必ずプリンタ制御コマンドとなる。これにより、結果的にプリンタに確実にプリンタ制御コマンドが送信され、問題なく印刷処理ができるようになる。   Therefore, the output of the printer control command generation / extraction filter is always a printer control command. As a result, the printer control command is surely transmitted to the printer, and the printing process can be performed without any problem.

本実施形態では、プリンタ制御コマンドをXPS文書のFDSのPTに格納したが、格納先はXPSの内部であればよく、FDのPTやFPのPTを始め、XPSを構成し得るXPSパートやリソースでもよいことは言うまでもない。   In this embodiment, the printer control command is stored in the FDS PT of the XPS document. However, the storage destination may be in the XPS, and the XPS parts and resources that can constitute the XPS, including the FD PT and the FP PT. But it goes without saying.

また、XPS文書からプリンタ制御コマンドを抽出する場合も、同様にプリンタ制御コマンドが格納されたXPS文書の構成要素から抽出すればよいことは言うまでもない。   Needless to say, when a printer control command is extracted from an XPS document, the printer control command may be similarly extracted from the constituent elements of the XPS document in which the printer control command is stored.

〔第2実施形態〕   [Second Embodiment]

上記第1実施形態では、大量のプリンタ制御コマンドが印刷ジョブとしてスプールされた場合には、処理効率が低下する場合がある。そこで、プリンタ制御コマンド保存フィルタを設けて、印刷制御コマンドをXPS文書に変換しながら保存ファイルとすることで、印刷処理効率の低下を防止できるように構成してもよい。以下、その実施形態について説明する。   In the first embodiment, when a large amount of printer control commands are spooled as a print job, the processing efficiency may decrease. Therefore, a printer control command storage filter may be provided so that the print control command is converted into an XPS document and used as a storage file, thereby preventing a decrease in print processing efficiency. The embodiment will be described below.

<プリンタドライバの動作>   <Printer driver operation>

図8は、本実施形態を示す第2のプリンタドライバの構成を説明する図である。本例は、プリンタドライバがXPSプリンタドライバによる第1のフィルタ処理と、第2のフィルタ処理の例である。特に、印刷システムをOSの印刷サポート機能とプリンタドライバを中心に示した例である。なお、図1に示したプリンタドライバ1315は、図8において、プリンタドライバ411に対応する。   FIG. 8 is a diagram illustrating the configuration of the second printer driver according to the present embodiment. In this example, the printer driver is an example of the first filter processing and the second filter processing by the XPS printer driver. In particular, the printing system is an example in which an OS print support function and a printer driver are mainly shown. The printer driver 1315 shown in FIG. 1 corresponds to the printer driver 411 in FIG.

図8において、本実施形態に示すプリンタドライバ411の中で特に重要となるモジュールは、第1のフィルタとして機能するプリンタ制御コマンド保存フィルタ415と第2のフィルタとして機能するプリンタ制御コマンド生成読込フィルタ413である。   In FIG. 8, the modules that are particularly important in the printer driver 411 shown in this embodiment are a printer control command storage filter 415 that functions as a first filter and a printer control command generation read filter 413 that functions as a second filter. It is.

ここで、プリンタ制御コマンド保存フィルタ415は入力をXPSストリームで受け取るように指定している。一方、プリンタ制御コマンド生成読込フィルタ413は入力をXPSパートで受け取るように指定している。   Here, the printer control command storage filter 415 specifies that the input is received as an XPS stream. On the other hand, the printer control command generation read filter 413 specifies that the input is received by the XPS part.

また、ユーザインタフェースの機能を提供するコンフィギュレーションモジュールについては、本発明に関与していないので図示していないことを明記しておく。   It is noted that the configuration module that provides the user interface function is not shown because it is not involved in the present invention.

まず、図8を用いてXPS形式の中間印刷データがスプールされた際のプリンタドライバの処理の流れについて説明する。   First, the flow of processing of the printer driver when XPS format intermediate print data is spooled will be described with reference to FIG.

アプリケーション401による印刷指示に応じ、OSの印刷サポート機能403が動作し、スプールファイル405が作成されXPS形式の中間印刷データが記憶部1339に格納される。スプール時の詳細な処理は前述しているのでここでは簡潔に説明した。   In response to a print instruction from the application 401, the OS print support function 403 operates, a spool file 405 is created, and intermediate print data in XPS format is stored in the storage unit 1339. Since detailed processing at the time of spooling has been described above, it has been briefly described here.

そして、デスプールにおいて、スプールファイル405のデータ型が「RAW」であることから、OSの印刷サポート機能403は、スプールファイル405に格納されたXPS形式のデータを、プリンタ制御コマンド保存フィルタ415に供給する。   Since the data type of the spool file 405 is “RAW” in despooling, the OS print support function 403 supplies the XPS format data stored in the spool file 405 to the printer control command storage filter 415. .

プリンタ制御コマンド保存フィルタ415は、入力されたデータを解析し、XPS形式と判断する。そして、プリンタ制御コマンド保存フィルタ415が入力されたデータがXPS形式と判断した場合、プリンタ制御コマンド保存フィルタ415は、入力されたデータをプリンタ制御コマンド生成読込フィルタ413にそのまま出力する。そして、プリンタ制御コマンド保存フィルタ415から出力されたデータはOSの印刷サポート機能403によりプリンタ制御コマンド生成読込フィルタ413に供給される。   The printer control command storage filter 415 analyzes the input data and determines that it is in the XPS format. When the printer control command storage filter 415 determines that the input data is in the XPS format, the printer control command storage filter 415 outputs the input data to the printer control command generation read filter 413 as it is. The data output from the printer control command storage filter 415 is supplied to the printer control command generation / read filter 413 by the OS print support function 403.

そして、プリンタ制御コマンド生成読込フィルタ413は、プリンタ制御コマンド保存フィルタ415からの入力データを解析し、プリンタ制御コマンド保存ファイル431のパスが格納されているか調査する。ここでは、パスが格納されていないので、入力されたXPS文書の各ページをレンダリングし、最終的にプリンタ制御コマンドをランゲージモニタ417に出力する。   The printer control command generation / read filter 413 analyzes the input data from the printer control command storage filter 415 and checks whether the path of the printer control command storage file 431 is stored. Here, since no path is stored, each page of the input XPS document is rendered, and finally a printer control command is output to the language monitor 417.

そして、ランゲージモニタ417は、プリンタ421と通信を行いながら、プリンタ421の動作状況に応じてプリンタ制御コマンドをプリンタ421に出力する。   The language monitor 417 outputs a printer control command to the printer 421 according to the operation status of the printer 421 while communicating with the printer 421.

続いて、プリンタ制御コマンドがスプールされた際のプリンタドライバの処理の流れを図8を用いて説明する。   Next, the flow of processing of the printer driver when the printer control command is spooled will be described with reference to FIG.

アプリケーション401による印刷指示に応じ、OSの印刷サポート機能403が動作し、スプールファイル405が作成され、プリンタ制御コマンドが格納される。なお、スプール時の詳細な処理は前述の通りである。   In response to a print instruction from the application 401, the OS print support function 403 operates to create a spool file 405 and store a printer control command. Detailed processing at the time of spooling is as described above.

ここで、スプールファイル405のデータ型が「RAW」であることから、OSの印刷サポート機能403は、スプールファイル405に格納されたプリンタ制御コマンド形式のデータを、プリンタ制御コマンド保存フィルタ415に供給する。   Here, since the data type of the spool file 405 is “RAW”, the print support function 403 of the OS supplies the printer control command format data stored in the spool file 405 to the printer control command storage filter 415. .

プリンタ制御コマンド保存フィルタ415は、入力されたデータを解析し、プリンタ制御コマンド形式であるかどうかを判断する。プリンタ制御コマンド保存フィルタ415が入力されたデータがプリンタ制御コマンド形式と判断した場合、プリンタ制御コマンド保存フィルタ415は、入力されたプリンタ制御コマンドをプリンタ制御コマンド保存ファイル431に保存する。   The printer control command storage filter 415 analyzes the input data and determines whether it is in the printer control command format. When the printer control command storage filter 415 determines that the input data is in the printer control command format, the printer control command storage filter 415 stores the input printer control command in the printer control command storage file 431.

そして、プリンタ制御コマンド保存ファイル431のパスをプライベートキーワードで格納したPTを作成する。そして、作成したPTを持つFDSを含むXPS文書を作成し、プリンタ制御コマンド生成読込フィルタ413に出力する。ここで、出力されたデータはOSの印刷サポート機能403によりプリンタ制御コマンド生成読込フィルタ413に供給される。   Then, a PT storing the path of the printer control command storage file 431 with a private keyword is created. Then, an XPS document including the FDS having the created PT is created and output to the printer control command generation / read filter 413. Here, the output data is supplied to the printer control command generation / read filter 413 by the print support function 403 of the OS.

次に、プリンタ制御コマンド生成読込フィルタ413は入力されたXPS文書を解析し、プリンタ制御コマンド保存ファイル431のパスが格納されているか調査する。ここではパスが格納されているので、プリンタ制御コマンド生成読込フィルタ413は、入力されたXPS文書からパスを抽出し、パスをもとにプリンタ制御コマンド保存ファイル431からプリンタ制御コマンドを読み込み、ランゲージモニタ417に出力する。ランゲージモニタ417はプリンタ421と通信を行いながら、プリンタ421の動作状況に応じてプリンタ制御コマンドをプリンタ421に出力する。   Next, the printer control command generation / read filter 413 analyzes the input XPS document and checks whether the path of the printer control command storage file 431 is stored. Since the path is stored here, the printer control command generation read filter 413 extracts the path from the input XPS document, reads the printer control command from the printer control command storage file 431 based on the path, and the language monitor. To 417. The language monitor 417 outputs a printer control command to the printer 421 according to the operation status of the printer 421 while communicating with the printer 421.

なお、プリンタ制御コマンド保存ファイル431のパスを、PTに格納した際の例を図9を用いて後述する。   An example of storing the path of the printer control command storage file 431 in the PT will be described later with reference to FIG.

以上のように、本実施形態では、先ず、プリンタ制御コマンド保存フィルタ415でプリンタ制御コマンドをプリンタ制御コマンド保存ファイル431に保存する。その後、プリンタ制御コマンド保存フィルタ415がプリンタ制御コマンド保存ファイル431のパスを格納したXPS文書を作成してプリンタ制御コマンド生成読込フィルタ413に出力する。   As described above, in this embodiment, first, the printer control command storage filter 415 stores the printer control command in the printer control command storage file 431. Thereafter, the printer control command storage filter 415 creates an XPS document storing the path of the printer control command storage file 431 and outputs the XPS document to the printer control command generation read filter 413.

その後、プリンタ制御コマンド生成読込フィルタ413がプリンタ制御コマンド保存フィルタ415から出力されるXPS文書からパスを抽出する。そして、プリンタ制御コマンド保存フィルタ415が、抽出したパスをもとにプリンタ制御コマンド保存ファイル431からプリンタ制御コマンドを読み込む。この一連の処理を実行することで、プリンタ制御コマンドがプリンタ制御コマンド保存ファイル431としてスプールされても適切に印刷処理が行われる。   Thereafter, the printer control command generation / read filter 413 extracts a path from the XPS document output from the printer control command storage filter 415. Then, the printer control command storage filter 415 reads the printer control command from the printer control command storage file 431 based on the extracted path. By executing this series of processing, even if the printer control command is spooled as the printer control command saving file 431, the printing processing is appropriately performed.

<記憶領域の識別子のPTへの格納>   <Storing storage area identifier in PT>

図9は、本実施形態を示すデータ処理装置で生成されるPTの一例を示す図である。   FIG. 9 is a diagram illustrating an example of a PT generated by the data processing apparatus according to the present embodiment.

以下、プリンタ制御コマンドを保存した記憶領域の識別子を、PTに格納する際の処理について説明する。   Hereinafter, a process for storing the identifier of the storage area storing the printer control command in the PT will be described.

図9に示すように、本実施形態では、プリンタ制御コマンド保存フィルタ415がプリンタ制御コマンドが保存される記憶領域の識別子をPTに格納する。ここで、記憶領域の識別子とは、具体的にはファイルシステムに作成されたファイルのパスである。   As shown in FIG. 9, in this embodiment, the printer control command storage filter 415 stores the identifier of the storage area in which the printer control command is stored in the PT. Here, the identifier of the storage area is specifically a path of a file created in the file system.

また、プリンタ制御コマンドを保存した記憶領域の識別子の文字列をPT格納する際に使用するキーワードは、パブリックのPrintSchemaには定義されていないため、プライベートのキーワードを用いる。   In addition, since a keyword used when PT storing the character string of the storage area identifier storing the printer control command is not defined in the public PrintSchema, a private keyword is used.

図9に示す例では、PrintTicket要素でプライベートの名前空間を「ns0000」と定義している。そして、Property要素を用い、name属性を「ns0000:RawJobPrintCommandFilePath」としている。このProperty要素の子要素であるValue要素を用いて、記憶領域の識別子を格納している。   In the example illustrated in FIG. 9, the private namespace is defined as “ns0000” in the PrintTicket element. Then, the Property element is used and the name attribute is “ns0000: RawJobPrintCommandFilePath”. The identifier of the storage area is stored using the Value element that is a child element of the Property element.

従って、PTにプリンタ制御コマンドを保存した記憶領域の識別子が含まれているかどうかを判断するためには、PT中に存在するProperty要素を列挙し、name属性に上記のプライベートのキーワードを持つものがあるかを調べればよい。   Therefore, in order to determine whether or not the storage area identifier storing the printer control command is included in the PT, the Property element existing in the PT is listed, and the name attribute has the above private keyword. Find out if it exists.

なお、厳密に判断するためには、Property要素の子要素であるValue要素が存在し、さらに文字列の値が記載されていることを調べればよいことは言うまでもない。   Needless to say, in order to make a strict judgment, it is sufficient to check that there is a Value element that is a child element of the Property element and that a value of a character string is described.

<プリンタ制御コマンド保存フィルタ>   <Printer control command storage filter>

図10は、本実施形態を示すデータ処理装置における第3のデータ処理手順の一例を示すフローチャートである。
なお、S1101〜S1113は各ステップを示す。また、各ステップは、プリンタ制御コマンド保存フィルタ415により実行される。ここで、プリンタ制御コマンド保存フィルタ415は、XPSドライバであるプリンタドライバ311に含まれるパイプラインフィルタの1つとして機能する。
FIG. 10 is a flowchart illustrating an example of a third data processing procedure in the data processing apparatus according to the present embodiment.
S1101 to S1113 indicate each step. Each step is executed by the printer control command storage filter 415. Here, the printer control command storage filter 415 functions as one of the pipeline filters included in the printer driver 311 that is an XPS driver.

なお、以降のS1101からS1107では入力されたデータの形式を判別するために入力データをキャッシュする処理を行う。   In the subsequent steps S1101 to S1107, processing for caching the input data is performed in order to determine the format of the input data.

具体的には、S1101で、プリンタ制御コマンド保存フィルタ415は、入力データを少なくとも1バイト読み込む。次に、S1102で、プリンタ制御コマンド保存フィルタ415は入力データを1バイト分読み込めたかどうか判断する。   Specifically, in S1101, the printer control command storage filter 415 reads at least one byte of input data. In step S1102, the printer control command storage filter 415 determines whether one byte of input data has been read.

ここで、プリンタ制御コマンド保存フィルタ415がデータを読み込めたと判断した場合は、S1103に移り、読み込めないと判断した場合は、本処理を終了する。   If the printer control command storage filter 415 determines that the data has been read, the process advances to step S1103. If it is determined that the data cannot be read, the process ends.

次に、S1103で、プリンタ制御コマンド保存フィルタ415は、読み込んだデータをキャッシュする。続いてS1104で、プリンタ制御コマンド保存フィルタ415は、データの形式を判別するのに十分なデータがキャッシュされているかどうかを判断する。つまり、プリンタ制御コマンド保存フィルタ415は、入力されたデータのデータ形式を判定することが可能かどうかを判断する。   In step S1103, the printer control command storage filter 415 caches the read data. In step S1104, the printer control command storage filter 415 determines whether sufficient data is cached to determine the data format. That is, the printer control command storage filter 415 determines whether it is possible to determine the data format of the input data.

ここで、プリンタ制御コマンド保存フィルタ415が入力されたデータの形式を判定することが可能であると判断した場合は、S1105へ進み、データが不十分でデータ形式が特定形式であるかを判定することができないと判断した場合は、S1101に戻る。   If the printer control command storage filter 415 determines that the format of the input data can be determined, the process advances to step S1105 to determine whether the data format is insufficient and the data format is a specific format. If it is determined that it cannot be performed, the process returns to S1101.

そして、S1105で、プリンタ制御コマンド保存フィルタ415は、入力されたデータの形式が特定形式、例えばプリンタ制御コマンドの形式であるかどうかを判断する。ここで、プリンタ制御コマンド保存フィルタ415がプリンタ制御コマンドの形式であると判断した場合は、S1106へ移り、プリンタ制御コマンドでないと判断した場合は、S1111に移る。   In step S1105, the printer control command storage filter 415 determines whether the format of the input data is a specific format, for example, the format of a printer control command. If the printer control command storage filter 415 determines that the format is a printer control command, the process proceeds to S1106. If it is determined that the printer control command is not a printer control command, the process proceeds to S1111.

以降S1106からS1110は入力されたデータの形式がプリンタ制御コマンドである場合の処理となる。   Thereafter, S1106 to S1110 are processing when the format of the input data is a printer control command.

具体的には、S1106で、プリンタ制御コマンド保存フィルタ415は、プリンタ制御コマンドを保存するファイルを作成し、キャッシュの内容をプリンタ制御コマンド保存ファイル431として記憶部1339に保存する。   Specifically, in step S <b> 1106, the printer control command storage filter 415 creates a file for storing printer control commands, and stores the cache contents in the storage unit 1339 as a printer control command storage file 431.

続く、S1107で、プリンタ制御コマンド保存フィルタ415は、入力されたデータの残りも全て読み込み上記ファイルに追記保存する。   In step S1107, the printer control command storage filter 415 reads all the remaining input data and additionally stores it in the file.

続いて、S1108で、プリンタ制御コマンド保存フィルタ415は、PTを作成し、プリンタ制御コマンドを保存したファイルのパスを、前述したようにプライベートキーワードを用いてPTに格納する。   In step S1108, the printer control command storage filter 415 creates a PT, and stores the path of the file storing the printer control command in the PT using the private keyword as described above.

続いて、S1109で、プリンタ制御コマンド保存フィルタ415は、XPS文書を作成し、作成したPTをFDSに割り当てるようにして格納する。続く、S1110で、プリンタ制御コマンド保存フィルタ415は、作成したXPS文書をプリンタ制御コマンド生成読込フィルタ413に出力して、本処理を終了する。   In step S1109, the printer control command storage filter 415 creates an XPS document and stores the created PT so as to be assigned to the FDS. In step S1110, the printer control command storage filter 415 outputs the created XPS document to the printer control command generation read filter 413, and ends this processing.

一方、S1111で、プリンタ制御コマンド保存フィルタ415は、入力されたデータの形式が特定形式、例えばXPS形式かどうか判断し、XPS形式であると判断した場合は、S1112に移り、XPS形式でないと判断した場合は、本処理を終了する。   On the other hand, in step S1111, the printer control command storage filter 415 determines whether the format of the input data is a specific format, for example, the XPS format. If so, this process ends.

そして、S1112で、プリンタ制御コマンド保存フィルタ415は、キャッシュの内容をそのままプリンタ制御コマンド生成読込フィルタ413に出力する。続いて、S1113で、プリンタ制御コマンド保存フィルタ415は、残りの入力されたデータを読込み全て、プリンタ制御コマンド生成読込フィルタ413に出力して、本処理を終了する。   In step S1112, the printer control command storage filter 415 outputs the contents of the cache to the printer control command generation read filter 413 as they are. In step S <b> 1113, the printer control command storage filter 415 reads all the remaining input data and outputs it to the printer control command generation read filter 413, and the process ends.

以上のように処理することで、入力されたデータがプリンタ制御コマンドである場合は、プリンタ制御コマンドをプリンタ制御コマンド保存ファイル431に保存し、XPS文書を作成し、FDSのPTにファイルのパスを埋め込み、XPS文書を出力する。   By performing the above processing, if the input data is a printer control command, the printer control command is saved in the printer control command saving file 431, an XPS document is created, and the file path is set in the FDS PT. Embed and output XPS document.

一方、入力されたデータがXPSである場合は、プリンタ制御コマンド保存フィルタ415は入力されたデータをそのままプリンタ制御コマンド生成読込フィルタ413に出力する。   On the other hand, if the input data is XPS, the printer control command storage filter 415 outputs the input data to the printer control command generation / read filter 413 as it is.

従って、プリンタ制御コマンド保存フィルタ415の出力は必ずXPSとなる。そして、結果的に後続するフィルタの入力にXPSパートが指定されていても、問題なく印刷処理を行うことができるようになる。   Therefore, the output of the printer control command storage filter 415 is always XPS. As a result, even if the XPS part is specified as the input of the subsequent filter, the printing process can be performed without any problem.

また、ここでは、入力されたデータがプリンタ制御コマンドであるかどうかを先に判定した後に、XPSであるかどうかを判定しているが、この順は逆でも良い。   Here, after determining whether the input data is a printer control command or not, it is determined whether or not it is XPS. However, this order may be reversed.

また、入力されたデータがプリンタ制御コマンドでもXPSでも無い時は処理を中断しているが、プリンタ制御コマンドと同様にファイルに保存し、ファイルのパスをPTに格納してXPSとして出力してもよい。   If the input data is neither a printer control command nor an XPS, the processing is interrupted. However, as with the printer control command, the processing is interrupted. Good.

つまり、入力されたデータの形式がプリンタ制御コマンド保存フィルタにとって未知である場合は、プリンタ制御コマンドと同様に扱ってもよい。   That is, if the format of the input data is unknown to the printer control command storage filter, it may be handled in the same manner as the printer control command.

<プリンタ制御コマンド生成読込フィルタ>   <Printer control command generation read filter>

図11は、本実施形態を示すデータ処理装置における第4のデータ処理手順の一例を示すフローチャートである。なお、S1201〜S1206は各ステップを示す。また、各ステップは、プリンタ制御コマンド生成読込フィルタ413により実行される。   FIG. 11 is a flowchart illustrating an example of a fourth data processing procedure in the data processing apparatus according to the present embodiment. S1201 to S1206 indicate each step. Each step is executed by the printer control command generation read filter 413.

まず、S1201で、プリンタ制御コマンド生成読込フィルタ413は、入力されたXPS文書のFDSがPTを持つかどうか判断する。ここで、プリンタ制御コマンド生成読込フィルタ413がPTを持っていると判断した場合は、S1202に移り、PTを持っていないと判断した場合は、S1206に移る。   First, in step S1201, the printer control command generation reading filter 413 determines whether the FDS of the input XPS document has PT. If it is determined that the printer control command generation / read filter 413 has a PT, the process proceeds to S1202. If it is determined that the printer control command generation / read filter 413 does not have a PT, the process proceeds to S1206.

そして、S1202で、プリンタ制御コマンド生成読込フィルタ413は入力されたXPS文書からFDSのPTを取得する。続いて、S1203で、プリンタ制御コマンド生成読込フィルタ413は取得したPTにプリンタ制御コマンドが保存されたファイルのパスが格納されているかどうかを判断する。ここで、プリンタ制御コマンド生成読込フィルタ413が、ファイルのパスが格納されていると判断した場合は、S1204に移り、格納されていないと判断した場合は、S1206に移る。   In step S1202, the printer control command generation / reading filter 413 acquires the PT of the FDS from the input XPS document. In step S <b> 1203, the printer control command generation read filter 413 determines whether a path of a file in which the printer control command is stored is stored in the acquired PT. If the printer control command generation / read filter 413 determines that the file path is stored, the process advances to step S1204. If the printer control command generation read filter 413 determines that the file path is not stored, the process advances to step S1206.

そして、S1204で、プリンタ制御コマンド生成読込フィルタ413は、PTに格納されているパスを抽出し、パスで示されるファイルからプリンタ制御コマンドを読み込み、ランゲージモニタ417に出力する。続く、S1205で、プリンタ制御コマンド生成読込フィルタ413は、パスで示されるファイルをプリンタ制御コマンド保存ファイル431から削除して、本処理を終了する。   In step S1204, the printer control command generation / reading filter 413 extracts the path stored in the PT, reads the printer control command from the file indicated by the path, and outputs the printer control command to the language monitor 417. In step S1205, the printer control command generation / read filter 413 deletes the file indicated by the path from the printer control command storage file 431, and ends the process.

一方、S1206で、通常のXPS印刷処理を行う。すなわち、プリンタ制御コマンド生成読込フィルタ413は、XPS内のFPを順次レンダリングして画像を作成し、これをプリンタ制御コマンドに変換してランゲージモニタ417に出力して、本処理を終了する。   On the other hand, in S1206, normal XPS printing processing is performed. That is, the printer control command generation / reading filter 413 sequentially renders the FPs in the XPS to create an image, converts it into a printer control command, outputs it to the language monitor 417, and ends this processing.

以上のようにすることで、入力されたXPSにプリンタ制御コマンドが保存されたパスが格納されていると判断した場合は、プリンタ制御コマンドをプリンタ制御コマンド保存ファイル431から読み出してランゲージモニタ417に出力することが可能になる。   As described above, when it is determined that the path where the printer control command is stored is stored in the input XPS, the printer control command is read from the printer control command storage file 431 and output to the language monitor 417. It becomes possible to do.

また、プリンタ制御コマンド生成読込フィルタ413は、入力されたXPSにパスが格納されていない場合は、通常通りXPSの描画内容をプリンタ制御コマンドに変換して出力する。従って、プリンタ制御コマンド生成読込フィルタの出力は、必ずプリンタ制御コマンドとなる。これにより、結果的にプリンタ421に確実にプリンタ制御コマンドが送信され、問題なく印刷処理ができるようになる。   Further, when no path is stored in the input XPS, the printer control command generation read filter 413 converts the XPS drawing contents into a printer control command as usual and outputs the printer control command. Therefore, the output of the printer control command generation read filter is always a printer control command. As a result, the printer control command is reliably transmitted to the printer 421, and printing processing can be performed without any problem.

本実施形態では、プリンタ制御コマンドを保存したファイルのパスをXPS文書のFDSのPTに格納する場合について説明したが、格納先はXPSの内部であればよく、FDのPTやFPのPTを始め、XPSを構成し得るXPSパートやリソースでもよいことは言うまでもない。   In this embodiment, the case where the path of the file storing the printer control command is stored in the FDS PT of the XPS document has been described. However, the storage destination may be inside the XPS, and the FD PT and FP PT can be used. Needless to say, XPS parts and resources that can constitute the XPS may be used.

また、XPS文書からパスを抽出する場合も、同様にパスが格納されたXPS文書の構成要素から抽出すればよいことは言うまでもない。   Needless to say, when extracting a path from an XPS document, the path may be similarly extracted from the constituent elements of the XPS document in which the path is stored.

さらに、本実施形態ではプリンタ制御コマンドを保存するのにファイルを用いたが、任意の記憶領域で良いことは言うまでもない。   Furthermore, in the present embodiment, a file is used to store the printer control command, but it goes without saying that any storage area may be used.

また、本実施形態では、ではファイルのパスをPTに格納したが、プリンタ制御コマンドを保存した記憶領域を特定可能な識別子であればよいことは言うまでもない。   In the present embodiment, the file path is stored in the PT, but it goes without saying that the identifier may be any identifier that can specify the storage area in which the printer control command is stored.

さらに、本実施形態では、記憶領域の識別子としてファイルのパスを例示したが、パス以外でも保存した記憶領域を特定できるものであればよく、例えばURI(Uniform Resource Identifier)等でも構わない。   Furthermore, in the present embodiment, the file path is exemplified as the storage area identifier. However, any storage area other than the path may be used as long as the storage area can be specified. For example, a URI (Uniform Resource Identifier) may be used.

以上説明した二つの実施形態によれば、次のような効果が得られる。   According to the two embodiments described above, the following effects can be obtained.

XPSパートで受け取るフィルタを少なくとも一つ以上有するXPSプリンタドライバにおいて、プリンタ制御コマンドを文書データとして扱うアプリケーションによる印刷ジョブを処理することが可能になる。   An XPS printer driver having at least one filter received by the XPS part can process a print job by an application that handles printer control commands as document data.

さらに、第2の実施形態によれば、大量のプリンタ制御コマンドが印刷ジョブとしてスプールされた場合でも、処理効率を著しく落とすことなく印刷処理を行うことができる。   Furthermore, according to the second embodiment, even when a large amount of printer control commands are spooled as a print job, it is possible to perform print processing without significantly reducing processing efficiency.

〔第3実施形態〕   [Third Embodiment]

以下、図12に示すメモリマップを参照して本発明に係るデータ処理装置で読み取り可能なデータ処理プログラムの構成について説明する。   Hereinafter, the configuration of a data processing program readable by the data processing apparatus according to the present invention will be described with reference to the memory map shown in FIG.

図12は、本発明に係るデータ処理装置で読み取り可能な各種データ処理プログラムを格納する記憶媒体のメモリマップを説明する図である。   FIG. 12 is a diagram for explaining a memory map of a storage medium for storing various data processing programs readable by the data processing apparatus according to the present invention.

なお、特に図示しないが、記憶媒体に記憶されるプログラム群を管理する情報、例えばバージョン情報,作成者等も記憶され、かつ、プログラム読み出し側のOS等に依存する情報、例えばプログラムを識別表示するアイコン等も記憶される場合もある。   Although not particularly illustrated, information for managing a program group stored in the storage medium, for example, version information, creator, etc. is also stored, and information depending on the OS on the program reading side, for example, a program is identified and displayed. Icons may also be stored.

さらに、各種プログラムに従属するデータも上記ディレクトリに管理されている。また、各種プログラムをコンピュータにインストールするためのプログラムや、インストールするプログラムが圧縮されている場合に、解凍するプログラム等も記憶される場合もある。   Further, data depending on various programs is also managed in the directory. In addition, a program for installing various programs in the computer, and a program for decompressing when the program to be installed is compressed may be stored.

本実施形態における図6,図7、図10、図11に示す機能が外部からインストールされるプログラムによって、ホストコンピュータにより遂行されていてもよい。そして、その場合、CD−ROMやフラッシュメモリやFD等の記憶媒体により、あるいはネットワークを介して外部の記憶媒体から、プログラムを含む情報群を出力装置に供給される場合でも本発明は適用されるものである。   The functions shown in FIGS. 6, 7, 10, and 11 in this embodiment may be performed by a host computer by a program installed from the outside. In this case, the present invention is applied even when an information group including a program is supplied to the output device from a storage medium such as a CD-ROM, a flash memory, or an FD, or from an external storage medium via a network. Is.

以上のように、前述した実施形態の機能を実現するソフトウエアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給する。   As described above, the storage medium storing the software program code for realizing the functions of the above-described embodiments is supplied to the system or apparatus.

そして、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、本発明の目的が達成されることは言うまでもない。   It goes without saying that the object of the present invention can also be achieved by the computer (or CPU or MPU) of the system or apparatus reading and executing the program code stored in the storage medium.

この場合、記憶媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium storing the program code constitutes the present invention.

従って、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。   Therefore, as long as it has the function of the program, the form of the program such as an object code, a program executed by an interpreter, or script data supplied to the OS is not limited.

プログラムを供給するための記憶媒体としては、例えばフレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVDなどを用いることができる。   As a storage medium for supplying the program, for example, a flexible disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD, etc. Can be used.

この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.

その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続する。そして、該ホームページから本発明のコンピュータプログラムそのもの、もしくは、圧縮され自動インストール機能を含むファイルをハードディスク等の記録媒体にダウンロードすることによっても供給できる。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバやftpサーバ等も本発明の請求項に含まれるものである。   As another program supply method, a browser on a client computer is used to connect to an Internet home page. Then, 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. 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, an ftp server, and the like that allow a plurality of users to download a program file for realizing the functional processing of the present invention on a computer are also included in the claims of the present invention.

また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布し、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせる。そして、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。   In addition, the program of the present invention is encrypted, stored in a storage medium such as a CD-ROM, distributed to users, and key information for decryption is downloaded from a homepage via the Internet to users who have cleared predetermined conditions. Let It is also possible to execute the encrypted program by using the key information and install the program on a computer.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけではない。例えばそのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行う。そして、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   In addition, the functions of the above-described embodiments are not only realized by executing the program code read by the computer. For example, based on an instruction of the program code, an OS (operating system) running on the computer performs part or all of the actual processing. Needless to say, the process includes the case where the functions of the above-described embodiments are realized.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込ませる。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Further, the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. After that, based on the instruction of the program code, the CPU of the function expansion board or function expansion unit performs part or all of the actual processing, and the processing of the above-described embodiment is realized by the processing. Needless to say.

本発明は上記実施形態に限定されるものではなく、本発明の趣旨に基づき種々の変形(各実施形態の有機的な組合せを含む)が可能であり、それらを本発明の範囲から除外するものではない。   The present invention is not limited to the above embodiment, and various modifications (including organic combinations of the embodiments) are possible based on the spirit of the present invention, and these are excluded from the scope of the present invention. is not.

本発明の様々な例と実施形態を示して説明したが、当業者であれば、本発明の趣旨と範囲は、本明細書内の特定の説明に限定されるのではない。   Although various examples and embodiments of the present invention have been shown and described, those skilled in the art will not limit the spirit and scope of the present invention to the specific description in the present specification.

本発明の第1実施形態を示すデータ処理装置を適用する印刷システムの構成を説明するブロック図である。1 is a block diagram illustrating a configuration of a printing system to which a data processing apparatus according to a first embodiment of the present invention is applied. 本実施形態を示すデータ処理装置で扱うXPS文書の構成を説明する図である。It is a figure explaining the structure of the XPS document handled with the data processor which shows this embodiment. 本実施形態を示す第1のプリンタドライバの構成を説明する図である。FIG. 3 is a diagram illustrating a configuration of a first printer driver showing the embodiment. 図3に示したXPS文書の先頭部分のバイナリ・ダンプの一例を示す図である。FIG. 4 is a diagram illustrating an example of a binary dump at the beginning of the XPS document illustrated in FIG. 3. 図2に示したPTへプリンタ制御コマンドを格納する処理を説明する図である。FIG. 3 is a diagram illustrating processing for storing a printer control command in the PT illustrated in FIG. 2. 本実施形態を示すデータ処理装置における第1のデータ処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the 1st data processing procedure in the data processor which shows this embodiment. 本実施形態を示すデータ処理装置における第2のデータ処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the 2nd data processing procedure in the data processor which shows this embodiment. 本実施形態を示す第2のプリンタドライバの構成を説明する図である。FIG. 3 is a diagram illustrating a configuration of a second printer driver showing the embodiment. 本実施形態を示すデータ処理装置で生成されるPTの一例を示す図である。It is a figure which shows an example of PT produced | generated with the data processor which shows this embodiment. 本実施形態を示すデータ処理装置における第3のデータ処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the 3rd data processing procedure in the data processing apparatus which shows this embodiment. 本実施形態を示すデータ処理装置における第4のデータ処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the 4th data processing procedure in the data processor which shows this embodiment. 本発明に係るデータ処理装置で読み取り可能な各種データ処理プログラムを格納する記憶媒体のメモリマップを説明する図である。It is a figure explaining the memory map of the storage medium which stores the various data processing program which can be read with the data processor which concerns on this invention. 従来の印刷システムにおける第1の印刷処理例を説明する図である。It is a figure explaining the example of the 1st printing process in the conventional printing system. 従来の印刷システムにおける第2の印刷処理例を説明する図である。It is a figure explaining the 2nd example of a printing process in the conventional printing system.

符号の説明Explanation of symbols

311 プリンタドライバ
313 プリンタ制御コマンド生成抽出フィルタ
315 プリンタ制御コマンド格納フィルタ
317 ランゲージモニタ
311 Printer Driver 313 Printer Control Command Generation Extraction Filter 315 Printer Control Command Storage Filter 317 Language Monitor

Claims (14)

アプリケーションから入力される入力データをプリンタドライバを介して処理するデータ処理装置であって、
前記プリンタドライバは、
入力される入力データのバイト列を解析して文字列のデータに変換する変換手段と、
前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であるか、又は文字列のデータの形式であるかのいずれであるかを判断する判断手段と、
前記判断手段がプリンタ制御コマンド形式であると判断した場合、前記変換手段により変換された文字列のデータの構成要素を解析し前記プリンタが解析できる印刷コマンドをプリンタに出力し、前記判断手段が文字列のデータの形式であると判断した場合、前記入力データをプリンタにする出力する出力手段とを備えたことを特徴とするデータ処理装置。
A data processing apparatus that processes input data input from an application via a printer driver,
The printer driver is
A conversion means for analyzing a byte string of input data to be converted into character string data;
Determining means for determining whether the format of input data input from the application is a printer control command format or a character string data format;
If the determination means determines that the printer control command format is used, the character string data converted by the conversion means is analyzed and a print command that can be analyzed by the printer is output to the printer. A data processing apparatus comprising: output means for outputting the input data to a printer when it is determined that the data format is a column.
アプリケーションから入力される入力データをプリンタドライバを介して処理するデータ処理装置であって、
前記プリンタドライバは、
前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であるか、又は文字列のデータの形式であるかのいずれであるかを判断する判断手段と、
前記判断手段によりプリンタ制御コマンド形式であると判断された場合、入力される入力データのバイト列を解析して文字列のデータに変換する変換手段と、
前記変換手段により変換された文字列のデータを保存する保存手段と、
前記保存手段から読みされる前記文字列のデータの構成要素を解析し前記プリンタが解析できる印刷コマンドをプリンタに出力し、前記判断手段が文字列のデータの形式であると判断した場合、前記入力データをプリンタにする出力する出力手段とを備えたことを特徴とするデータ処理装置。
A data processing apparatus that processes input data input from an application via a printer driver,
The printer driver is
Determining means for determining whether the format of input data input from the application is a printer control command format or a character string data format;
Conversion means for analyzing a byte string of input data to be inputted and converting it into character string data when the determination means determines that the printer control command format is used;
Storage means for storing character string data converted by the conversion means;
When the component of the character string data read from the storage means is analyzed and a print command that can be analyzed by the printer is output to the printer, and when the determination means determines that the data format is character string data, the input A data processing apparatus comprising output means for outputting data to a printer.
前記プリンタドライバは、特定のオペレーティングシステムに従い入力される入力データが特定形式の場合、前記入力データを文字列のデータと判断することを特徴とする請求項1又は2記載のデータ処理装置。   3. The data processing apparatus according to claim 1, wherein the printer driver determines that the input data is character string data when the input data input according to a specific operating system is in a specific format. 前記アプリケーションは、前記入力データがプリンタ制御コマンド形式である場合に、前記入力データに形式としてRAWを指定することを特徴とする請求項1乃至3のいずれか1項に記載のデータ処理装置。   4. The data processing apparatus according to claim 1, wherein the application specifies RAW as a format for the input data when the input data is in a printer control command format. アプリケーションから入力される入力データをプリンタドライバを介して処理するデータ処理装置であって、
前記プリンタドライバは、
前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であるか、又は文字列のデータの形式であるかのいずれであるかを判断する判断手段と、
前記判断手段が前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であると判断した場合、入力される入力データのバイト列を解析して文字列のデータに変換する第1のフィルタと、
前記第1のフィルタにより変換された文字列のデータの構成要素を解析し前記プリンタが解析できる印刷コマンドをプリンタに出力する第2のフィルタと、を備えたことを特徴とするデータ処理装置。
A data processing apparatus that processes input data input from an application via a printer driver,
The printer driver is
Determining means for determining whether the format of input data input from the application is a printer control command format or a character string data format;
A first filter that analyzes a byte string of input data to be converted into character string data when the determination unit determines that the format of input data input from the application is a printer control command format; ,
A data processing apparatus comprising: a second filter that analyzes a component of character string data converted by the first filter and outputs a print command that can be analyzed by the printer to the printer.
アプリケーションから入力される入力データをプリンタドライバを介して処理するデータ処理装置であって、
前記プリンタドライバは、
前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であるか、又は文字列のデータの形式であるかのいずれであるかを判断する判断手段と、
前記判断手段が前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であると判断した場合、入力される入力データのバイト列を解析して文字列のデータに変換して保存手段に保存する第1のフィルタと、
前記第1のフィルタにより保存された文字列のデータの構成要素を読み込んで解析して、前記プリンタが解析できる印刷コマンドをプリンタに出力する第2のフィルタと、を備えたことを特徴とするデータ処理装置。
A data processing apparatus that processes input data input from an application via a printer driver,
The printer driver is
Determining means for determining whether the format of input data input from the application is a printer control command format or a character string data format;
When the determination means determines that the format of the input data input from the application is a printer control command format, the input input data byte string is analyzed, converted into character string data, and stored in the storage means A first filter that
Data comprising: a second filter that reads and analyzes a component of character string data stored by the first filter and outputs a print command that can be analyzed by the printer to the printer Processing equipment.
アプリケーションから入力される入力データをプリンタドライバを介して処理するデータ処理装置における印刷処理方法であって、
入力される入力データのバイト列を解析して文字列のデータに変換する変換ステップと、
前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であるか、又は文字列のデータの形式であるかのいずれであるかを判断する判断ステップと、
前記判断ステップがプリンタ制御コマンド形式であると判断した場合、前記変換ステップにより変換された文字列のデータの構成要素を解析し前記プリンタが解析できる印刷コマンドをプリンタに出力し、前記判断ステップが文字列のデータの形式であると判断した場合、前記入力データをプリンタにする出力する出力ステップとを備えたことを特徴とする印刷処理方法。
A print processing method in a data processing apparatus for processing input data input from an application via a printer driver,
A conversion step that parses the input input byte sequence and converts it into character string data;
A determination step of determining whether a format of input data input from the application is a printer control command format or a character string data format;
If it is determined that the determination step is a printer control command format, the character string data converted by the conversion step is analyzed and a print command that can be analyzed by the printer is output to the printer. An output step of outputting the input data to a printer when it is determined that the format is a column data format.
アプリケーションから入力される入力データをプリンタドライバを介して処理するデータ処理装置における印刷処理方法であって、
前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であるか、又は文字列のデータの形式であるかのいずれであるかを判断する判断ステップと、
入力される入力データのバイト列を解析して文字列のデータに変換する変換ステップと、
前記変換ステップにより変換された文字列のデータを保存手段に保存する保存ステップと、
前記判断ステップがプリンタ制御コマンド形式であると判断した場合、前記保存手段から読みされる前記文字列のデータの構成要素を解析し前記プリンタが解析できる印刷コマンドをプリンタに出力し、前記判断ステップが文字列のデータの形式であると判断した場合、前記入力データをプリンタにする出力する出力手段とを備えたことを特徴とする印刷処理方法。
A print processing method in a data processing apparatus for processing input data input from an application via a printer driver,
A determination step of determining whether a format of input data input from the application is a printer control command format or a character string data format;
A conversion step that parses the input input byte sequence and converts it into character string data;
A storage step of storing the character string data converted by the conversion step in a storage unit;
If it is determined that the determination step is a printer control command format, a component of the character string data read from the storage unit is analyzed, and a print command that can be analyzed by the printer is output to the printer. A print processing method, comprising: output means for outputting the input data as a printer when it is determined that the data is in a character string data format.
前記プリンタドライバは、特定のオペレーティングシステムに従い入力される入力データが特定形式の場合、前記入力データを文字列のデータと判断することを特徴とする請求項7又は8記載の印刷処理方法。   9. The print processing method according to claim 7, wherein when the input data input according to a specific operating system is in a specific format, the printer driver determines the input data as character string data. 前記アプリケーションは、前記入力データがプリンタ制御コマンド形式である場合に、前記入力データに形式としてRAWを指定することを特徴とする請求項7乃至9のいずれか1項に記載の印刷処理方法。   The print processing method according to claim 7, wherein, when the input data is in a printer control command format, the application specifies RAW as the format for the input data. アプリケーションから入力される入力データをプリンタドライバを介して処理するデータ処理装置における印刷処理方法であって、
前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であるか、又は文字列のデータの形式であるかのいずれであるかを判断する判断ステップと、
前記判断ステップにより前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であると判断した場合、入力される入力データのバイト列を解析して文字列のデータに変換する第1のフィルタ処理ステップと、
前記第1のフィルタ処理ステップにより変換された文字列のデータの構成要素を解析し前記プリンタが解析できる印刷コマンドをプリンタに出力する第2のフィルタ処理ステップと、を備えたことを特徴とする印刷処理方法。
A print processing method in a data processing apparatus for processing input data input from an application via a printer driver,
A determination step of determining whether a format of input data input from the application is a printer control command format or a character string data format;
A first filtering process for analyzing a byte string of input data to be converted into character string data when it is determined in the determining step that the format of input data input from the application is a printer control command format; Steps,
A second filter processing step for analyzing the constituent elements of the character string data converted by the first filter processing step and outputting a print command that can be analyzed by the printer to the printer; Processing method.
アプリケーションから入力される入力データをプリンタドライバを介して処理するデータ処理装置における印刷処理方法であって、
前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であるか、又は文字列のデータの形式であるかのいずれであるかを判断する判断ステップと、
前記アプリケーションから入力される入力データの形式がプリンタ制御コマンド形式であると判断した場合、入力される入力データのバイト列を解析して文字列のデータに変換して保存手段に保存する第1のフィルタ処理ステップと、
前記第1のフィルタにより保存された文字列のデータの構成要素を読み込んで解析して、前記プリンタが解析できる印刷コマンドをプリンタに出力する第2のフィルタ処理ステップと、を備えたことを特徴とする印刷処理方法。
A print processing method in a data processing apparatus for processing input data input from an application via a printer driver,
A determination step of determining whether a format of input data input from the application is a printer control command format or a character string data format;
When it is determined that the format of the input data input from the application is the printer control command format, the first input data is analyzed and converted into character string data and stored in the storage means. A filtering step;
A second filter processing step of reading and analyzing a component of character string data stored by the first filter and outputting a print command that can be analyzed by the printer to the printer. Print processing method.
請求項7乃至12のいずれか1項に記載の印刷処理方法をコンピュータに実行させるためのプログラムを格納したことを特徴とするコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing a program for causing a computer to execute the print processing method according to any one of claims 7 to 12. 請求項7乃至12のいずれか1項に記載の印刷処理方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the print processing method according to any one of claims 7 to 12.
JP2007311546A 2007-11-30 2007-11-30 Data processor, print processing method, storage medium, and program Withdrawn JP2009134645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007311546A JP2009134645A (en) 2007-11-30 2007-11-30 Data processor, print processing method, storage medium, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007311546A JP2009134645A (en) 2007-11-30 2007-11-30 Data processor, print processing method, storage medium, and program

Publications (1)

Publication Number Publication Date
JP2009134645A true JP2009134645A (en) 2009-06-18

Family

ID=40866445

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007311546A Withdrawn JP2009134645A (en) 2007-11-30 2007-11-30 Data processor, print processing method, storage medium, and program

Country Status (1)

Country Link
JP (1) JP2009134645A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013045422A (en) * 2011-08-26 2013-03-04 Canon Inc Print data processing method, pring data processor and program
CN110275683A (en) * 2018-03-15 2019-09-24 佳能株式会社 Control method and information processing unit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013045422A (en) * 2011-08-26 2013-03-04 Canon Inc Print data processing method, pring data processor and program
CN110275683A (en) * 2018-03-15 2019-09-24 佳能株式会社 Control method and information processing unit
US11429331B2 (en) 2018-03-15 2022-08-30 Canon Kabushiki Kaisha Control method and information processing apparatus extending the function of a printer driver

Similar Documents

Publication Publication Date Title
JP4898405B2 (en) Document data processing method, document data creation device, and document data processing device
US8537408B2 (en) Information processing apparatus, information processing method, program, and storage medium
JP5072676B2 (en) Information processing apparatus, information processing method, and printing system
JP4857135B2 (en) Information processing apparatus, information processing method, program, and storage medium
JP2005332088A (en) Document preparing device and file conversion system
US8274670B2 (en) Information processing apparatus print control method, and storage medium
JP5261250B2 (en) Print data processing apparatus, method, and computer-readable medium for processing page description language
JP5070101B2 (en) Information processing apparatus, control method therefor, and printer driver program
JP5121563B2 (en) Information processing apparatus, information processing method, and program
US7203898B2 (en) Document processing method and apparatus
JP4810332B2 (en) Information processing apparatus, print setting method, storage medium, program
KR100772376B1 (en) Apparatus and method for direct printing of meta data
JP2005084898A (en) Print data processing system and program for this system
JP6566850B2 (en) Information processing system, information processing system control method, information processing apparatus, and program
JP2009134645A (en) Data processor, print processing method, storage medium, and program
US8619284B2 (en) Method and apparatus for including converted drawing commands in a print data file
JP2008310816A (en) System and method for compact representation of multiple markup page data
JP2009020553A (en) Device and program for managing electronic file
JP2023020591A (en) Information processing device, control method thereof, and program
JP2006235756A (en) Image processor and its method
JP2008152728A (en) Information processor, preview method, program, and storage medium
JP7271208B2 (en) Program and information processing device
JP2010125810A (en) Information processor, method for processing data, program, and recording medium
JP5479558B2 (en) Information processing apparatus, information processing method, and program
JP5335392B2 (en) Information processing apparatus, information processing method, and computer program

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110201