JP6437076B2 - Information processing apparatus, control method therefor, and program - Google Patents

Information processing apparatus, control method therefor, and program Download PDF

Info

Publication number
JP6437076B2
JP6437076B2 JP2017207215A JP2017207215A JP6437076B2 JP 6437076 B2 JP6437076 B2 JP 6437076B2 JP 2017207215 A JP2017207215 A JP 2017207215A JP 2017207215 A JP2017207215 A JP 2017207215A JP 6437076 B2 JP6437076 B2 JP 6437076B2
Authority
JP
Japan
Prior art keywords
xps
data
drawing data
format
gdi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017207215A
Other languages
Japanese (ja)
Other versions
JP2018022527A (en
Inventor
南陽 母里
南陽 母里
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2017207215A priority Critical patent/JP6437076B2/en
Publication of JP2018022527A publication Critical patent/JP2018022527A/en
Application granted granted Critical
Publication of JP6437076B2 publication Critical patent/JP6437076B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、プリンタドライバの描画制御技術に関するものである。   The present invention relates to a printer driver drawing control technique.

マイクロソフト社のプリンティングシステムでは、従来よりGDI(Graphic Device Interface)と呼ばれるグラフィックスエンジンが使用されてきた。GDIを用いた従来の印刷処理フローは、以下のとおりである。
1)ユーザからの印刷指示に応じて、GDIアプリケーション(以下「GDIアプリ」と呼ぶ。)がGDIのサービス関数群を呼び出して描画命令を発行する。
2)発行されたGDI描画命令は、描画データとしてスプールされ、GDI用のプリンタドライバ(以下「GDIドライバ」と呼ぶ)に渡される。
3)GDIドライバでは、GDI描画命令で構成される描画データ(以下、「GDI形式の描画データ」と呼ぶ。)を印刷装置が解釈可能な印刷データ(いわゆるPDLデータ)に変換し、印刷装置に出力する。
In the Microsoft printing system, a graphics engine called GDI (Graphic Device Interface) has been used. A conventional print processing flow using GDI is as follows.
1) In response to a print instruction from a user, a GDI application (hereinafter referred to as “GDI application”) calls a GDI service function group to issue a drawing command.
2) The issued GDI drawing command is spooled as drawing data and passed to a printer driver for GDI (hereinafter referred to as “GDI driver”).
3) The GDI driver converts drawing data composed of GDI drawing commands (hereinafter referred to as “GDI format drawing data”) into print data (so-called PDL data) that can be interpreted by the printing apparatus. Output.

このような、GDIアプリからGDIドライバを介して印刷を行う処理フローを「GDIプリントパス」と呼ぶこととする。近年、このGDIプリントパスに、XPSプリントパスと呼ばれる新しい印刷処理フローが追加された。XPSは、XMLベースの電子文書フォーマットで、XML Paper Specificationの略である。XPSプリントパスでは、XPSを扱うアプリケーション(以下「XPSアプリ」と呼ぶ。)でXPS形式の描画データを生成し、XPS用のプリンタドライバ(以下、「XPSドライバ」と呼ぶ。)にて印刷データに変換され、印刷装置に出力される。   Such a processing flow for printing from the GDI application via the GDI driver is referred to as a “GDI print pass”. In recent years, a new print processing flow called an XPS print path has been added to the GDI print path. XPS is an XML-based electronic document format and is an abbreviation for XML Paper Specification. In the XPS print path, drawing data in the XPS format is generated by an application that handles XPS (hereinafter referred to as “XPS application”), and the print data is generated by an XPS printer driver (hereinafter referred to as “XPS driver”). It is converted and output to the printing device.

GDIプリントパスとXPSプリントパスとは排他的な関係にあるわけではなく、例えばGDIアプリがGDIを使って生成したGDI形式の描画データをXPS形式の描画データに変換してXPSドライバで印刷データにすることが可能である。また、逆にXPSアプリによるXPS形式の描画データをGDI形式の描画データに変換してGDIドライバで印刷データにすることも可能である。すなわち、GDIアプリからXPSドライバを介して印刷を行う印刷処理フローや、XPSアプリからGDIドライバを介して印刷を行う印刷処理フローも存在する。例えば、GDIアプリからXPSドライバを用いて印刷を行う場合、GDI形式の描画データが変換モジュールによってXPS形式の描画データに変換される。この変換モジュールはMXDW(Microsoft XPS Document Writer)と呼ばれる。XPS形式に変換された描画データは、XPSスプールファイルに格納された後、XPSドライバにて印刷データへ変換される。   The GDI print path and the XPS print path are not in an exclusive relationship. For example, the GDI format drawing data generated by the GDI application using GDI is converted into the XPS format drawing data, and the XPS driver converts the drawing data to the print data. Is possible. Conversely, it is also possible to convert the drawing data in the XPS format by the XPS application into drawing data in the GDI format and use the GDI driver as print data. That is, there is a print processing flow for printing from the GDI application via the XPS driver and a print processing flow for printing from the XPS application via the GDI driver. For example, when printing is performed from an GDI application using an XPS driver, GDI format drawing data is converted into XPS format drawing data by the conversion module. This conversion module is called MXDW (Microsoft XPS Document Writer). The drawing data converted into the XPS format is stored in the XPS spool file, and then converted into print data by the XPS driver.

このようにWindows(登録商標)VISTA以降のOSにおいては4つの印刷処理フローが利用可能になっている。これにより、GDIドライバあるいはXPSドライバのどちらか一方を用意すれば、GDIアプリおよびXPSアプリの両方で生成された描画データの印刷処理に対応することが出来る。   As described above, four print processing flows can be used in the OS after Windows (registered trademark) Vista. Accordingly, if either the GDI driver or the XPS driver is prepared, it is possible to cope with the printing process of the drawing data generated by both the GDI application and the XPS application.

しかしながら、XPS形式とGDI形式とでは仕様が異なることから、描画データの形式変換には様々な問題が存在する。その一例として、印刷可能領域からはみ出した部分に印刷画像を割り当てた印刷要求が、GDIアプリからXPSドライバに対して発行されてしまうという問題が挙げられる。この問題に対しては、XPSドライバに入力されるXPS形式の描画データが、GDIアプリ由来のものか、XPSアプリ由来のものかを判断して印刷可能領域内に印刷されるように制御する技術が提案されている(特許文献1)。   However, since the specifications differ between the XPS format and the GDI format, there are various problems in the format conversion of drawing data. As an example, there is a problem that a print request in which a print image is allocated to a portion that protrudes from the printable area is issued from the GDI application to the XPS driver. To solve this problem, a technique for controlling whether drawing data in the XPS format input to the XPS driver is derived from the GDI application or from the XPS application and is printed in the printable area. Has been proposed (Patent Document 1).

特開2008−276745号公報JP 2008-276745 A

そして、描画データの形式変換における問題として、上述の問題の他に、グラフィック属性のオブジェクトの描画に関する問題の存在が明らかとなった。例えば、グラフィック属性のオブジェクトの描画命令でオブジェクト幅=0を指定した場合、プリンタドライバによってオブジェクト(例えば、線)が描画されたりされなかったりするという問題である。この問題は、GDI形式におけるオブジェクト幅=0はデバイスで表示できる最小の幅を意味するのに対し、XPS形式におけるオブジェクト幅=0は当該オブジェクトをまったく描画しないことを意味することに起因している。つまり、GDIアプリがGDIを介して生成した描画データにオブジェクト幅=0の線の描画を指定する描画命令が含まれる場合に、GDIドライバで印刷を行えば線が描画されるのに対し、XPSドライバでの印刷では線が描画されないことになる。すなわち、同じGDIアプリからなされた同じ描画命令であるにも関わらず、所定のグラフィック描画命令に対して、利用するプリンタドライバの種類によって印刷結果に違いが出るのでは、印刷品質に大きな影響を及ぼすことになる。   As a problem in drawing data format conversion, in addition to the problems described above, it has become clear that there is a problem related to drawing of objects having graphic attributes. For example, when an object width = 0 is specified by a drawing command for an object with a graphic attribute, there is a problem that an object (for example, a line) is not drawn by a printer driver. This problem is caused by the fact that object width = 0 in the GDI format means the smallest width that can be displayed on the device, whereas object width = 0 in the XPS format means that the object is not drawn at all. . In other words, if the drawing data that the GDI application generates via GDI includes a drawing command that specifies drawing of a line with object width = 0, the line is drawn if printing is performed with the GDI driver, whereas XPS Lines are not drawn when printing with the driver. That is, even if the same drawing command is issued from the same GDI application, if the print result differs depending on the type of printer driver to be used for a predetermined graphic drawing command, the print quality is greatly affected. It will be.

本発明に係る情報処理装置は、入力されたXPS形式の描画データから、印刷装置に対応した印刷データを生成するプリンタドライバを備えた情報処理装置であって、前記プリンタドライバは、前記入力されたXPS形式の描画データが、GDIアプリケーションの印刷処理に基づき生成されたGDI形式の描画データから変換モジュールで変換されたXPS形式の描画データであるかどうかを判定し、当該入力されたXPS形式の描画データが、所定のグラフィック描画命令を含むかどうかを判定し、当該判定の結果、前記入力されたXPS形式の描画データが、前記GDIアプリケーションの印刷処理に基づき生成されたGDI形式の描画データから前記変換モジュールで変換されたXPS形式の描画データであり、且つ、前記所定のグラフィック描画命令を含む、と判定した場合、当該所定のグラフィック描画命令を前記印刷装置で表現可能な描画を指定するグラフィック描画命令に変更し、当該変更後のグラフィック描画命令を含む描画データに基づいて前記印刷データを生成する、ことを特徴とする。   An information processing apparatus according to the present invention is an information processing apparatus including a printer driver that generates print data corresponding to a printing apparatus from input drawing data in an XPS format, and the printer driver It is determined whether the drawing data in the XPS format is the drawing data in the XPS format converted by the conversion module from the drawing data in the GDI format generated based on the printing process of the GDI application, and the input drawing in the XPS format is performed. It is determined whether the data includes a predetermined graphic rendering command, and as a result of the determination, the input XPS format rendering data is obtained from the GDI format rendering data generated based on the printing process of the GDI application. Drawing data in XPS format converted by the conversion module, and the predetermined group If it is determined that the graphic drawing command is included, the predetermined graphic drawing command is changed to a graphic drawing command that designates drawing that can be expressed by the printing apparatus, and based on the drawing data including the changed graphic drawing command. The print data is generated.

本発明によれば、入力されたXPS形式の描画データから印刷装置に対応する印刷データを生成するプリンタドライバ(XPSドライバ)において、当該入力されたXPS形式の描画データが、GDIアプリケーションの印刷処理で生成されたGDI形式の描画データから所定の変換モジュールによってXPS形式の描画データに変換されたものであり、且つ、所定のグラフィック描画命令を含んでいる場合、当該所定のグラフィック描画命令を印刷装置で表現可能な特定の描画を指定するグラフィック描画命令に変更し、当該変更後のグラフィック描画命令を含む描画データに基づいて印刷データを生成することにより、GDIアプリケーションからの同じ描画命令でありながら、使用するプリンタドライバの種類がXPSドライバであるかGDIドライバであるかによって印刷結果に差が生じてしまうのを防ぐことができる。   According to the present invention, in a printer driver (XPS driver) that generates print data corresponding to a printing apparatus from input drawing data in XPS format, the input drawing data in XPS format is subjected to printing processing of a GDI application. When the generated GDI format drawing data is converted into XPS format drawing data by a predetermined conversion module and includes a predetermined graphic drawing command, the predetermined graphic drawing command is received by the printing apparatus. Change to a graphic drawing command that designates a specific drawing that can be expressed, and generate print data based on the drawing data including the changed graphic drawing command, so that the same drawing command from the GDI application is used. Printer driver type is XPS driver Depending whether the GDI driver can be prevented from difference in print results occurs.

印刷データを生成する情報処理装置の構成の一例を示す機能ブロック図である。It is a functional block diagram which shows an example of a structure of the information processing apparatus which produces | generates print data. 情報処理装置のハードウェア構成の一例を示すブロック図である。It is a block diagram which shows an example of the hardware constitutions of information processing apparatus. UIドライバの内部構成の一例を示す図である。It is a figure which shows an example of an internal structure of UI driver. グラフィックスドライバの内部構成の一例を示す図である。It is a figure which shows an example of an internal structure of a graphics driver. 印刷データ生成処理の流れを示すフローチャートである。6 is a flowchart illustrating a flow of print data generation processing. XPSデータのデータ構造を示す図である。It is a figure which shows the data structure of XPS data. 実施例1に係るアプリ判定処理の詳細を示すフローチャートである。6 is a flowchart illustrating details of an application determination process according to the first embodiment. (a)は探索文字列設定情報の一例を示す図であり、(b)は探索の対象ファイルとしてのプリントチケットの一例を示す図である。(A) is a figure which shows an example of search character string setting information, (b) is a figure which shows an example of the print ticket as a search object file. 描画命令変更処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a drawing command change process. XPSドライバのUI画面の一例を示す図である。3 is a diagram illustrating an example of a UI screen of an XPS driver. FIG. 実施例2に係るアプリ判定処理の詳細を示すフローチャートである。12 is a flowchart illustrating details of an application determination process according to the second embodiment. 実施例2に係るプリントチケットの一例である。6 is an example of a print ticket according to a second embodiment.

以下、図面を参照して本発明の実施の形態を詳しく説明する。なお、以下の実施の形態は特許請求の範囲に係る発明を限定するものでなく、また実施の形態で説明されている特徴の組み合わせの全てが発明の解決手段に必須のものとは限らない。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The following embodiments do not limit the invention according to the claims, and all combinations of features described in the embodiments are not necessarily essential to the solution means of the invention.

[実施例1]
図1は、本実施例に係る、印刷データを生成する情報処理装置の構成の一例を示す機能ブロック図である。情報処理装置100には、不図示のオペレーティングシステム(以下、OS)がインストールされている。本実施例では、OSとしてWindows(登録商標)を前提としている。そして、情報処理装置100には描画データを生成するソフトウェアとして、GDIアプリケーション110とXPSアプリケーション120の2種類の描画用ソフトウェアがOS上で動作する。GDIアプリ110は、ユーザからの印刷指示を受けてGDI関数を呼び出して、オブジェクトの属性(文字、グラフィック、イメージなど)に応じたGDI形式の描画データを、GDI111を用いて生成する。GDI111は、一般にグラフィックスエンジンと呼ばれる。GDI形式の描画データは、そのままではXPSドライバ130で入力が受け付けられないので、MXDW112に送られる。MXDW112は、GDI−XPS変換手段であって、GDI形式の描画データをXPS形式の描画データに変換するモジュールでありOSによって提供される。MXDW112によってXPS形式に変換された描画データが、XPSドライバ130に入力される。XPSアプリ120は、XPS形式の描画データを直接生成する。なお、XPS形式の描画データは、WPF(Windows Presentation Foundation)と呼ばれるグラフィックエンジンを介して生成される場合もあるが、本発明の特徴とは無関係であるので説明を省く。XPSアプリ120で生成されたXPS形式の描画データは、そのままXPSドライバ130に入力される。
[Example 1]
FIG. 1 is a functional block diagram illustrating an example of a configuration of an information processing apparatus that generates print data according to the present embodiment. An operating system (hereinafter referred to as OS) (not shown) is installed in the information processing apparatus 100. In this embodiment, Windows (registered trademark) is assumed as the OS. In the information processing apparatus 100, two types of drawing software, a GDI application 110 and an XPS application 120, operate on the OS as software for generating drawing data. The GDI application 110 receives a print instruction from the user, calls a GDI function, and uses the GDI 111 to generate drawing data in GDI format according to the object attributes (characters, graphics, images, etc.). The GDI 111 is generally called a graphics engine. The drawing data in the GDI format is sent to the MXDW 112 because the XPS driver 130 cannot accept the input as it is. The MXDW 112 is a GDI-XPS conversion means, and is a module that converts drawing data in the GDI format into drawing data in the XPS format, and is provided by the OS. The drawing data converted into the XPS format by the MXDW 112 is input to the XPS driver 130. The XPS application 120 directly generates drawing data in the XPS format. The drawing data in the XPS format may be generated via a graphic engine called WPF (Windows Presentation Foundation), but this is not relevant to the features of the present invention, and will not be described. The drawing data in the XPS format generated by the XPS application 120 is input to the XPS driver 130 as it is.

XPSドライバ130は、入力描画データとしてXPS形式の描画データのみを受け付けるプリンタドライバである。XPSドライバ130は、印刷部数や用紙サイズといった印刷設定を管理し、入力された描画データから印刷装置が解釈可能な印刷データ(PDLデータ)を生成する。XPSドライバ130で生成された印刷データは、スプーラ140を経て印刷装置に送信される。XPSドライバ130は、UIドライバ131、グラフィックスドライバ132、設定データ保持部133から構成される。UIドライバ131は、XPSドライバ130のユーザインタフェース画面(以下、UI画面)の表示や、ユーザから入力された印刷設定に関する情報の保存を行う。グラフィックスドライバ132は、UIドライバ131でユーザが設定した印刷設定情報に基づいて、XPS形式の描画データから印刷データを生成する。UIドライバ131及びグラフィックスドライバ132の詳細については後述する。設定データ保持部133は、XPSドライバ130が印刷データ生成時に参照する、印刷に関連する各種設定データを保持する。この設定データはXML形式で記述され、UIドライバ131及びグラフィックスドライバ132の動作設定に関する情報が含まれる。本実施例では、アプリケーションの種類を判定するための探索文字列に関する情報が設定データの一部として保持されており、印刷データ生成時に参照される。   The XPS driver 130 is a printer driver that accepts only XPS format drawing data as input drawing data. The XPS driver 130 manages print settings such as the number of copies to be printed and the paper size, and generates print data (PDL data) that can be interpreted by the printing apparatus from the input drawing data. The print data generated by the XPS driver 130 is transmitted to the printing apparatus via the spooler 140. The XPS driver 130 includes a UI driver 131, a graphics driver 132, and a setting data holding unit 133. The UI driver 131 displays a user interface screen (hereinafter referred to as a UI screen) of the XPS driver 130 and stores information related to print settings input by the user. The graphics driver 132 generates print data from the drawing data in the XPS format based on the print setting information set by the user with the UI driver 131. Details of the UI driver 131 and the graphics driver 132 will be described later. The setting data holding unit 133 holds various setting data related to printing, which the XPS driver 130 refers to when generating print data. This setting data is described in the XML format and includes information related to operation settings of the UI driver 131 and the graphics driver 132. In this embodiment, information related to a search character string for determining the type of application is held as part of setting data, and is referred to when print data is generated.

図2は、情報処理装置100のハードウェア構成の一例を示すブロック図である。なお図2に示す構成は一例であって、情報処理装置100は単体の機器であっても、LANやWAN等のネットワークを介して接続がされた複数の機器からなるシステムであってもよい。情報処理装置100は、ROM206やハードディスク203に記憶された処理プログラムをCPU201が実行することで様々な処理を実現し、システムバス210に接続された各部を総括的に制御する。また、CPU201は、マウスカーソル等で指示されたコマンドに基づいて、予め登録されたウインドウを開くといった種々の処理を実行する。例えばユーザが印刷の実行を指示する際は、印刷設定のウインドウを開き、XPSドライバ130に対する各種設定を行う。RAM202は、CPU201の主メモリ、ワークエリア等として機能する。ハードディスク203には、OS、ブートプログラム、各種のアプリケーション、フォントデータ、ユーザファイル、編集ファイル等が記憶される。XPSドライバ130もハードディスク203に保存される。ディスプレイコントローラ204は、不図示のディスプレイの表示を制御する。プリンタコントローラ205は、所定の双方向性インタフェース(不図示)を介して印刷装置に接続され、印刷装置との通信制御を担う。なお、CPU201は、例えばRAM202上に設定された表示情報RAMへのアウトラインフォントの展開(ラスタライズ)処理を実行し、ディスプレイ上でのWYSIWYG(ウィジウィグ)を可能としている。外部記憶ドライブ207は、CDやDVDといった記憶媒体とのアクセスを制御する。キーボードコントローラ209は、キーボードやポインティングデバイスからのキー入力を制御する。   FIG. 2 is a block diagram illustrating an example of a hardware configuration of the information processing apparatus 100. The configuration illustrated in FIG. 2 is an example, and the information processing apparatus 100 may be a single device or a system including a plurality of devices connected via a network such as a LAN or a WAN. The information processing apparatus 100 implements various processes when the CPU 201 executes a processing program stored in the ROM 206 or the hard disk 203, and comprehensively controls each unit connected to the system bus 210. Further, the CPU 201 executes various processes such as opening a pre-registered window based on a command instructed with a mouse cursor or the like. For example, when the user gives an instruction to execute printing, a print setting window is opened and various settings for the XPS driver 130 are performed. The RAM 202 functions as a main memory, work area, and the like for the CPU 201. The hard disk 203 stores an OS, a boot program, various applications, font data, user files, edit files, and the like. The XPS driver 130 is also stored in the hard disk 203. The display controller 204 controls display on a display (not shown). The printer controller 205 is connected to the printing apparatus via a predetermined bidirectional interface (not shown) and is responsible for communication control with the printing apparatus. Note that the CPU 201 executes, for example, outline font development (rasterization) processing on the display information RAM set on the RAM 202 to enable WYSIWYG on the display. The external storage drive 207 controls access to a storage medium such as a CD or a DVD. A keyboard controller 209 controls key input from a keyboard or pointing device.

続いて、UIドライバ131の詳細について説明する。図3は、UIドライバ131の内部構成の一例を示す図である。UIドライバ131は、UI表示部301、UI設定部302、ドライバ初期化部303、ドライバハンドル返却部304から構成される。   Next, details of the UI driver 131 will be described. FIG. 3 is a diagram illustrating an example of an internal configuration of the UI driver 131. The UI driver 131 includes a UI display unit 301, a UI setting unit 302, a driver initialization unit 303, and a driver handle return unit 304.

UI表示部301は、ユーザが印刷設定を行うためのUI画面をディスプレイ上に表示する。UI設定部302は、UI表示部301を介してユーザが設定または変更した印刷設定を保存する。ドライバ初期化部303は、UIドライバ131の初期化を行う。アプリケーションやGDI111からドライバ初期化指示を受けると、初期化処理で生成したドライバハンドルをアプリケーションまたはGDI111に渡す。ドライバハンドルとは、ドライバを固有に識別するための識別名である。初期化処理で生成したドライバハンドルはドライバハンドル返却部304にて初期化指示を出したアプリケーションに返却する。ドライバハンドルを受け取ったアプリケーションは、ユーザに対して印刷設定入力の許可や、XPSドライバ130に対して描画データの出力を行う。なお、ユーザが印刷設定を行うために、ドライバの初期化指示と共にUI画面の表示指示がUIドライバ131に渡される場合がある。その場合には、UI表示部301にてUIダイアログを表示する。   The UI display unit 301 displays a UI screen for the user to make print settings on the display. The UI setting unit 302 stores print settings set or changed by the user via the UI display unit 301. The driver initialization unit 303 initializes the UI driver 131. When a driver initialization instruction is received from the application or GDI 111, the driver handle generated by the initialization process is passed to the application or GDI 111. The driver handle is an identification name for uniquely identifying the driver. The driver handle generated by the initialization process is returned to the application that issued the initialization instruction by the driver handle return unit 304. The application that has received the driver handle permits the user to input print settings and outputs drawing data to the XPS driver 130. Note that a UI screen display instruction may be passed to the UI driver 131 together with a driver initialization instruction in order for the user to perform print settings. In that case, a UI dialog is displayed on the UI display unit 301.

続いて、グラフィックスドライバ132の詳細について説明する。図4は、グラフィックスドライバ132の内部構成の一例を示す図である。前述したように、グラフィックスドライバ132はXPS形式の描画データ(以下、「XPSデータ」と呼ぶ。)を受け取って、印刷設定情報に応じた印刷データを生成し、スプーラ140を介して印刷装置に送信する機能を有する。グラフィックスドライバ132は、XPS解析部401と印刷データ生成部402とで構成される。   Next, details of the graphics driver 132 will be described. FIG. 4 is a diagram illustrating an example of the internal configuration of the graphics driver 132. As described above, the graphics driver 132 receives drawing data in XPS format (hereinafter referred to as “XPS data”), generates print data corresponding to the print setting information, and sends it to the printing apparatus via the spooler 140. It has a function to transmit. The graphics driver 132 includes an XPS analysis unit 401 and a print data generation unit 402.

MXDW112又はXPSアプリ120から入力されるXPSデータは、ドキュメント情報の全てがXMLで記述されており、記述内容ごとの複数ファイルをZIP圧縮により1つにまとめている。入力されたXPSデータは、XPS解析部401において解凍された後に解析される。解析の内容としては、例えば、入力されたXPSデータがGDIアプリ110に由来するものかどうかの判定処理がある。解析処理の詳細については後述する。また、XPS解析部401は、印刷データの前段階のデータである中間データの生成も行なう。印刷データ生成部402は、中間データと印刷設定情報を基に印刷データ(PDLデータ)を生成する。生成された印刷データはスプーラ140に出力される。   In the XPS data input from the MXDW 112 or the XPS application 120, all document information is described in XML, and a plurality of files for each description content are combined into one by ZIP compression. The input XPS data is analyzed after being decompressed by the XPS analysis unit 401. The contents of the analysis include, for example, a determination process of whether the input XPS data is derived from the GDI application 110. Details of the analysis processing will be described later. The XPS analysis unit 401 also generates intermediate data that is data at the previous stage of the print data. The print data generation unit 402 generates print data (PDL data) based on the intermediate data and the print setting information. The generated print data is output to the spooler 140.

次に、本実施例に係る、XPSドライバ130における印刷データ生成処理について詳しく説明する。図5は、印刷データ生成処理の流れを示すフローチャートである。この印刷データ生成処理は、XPSドライバ130に対する印刷指示に応答して開始する。具体的には、ユーザの印刷指示に応じてROM206に格納された所定のプログラムがRAM202に展開され、これをCPU201が実行することで実現される。   Next, the print data generation process in the XPS driver 130 according to the present embodiment will be described in detail. FIG. 5 is a flowchart showing the flow of print data generation processing. This print data generation process starts in response to a print instruction to the XPS driver 130. Specifically, a predetermined program stored in the ROM 206 is developed in the RAM 202 in accordance with a user's print instruction, and is realized by the CPU 201 executing it.

ステップ501において、XPSドライバ130に、MXDW112或いはXPSアプリ120からXPSデータが入力される。入力されたXPSデータは、グラフィックスドライバ132内のXPS解析部401に送られる。この時点でXPSデータはZIP形式の状態である。XPSドライバ130がXPSデータの入力を受け付けた時点では、それがXPSアプリ120から直接に入力されたものか、当初はEMF形式であった描画データがMXDW112でXPS形式に変換された後に入力されたものかは分からない。そこで、入力されたXPSデータが、GDIアプリ110に由来するものか、XPSアプリ120に由来するものかを識別するために後述のステップ503にてアプリ判定処理を行なう。   In step 501, XPS data is input to the XPS driver 130 from the MXDW 112 or the XPS application 120. The input XPS data is sent to the XPS analysis unit 401 in the graphics driver 132. At this point, the XPS data is in the ZIP format. When the XPS driver 130 accepts the input of XPS data, it was input directly from the XPS application 120, or the drawing data that was originally in the EMF format was input after being converted into the XPS format by the MXDW 112 I don't know if it's something. Therefore, in order to identify whether the input XPS data is derived from the GDI application 110 or the XPS application 120, an application determination process is performed in step 503 described later.

ステップ502において、XPS解析部402は、ZIP形式のXPSデータを解凍する。図6は、XPSデータのデータ構造を示す図である。XPSデータはツリー構造になっており、rootフォルダの下の第一階層に「Metadata」「_rels」、「Documents」といった複数のフォルダが存在する。   In step 502, the XPS analysis unit 402 decompresses the ZIP format XPS data. FIG. 6 shows the data structure of XPS data. The XPS data has a tree structure, and a plurality of folders such as “Metadata”, “_rels”, and “Documents” exist in the first hierarchy under the root folder.

ステップ503において、XPS解析部402は、アプリ判定処理を行う。このアプリ判定処理は、入力されたXPSデータの生成元のアプリケーションが、GDIアプリ110であるのかXPSアプリ120であるのかを判定する処理である。アプリ判定処理の詳細については後述する。判定の結果、生成元のアプリがGDIアプリ110であれば、ステップ505に進む。一方、生成元のアプリがXPSアプリ120であれば、描画命令に手を加えることなくそのまま中間データを生成し、ステップ507に進む。   In step 503, the XPS analysis unit 402 performs an application determination process. This application determination process is a process for determining whether the application that generated the input XPS data is the GDI application 110 or the XPS application 120. Details of the application determination process will be described later. As a result of the determination, if the generation source application is the GDI application 110, the process proceeds to step 505. On the other hand, if the generation source application is the XPS application 120, the intermediate data is generated as it is without changing the drawing command, and the process proceeds to step 507.

ステップ505において、XPS解析部401は、解凍して得られた「Documents」フォルダ内のページ単位のファイル内に、グラフィック属性のオブジェクトの幅として0が指定された描画命令が存在するかどうかを判定する。図6に示す“1.fpage”や“2.fpage”がページ単位のファイルであり、その中には、例えば、以下に示す「Path」の描画命令が含まれている。
<Path Data="F1 M 19.2,19.2 L 96,19.2" Stroke="#ffff0000" StrokeThickness="0" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeEndLineCap="Round" Clip="M 0,0 L 0,1083.84 755.2,1083.84 755.2,0 z" />
In step 505, the XPS analysis unit 401 determines whether or not a drawing command in which 0 is specified as the width of the graphic attribute object exists in the page unit file in the “Documents” folder obtained by decompression. To do. “1.fpage” and “2.fpage” shown in FIG. 6 are files in page units, and include, for example, a “Path” drawing command shown below.
<Path Data = "F1 M 19.2,19.2 L 96,19.2" Stroke = "# ffff0000" StrokeThickness = "0" StrokeLineJoin = "Round" StrokeStartLineCap = "Round" StrokeEndLineCap = "Round" Clip = "M 0,0 L 0 , 1083.84 755.2,1083.84 755.2,0 z "/>

上記「Path」は線の描画を指定する命令であり、各要素は線描画の設定内容を表している。例えばData要素は、(19.2, 19.2)の座標に移動(M)し、線(L)を(96, 19.2)に対して描画することを表している。そして、オブジェクト幅としての線幅に関する要素は“StrokeThickness”であり、その要素値が“0”であること、すなわちXPSの仕様では線を描画しないことを意味している。   The “Path” is a command for designating line drawing, and each element represents the setting contents of line drawing. For example, the Data element represents moving (M) to the coordinates (19.2, 19.2) and drawing the line (L) with respect to (96, 19.2). The element related to the line width as the object width is “StrokeThickness”, which means that the element value is “0”, that is, the XPS specifications do not draw a line.

判定の結果、オブジェクト幅が0のグラフィック描画命令が存在する場合は、ステップ506に進む。一方、オブジェクト幅が0のグラフィック描画命令が存在しない場合は、ファイル内の描画命令に手を加えることなく中間データを生成してステップ507に進む。   As a result of the determination, if there is a graphic drawing command with an object width of 0, the process proceeds to step 506. On the other hand, if there is no graphic drawing command with an object width of 0, intermediate data is generated without changing the drawing command in the file, and the process proceeds to step 507.

ステップ506において、XPS解析部401は、オブジェクト幅が0のグラフィック描画命令を、最小幅でのオブジェクト(例えば、線オブジェクト)の描画を指定するグラフィック描画命令に変更する処理を行なう。例えば、上述の「Path」の描画命令の場合、以下のように変更される。
<Path Data="F1 M 19.2,19.2 L 96,19.2" Stroke="#ffff0000" StrokeThickness="0.16" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeEndLineCap="Round" Clip="M 0,0 L 0,1083.84 755.2,1083.84 755.2,0 z" />
In step 506, the XPS analysis unit 401 performs a process of changing a graphic drawing command having an object width of 0 to a graphic drawing command for designating drawing of an object (for example, a line object) with the minimum width. For example, in the case of the above-mentioned “Path” drawing command, the following changes are made.
<Path Data = "F1 M 19.2,19.2 L 96,19.2" Stroke = "# ffff0000" StrokeThickness = "0.16" StrokeLineJoin = "Round" StrokeStartLineCap = "Round" StrokeEndLineCap = "Round" Clip = "M 0,0 L 0 , 1083.84 755.2,1083.84 755.2,0 z "/>

上記具体例の場合、“StrokeThickness”の要素値“0”が、“0.16”に変更されており、これは0.16の幅(単位はpoint)で線を描画することを意味している。
このように、オブジェクト幅が0のグラフィック描画命令をXPSの仕様に従ってそのまま描画しないと解釈するのではなく、GDIの仕様に従ってデバイスの最小単位で描画するという内容に解釈し直し、描画命令の内容が変更される。この描画命令変更処理の具体的な流れについては後述する。そして、この描画命令変更処理の結果を踏まえて或いは描画命令変更処理の過程において中間データが生成され、印刷データ生成部402に送られる。
In the case of the above specific example, the element value “0” of “StrokeThickness” is changed to “0.16”, which means that a line is drawn with a width of 0.16 (unit is point).
In this way, the graphic drawing command with the object width of 0 is not interpreted as not being drawn as it is according to the XPS specification, but is re-interpreted as the content of drawing in the minimum unit of the device according to the GDI specification. Be changed. The specific flow of this drawing command change process will be described later. Then, based on the result of the rendering command change process or in the course of the rendering command change process, intermediate data is generated and sent to the print data generation unit 402.

ステップ507において、印刷データ生成部402は、中間データと印刷設定情報に基づいて印刷データを生成する。生成された印刷データはスプーラに送られる。   In step 507, the print data generation unit 402 generates print data based on the intermediate data and the print setting information. The generated print data is sent to the spooler.

以上が、XPSドライバ130における印刷データ生成処理の内容である。上述のとおり、EMF(GDI)とXPSとでは仕様が異なる、オブジェクト幅=0のグラフィック描画に関して生成元アプリケーションの種類に応じた印刷データの生成を行うことで、各アプリケーションで想定している仕様で印刷を行うことが可能となる。   The above is the content of the print data generation process in the XPS driver 130. As described above, EMF (GDI) and XPS have different specifications, and print data is generated according to the type of generation application for graphic drawing with an object width = 0. Printing can be performed.

続いて、上述した図5のフローチャートにおけるアプリ判定処理(ステップ503)の詳細について説明する。本実施例のアプリ判定処理では、予め設定された探索条件の情報に従って、XPS形式の描画データ内の所定のファイルから特定の文字列を探索することで、XPSドライバに入力されたXPSデータの生成元のアプリを特定する。図7は、本実施例に係るアプリ判定処理の詳細を示すフローチャートである。   Next, details of the application determination process (step 503) in the flowchart of FIG. 5 described above will be described. In the application determination process of the present embodiment, generation of XPS data input to the XPS driver is performed by searching for a specific character string from a predetermined file in drawing data in XPS format in accordance with information on a preset search condition. Identify the original app. FIG. 7 is a flowchart illustrating details of the application determination process according to the present embodiment.

ステップ701では、生成元アプリを特定するための探索文字列に関する設定情報が設定データ保持部133から取得される。図8(a)は、本ステップで取得する探索文字列設定情報の一例を示しており、XPSデータ内のどの部分(ファイル)を対象に如何なる文字列を探索するかが指定されている。図8(a)に示す探索文字列設定情報において、探索条件の単位であるSetting要素801は、「SearchString」、「SearchPath」、「Mode」の3つの要素をさらに有している。「SearchString」は探索する文字列を指定してする要素であり、ここではMXDW112を表す文字列である“microsoftxpsdocumentwriter”がその値として設定されている。MXDW112を指すこの文字列は、EMF形式からXPS形式に変換する際にMXDW112において、ジョブレベルのプリントチケットに記述されるものである。そのため、この文字列を含むプリントチケットを持つXPSデータはGDIアプリ110が生成元であると判断することができる。なお、MXDW112を表す文字列であればよいので“microsoftxpsdocumentwriter”に限定されるわけではない。   In step 701, setting information related to a search character string for specifying a generation source application is acquired from the setting data holding unit 133. FIG. 8A shows an example of search character string setting information acquired in this step, which specifies which part (file) in the XPS data is to be searched for. In the search character string setting information shown in FIG. 8A, the Setting element 801 which is a unit of the search condition further includes three elements “SearchString”, “SearchPath”, and “Mode”. “SearchString” is an element that designates a character string to be searched, and here, “microsoftxpsdocumentwriter”, which is a character string representing MXDW 112, is set as its value. This character string indicating the MXDW 112 is described in the job level print ticket in the MXDW 112 when converting from the EMF format to the XPS format. Therefore, the XPS data having the print ticket including this character string can be determined to be generated by the GDI application 110. Note that it is not limited to “microsoftxpsdocumentwriter” as long as it is a character string representing MXDW112.

「SearchPath」は、XPSデータの中のどのファイルから文字列を探索するかを特定するためのパスを指定する要素である。ここではその値として“/MeaData/*_PT.xml”が設定されている。前述のとおりXPSデータは複数のファイルがZIP圧縮されたデータ形式であるため、「SearchPath」で探索先のパスを指定することによりどのファイルを探索するかを特定する。本実施例のように、正規表現を用いることで複数のファイル(例えば“A_PT.xml”や“B_PT.xml”といったファイル名のファイル)を探索対象にすることができる。ジョブレベルのプリントチケットのファイル名は“JOB_PT.xml”であるので、正規表現を用いることなく“JOB_PT.xml”の文字列を設定値としてもよい。「Mode」は、「SearchPath」で指定されたパスに対応するファイル内に「SearchString」で指定された探索文字列が存在した場合に、どの種類のアプリケーションに由来するXPSデータであるとするかを特定する要素である。ここではその値として“cpk:GDI”が設定されている。つまり、この場合、メタデータフォルダ内の“_PT.xml”をファイル名に含むファイル内に“microsoftxpsdocumentwriter”の文字列があれば、GDIアプリ110由来のXPSデータと判定されることになる。もし「Mode」要素の設定値として“cpk:XPS”が入っていれば、XPSアプリ120に由来すると判定されることになる。なお、図8(a)の例では探索条件は1つ(Setting要素が1つのみ)しか設定されていないが、複数の探索条件を設定し、いずれかの探索条件(Setting要素)を満たした場合に、アプリケーションの種類が特定されるようにしてもよい。このように設定情報において、XPSデータのどのファイルからどの文字列を探索し、見つかった場合にどの種類のアプリケーションと判定するか、という内容を定義している。これにより、プログラム自体はそのままで設定情報における定義変更によって探索条件を変更することができる。   “SearchPath” is an element for designating a path for identifying a file from which to search for a character string in XPS data. Here, “/MeaData/*_PT.xml” is set as the value. As described above, since the XPS data has a data format in which a plurality of files are ZIP-compressed, the search destination path is specified by “SearchPath” to specify which file is to be searched. As in this embodiment, by using regular expressions, a plurality of files (for example, files with file names such as “A_PT.xml” and “B_PT.xml”) can be searched. Since the file name of the job level print ticket is “JOB_PT.xml”, the character string “JOB_PT.xml” may be set as a setting value without using a regular expression. “Mode” indicates which type of application the XPS data is derived from when the search string specified by “SearchString” exists in the file corresponding to the path specified by “SearchPath”. The element to identify. Here, “cpk: GDI” is set as the value. That is, in this case, if there is a character string “microsoftxpsdocumentwriter” in the file name including “_PT.xml” in the metadata folder, it is determined that the XPS data is derived from the GDI application 110. If “cpk: XPS” is entered as the setting value of the “Mode” element, it is determined that the attribute is derived from the XPS application 120. In the example of FIG. 8 (a), only one search condition (only one Setting element) is set, but a plurality of search conditions are set and one of the search conditions (Setting element) is satisfied. In this case, the type of application may be specified. In this way, the setting information defines the content of which character string is searched from which file of XPS data and which type of application is determined when it is found. Thereby, the search condition can be changed by changing the definition in the setting information without changing the program itself.

ステップ702では、探索文字列の設定情報に従って、「SearchPath」で指定されたパスが示すファイル内に、「SearchString」で指定された探索文字列が存在するかどうかが判定される。図8(b)は、探索の対象ファイルとしてのプリントチケットの一例を示す図である。図8(b)に示す例では、“psf:PrintTicket”要素の“xmlns:ns0000”要素の中に上記探索文字列“microsoftxpsdocumentwriter”が含まれている。判定の結果、対象ファイル内に探索文字列が存在する場合はステップ703に進む。一方、対象ファイル内に探索文字列が存在しない場合はステップ704に進む。   In step 702, it is determined whether the search character string specified by “SearchString” exists in the file indicated by the path specified by “SearchPath” according to the setting information of the search character string. FIG. 8B is a diagram illustrating an example of a print ticket as a search target file. In the example shown in FIG. 8B, the search character string “microsoftxpsdocumentwriter” is included in the “xmlns: ns0000” element of the “psf: PrintTicket” element. As a result of the determination, if a search character string exists in the target file, the process proceeds to step 703. On the other hand, if the search character string does not exist in the target file, the process proceeds to step 704.

ステップ703では、入力XPSデータについて、MXDW112を経由したGDIアプリ110が生成元であると決定され、本処理を終える。   In step 703, it is determined that the GDI application 110 that has passed through the MXDW 112 is the generation source for the input XPS data, and this processing is finished.

ステップ704では、入力XPSデータについて、XPSアプリ120が生成元であると決定され、本処理を終える。
以上が、本実施例に係るアプリ判定処理の内容である。
In step 704, it is determined that the XPS application 120 is the generation source for the input XPS data, and the present process ends.
The above is the content of the application determination process according to the present embodiment.

続いて、上述した図5のフローチャートにおける描画命令変更処理(ステップ506)の詳細について説明する。図9は、描画命令変更処理の詳細を示すフローチャートである。   Next, details of the drawing command change process (step 506) in the flowchart of FIG. 5 described above will be described. FIG. 9 is a flowchart showing details of the drawing command change process.

ステップ901では、ユーザが設定した印刷設定情報から印刷解像度と印刷用紙サイズの情報が取得される。この印刷設定情報はXPSデータ内の上述のプリントチケットと呼ばれる部分に記述されている。XPS解析部401は、プリントチケットを解析して、印刷解像度と印刷用紙サイズの情報を取得する。図8(b)の例では、印刷解像度は“psk:PageResolution”要素にて100(dpi)が、印刷用紙サイズは“psk:PageMediaSize”要素にてA4に相当するサイズ(縦210mm×横297mm)がそれぞれ設定されている。   In step 901, information about the print resolution and print paper size is acquired from the print setting information set by the user. This print setting information is described in the part called the above-mentioned print ticket in the XPS data. The XPS analysis unit 401 analyzes the print ticket and acquires information about the print resolution and the print paper size. In the example of FIG. 8B, the print resolution is 100 (dpi) in the “psk: PageResolution” element, and the print paper size is a size corresponding to A4 in the “psk: PageMediaSize” element (210 mm long × 297 mm wide). Are set respectively.

ステップ902では、取得した印刷解像度及び印刷用紙サイズの情報から、デバイスで表現可能な最小の幅である1ピクセル(pixel)の幅が導出される。例えば、上述のように印刷解像度が100(dpi)、印刷用紙サイズがA4に設定されていた場合、画像の画素数は縦827pixel×横1169pixelとなる。この場合、1ピクセルの幅として、約0.25mmが導出されることとなる。   In step 902, the width of 1 pixel, which is the minimum width that can be expressed by the device, is derived from the acquired information about the print resolution and the print paper size. For example, when the print resolution is set to 100 (dpi) and the print paper size is set to A4 as described above, the number of pixels of the image is 827 pixels × 1169 pixels. In this case, about 0.25 mm is derived as the width of one pixel.

ステップ903では、オブジェクト幅=0(XPS形式では「描画しない」を意味)を指定するグラフィック描画命令を、1ピクセル幅に相当するオブジェクト幅(ここでは0.25mm)でオブジェクトの描画を指定するグラフィック描画命令に変更する。   In step 903, a graphic drawing command specifying object width = 0 (meaning “not drawing” in the XPS format) is used to specify drawing of an object with an object width corresponding to one pixel width (here, 0.25 mm). Change to instruction.

以上が、描画命令変更処理の内容である。この変更処理により、入力されたXPSデータの生成元アプリがGDIアプリであった場合、そのままでは何も描画されない内容の描画命令が、GDI(EMF)の仕様と同様、最小のオブジェクト幅で描画する描画命令に変更される。   The above is the content of the drawing command change process. With this change processing, if the generation application of the input XPS data is a GDI application, a drawing command with a content that is not drawn as it is is drawn with the minimum object width as in the GDI (EMF) specification. Changed to a drawing command.

なお、上述の例では、1ピクセル幅を計算によって求めているが、印刷装置や生成する印刷データの仕様によっては、線などのグラフィック属性のオブジェクトを最小幅で描画する専用の描画命令が予め用意されている場合もある。このような場合は、上述のステップ902における導出処理を省略し、図5のフローにおける印刷データの生成(ステップ507)にて、オブジェクト幅が0のグラフィック描画命令については、上記専用の描画命令に変更した上で印刷データを生成すればよい。この場合、印刷装置側でオブジェクト幅の計算が行われることになる。   In the above example, the 1 pixel width is obtained by calculation. However, depending on the specifications of the printing apparatus and the print data to be generated, a dedicated drawing command for drawing a graphic attribute object such as a line with the minimum width is prepared in advance. Sometimes it is. In such a case, the derivation process in step 902 described above is omitted, and the graphic drawing command in which the object width is 0 in the print data generation (step 507) in the flow of FIG. The print data may be generated after the change. In this case, the object width is calculated on the printing apparatus side.

また、本実施例では、情報処理装置にインストールされているプリンタドライバがXPSドライバのみの構成であったが、さらにGDIドライバがインストールされていてもよい。本実施例を適用することで、GDIアプリで生成した描画データについていずれのプリンタドライバを用いても同じ印刷結果を得ることができる。   In this embodiment, the printer driver installed in the information processing apparatus has only the XPS driver. However, a GDI driver may also be installed. By applying this embodiment, the same print result can be obtained regardless of which printer driver is used for the drawing data generated by the GDI application.

本実施例によれば、XPSドライバに入力されたXPSデータがGDIアプリに由来する場合は、オブジェクト幅=0のグラフィック描画命令が、GDIアプリの仕様に則ってオブジェクトの最小幅での描画を指定するグラフィック描画命令に変更される。これにより、GDIアプリでユーザが意図した内容の印刷結果を、XPSドライバを介した印刷によって得ることができる。   According to the present embodiment, when the XPS data input to the XPS driver is derived from the GDI application, the graphic drawing command with the object width = 0 specifies drawing with the minimum width of the object in accordance with the GDI application specification. The graphic drawing command is changed. Thereby, the printing result of the content intended by the user with the GDI application can be obtained by printing via the XPS driver.

[実施例2]
実施例1では、予め設定された探索条件の情報に従って、XPSデータ内の所定のファイルから特定の文字列を探索することで、XPSドライバに入力されたXPSデータの生成元のアプリを特定し、必要に応じて描画命令を変更する態様であった。次に、印刷時に使用するXPSドライバのユーザインタフェース画面でユーザが行なった設定内容に基づいて、XPSデータの生成元のアプリを特定する態様について、実施例2として説明する。なお、実施例1と基本的な構成は共通であり、以下では実施例1との差異点であるアプリ判定処理を中心に説明するものとする。
[Example 2]
In the first embodiment, a specific character string is searched from a predetermined file in XPS data in accordance with information on a preset search condition, thereby specifying an application that generates XPS data input to the XPS driver. The drawing command was changed as necessary. Next, an embodiment in which the XPS data generation source application is specified based on the settings made by the user on the user interface screen of the XPS driver used during printing will be described as a second embodiment. The basic configuration is the same as that of the first embodiment, and the following description will focus on the application determination process that is the difference from the first embodiment.

最初に、ユーザが印刷時に使用する、XPSドライバ130のユーザインタフェース画面(以下、UI画面)について説明する。図10は、XPSドライバ130のUI画面の一例を示す図である。このUI画面1000は、UIドライバ131のUI表示部301によって情報処理装置100のディスプレイ上に表示される。ユーザは印刷時、文書等の作成アプリケーションから図10に示すようなUI画面1000を使用して、出力用紙サイズや印刷の向きといった各種印刷設定を行う。このUI画面1000では、右上部にある「出力方式」の項目1001において、出力モードとして「印刷(GDI−XPS互換)」を選択できるようになっている。この「印刷(GDI−XPS互換)」は、GDIアプリによって生成した描画データを印刷出力するユーザが、GDIドライバで印刷する時と同様の印刷結果を、XPSドライバを介した印刷で得たい場合に選択するモードである。なお、ユーザが、「印刷(GDI−XPS互換)」を選択しなかった場合(例えば、通常の印刷を示す「印刷(通常)」を選択した場合)は、すべてXPSの仕様に従うことになる。すなわち、GDIアプリによって生成した描画データであったとしても、XPSの仕様に従って、オブジェクト幅=0のグラフィック描画命令はオブジェクトの描画を行なわない描画命令として扱われることになる。   First, a user interface screen (hereinafter, UI screen) of the XPS driver 130 used by the user during printing will be described. FIG. 10 is a diagram illustrating an example of a UI screen of the XPS driver 130. The UI screen 1000 is displayed on the display of the information processing apparatus 100 by the UI display unit 301 of the UI driver 131. At the time of printing, the user uses the UI screen 1000 as shown in FIG. 10 from a document creation application to make various print settings such as the output paper size and print orientation. In the UI screen 1000, “print (GDI-XPS compatible)” can be selected as an output mode in an “output method” item 1001 in the upper right part. This “printing (GDI-XPS compatible)” is used when the user who prints out the drawing data generated by the GDI application wants to obtain the same printing result as when printing with the GDI driver by printing via the XPS driver. This is the mode to select. When the user does not select “print (GDI-XPS compatible)” (for example, when “print (normal)” indicating normal printing is selected), the XPS specifications are all followed. That is, even if the drawing data is generated by the GDI application, in accordance with the XPS specification, the graphic drawing command with the object width = 0 is treated as a drawing command that does not draw the object.

図11は、本実施例に係るアプリ判定処理の詳細を示すフローチャートである。
ステップ1201では、受信したXPSデータの中から、印刷設定情報が記述されたファイルであるプリントチケットが取得され、内容の解析がなされる。この際、ユーザが印刷設定時に上述のUI画面1000の項目1001で選択した、出力モードの設定値を取得する。図12は、本実施例に係るXPSデータのプリントチケットの一例である。ここで、UI画面1000における出力方式の項目1001は、XPSデータのプリントチケット上では、「psk:OutputMode」要素で記載される。図12の例では、「psk:OutputMode」の要素値として“GDI”が設定されており、これは出力方式として「印刷(GDI−XPS互換)」が選択されたことを意味している。XPS解析部401はプリントチケット上の「psk:OutputMode」要素の設定値を読み取ることで、生成元のアプリケーションの種類を特定することが可能となる。
FIG. 11 is a flowchart illustrating details of the application determination process according to the present embodiment.
In step 1201, a print ticket, which is a file in which print setting information is described, is acquired from the received XPS data, and the content is analyzed. At this time, the setting value of the output mode selected by the item 1001 of the above-described UI screen 1000 at the time of print setting is acquired. FIG. 12 is an example of a print ticket for XPS data according to the present embodiment. Here, the output method item 1001 on the UI screen 1000 is described by a “psk: OutputMode” element on the XPS data print ticket. In the example of FIG. 12, “GDI” is set as the element value of “psk: OutputMode”, which means that “print (GDI-XPS compatible)” is selected as the output method. The XPS analysis unit 401 can identify the type of application that is the generation source by reading the setting value of the “psk: OutputMode” element on the print ticket.

ステップ1102では、取得した出力モードの設定値(「psk:OutputMode」の要素値)が“GDI”であるかどうかが判定される。判定の結果、“GDI”である場合は、ステップ1103に進む。一方、“GDI”でない場合は、ステップ1104に進む。   In step 1102, it is determined whether or not the acquired output mode setting value (element value of “psk: OutputMode”) is “GDI”. If the result of determination is “GDI”, the processing proceeds to step 1103. On the other hand, if it is not “GDI”, the process proceeds to step 1104.

ステップ1103では、入力されたXPSデータはMXDW112を経由したGDIアプリ110が生成元のXPSデータであると決定され、本処理を終える。   In step 1103, it is determined that the input XPS data is the XPS data that is generated by the GDI application 110 via the MXDW 112, and this processing ends.

ステップ1104では、入力されたXPSデータは、XPSアプリ4が生成元のXPSデータであると決定され、本処理を終える。
以上が、本実施例に係るアプリ判定処理の内容である。
In step 1104, it is determined that the input XPS data is the XPS data generated by the XPS application 4, and the process ends.
The above is the content of the application determination process according to the present embodiment.

本実施例によっても、実施例1と同様、GDIアプリでユーザが意図した内容の印刷結果を、XPSドライバを介した印刷によって得ることができる。   Also in the present embodiment, as in the first embodiment, the print result of the contents intended by the user with the GDI application can be obtained by printing via the XPS driver.

(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

Claims (11)

入力されたXPS形式の描画データから、印刷装置に対応した印刷データを生成するプリンタドライバを備えた情報処理装置であって、
前記プリンタドライバは、
前記入力されたXPS形式の描画データが、GDIアプリケーションの印刷処理に基づき生成されたGDI形式の描画データから変換モジュールで変換されたXPS形式の描画データであるかどうかを判定し、
当該入力されたXPS形式の描画データが、所定のグラフィック描画命令を含むかどうかを判定し、
当該判定の結果、前記入力されたXPS形式の描画データが、前記GDIアプリケーションの印刷処理に基づき生成されたGDI形式の描画データから前記変換モジュールで変換されたXPS形式の描画データであり、且つ、前記所定のグラフィック描画命令を含む、と判定した場合、当該所定のグラフィック描画命令を前記印刷装置で表現可能な特定の描画を指定するグラフィック描画命令に変更し、
当該変更後のグラフィック描画命令を含む描画データに基づいて前記印刷データを生成する、
ことを特徴とする情報処理装置。
An information processing apparatus including a printer driver that generates print data corresponding to a printing apparatus from input drawing data in XPS format,
The printer driver is
Determining whether the input drawing data in the XPS format is drawing data in the XPS format converted by the conversion module from the drawing data in the GDI format generated based on the printing process of the GDI application;
Determining whether the input drawing data in the XPS format includes a predetermined graphic drawing command;
As a result of the determination, the input drawing data in the XPS format is drawing data in the XPS format converted by the conversion module from the drawing data in the GDI format generated based on the printing process of the GDI application, and If it is determined that the predetermined graphic drawing command is included, the predetermined graphic drawing command is changed to a graphic drawing command for designating a specific drawing that can be expressed by the printing device,
Generating the print data based on drawing data including the changed graphic drawing command;
An information processing apparatus characterized by that.
前記プリンタドライバは、予め設定された探索条件の情報に従って、前記入力されたXPS形式の描画データから特定の文字列を探索することで、前記XPS形式の描画データが前記GDIアプリケーションからの印刷処理に基づき生成されたGDI形式の描画データから前記変換モジュールで変換されたXPS形式の描画データであるかどうかを判定することを特徴とする請求項1に記載の情報処理装置。   The printer driver searches a specific character string from the input drawing data in the XPS format in accordance with information on a preset search condition, so that the drawing data in the XPS format is used for printing processing from the GDI application. 2. The information processing apparatus according to claim 1, wherein whether or not the drawing data is XPS format converted by the conversion module from GDI format drawing data generated based on the information. 前記プリンタドライバは、前記プリンタドライバのユーザインタフェース画面でユーザが行なった出力方式に関する設定内容に基づいて、前記入力されたXPS形式の描画データが、前記GDIアプリケーションからの印刷処理に基づき生成されたGDI形式の描画データから前記変換モジュールで変換されたXPS形式の描画データであるかどうかを判定することを特徴とする請求項1に記載の情報処理装置。   The printer driver is a GDI in which the input drawing data in the XPS format is generated based on a printing process from the GDI application, based on the setting contents regarding the output method performed by the user on the user interface screen of the printer driver. The information processing apparatus according to claim 1, wherein it is determined whether or not the drawing data is in XPS format converted by the conversion module from drawing data in the format. 前記所定のグラフィック描画命令とは、オブジェクト幅が0のグラフィック描画命令であることを特徴とする請求項1乃至3のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the predetermined graphic drawing command is a graphic drawing command with an object width of zero. 前記プリンタドライバは、
前記入力されたXPS形式の描画データ内のプリントチケットから印刷解像度と印刷用紙サイズの情報を取得して前記印刷装置で表現可能な最小のオブジェクト幅を導出し、
前記所定のグラフィック描画命令を、当該導出した前記印刷装置で表現可能な最小のオブジェクト幅での描画を指定するグラフィック描画命令に変更する、
ことを特徴とする請求項に記載の情報処理装置。
The printer driver is
Deriving the minimum object width that can be expressed by the printing apparatus by obtaining information of the printing resolution and the printing paper size from the print ticket in the input drawing data in the XPS format,
Changing the predetermined graphic drawing command to a graphic drawing command for designating drawing with a minimum object width that can be expressed by the derived printing apparatus ;
The information processing apparatus according to claim 1 .
前記プリンタドライバは、前記所定のグラフィック描画命令を、前記印刷装置で表現可能な最小のオブジェクト幅での描画を指定する予め定められた専用のグラフィック描画命令に変更することを特徴とする請求項に記載の情報処理装置。 The printer driver according to claim 1, characterized in that to change the predetermined graphic drawing instruction, a dedicated graphics rendering instruction predetermined specifying the drawing with the smallest object width that can be expressed by the printing device The information processing apparatus described in 1. 前記オブジェクト幅が0のグラフィック描画命令は、線オブジェクトのグラフィック描画命令であることを特徴とする請求項に記載の情報処理装置。 The information processing apparatus according to claim 4 , wherein the graphic drawing command with an object width of 0 is a graphic drawing command for a line object. 前記プリンタドライバは、前記入力されたXPS形式の描画データが、XPSアプリケーションの印刷処理に基づき生成されるXPS形式の描画データである場合、当該XPS形式の描画命令に含まれる前記所定のグラフィック描画命令を変更しないことを特徴とする請求項に記載の情報処理装置。 When the input XPS drawing data is XPS drawing data generated based on the printing process of the XPS application, the printer driver includes the predetermined graphic drawing command included in the XPS drawing command. The information processing apparatus according to claim 1 , wherein the information processing apparatus is not changed. 入力されたXPS形式の描画データから、印刷装置に対応した印刷データを生成するプリンタドライバによって実行される、印刷データ生成方法であって、
前記印刷データ生成方法は、
前記入力されたXPS形式の描画データが、GDIアプリケーションの印刷処理に基づき生成されたGDI形式の描画データから変換モジュールで変換されたXPS形式の描画データであるか判定する第1の判定ステップと、
前記入力されたXPS形式の描画データが、所定のグラフィック描画命令を含むか判定する第2の判定ステップと、
前記第1の判定ステップにおいて、前記入力されたXPS形式の描画データが、前記GDIアプリケーションの印刷処理に基づき生成されたGDI形式の描画データから前記変換モジュールで変換されたXPS形式の描画データであると判定され、且つ、前記第2の判定ステップにおいて、前記入力されたXPS形式の描画データが、前記所定のグラフィック描画命令を含むと判定された場合、当該所定のグラフィック描画命令を前記印刷装置で表現可能な特定の描画を指定するグラフィック描画命令に変更する変更ステップと、
前記変更ステップで変更した後のグラフィック描画命令を含む描画データに基づいて前記印刷データを生成する生成ステップと、
を含むことを特徴とする印刷データ生成方法。
A print data generation method executed by a printer driver that generates print data corresponding to a printing device from input drawing data in XPS format,
The print data generation method includes:
A first determination step for determining whether the input drawing data in the XPS format is drawing data in the XPS format converted by the conversion module from the drawing data in the GDI format generated based on the printing process of the GDI application;
A second determination step of determining whether the input drawing data in the XPS format includes a predetermined graphic drawing command;
In the first determination step, the input XPS format drawing data is XPS format drawing data converted by the conversion module from the GDI format drawing data generated based on the printing process of the GDI application. In the second determination step, if it is determined that the input drawing data in the XPS format includes the predetermined graphic drawing command, the predetermined graphic drawing command is output by the printing apparatus. A change step that changes to a graphic drawing command that specifies a particular drawing that can be represented;
A generation step of generating the print data based on drawing data including a graphic drawing command after being changed in the changing step;
A print data generation method comprising:
入力されたXPS形式の描画データから、印刷装置に対応した印刷データを生成するプリンタドライバであって、
前記プリンタドライバは、コンピュータを、
前記入力されたXPS形式の描画データが、GDIアプリケーションの印刷処理に基づき生成されたGDI形式の描画データから変換モジュールで変換されたXPS形式の描画データであるかどうかを判定する第1の判定手段と、
当該入力されたXPS形式の描画データが、所定のグラフィック描画命令を含むかどうかを判定する第2の判定手段と、
前記第1の判定手段において、前記入力されたXPS形式の描画データが、前記GDIアプリケーションの印刷処理に基づき生成されたGDI形式の描画データから前記変換モジュールで変換されたXPS形式の描画データである、と判定し、且つ、前記第2の判定手段において、前記入力されたXPS形式の描画データが前記所定のグラフィック描画命令を含む、と判定した場合に、当該所定のグラフィック描画命令を前記印刷装置で表現可能な特定の描画を指定するグラフィック描画命令に変更する変更手段と、
前記変更手段で変更した後のグラフィック描画命令を含む描画データに基づいて前記印刷データを生成する生成手段と、
して機能させるためのプログラムであることを特徴とするプリンタドライバ。
A printer driver that generates print data corresponding to a printing device from input drawing data in XPS format,
The printer driver is a computer,
First determination means for determining whether the input XPS format drawing data is XPS format drawing data converted by a conversion module from GDI format drawing data generated based on printing processing of a GDI application. When,
Second determination means for determining whether the input drawing data in the XPS format includes a predetermined graphic drawing command;
In the first determination means, the input drawing data in the XPS format is drawing data in the XPS format converted by the conversion module from the drawing data in the GDI format generated based on the printing process of the GDI application. , And the second determination means determines that the input drawing data in the XPS format includes the predetermined graphic drawing command, the predetermined graphic drawing command is sent to the printing apparatus. A change means for changing to a graphic drawing command that specifies a specific drawing that can be represented by
Generating means for generating the print data based on drawing data including a graphic drawing command after being changed by the changing means;
A printer driver characterized by being a program for functioning as a printer.
前記所定のグラフィック描画命令とは、オブジェクト幅が0のグラフィック描画命令であり、
前記印刷装置で表現可能な特定の描画を指定するグラフィック描画命令とは、前記印刷装置で表現可能な最小のオブジェクト幅での描画を指定するグラフィック描画命令である、ことを特徴とする請求項10に記載のプリンタドライバ。
The predetermined graphic drawing command is a graphic drawing command with an object width of 0,
11. The graphic drawing command for designating a specific drawing that can be expressed by the printing device is a graphic drawing command for specifying drawing by a minimum object width that can be expressed by the printing device. The printer driver described in 1.
JP2017207215A 2017-10-26 2017-10-26 Information processing apparatus, control method therefor, and program Active JP6437076B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017207215A JP6437076B2 (en) 2017-10-26 2017-10-26 Information processing apparatus, control method therefor, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017207215A JP6437076B2 (en) 2017-10-26 2017-10-26 Information processing apparatus, control method therefor, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2015209846A Division JP6234417B2 (en) 2015-10-26 2015-10-26 Information processing apparatus, control method therefor, and program

Publications (2)

Publication Number Publication Date
JP2018022527A JP2018022527A (en) 2018-02-08
JP6437076B2 true JP6437076B2 (en) 2018-12-12

Family

ID=61165669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017207215A Active JP6437076B2 (en) 2017-10-26 2017-10-26 Information processing apparatus, control method therefor, and program

Country Status (1)

Country Link
JP (1) JP6437076B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019192087A (en) * 2018-04-27 2019-10-31 キヤノン株式会社 Information processing device, program, and information processing method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4624087B2 (en) * 2004-12-06 2011-02-02 京セラミタ株式会社 Drawing processing apparatus and program
JP4667280B2 (en) * 2006-03-17 2011-04-06 キヤノン株式会社 Information processing apparatus, control method therefor, and program
JP4367561B2 (en) * 2007-04-02 2009-11-18 セイコーエプソン株式会社 Print control apparatus and print document printing method
JP4375459B2 (en) * 2007-08-03 2009-12-02 ブラザー工業株式会社 Print control device and printer driver program
JP2012173989A (en) * 2011-02-22 2012-09-10 Ricoh Co Ltd Print controller, program and recording medium
CN105003464B (en) * 2014-04-23 2019-11-12 德昌电机(深圳)有限公司 Aerofoil fan

Also Published As

Publication number Publication date
JP2018022527A (en) 2018-02-08

Similar Documents

Publication Publication Date Title
US8917405B2 (en) Information processing for generating graphics data processible by a printer
US8339642B2 (en) Apparatus, method, and system for processing character data
US20060209329A1 (en) A print control unit, a control method thereof, a print control program, and a recording medium
JP2005228243A (en) Information processor and control method therefor and program
US8325368B2 (en) Print information conversion apparatus, printing apparatus, printing system, and computer readable medium
JP5235695B2 (en) Printing control apparatus and control method thereof
US9507544B2 (en) Information processing apparatus, recording medium, and control method to process print data using filters
US9928018B2 (en) Information processing apparatus and control method thereof, for a drawing control technique of a printer driver
JP4537040B2 (en) Document processing apparatus and document processing method
US8320001B2 (en) Information processing method and apparatus for banner printing
JP2009187553A (en) Method for printing text-only content of pdf document
JP6234417B2 (en) Information processing apparatus, control method therefor, and program
JP2017151820A (en) Information processing device, program, and control method
JP6437076B2 (en) Information processing apparatus, control method therefor, and program
US10310788B2 (en) Control method for generating data used for printing and information processing apparatus
US8908227B2 (en) Image forming apparatus, image forming system, image data processing method, program, and storage medium
US9978005B2 (en) Printer for drawing bold character, method for controlling the same, and storage medium
US20100142001A1 (en) Information processing apparatus, method for controlling the information processing apparatus, and storage medium
JP2010117907A (en) Print controller and printer
JP5953727B2 (en) Image processing apparatus and program
JP2011039960A (en) Information processing apparatus, program, and computer readable recording medium
JP2020177298A (en) Image processing device, image processing method, and program
JP2007115026A (en) Printing controller, printing control method, printing control program and recording medium
JP2006085584A (en) Image forming method and image forming apparatus
KR20070022534A (en) Printer driver for converting printing data into common file and printer controlling apparatus using the same

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180425

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20180522

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180717

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20181016

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181113

R151 Written notification of patent or utility model registration

Ref document number: 6437076

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151