JP4449398B2 - Printing apparatus, printing method, and program for printing apparatus - Google Patents

Printing apparatus, printing method, and program for printing apparatus Download PDF

Info

Publication number
JP4449398B2
JP4449398B2 JP2003345870A JP2003345870A JP4449398B2 JP 4449398 B2 JP4449398 B2 JP 4449398B2 JP 2003345870 A JP2003345870 A JP 2003345870A JP 2003345870 A JP2003345870 A JP 2003345870A JP 4449398 B2 JP4449398 B2 JP 4449398B2
Authority
JP
Japan
Prior art keywords
document
data
stored
analysis
analyzed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003345870A
Other languages
Japanese (ja)
Other versions
JP2005111710A (en
Inventor
敦 成沢
悟 織井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2003345870A priority Critical patent/JP4449398B2/en
Publication of JP2005111710A publication Critical patent/JP2005111710A/en
Application granted granted Critical
Publication of JP4449398B2 publication Critical patent/JP4449398B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Record Information Processing For Printing (AREA)

Description

本発明は、印刷装置および印刷方法並びに印刷装置用のプログラムに関する。   The present invention relates to a printing apparatus, a printing method, and a program for the printing apparatus.

従来、この種の印刷装置としては、SVG文書を解析して印刷するプリンタとHTML文書をSVG文書に変換するフォーマッティングサーバとにより構成されたプリンタシステムが提案されている(例えば、特許文献1参照)。このシステムでは、HTML文書を受け付けると、フォーマッティングサーバにより受け付けたHTML文書をSVG文書に変換し、この変換したSVG文書をプリンタで解析して印刷する。
特開2002−91726号公報(図1,第5頁)
Conventionally, as this type of printing apparatus, a printer system configured by a printer that analyzes and prints an SVG document and a formatting server that converts an HTML document into an SVG document has been proposed (see, for example, Patent Document 1). . In this system, when an HTML document is received, the HTML document received by the formatting server is converted into an SVG document, and the converted SVG document is analyzed by a printer and printed.
JP 2002-91726 A (FIG. 1, page 5)

しかしながら、上述のプリンタシステムでは、プリンタとフォーマッティングサーバとから構成されていることから大型化し、家庭のリビングなどの限られたスペースに設置する場合には不向きである。また、HTML文書を受け付けたときには、フォーマッティングサーバによりSVG文書に変換すると共にこの変換したSVG文書を解析して印刷するから、変換や解析に時間を要し、迅速な印刷を行なうことができない。さらに、予め印刷サイズが設定されてレイアウトされた文書を異なるサイズの印刷用紙がプリンタにセットされているときには、一部が印刷されないなどの予期しない印刷を行なってしまうことがある。   However, since the above-described printer system is composed of a printer and a formatting server, the printer system is increased in size and is not suitable for installation in a limited space such as a living room. When an HTML document is received, it is converted into an SVG document by the formatting server and the converted SVG document is analyzed and printed. Therefore, it takes time for conversion and analysis, and rapid printing cannot be performed. Furthermore, when a printing paper of a different size is set in a printer with a print size set in advance, unexpected printing such as a part not being printed may be performed.

本発明の印刷装置および印刷方法は、HTML文書やこれを拡張したXHTML文書などのようなオブジェクトを所定の書式により階層的に記述した記述文書をより適切に印刷することを目的の一つとする。また、本発明の印刷装置および印刷方法は、HTML文書やこれを拡張したXHTML文書などのようなオブジェクトを所定の書式により階層的に記述した記述文書をより迅速に解析して印刷することを目的の一つとする。本発明の印刷装置用のプログラムは、印刷装置に所定の書式により階層的に記述した記述文書の解析や印刷をより適正に迅速に行なわせることを目的とする。   An object of the printing apparatus and printing method of the present invention is to more appropriately print a description document in which objects such as an HTML document or an XHTML document obtained by extending the document are hierarchically described in a predetermined format. Another object of the printing apparatus and printing method of the present invention is to more quickly analyze and print a description document in which objects such as an HTML document and an XHTML document obtained by extending the document are hierarchically described in a predetermined format. One of them. An object of the program for a printing apparatus of the present invention is to cause the printing apparatus to analyze and print a description document hierarchically described in a predetermined format more appropriately and quickly.

本発明の印刷装置および印刷方法並びに印刷装置用のプログラムは、上述の目的の少なくとも一部を達成するために以下の手段を採った。   The printing apparatus, the printing method, and the program for the printing apparatus of the present invention employ the following means in order to achieve at least a part of the above object.

本発明の印刷装置は、
印刷可能なオブジェクトを所定の第1書式により階層的に記述した記述文書を解析して紙などの媒体に印刷する印刷装置であって、
前記媒体のサイズを設定するサイズ設定手段と、
データを記憶するデータ記憶手段と、
記述文書におけるオブジェクトの階層的な木構造を解析すると共に該解析した木構造を前記データ記憶手段に記憶させる構造解析手段と、
オブジェクトの印刷時の様式について所定の第2書式により記述した様式文書を解析すると共に該解析結果としての様式データを前記データ記憶手段に記憶させる様式解析手段と、
記述文書が指定されたとき、該指定された記述文書に対応する木構造の解析を前記構造解析手段に指示すると共に該指定された記述文書に記述された様式文書に対応する様式データの解析を前記様式解析手段に指示し、前記解析された木構造と前記解析された様式データとの関連付けを行なう解析指示手段と、
レイアウト作成指示がなされたとき、前記解析されて前記データ記憶手段に記憶された木構造と該木構造に関連付けられた様式データと前記サイズ設定手段により設定された前記媒体のサイズとに基づいてオブジェクトの前記媒体へのレイアウトをページ毎に作成すると共に該作成したページ毎のレイアウトを前記データ記憶手段に記憶させるレイアウト作成手段と、
印刷実行指示がなされたとき、前記データ記憶手段に記憶されたページ毎のレイアウトに基づいてオブジェクトを取得すると共にレイアウトして印刷する印刷実行手段と、
を備えることを要旨とする。
The printing apparatus of the present invention includes:
A printing apparatus that analyzes a description document in which printable objects are hierarchically described in a predetermined first format and prints it on a medium such as paper,
Size setting means for setting the size of the medium;
Data storage means for storing data;
A structure analysis means for analyzing a hierarchical tree structure of an object in a description document and storing the analyzed tree structure in the data storage means;
A form analyzing means for analyzing a form document described in a predetermined second form with respect to a form at the time of printing of the object, and storing the form data as the analysis result in the data storage means;
When a description document is designated, the structure analysis means is instructed to analyze the tree structure corresponding to the designated description document, and the form data corresponding to the form document described in the designated description document is analyzed. Instructing the style analysis means, an analysis instruction means for associating the analyzed tree structure with the analyzed style data;
When a layout creation instruction is given, an object is created based on the tree structure analyzed and stored in the data storage means, the style data associated with the tree structure, and the size of the medium set by the size setting means. Creating a layout for each page of the medium and storing the created layout for each page in the data storage means;
Print execution means for acquiring an object based on the layout for each page stored in the data storage means and performing layout printing when a print execution instruction is made; and
It is a summary to provide.

この本発明の印刷装置では、記述文書が指定されたときには、まず、指定された記述文書に対応する木構造を解析すると共に記述文書に記述された様式文書に対応する様式データを解析し、この解析した木構造と解析した様式データとの関連付けを行なう。続いて、レイアウト作成指示がなされたときに、解析されてデータ記憶手段に記憶された木構造とこの木構造に関連付けられた様式データとサイズ設定手段により設定された媒体のサイズとに基づいてオブジェクトの媒体へのレイアウトをページ毎に作成する。そして、印刷実行指示がなされたときに、データ記憶手段に記憶されたページ毎のレイアウトに基づいてオブジェクトを取得すると共にレイアウトして印刷する。このように、媒体のサイズに基づいて印刷装置でレイアウトして印刷するから、木構造と様式データに基づいてレイアウトされたものをそのまま印刷する際に生じる予期しない不都合、例えばページサイズが媒体のサイズより大きいことにより一部が印刷されないといった不都合などを回避することができる。この結果、より適正に印刷することができる。ここで、記述文書としては、例えばXHTML言語などのマークアップ言語により記述されてなるものとすることもできる。また、印刷可能なオブジェクトとしては、テキスト,画像,表などが含まれる。印刷装置としては、例えば、カラーインクジェットプリンタを用いることができる。   In the printing apparatus of the present invention, when a descriptive document is designated, first, the tree structure corresponding to the designated descriptive document is analyzed and the form data corresponding to the form document described in the descriptive document is analyzed. The analyzed tree structure is associated with the analyzed style data. Subsequently, when the layout creation instruction is given, the object is analyzed based on the tree structure analyzed and stored in the data storage means, the style data associated with the tree structure, and the size of the medium set by the size setting means. A layout for each medium is created for each page. When a print execution instruction is issued, an object is acquired based on the layout for each page stored in the data storage means, and the object is laid out and printed. In this way, since the printing apparatus lays out and prints based on the size of the medium, an unexpected inconvenience that occurs when printing the layout based on the tree structure and style data as it is, for example, the page size is the size of the medium. It is possible to avoid the inconvenience that a part is not printed due to the larger size. As a result, printing can be performed more appropriately. Here, the description document may be described in a markup language such as XHTML language. Also, printable objects include text, images, tables and the like. As the printing apparatus, for example, a color ink jet printer can be used.

こうした本発明の印刷装置において、前記様式データはページサイズを含み、前記レイアウト作成手段は、前記様式データに含まれるページサイズが前記サイズ設定手段により設定された媒体のサイズより大きいときには、前記ページサイズに代えて前記設定された媒体のサイズを用いてレイアウトする手段であるものとすることもできる。こうすれば、媒体のサイズに応じたレイアウトを行なって印刷することができる。   In such a printing apparatus according to the present invention, the format data includes a page size, and the layout creating unit is configured to output the page size when the page size included in the format data is larger than the size of the medium set by the size setting unit. Instead of this, it may be a means for laying out using the set medium size. By doing so, it is possible to perform printing according to the layout according to the size of the medium.

この態様の本発明の印刷装置において、前記様式データはオブジェクトのサイズを含み、前記レイアウト作成手段は、前記様式データに含まれるオブジェクトのサイズが前記サイズ設定手段により設定された媒体のサイズに対応する最大オブジェクトサイズより大きいときには、前記オブジェクトのサイズに代えて最大オブジェクトサイズを用いてレイアウトする手段であるものとすることもできる。こうすれば、媒体のサイズに応じてオブジェクトをレイアウトして印刷することができる。   In this aspect of the printing apparatus of the present invention, the format data includes the size of an object, and the layout creating unit corresponds to the size of the medium in which the size of the object included in the format data is set by the size setting unit. When it is larger than the maximum object size, it may be a means for laying out using the maximum object size instead of the object size. In this way, the object can be laid out and printed according to the size of the medium.

また、本発明の印刷装置において、前記解析指示手段は、記述文書が指定されたときに該指定の前に指定された他の記述文書に対する印刷処理を実行しているときには、該印刷処理の実行に拘わらず、前記構造解析手段による前記他の記述文書における木構造の解析が終了した以降に該指定された記述文書に対する木構造の解析を前記構造解析手段に指示する手段であるものとすることもできる。こうすれば、前に指定された他の記述文書の印刷処理が完全に終了してから指定された記述文書の解析を開始するものに比して、迅速に解析して印刷することができる。   Further, in the printing apparatus of the present invention, when the description instruction is specified, the analysis instructing unit executes the print process when executing a print process for another description document specified before the specification document. Regardless of whether or not the structure analysis means instructs the structure analysis means to analyze the tree structure of the specified description document after the analysis of the tree structure in the other description document is completed. You can also. In this way, it is possible to analyze and print more quickly than when the analysis of the specified description document is started after the print processing of the other specified description document is completely completed.

さらに、本発明の印刷装置において、前記解析指示手段は、前記データ記憶手段に記憶された木構造を指定して前記レイアウト作成手段に前記レイアウト作成指示を行なう手段であるものとすることもできる。この場合、前記レイアウト作成手段は前記レイアウトの作成を完了した以降に前記解析指示手段に所定の終了信号を出力する手段であり、前記解析指示手段は前記所定の終了信号を受け付けた以降に該所定の終了信号に係る木構造の次に解析された木構造を指定して前記レイアウト作成指示を行なう手段であるものとすることもできる。こうすれば、解析指示手段によるレイアウト作成指示によりレイアウトを作成することができる。   Further, in the printing apparatus of the present invention, the analysis instruction means may be means for designating a tree structure stored in the data storage means and instructing the layout creation means to perform the layout creation. In this case, the layout creation means is a means for outputting a predetermined end signal to the analysis instruction means after completing the creation of the layout, and the analysis instruction means receives the predetermined end signal after receiving the predetermined end signal. It is also possible to designate the tree structure analyzed next to the tree structure related to the end signal of the above and to instruct the layout creation. In this way, a layout can be created by a layout creation instruction from the analysis instruction means.

あるいは、本発明の印刷装置において、前記レイアウト作成手段は、レイアウトの作成が完了したページ毎に前記印刷実行指示を前記印刷実行手段に行なう手段であるものとすることもできるし、1ページ分のレイアウトの作成が完了したときに前記印刷実行指示を前記印刷実行手段に行なう手段であるものとすることもできる。こうすれば、1ページ分の解析が終了した時点で印刷実行指示を行なうから、迅速に印刷することができる。   Alternatively, in the printing apparatus of the present invention, the layout creation means may be a means for giving the print execution instruction to the print execution means for each page for which layout creation has been completed. It may be a means for giving the print execution instruction to the print execution means when the creation of the layout is completed. In this way, a print execution instruction is given when the analysis for one page is completed, so that printing can be performed quickly.

また、本発明の印刷装置において、前記様式解析手段は前記解析にかかる様式文書を識別する識別情報を該様式文書を解析して得られる様式データに関連付けて前記データ記憶手段に記憶させる手段であり、前記解析指示手段は、前記指定された記述文書に記述された様式文書に対応する様式データの解析を前記様式解析手段に指示する際には、前記指定された記述文書に記述された様式文書の識別情報に基づいて前記データ記憶手段に該様式文書に対応する様式データが記憶されているか否かを判定し、前記データ記憶手段に該様式文書に対応する様式データが記憶されていないときには該様式文書の解析を前記様式解析手段に指示すると共に該指示に基づいて解析された様式データと前記解析された木構造との関連付けを行ない、前記データ記憶手段に該様式文書に対応する様式データが記憶されているときには該対応する様式データと前記解析された木構造との関連付けを行なう手段であるものとすることもできる。こうすれば、様式文書に対応する様式情報がデータ記憶手段に記憶されているときには様式文書の解析を行なわないから、常に様式文書を解析するものに比して、迅速に解析処理を終了することができる。この結果、印刷を実行することができる。   Further, in the printing apparatus of the present invention, the format analysis unit is a unit that stores identification information for identifying the format document for the analysis in the data storage unit in association with the format data obtained by analyzing the format document. When the analysis instruction means instructs the form analysis means to analyze the form data corresponding to the form document described in the specified description document, the form document described in the specified description document. It is determined whether or not form data corresponding to the form document is stored in the data storage means on the basis of the identification information, and when form data corresponding to the form document is not stored in the data storage means, The form document analysis is instructed to the form analysis means, and the form data analyzed based on the instruction is associated with the analyzed tree structure. It may be assumed to be a means for performing association with the style data and the analyzed tree structure having the corresponding when the style data corresponding to 該様 formula document data storage unit is stored. In this way, since the form document is not analyzed when the form information corresponding to the form document is stored in the data storage means, the analysis process can be completed more quickly than the case where the form document is always analyzed. Can do. As a result, printing can be executed.

本発明の印刷方法は、
紙などの媒体のサイズを設定するサイズ設定手段を有し、印刷可能なオブジェクトを所定の書式により階層的に記述した記述文書を解析して前記媒体に印刷する印刷装置における印刷方法であって、記述文書が指定されたとき、
(a)前記指定された記述文書におけるオブジェクトの階層的な木構造を解析し、
(b)前記指定された記述文書に記述された様式文書を解析してオブジェクトの印刷時における様式データを作成し、
(c)前記解析された木構造と前記解析された様式データとを関連付けを行ない、
(d)レイアウト作成指示がなされたとき、前記解析された木構造と該木構造に関連付けられた様式データと前記サイズ設定手段により設定された媒体のサイズとに基づいてオブジェクトの前記媒体へのレイアウトをページ毎に作成し、
(e)印刷実行指示がなされたとき、前記作成したページ毎のレイアウトに基づいてオブジェクトを取得すると共にレイアウトして印刷する
ことを要旨とする。
The printing method of the present invention includes:
A printing method in a printing apparatus that has size setting means for setting the size of a medium such as paper, analyzes a description document in which printable objects are hierarchically described in a predetermined format, and prints on the medium. When a descriptive document is specified,
(A) Analyzing a hierarchical tree structure of objects in the specified description document;
(B) Analyzing the form document described in the designated description document to create form data when printing the object;
(C) associating the analyzed tree structure with the analyzed style data;
(D) When a layout creation instruction is given, the layout of objects on the medium is based on the analyzed tree structure, the style data associated with the tree structure, and the size of the medium set by the size setting means. For each page,
(E) When a print execution instruction is given, an object is acquired based on the created layout for each page, and the layout is printed.

この本発明の印刷方法では、記述文書が指定されたときには、まず、指定された記述文書に対応する木構造を解析すると共に記述文書に記述された様式文書に対応する様式データを解析し、この解析した木構造と解析した様式データとの関連付けを行なう。続いて、レイアウト作成指示がなされたときに、解析された木構造とこの木構造に関連付けられた様式データとサイズ設定手段により設定された媒体のサイズとに基づいてオブジェクトの媒体へのレイアウトをページ毎に作成する。そして、印刷実行指示がなされたときに、データ記憶手段に記憶されたページ毎のレイアウトに基づいてオブジェクトを取得すると共にレイアウトして印刷する。このように、媒体のサイズにも基づいてレイアウトして印刷するから、木構造と様式データに基づいてレイアウトされたものをそのまま印刷する際に生じる予期しない不都合、例えばページサイズが媒体のサイズより大きいことにより一部が印刷されないといった不都合などを回避することができる。この結果、より適正に印刷することができる。   In the printing method of the present invention, when a descriptive document is designated, first, the tree structure corresponding to the designated descriptive document is analyzed, and the form data corresponding to the form document described in the descriptive document is analyzed. The analyzed tree structure is associated with the analyzed style data. Subsequently, when the layout creation instruction is given, the layout of the object on the medium is paged based on the analyzed tree structure, the style data associated with the tree structure, and the medium size set by the size setting means. Create each. When a print execution instruction is issued, an object is acquired based on the layout for each page stored in the data storage means, and the object is laid out and printed. As described above, since the layout is also printed based on the size of the medium, an unexpected inconvenience caused when printing the layout based on the tree structure and the style data as it is, for example, the page size is larger than the size of the medium. As a result, it is possible to avoid inconveniences such as a part not being printed. As a result, printing can be performed more appropriately.

本発明の印刷装置用のプログラムは、
装着された紙などの媒体のサイズを設定するサイズ設定部を有し、印刷可能なオブジェクトを所定の書式により階層的に記述した記述文書が指定されたときに該指定された記述文書を解析して媒体に印刷する印刷装置に用いられるプログラムであって、
(a)前記指定された記述文書におけるオブジェクトの階層的な木構造を解析するモジュールと、
(b)前記指定された記述文書に記述されたオブジェクトの印刷時の様式を記述した様式文書を解析して様式データを作成するモジュールと、
(c)前記解析された木構造と前記解析されて作成された様式データとの関連付けを行なうモジュールと、
(d)レイアウト作成指示がなされたときに前記解析された木構造と該木構造に関連付けられた様式データと前記サイズ設定部により設定された媒体のサイズとに基づいてオブジェクトの前記媒体へのレイアウトをページ毎に作成するモジュールと、
(e) 印刷実行指示がなされたときに前記作成されたページ毎のレイアウトに基づいてオブジェクトを取得して印刷可能にレイアウトするモジュールと、
を備えることを要旨とする。
The program for the printing apparatus of the present invention is:
A size setting unit for setting the size of a medium such as a loaded paper is provided. When a description document in which printable objects are hierarchically described in a predetermined format is specified, the specified description document is analyzed. A program used in a printing apparatus for printing on a medium,
(A) a module for analyzing a hierarchical tree structure of objects in the specified description document;
(B) a module for generating form data by analyzing a form document describing a form at the time of printing of an object described in the designated description document;
(C) a module for associating the analyzed tree structure with the analyzed and generated style data;
(D) Layout of objects on the medium based on the analyzed tree structure when the layout creation instruction is given, the style data associated with the tree structure, and the size of the medium set by the size setting unit A module that creates a page for each page,
(E) a module that acquires an object based on the created layout for each page when a print execution instruction is given, and lays out the printable layout;
It is a summary to provide.

この本発明の印刷装置用のプログラムによれば、印刷装置にインストールすることにより、記述文書が指定されたときには、まず、指定された記述文書に対応する木構造を解析すると共に記述文書に記述された様式文書に対応する様式データを解析し、この解析した木構造と解析した様式データとの関連付けを行なう。続いて、レイアウト作成指示がなされたときに、解析された木構造とこの木構造に関連付けられた様式データとサイズ設定手段により設定された媒体のサイズとに基づいてオブジェクトの媒体へのレイアウトをページ毎に作成する。そして、印刷実行指示がなされたときに、データ記憶手段に記憶されたページ毎のレイアウトに基づいてオブジェクトを取得すると共にレイアウトして印刷する。このように、媒体のサイズにも基づいてレイアウトして印刷するから、木構造と様式データに基づいてレイアウトされたものをそのまま印刷する際に生じる予期しない不都合、例えばページサイズが媒体のサイズより大きいことにより一部が印刷されないといった不都合などを回避することができる。この結果、より適正に印刷することができる。   According to the program for a printing apparatus of the present invention, when a description document is designated by being installed in the printing apparatus, the tree structure corresponding to the designated description document is first analyzed and described in the description document. The form data corresponding to the form document is analyzed, and the analyzed tree structure is associated with the analyzed form data. Subsequently, when the layout creation instruction is given, the layout of the object on the medium is paged based on the analyzed tree structure, the style data associated with the tree structure, and the medium size set by the size setting means. Create each. When a print execution instruction is issued, an object is acquired based on the layout for each page stored in the data storage means, and the object is laid out and printed. As described above, since the layout is also printed based on the size of the medium, an unexpected inconvenience caused when printing the layout based on the tree structure and the style data as it is, for example, the page size is larger than the size of the medium. As a result, it is possible to avoid inconveniences such as a part not being printed. As a result, printing can be performed more appropriately.

次に、本発明を実施するための最良の形態を実施例を用いて説明する。   Next, the best mode for carrying out the present invention will be described using examples.

図1は、本発明の一実施例としてのカラーインクジェットプリンタ20の構成の概略を示す構成図である。実施例のカラーインクジェットプリンタ20は、図示するように、コンピュータ10やデジタルテレビ12,デジタルカメラ14などと接続してデジタル画像(以下、画像という)の入力を司る入力インターフェース22と、入力インタフェース22に入力される画像の形式に基づいてデータの出力先を割り振る信号処理部24と、マークアップ言語としてのXHTML(eXtensible Hyper Text Markup Language)により記述されたXHTML文書を解析して要素の木構造としてのDOM(Document Object Model)ツリーを作成してメモリ50に書き込むと共にCSS(Cascading Style Sheets)により記述されたCSS文書を読み込んでスタイルオブジェクトを作成してフラッシュメモリ52に書き込む解析部30と、解析部30により作成されたDOMツリーとスタイルオブジェクトとを用いてXHTML文書に記述された要素(オブジェクト)としての画像やテキストを印刷用の印刷用のページ毎にレイアウトしてページボックスとしてメモリ50に書き込むレイアウタ38と、レイアウタ38によりレイアウトして得られるページボックスを用いてRBGデータとしての印刷用画像を描画するレンダリングプラグイン(以下、RPIという)40と、描画されたRGB(Red Green Blue)データの印刷用画面をCMYK(Cyan Magenta Yellow Black)データに変換する色変換部42と、変換されたCMYKデータを誤差拡散処理などの画像処理を行なって2値化する2値化部44と、2値化されたCMYKの各データを図示しない印刷ヘッドを備える印刷実行部48にバンド単位で出力するために一時的にデータを蓄えるイメージバッファ46と、各種設定を行なう操作部60とを備える。   FIG. 1 is a configuration diagram showing an outline of the configuration of a color inkjet printer 20 as an embodiment of the present invention. As shown in the figure, the color inkjet printer 20 of the embodiment is connected to a computer 10, a digital television 12, a digital camera 14, etc., and an input interface 22 that controls input of a digital image (hereinafter referred to as an image) Analyzing an XHTML document described in XHTML (eXtensible Hyper Text Markup Language) as a markup language by assigning an output destination of data based on the format of the input image, and as an element tree structure A DOM (Document Object Model) tree is created and written to the memory 50, and a CSS document described in CSS (Cascading Style Sheets) is read to read the style object. An image and text as elements (objects) described in the XHTML document using the analysis unit 30 that creates a text and writes it to the flash memory 52, and the DOM tree and style object created by the analysis unit 30 for printing. A layout plug-in (hereinafter referred to as RPI) that renders an image for printing as RBG data using a layout 38 that is laid out for each page for printing and written to the memory 50 as a page box, and a page box obtained by layout by the layouter 38. 40), a color conversion unit 42 that converts a print screen of rendered RGB (Red Green Blue) data into CMYK (Cyan Magenta Yellow Black) data, and image processing such as error diffusion processing on the converted CMYK data The line The binarization unit 44 for binarization and the image buffer 46 for temporarily storing data for outputting the binarized CMYK data in units of bands to a print execution unit 48 having a print head (not shown). And an operation unit 60 for performing various settings.

信号処理部24は、入力された信号が直ちに印刷可能な印刷用データの場合には印刷実行部48のイメージバッファ46にデータを出力し、RGBデータの場合にはメモリ50の印刷用画面格納領域に出力し、XHTML文書で記述されたファイルの場合には解析部30に出力する。   The signal processing unit 24 outputs the data to the image buffer 46 of the print execution unit 48 when the input signal is printable data that can be printed immediately, and the print screen storage area of the memory 50 when the input signal is RGB data. In the case of a file described in an XHTML document, it is output to the analysis unit 30.

解析部30は、XHTML文書の解析を指示することによりDOMツリーを作成するコア32と、コア32からの指示に基づいてXHTML文書を解析するXMLパーサー34と、作成されたDOMツリーのlinkタグ内の初期化処理により依頼されたCSS文書を解析するCSSプラグイン(以下、CSSPIという)36とから構成されている。   The analysis unit 30 includes a core 32 that creates a DOM tree by instructing analysis of an XHTML document, an XML parser 34 that analyzes an XHTML document based on an instruction from the core 32, and a link tag of the created DOM tree. The CSS plug-in (hereinafter referred to as CSSI) 36 for analyzing the CSS document requested by the initialization process of FIG.

操作部60は、プリンタ正面に配置された液晶ディスプレイ61と、その横に設けられた二つの操作ボタン62と、内部にワンチップとして構成されたCPU63,ROM64,ディスプレイコントローラ(以下、LCDCという)65,メモリ66と、を備える。この操作部60により設定する内容としては、例えば、装着されている印刷用紙の種類やサイズ,インクの種類などであり、設定は、操作ボタン62の操作に基づいてROM64に予め記憶された処理プログラムが起動され、この処理プログラムにより液晶ディスプレイ61に表示されるメニューに従って行なわれる。例えば、用紙サイズの設定の場合、メニューから用紙サイズを選択し、液晶ディスプレイ61にトグルして表示される「A4縦」や「B5縦」などから選択することにより設定するのである。こうして設定した内容は、メモリ66に書き込まれる。なお、実施例では、操作部60による設定を行なわなくても、デフォルトとして、例えば印刷用紙の種類としては「普通紙」,用紙サイズとしては「A4縦」,インクの種類としては「顔料系」などが設定されている。こうした操作部60による設定処理は、本発明の中核をなさないからこれ以上の説明については省略する。   The operation unit 60 includes a liquid crystal display 61 arranged in front of the printer, two operation buttons 62 provided on the side, a CPU 63, a ROM 64, a display controller (hereinafter referred to as LCDC) 65 configured as one chip inside. , And a memory 66. The contents set by the operation unit 60 include, for example, the type and size of the loaded printing paper, the type of ink, and the setting is a processing program stored in advance in the ROM 64 based on the operation of the operation button 62. Is started according to the menu displayed on the liquid crystal display 61 by this processing program. For example, in the case of setting the paper size, the paper size is selected from the menu and is set by selecting from “A4 portrait”, “B5 portrait”, etc. displayed by being toggled on the liquid crystal display 61. The contents set in this way are written into the memory 66. In the embodiment, even if the setting by the operation unit 60 is not performed, as a default, for example, “plain paper” as the type of printing paper, “A4 portrait” as the paper size, and “pigment type” as the ink type. Etc. are set. Since the setting process by the operation unit 60 does not form the core of the present invention, further description is omitted.

次に、こうして構成された実施例のカラーインクジェットプリンタ20の動作、特にXHTML文書を印刷する際の動作について説明する。図2は、解析部30により実行される解析レイアウト指示処理の一例を示すフローチャートである。この処理は所定時間毎(例えば、8msec毎)に繰り返し実行される。解析レイアウト指示処理が実行されると、まず、XHTML文書を特定するためのURL(Uniform Resouce Locator)の指定があるか否かを判定し(ステップS100)、URLの指定があるときにはそのURLをメモリ50に領域設定されたURL格納用バッファ領域に格納し(ステップS110)、URLの指定がないときには次の処理に進む。URL指定は、例えば、操作者がデジタルテレビ12で表示された印刷可能な項目のうちカラーインクジェットプリンタ20で印刷しようとする項目を選択したときデジタルテレビ12からのカラーインクジェットプリンタ20に出力されることにより行なうものとすることができるし、コンピュータ10から単にURLを選択してカラーインクジェットプリンタ20に印刷要求することによっても行なうことができる。なお、コンピュータ10からのURL指定では、コンピュータ10によってもXHTML文書の解析やレイアウト,色変換や2値化などを行なうことができるが、コンピュータ10によってはこうした処理を一切行なわず、URLだけをカラーインクジェットプリンタ20に送信する場合となる。   Next, the operation of the color ink jet printer 20 of the embodiment configured as described above, particularly the operation when printing an XHTML document will be described. FIG. 2 is a flowchart illustrating an example of the analysis layout instruction process executed by the analysis unit 30. This process is repeatedly executed every predetermined time (for example, every 8 msec). When the analysis layout instruction process is executed, first, it is determined whether or not a URL (Uniform Resource Locator) for specifying an XHTML document is specified (step S100). If a URL is specified, the URL is stored in the memory. 50 is stored in the URL storage buffer area set in the area 50 (step S110), and if no URL is designated, the process proceeds to the next process. The URL designation is output to the color inkjet printer 20 from the digital television 12 when the operator selects an item to be printed by the color inkjet printer 20 among the printable items displayed on the digital television 12. Or by simply selecting a URL from the computer 10 and making a print request to the color inkjet printer 20. In the URL designation from the computer 10, the XHTML document can be analyzed, laid out, color converted, binarized, etc. by the computer 10, but the computer 10 does not perform such processing at all, and only the URL is colored. In this case, the data is transmitted to the ink jet printer 20.

続いて、メモリ50のURL格納用バッファ領域にURLが格納されているか否かを判定すると共に(ステップS120)、XHTML文書を現在解析中であるか否かを判定する(ステップS130)。XHTML文書を現在解析中であるか否かの判定は、この解析レイアウト指示処理と同時に並列に解析部30自信によって行なっているか否かを判定することにより、例えば解析開始時と解析終了時にフラグ操作するものとすればフラグを調べることにより行なうことができる。URLが格納されており、現在XHTML文書の解析中ではないときには、メモリ50のURL格納用バッファ領域に格納されている最初のURLを読み出してそのURLにより特定されるXHTML文書の解析を開始し(ステップS140)、URLが格納されていないときやURLが格納されていても現在XHTML文書を解析している最中のときには次の処理に進む。XHTML文書の解析は、図3に例示する解析処理に基づいて行なわれる。この解析処理ではURLにより特定されるXHTML文書が解析されてDOMツリーが作成され、XHTML文書に記述されたCSS文書を解析してスタイルオブジェクトが作成され、DOMツリーについてはその識別情報としてDOMツリーIDが付与されてメモリ50のDOMツリー用格納領域に記憶され、スタイルオブジェクトについてはその識別情報としてスタイルオブジェクトID(実施例では、CSS文書名)が付与されてフラッシュメモリ52に記憶される。解析処理の詳細については後述する。   Subsequently, it is determined whether or not the URL is stored in the URL storage buffer area of the memory 50 (step S120), and whether or not the XHTML document is currently being analyzed is determined (step S130). Whether or not the XHTML document is currently being analyzed is determined by determining whether or not the analysis unit 30 is confident in parallel with the analysis layout instruction processing, for example, at the start of analysis and at the end of analysis. If so, this can be done by checking the flag. When the URL is stored and the XHTML document is not currently being analyzed, the first URL stored in the URL storage buffer area of the memory 50 is read and analysis of the XHTML document specified by the URL is started ( In step S140, when the URL is not stored or when the XHTML document is currently being analyzed even if the URL is stored, the process proceeds to the next process. The analysis of the XHTML document is performed based on the analysis process illustrated in FIG. In this analysis process, the XHTML document specified by the URL is analyzed to create a DOM tree, the CSS document described in the XHTML document is analyzed to generate a style object, and the DOM tree ID is used as identification information for the DOM tree. Is stored in the DOM tree storage area of the memory 50, and the style object ID (in the embodiment, CSS document name) is added as identification information for the style object and stored in the flash memory 52. Details of the analysis processing will be described later.

次に、レイアウタ38によってレイアウトが行なわれている最中であるか否かを判定し(ステップS150)、レイアウタ38によるレイアウトが行なわれていないときにはメモリ50のDOMツリー用格納領域に格納されたDOMツリーのうち最初のDOMツリーをDOMツリーIDを用いて指定してレイアウタ38にレイアウト開始指示を出力し(ステップS160)、この解析レイアウト指示処理を終了し、レイアウタ38によってレイアウトが行なわれている最中であるときにはレイアウト開始指示を出力せずに解析レイアウト指示処理を終了する。ここで、レイアウタ38によってレイアウトが行なわれている最中であるか否かの判定は、レイアウタ38からレイアウト終了の信号を入力したか否かにより行なうことができる。レイアウト終了の信号の受信についてはレイアウタ38の処理を説明する際に詳述する。   Next, it is determined whether the layout is being performed by the layouter 38 (step S150). When the layout is not performed by the layouter 38, the DOM stored in the DOM tree storage area of the memory 50 is determined. The first DOM tree in the tree is designated using the DOM tree ID, and a layout start instruction is output to the layouter 38 (step S160). This analysis layout instruction processing is terminated, and the layout layout 38 is being executed. When it is in the middle, the analysis layout instruction process is terminated without outputting the layout start instruction. Here, whether or not the layout is being performed by the layouter 38 can be determined based on whether or not a layout end signal is input from the layouter 38. The reception of the layout end signal will be described in detail when the processing of the layout 38 is described.

こうした解析レイアウト指示処理は、前述したように繰り返し実行されるから、解析部30ではURLが指定される毎にXHTML文書の解析中であるか否かに拘わらずに指定されたURLをメモリ50のURL格納用バッファ領域に格納する。また、メモリ50のURL格納用バッファ領域にURLが格納されているときには、レイアウタ38によるレイアウトの実行中であるか否かに拘わらずにXHTML文書の解析を順次行なう。従って、メモリ50のURL格納用バッファ領域には複数のURLが格納される場合が生じ、DOMツリー用格納領域に複数のDOMツリーが格納される場合が生じ、フラッシュメモリ52に複数のスタイルオブジェクトが格納される場合が生じる。実施例では、複数のURLを格納することができるようにURL格納用バッファ領域が設定されており、複数のDOMツリーを格納することができるようにDOMツリー用格納領域が設定されており、複数のスタイルオブジェクトを格納することができるようにフラッシュメモリ52の容量が確保されている。   Since such an analysis layout instruction process is repeatedly executed as described above, every time the URL is specified in the analysis unit 30, the specified URL is stored in the memory 50 regardless of whether or not the XHTML document is being analyzed. Store in the URL storage buffer area. When a URL is stored in the URL storage buffer area of the memory 50, XHTML documents are sequentially analyzed regardless of whether the layout by the layouter 38 is being executed. Accordingly, a plurality of URLs may be stored in the URL storage buffer area of the memory 50, a plurality of DOM trees may be stored in the DOM tree storage area, and a plurality of style objects are stored in the flash memory 52. It may be stored. In the embodiment, a URL storage buffer area is set so that a plurality of URLs can be stored, and a DOM tree storage area is set so that a plurality of DOM trees can be stored. The capacity of the flash memory 52 is secured so that the style objects can be stored.

次に、解析部30により実行される解析処理について説明する。解析処理は、前述したように図3に例示するフローチャートに基づいて行なわれる。説明の容易のために具体例として図4に例示するXHTML文書を用いて説明する。図5は、この具体例のXHTML文書により用いられているJPEG形式として格納された5つの画像の一例を示す。解析レイアウト指示処理によりURLを指定して解析開始の指示がなされると、URLにより特定されるXHTML文書を読み出し(ステップS200)、読み出したXHTML文書を解析してDOMツリーを作成する(ステップS210)。このとき、作成するDOMツリーには識別情報としてDOMツリーID(例えば、URLにDOMを付して作成したIDなど)を付与する。XHTML文書の読み出しは、具体的には、コア32がURLを指定してXMLパーサー34に解析依頼することによりXMLパーサー34が行なう。XHTML文書の解析およびDOMツリーの作成は、具体的には、XMLパーサー34がXHTML文書を最初から順に解析して各要素を作成すると共にDOMツリーに登録することにより行なう。なお、要素の作成はコア32に対して行ない、要素の登録はメモリ50のDOMツリー用格納領域に関連付けて格納することにより行なう。図4に例示したXHTML文書を解析して作成されたDOMツリーを図6に示す。   Next, analysis processing executed by the analysis unit 30 will be described. The analysis process is performed based on the flowchart illustrated in FIG. 3 as described above. For ease of explanation, a specific example will be described using the XHTML document illustrated in FIG. FIG. 5 shows an example of five images stored as the JPEG format used by the XHTML document of this specific example. When a URL is specified by the analysis layout instruction process and an analysis start instruction is given, the XHTML document specified by the URL is read (step S200), and the read XHTML document is analyzed to create a DOM tree (step S210). . At this time, a DOM tree ID (for example, an ID created by adding a DOM to a URL) is assigned as identification information to the DOM tree to be created. Specifically, the XHTML document is read by the XML parser 34 when the core 32 designates a URL and requests an analysis to the XML parser 34. Specifically, the analysis of the XHTML document and the creation of the DOM tree are performed by the XML parser 34 analyzing the XHTML document from the beginning in order to create each element and register it in the DOM tree. The element is created for the core 32, and the element is registered by associating it with the DOM tree storage area of the memory 50. FIG. 6 shows a DOM tree created by analyzing the XHTML document illustrated in FIG.

こうしてDOMツリーを作成すると、XHTML文書に指定されたCSS文書名をスタイルオブジェクトIDとするスタイルオブジェクトがフラッシュメモリ52に記憶されているか否かを検索する(ステップS220)。スタイルオブジェクトが記憶されていないときには、XHTML文書に指定されたCSS文書を読み出して解析し、スタイルオブジェクトを作成する(ステップS250)。CSS文書の読み出しは、具体的には、DOMツリーのlinkタグ内の初期化処理内の依頼により依頼されたCSSPI36が行なう。CSS文書の解析およびスタイルオブジェクトの作成は、具体的には、CSSPI36がCSS文書を最初から順に解析して各ルールをフラッシュメモリ52に格納することにより行なう。この際、CSS文書名をスタイルオブジェクトIDとすると共にこのスタイルオブジェクトIDとスタイルオブジェクトを作成した日時とをフラッシュメモリ52に格納したスタイルオブジェクトに関連付けて格納する。図7に具体例のXHTML文書により指定されたCSS文書の一例を示し、図8にこのCSS文書を解析して作成されたスタイルオブジェクトの一例を示す。   When the DOM tree is created in this way, it is searched whether or not a style object having the CSS document name specified in the XHTML document as the style object ID is stored in the flash memory 52 (step S220). When the style object is not stored, the CSS document designated as the XHTML document is read and analyzed to create a style object (step S250). Specifically, the CSS document 36 is read by the request in the initialization process in the link tag of the DOM tree. Specifically, the CSS document is analyzed and the style object is created by the CSSI 36 analyzing the CSS document in order from the beginning and storing each rule in the flash memory 52. At this time, the CSS document name is used as the style object ID, and the style object ID and the date and time when the style object is created are stored in association with the style object stored in the flash memory 52. FIG. 7 shows an example of a CSS document designated by a specific example XHTML document, and FIG. 8 shows an example of a style object created by analyzing the CSS document.

一方、XHTML文書に指定されたCSS文書名をスタイルオブジェクトIDとするスタイルオブジェクトがフラッシュメモリ52に記憶されているときには、そのスタイルオブジェクトが格納された日時が所定期間内であるか否かを判定する(ステップS240)。ここで、所定期間としては、例えば1日や3日,1週間,1ヶ月など種々の期間を用いることができる。このように、スタイルオブジェクトが格納された日時が所定期間内であるか否かを判定するのは、CSS文書が更新などにより書き替えられる場合があるからである。スタイルオブジェクトが格納された日時が所定期間内ではないときには、スタイルオブジェクトが記憶されていないときには、XHTML文書に指定されたCSS文書を読み出して解析し、スタイルオブジェクトを作成する(ステップS250)。この際、作成したスタイルオブジェクトは、対応するCSS文書名をスタイルオブジェクトIDとしてフラッシュメモリ52に記憶されるから、同一のスタイルオブジェクトIDと共にフラッシュメモリ52に記憶されているスタイルオブジェクトは新たに解析されたスタイルオブジェクトにより上書きされることになる。   On the other hand, when a style object whose style object ID is the CSS document name specified in the XHTML document is stored in the flash memory 52, it is determined whether or not the date and time when the style object is stored is within a predetermined period. (Step S240). Here, various periods such as one day, three days, one week, and one month can be used as the predetermined period. Thus, the reason why it is determined whether the date and time when the style object is stored is within a predetermined period is that the CSS document may be rewritten by updating or the like. When the date and time when the style object is stored is not within the predetermined period, if the style object is not stored, the CSS document specified in the XHTML document is read and analyzed to create a style object (step S250). At this time, since the created style object is stored in the flash memory 52 with the corresponding CSS document name as the style object ID, the style object stored in the flash memory 52 together with the same style object ID is newly analyzed. It will be overwritten by the style object.

こうしてスタイルオブジェクトを作成するか、所定期間内に格納された対応するスタイルオブジェクトがフラッシュメモリ52に格納されているときには、作成したDOMツリーと対応するスタイルオブジェクトとの関連付け処理を実行し(ステップS260)、URL格納用バッファ領域から解析の対象のURLを削除して(ステップS270)、解析処理を終了する。   In this way, the style object is created, or when the corresponding style object stored within the predetermined period is stored in the flash memory 52, a process of associating the created DOM tree with the corresponding style object is executed (step S260). The URL to be analyzed is deleted from the URL storage buffer area (step S270), and the analysis process is terminated.

次に、レイアウタ38の処理について説明する。図9は、解析部30によりDOMツリーを指定してレイアウト開始指示がなされたときにレイアウタ38により実行されるレイアウト描画指示処理の一例を示すフローチャートである。レイアウト描画指示処理が実行されると、レイアウタ38は、まず、指定されたDOMツリーに基づいてレイアウトを開始する(ステップS300)。レイアウトは、図10に例示するレイアウト処理により実行される。説明の都合上、ここで、レイアウト処理について説明する。   Next, processing of the layouter 38 will be described. FIG. 9 is a flowchart illustrating an example of a layout drawing instruction process executed by the layouter 38 when the analysis unit 30 designates a DOM tree and issues a layout start instruction. When the layout drawing instruction process is executed, the layouter 38 first starts layout based on the designated DOM tree (step S300). The layout is executed by the layout process illustrated in FIG. For convenience of explanation, layout processing will be described here.

レイアウト処理では、レイアウタ38は、まず、操作部60から設定されている用紙サイズを取得すると共に(ステップS400)、DOMツリーに関連付けられたスタイルオブジェクトからページサイズを取得し(ステップS405)、取得した用紙サイズとページサイズとを比較する(ステップS410)。ページサイズが用紙サイズより大きいときには、適正なレイアウトができないと判断し、用紙サイズをページサイズとして設定する(ステップS415)。そして、用紙サイズからレイアウト可能な要素の最大サイズを設定すると共にスタイルオブジェクトのサイズを設定した最大サイズに制限する(ステップS425)。最大サイズは、例えば用紙サイズから上下左右のマージンをとった後の上下左右のサイズとして設定することができる。スタイルオブジェクトのサイズの制限は、例えば図8に示す「StyleRule」の「width」や「height」が最大サイズを超えているときには「width」と「height」との比率を保持したまま最大サイズ内となるよう「width」と「height」とを変更することにより行なう。このように、比率を保持することにより、縦方向だけ或いは横方向だけが制限されることによる予期しない変形を回避することができる。なお、ステップ410で用紙サイズがページサイズ以上のときにはページサイズの設定や要素の最大サイズの制限は行なわれない。こうした用紙サイズとページサイズとに基づく処理を終了すると、次に、DOMツリーの各要素に対してその要素の特性に従って要素ボックスを作成する(ステップS430)。例えば、要素が画像であればイメージボックスを作成し、要素がテキストであればテキストボックスを作成するのである。続いて、ページサイズに基づいてページ毎に対応するページボックスを作成し(ステップS435)、そのページボックスの下にbodyタグ内の要素ボックスをレイアウトできなくなるまで順にレイアウトする(ステップS440〜S450)。要素ボックスのレイアウトは、イメージボックスの場合には最大サイズに制限された画像サイズに基づいて行を作成してイメージボックスを登録することにより行なわれる。画像サイズによりイメージボックスをレイアウトすることができないときにはステップS445でレイアウト不可の判定がなされ、次ページに対応するページボックスが作成される(ステップS435)。また、要素ボックスがテキストボックスの場合には、要素ボックスのレイアウトは、行に入るだけのテキストボックスを生成して行に登録し、残余のテキストについては、行を作成し、作成した行に入るだけのテキストボックスを作成して登録することを繰り返すことにより行なわれる。なお、ページの最終行にテキストボックスを登録しても、テキストのすべてを登録できないときには、ステップS445でレイアウト不可の判定がなされ、次ページに対応するページボックスが作成され、残余のテキストを同様にしてテキストボックスとして行に登録する。図11に具体例のDOMツリーを用いてレイアウトした際の各ページのページボックスを示す。こうしてすべての要素ボックスをレイアウトすると、指定されたDOMツリーをメモリ50のDOMツリー用格納領域から削除して(ステップS455)、レイアウト処理を終了する。このように、レイアウト処理を終了するときに用いたDOMツリーをメモリ50のDOMツリー用格納領域から削除することにより、DOMツリー用格納領域に不要なDOMツリーが格納された状態が継続されるのを回避することができる。この結果、解析部30によって作成される新たなDOMツリーの格納領域を確保することができる。   In the layout process, the layouter 38 first acquires the paper size set from the operation unit 60 (step S400), and also acquires the page size from the style object associated with the DOM tree (step S405). The paper size is compared with the page size (step S410). If the page size is larger than the paper size, it is determined that an appropriate layout is not possible, and the paper size is set as the page size (step S415). Then, the maximum size of elements that can be laid out is set from the paper size, and the size of the style object is limited to the set maximum size (step S425). The maximum size can be set, for example, as the vertical and horizontal sizes after taking the vertical and horizontal margins from the paper size. For example, when the “styleRule” “width” or “height” of the “StyleRule” shown in FIG. 8 exceeds the maximum size, the style object size is limited within the maximum size while maintaining the ratio between “width” and “height”. This is done by changing “width” and “height”. In this way, by maintaining the ratio, it is possible to avoid an unexpected deformation caused by limiting only the vertical direction or only the horizontal direction. When the paper size is greater than or equal to the page size in step 410, the page size is not set and the maximum element size is not limited. When the processing based on the paper size and page size is completed, an element box is created for each element of the DOM tree according to the characteristics of the element (step S430). For example, if the element is an image, an image box is created, and if the element is text, a text box is created. Subsequently, a page box corresponding to each page is created based on the page size (step S435), and the element box in the body tag is laid out in order until it becomes impossible to lay out under the page box (steps S440 to S450). In the case of an image box, the element box is laid out by creating a row based on the image size limited to the maximum size and registering the image box. When the image box cannot be laid out according to the image size, it is determined in step S445 that the layout is not possible, and a page box corresponding to the next page is created (step S435). If the element box is a text box, the layout of the element box creates a text box that fits in the line, registers it in the line, creates a line for the remaining text, and enters the created line. This is done by repeatedly creating and registering just a text box. Note that even if the text box is registered in the last line of the page, if all of the text cannot be registered, it is determined in step S445 that the layout is not possible, a page box corresponding to the next page is created, and the remaining text is similarly set. And register it in a line as a text box. FIG. 11 shows a page box of each page when laying out using a specific example DOM tree. When all the element boxes are laid out in this way, the designated DOM tree is deleted from the DOM tree storage area of the memory 50 (step S455), and the layout process is terminated. As described above, by deleting the DOM tree used when the layout process is completed from the DOM tree storage area of the memory 50, the state where the unnecessary DOM tree is stored in the DOM tree storage area is continued. Can be avoided. As a result, a storage area for a new DOM tree created by the analysis unit 30 can be secured.

レイアウト描画指示処理(図9)の説明に戻る。レイアウトを開始すると、最初のページ分のレイアウトが完了するのを待って(ステップS310)、レイアウトが完了したページを指定してRPI40に描画開始指示を出力する(ステップS320)。ページ分のレイアウトが完了したか否かの判定は、次ページに対応するページボックスが作成されたか否かにより、1ページだけしかないときにはレイアウト処理が終了したか否かにより行なうことができる。描画開始指示されたRPI40は、図12に例示する描画処理を実行し、ページボックスに従ってテキストや画像をメモリ50の印刷用画像格納領域を用いてRGBデータとして描画し(ステップS500)、描画が終了したときに色変換部42に色変換指示を出力すると共に(ステップS510)、描画終了をレイアウタ38に出力する。なお、画像の描画については、画像ファイルを読み出し、ファイル形式によっては展開等を行なって描画する。図13に具体例の印刷結果の一例を示す。図中の破線はbodyタグ内のdivタグの領域を示し、画像の上部および左側部の「12cm」はCSS文書により記述された画像サイズを示す。実際の印刷結果には、こうしたdivタグの領域や画像サイズは表示されないのは言うまでもない。   Returning to the description of the layout drawing instruction process (FIG. 9). When the layout is started, it waits for the layout of the first page to be completed (step S310), specifies the page for which the layout has been completed, and outputs a drawing start instruction to the RPI 40 (step S320). Whether or not the layout for the page has been completed can be determined based on whether or not the page box corresponding to the next page has been created and whether or not the layout processing has been completed when there is only one page. The RPI 40 instructed to start drawing executes the drawing process illustrated in FIG. 12, draws text and images as RGB data using the print image storage area of the memory 50 according to the page box (step S500), and the drawing ends. In this case, a color conversion instruction is output to the color conversion unit 42 (step S510), and a drawing end is output to the layouter 38. For image drawing, an image file is read and, depending on the file format, is developed and drawn. FIG. 13 shows an example of a print result of a specific example. The broken line in the figure indicates the area of the div tag in the body tag, and “12 cm” at the top and left side of the image indicates the image size described by the CSS document. It goes without saying that the area of the div tag and the image size are not displayed in the actual print result.

描画開始指示を出力した後はそのページの描画が終了するのを待って(ステップS330)、そのページに対応するページボックスを削除する(ステップS340)。このように、ページの描画が終了する毎にそのページに対応するページボックスを削除することにより、ボックス用格納領域に不要なページボックスが格納された状態が継続されるのを回避することができる。こうしてページボックスを削除すると、次ページがあるか否かを判定し(ステップS350)、次ページがあるときにはステップS310の処理に戻る。即ち、次ページに対するページ分のレイアウトが完了しているか否かを判定し、レイアウトが完了していないときには完了するまで待ってレイアウトが完了したページを指定してRPI40に描画開始指示を出力するのである。こうしてすべてのページを描画し、次ページがなくなると、レイアウト終了を解析部30に出力して(ステップS360)、レイアウト描画指示処理を終了する。このように、レイアウタ38からレイアウト終了の信号を解析部30に出力することにより、解析部30は、レイアウタ38によるレイアウトの最中であるか否かを判定することができる。   After outputting the drawing start instruction, it waits for the drawing of the page to end (step S330), and deletes the page box corresponding to the page (step S340). In this way, by deleting the page box corresponding to the page every time drawing of the page is completed, it is possible to avoid the state where unnecessary page boxes are stored in the box storage area. . When the page box is deleted in this way, it is determined whether or not there is a next page (step S350). If there is a next page, the process returns to step S310. That is, it is determined whether or not the layout for the next page has been completed. If the layout has not been completed, the process waits until the layout is completed, specifies the page for which the layout has been completed, and outputs a drawing start instruction to the RPI 40. is there. When all pages are drawn in this way and there is no next page, the end of layout is output to the analysis unit 30 (step S360), and the layout drawing instruction processing is ended. In this way, by outputting a layout end signal from the layouter 38 to the analysis unit 30, the analysis unit 30 can determine whether the layout by the layouter 38 is in progress.

以上説明した実施例のカラーインクジェットプリンタ20によれば、CSS文書を解析したスタイルオブジェクトにおけるページサイズが操作部60により設定された用紙サイズより大きいときには、用紙サイズをページサイズとして設定し、用紙サイズから求められる要素の最大サイズによりスタイルオブジェクトのサイズを制限し、設定したページサイズや制限されたサイズを用いてレイアウトして印刷することができる。この結果、ページサイズが印刷サイズより大きいときに生じる不都合、例えば、印刷すべき内容の一部が印刷されないといった不都合を回避することができる。従って、XHTML文書をより適正に印刷することができる。   According to the color inkjet printer 20 of the embodiment described above, when the page size in the style object obtained by analyzing the CSS document is larger than the paper size set by the operation unit 60, the paper size is set as the page size. The size of the style object is limited by the maximum size of the required element, and the layout can be printed using the set page size or the limited size. As a result, it is possible to avoid inconveniences that occur when the page size is larger than the print size, for example, inconveniences in which part of the content to be printed is not printed. Therefore, the XHTML document can be printed more appropriately.

また、実施例のカラーインクジェットプリンタ20によれば、URLが指定される毎にXHTML文書の解析中であるか否かに拘わらずに指定されたURLをメモリ50のURL格納用バッファ領域に格納することができる。また、メモリ50のURL格納用バッファ領域にURLが格納されているときには、レイアウタ38によるレイアウトの実行中であるか否かに拘わらずにXHTML文書の解析を順次行なうことができる。この結果、レイアウタ38によるレイアウトの実行中であるか否かに拘わらず、URLの指定を格納し、URLにより特定されるXHTML文書を読み込んで解析することができる。したがって、印刷を完了する毎にURLにより特定されるXHTML文書を読み込んで解析して印刷するものに比して、迅速に解析して印刷することができる。   Further, according to the color inkjet printer 20 of the embodiment, every time a URL is specified, the specified URL is stored in the URL storage buffer area of the memory 50 regardless of whether the XHTML document is being analyzed. be able to. Further, when the URL is stored in the URL storage buffer area of the memory 50, the XHTML document can be sequentially analyzed regardless of whether the layout is being executed by the layouter 38 or not. As a result, regardless of whether the layout is being executed by the layouter 38, the designation of the URL can be stored, and the XHTML document specified by the URL can be read and analyzed. Therefore, each time printing is completed, the XHTML document specified by the URL is read, analyzed, and printed more quickly than when it is printed.

さらに、実施例のカラーインクジェットプリンタ20によれば、XHTML文書に指定されたCSS文書名をスタイルオブジェクトIDとするスタイルオブジェクトがフラッシュメモリ52に記憶されており、そのスタイルオブジェクトが格納された日時が所定期間内のときには、CSS文書の解析してスタイルオブジェクトを作成することなしに、その後の処理を実行するから、常にCSS文書を解析してスタイルオブジェクトを作成するものに比して、解析処理を迅速に終了することができる。この結果、迅速に印刷することができる。しかも、スタイルオブジェクトがフラッシュメモリ52に記憶されていても、そのスタイルオブジェクトが格納された日時が所定期間を超えているときにはCSS文書を解析してスタイルオブジェクトを作成するから、所定期間を経過したスタイルオブジェクト、即ち古いスタイルオブジェクトを用いて印刷するのを回避することができる。   Further, according to the color inkjet printer 20 of the embodiment, the style object having the CSS object name specified in the XHTML document as the style object ID is stored in the flash memory 52, and the date and time when the style object is stored is predetermined. When it is within the period, the subsequent processing is executed without creating a style object by analyzing the CSS document. Therefore, the analysis process can be performed more quickly than the case where the style object is always created by analyzing the CSS document. Can be finished. As a result, it is possible to print quickly. Moreover, even if the style object is stored in the flash memory 52, the style object is created by analyzing the CSS document when the date and time when the style object is stored exceeds the predetermined period. Printing with objects, ie old style objects, can be avoided.

ここで、実施例のカラーインクジェットプリンタ20では、操作部60がサイズ設定手段に相当し、メモリ50やフラッシュメモリ52がデータ記憶手段に相当し、XMLパーサー34が構造解析手段に相当し、CSSPI36が様式解析手段に相当し、コア32が解析指示手段に相当し、レイアウタ38がレイアウト作成手段に相当し、RPI40と色変換部42と2値化部44とイメージバッファ46と印刷実行部48とが印刷実行手段に相当する。   Here, in the color inkjet printer 20 of the embodiment, the operation unit 60 corresponds to the size setting unit, the memory 50 and the flash memory 52 correspond to the data storage unit, the XML parser 34 corresponds to the structure analysis unit, and the CSSI 36 Corresponding to the style analysis means, the core 32 corresponds to the analysis instruction means, the layouter 38 corresponds to the layout creation means, the RPI 40, the color conversion section 42, the binarization section 44, the image buffer 46, and the print execution section 48. This corresponds to the print execution means.

実施例のカラーインクジェットプリンタ20では、CSS文書を解析したスタイルオブジェクトにおけるページサイズが操作部60により設定された用紙サイズより大きいときには用紙サイズをページサイズとして設定すると共に用紙サイズから求められる要素の最大サイズによりスタイルオブジェクトのサイズを制限するものとしたが、要素の最大サイズによるスタイルオブジェクトのサイズの制限を行なわないものとしても構わない。   In the color inkjet printer 20 of the embodiment, when the page size in the style object analyzed from the CSS document is larger than the paper size set by the operation unit 60, the paper size is set as the page size and the maximum size of the elements obtained from the paper size is set. However, the size of the style object may not be restricted by the maximum size of the element.

実施例のカラーインクジェットプリンタ20では、メモリ50のURL格納用バッファ領域にURLが格納されているときには、メモリ50のDOMツリー用格納領域に格納されているDOMツリーの数に拘わらずに、XHTML文書の解析を順次行なうものとしたが、メモリ50のDOMツリー用格納領域に格納されているDOMツリーが所定数のときには所定数未満となるまで次のXHTML文書の解析を保留するものとしてもよい。所定数としては例えば値2をとすることができる。こうすれば、メモリ50のDOMツリー用格納領域を小さくすることができる。   In the color inkjet printer 20 of the embodiment, when the URL is stored in the URL storage buffer area of the memory 50, the XHTML document is used regardless of the number of DOM trees stored in the DOM tree storage area of the memory 50. However, when the number of DOM trees stored in the DOM tree storage area of the memory 50 is a predetermined number, the analysis of the next XHTML document may be suspended until the number becomes less than the predetermined number. For example, a value of 2 can be used as the predetermined number. In this way, the storage area for the DOM tree in the memory 50 can be reduced.

実施例のカラーインクジェットプリンタ20では、メモリ50のURL格納用バッファ領域にURLが格納されているときには、XHTML文書の解析を終了次第、直ちに次のXHTML文書を解析するものとしたが、XHTML文書の解析を終了した以降であれば如何なるタイミングで次のXHTML文書を解析するものとしてもよい。   In the color inkjet printer 20 of the embodiment, when the URL is stored in the URL storage buffer area of the memory 50, the analysis of the XHTML document is immediately performed upon completion of the analysis of the XHTML document. After the analysis is completed, the next XHTML document may be analyzed at any timing.

実施例のカラーインクジェットプリンタ20では、URLが指定される毎にXHTML文書の解析中であるか否かに拘わらずに指定されたURLをメモリ50のURL格納用バッファ領域に格納すると共にメモリ50のURL格納用バッファ領域にURLが格納されているときにはレイアウタ38によるレイアウトの実行中であるか否かに拘わらずにXHTML文書の解析を順次行なうものとしたが、レイアウトの実行中などの印刷処理を実行しているときにはXHTML文書の解析を行なわないものとしてもよい。この場合、URLの受け付けも印刷処理が終了したときに行なうものとしても差し支えない。   In the color inkjet printer 20 of the embodiment, every time a URL is specified, the specified URL is stored in the URL storage buffer area of the memory 50 regardless of whether the XHTML document is being analyzed or not. When the URL is stored in the URL storage buffer area, the XHTML document is sequentially analyzed regardless of whether the layout is being executed by the layouter 38. However, the printing process such as the execution of the layout is performed. During execution, the XHTML document may not be analyzed. In this case, the URL may be accepted when the printing process is completed.

実施例のカラーインクジェットプリンタ20では、スタイルオブジェクトがフラッシュメモリ52に記憶されていても、そのスタイルオブジェクトが格納された日時が所定期間を超えているときにはCSS文書を解析してスタイルオブジェクトを作成し、格納されているスタイルオブジェクトに上書きするものとしたが、電源が投入されたタイミングなどの所定のタイミングで所定期間より前にフラッシュメモリ52に格納されたスタイルオブジェクトを検索して削除するものとしてもよい。この場合、スタイルオブジェクトがフラッシュメモリ52に記憶されていれば、そのスタイルオブジェクトが格納された日時が所定期間内であるか否かを判定することなく、フラッシュメモリ52に記憶されているスタイルオブジェクトと解析したDOMツリーとの関連付け処理を行なうものとすればよい。   In the color inkjet printer 20 of the embodiment, even if the style object is stored in the flash memory 52, when the date and time when the style object is stored exceeds a predetermined period, the CSS document is analyzed to create the style object, Although it is assumed that the stored style object is overwritten, the style object stored in the flash memory 52 before the predetermined period may be searched and deleted at a predetermined timing such as when the power is turned on. . In this case, if the style object is stored in the flash memory 52, the style object stored in the flash memory 52 is determined without determining whether the date and time when the style object is stored is within a predetermined period. The association process with the analyzed DOM tree may be performed.

実施例のカラーインクジェットプリンタ20では、フラッシュメモリ52に記憶するスタイルオブジェクトの数については何ら制限をしないものとしたが、フラッシュメモリ52に記憶するスタイルオブジェクトの数を、例えば5個や10個などのように制限を設けるものとしてもよい。この場合、制限数のスタイルオブジェクトが記憶されている状態で新たなスタイルオブジェクトを記憶するときには、記憶されているスタイルオブジェクトのうち格納した日時が最も古いものを削除するものとすればよい。   In the color inkjet printer 20 of the embodiment, the number of style objects stored in the flash memory 52 is not limited at all. However, the number of style objects stored in the flash memory 52 is, for example, five or ten. In this way, a restriction may be provided. In this case, when a new style object is stored in a state where a limited number of style objects are stored, the stored style object having the oldest stored date and time may be deleted.

実施例のカラーインクジェットプリンタ20では、XHTML文書に指定されたCSS文書名をスタイルオブジェクトIDとするスタイルオブジェクトがフラッシュメモリ52に記憶されており、そのスタイルオブジェクトが格納された日時が所定期間内のときには、CSS文書の解析してスタイルオブジェクトを作成することなしに、その後の処理を実行するものとしたが、常にXHTML文書に指定されたCSS文書を解析するものとしても差し支えない。   In the color inkjet printer 20 of the embodiment, a style object having the CSS document name specified in the XHTML document as the style object ID is stored in the flash memory 52, and the date and time when the style object is stored is within a predetermined period. Although the subsequent processing is executed without creating a style object by analyzing the CSS document, it is also possible to always analyze the CSS document specified in the XHTML document.

実施例のカラーインクジェットプリンタ20では、記述文書としてXHTMLにより記述されたXHTML文書を解析して印刷するものとしたが、他のマークアップ言語により記述された記述文書を解析して印刷するものとしてもよい。また、マークアップ言語以外の言語により記述された文書を解析して印刷するものとしても差し支えない。   In the color inkjet printer 20 of the embodiment, an XHTML document described in XHTML is analyzed and printed as a description document. However, a description document described in another markup language may be analyzed and printed. Good. In addition, a document described in a language other than the markup language may be analyzed and printed.

実施例のカラーインクジェットプリンタ20では、入力インターフェース22に接続される機器としてコンピュータ10やデジタルテレビ12やデジタルカメラ14などを記載したが、如何なる機器を接続するものとしても差し支えない。   In the color inkjet printer 20 of the embodiment, the computer 10, the digital television 12, the digital camera 14, and the like are described as devices connected to the input interface 22, but any device may be connected.

実施例では、XHTML文書を解析して印刷する本発明の印刷装置としてカラーインクジェットプリンタを用いたが、カラーレーザプリンタやモノクロのインジェットプリンタやレーザプリンタなどの種々のプリンタを用いるものとしてもよい。   In the embodiment, a color inkjet printer is used as the printing apparatus of the present invention for analyzing and printing an XHTML document. However, various printers such as a color laser printer, a monochrome inkjet printer, and a laser printer may be used.

以上、本発明を実施するための最良の形態について実施例を用いて説明したが、本発明はこうした実施例に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において、種々なる形態で実施し得ることは勿論である。   The best mode for carrying out the present invention has been described with reference to the embodiments. However, the present invention is not limited to these embodiments, and various modifications can be made without departing from the gist of the present invention. Of course, it can be implemented in the form.

本発明は、印刷機器産業に利用可能である。   The present invention is applicable to the printing equipment industry.

実施例のカラーインクジェットプリンタ20の構成を例示する構成図。1 is a configuration diagram illustrating a configuration of a color inkjet printer 20 according to an embodiment. 解析レイアウト指示処理の一例を示すフローチャート。The flowchart which shows an example of an analysis layout instruction | indication process. 解析処理の一例を示すフローチャート。The flowchart which shows an example of an analysis process. 具体例のXHTML文書の一例を示す説明図。Explanatory drawing which shows an example of the XHTML document of a specific example. 具体例のXHTML文書に記述された画像の一例を示す説明図。Explanatory drawing which shows an example of the image described in the XHTML document of a specific example. 具体例のDOMツリーの一例を示す説明図。Explanatory drawing which shows an example of the DOM tree of a specific example. 具体例のCSS文書の一例を示す説明図。Explanatory drawing which shows an example of the CSS document of a specific example. 具体例のスタイルオブジェクトの一例を示す説明図。Explanatory drawing which shows an example of the style object of a specific example. レイアウト描画指示処理の一例を示すフローチャート。6 is a flowchart illustrating an example of a layout drawing instruction process. レイアウト処理の一例を示すフローチャート。The flowchart which shows an example of a layout process. 具体例のページボックスの一例を示す説明図。Explanatory drawing which shows an example of the page box of a specific example. 描画処理の一例を示すフローチャート。The flowchart which shows an example of a drawing process. 具体例の印刷結果の一例を示す説明図。Explanatory drawing which shows an example of the printing result of a specific example.

符号の説明Explanation of symbols

10 コンピュータ、12 デジタルテレビ、14 デジタルカメラ、20 カラーインクジェットプリンタ、22 入力インターフェース、24 信号処理部、30 解析部、32 コア、34 XMLパーサー、36 CSSPI、38 レイアウタ、40 RPI、42 色変換部、44 2値化部、46 イメージバッファ、48 印刷実行部、50 メモリ、52 フラッシュメモリ、60 操作部、61 液晶ディスプレイ、62 操作ボタン、63 CPU、64 ROM、65 ディスプレイコントローラ(LCDC)、66 メモリ。   10 computers, 12 digital televisions, 14 digital cameras, 20 color inkjet printers, 22 input interfaces, 24 signal processing units, 30 analysis units, 32 cores, 34 XML parsers, 36 CSSPIs, 38 layouters, 40 RPIs, 42 color conversion units, 44 binarization unit, 46 image buffer, 48 print execution unit, 50 memory, 52 flash memory, 60 operation unit, 61 liquid crystal display, 62 operation buttons, 63 CPU, 64 ROM, 65 display controller (LCDC), 66 memory.

Claims (13)

印刷可能なオブジェクトを所定の第1書式により階層的に記述した記述文書を解析して紙などの媒体に印刷する印刷装置であって、
前記媒体のサイズを設定するサイズ設定手段と、
データを記憶するデータ記憶手段と、
所定時間毎に前記記述文書を特定するためのURLの指定があるか否かを判定し、指定があるときには該指定されているURLを前記データ記憶手段に記憶させるURL記憶手段と、
記述文書におけるオブジェクトの階層的な木構造を解析すると共に該解析した木構造を前記データ記憶手段に記憶させる構造解析手段と、
オブジェクトの印刷時の様式について所定の第2書式により記述した様式文書を解析し、該解析結果としての様式データを前記データ記憶手段に記憶させると共に前記解析にかかる様式文書を識別する識別情報と前記様式データを記憶した日時とを該様式データに関連付けて前記データ記憶手段に記憶させる様式解析手段と、
前記URLの指定を伴って記述文書が指定されたとき、該指定の前に指定された他の記述文書に対する印刷処理を実行しているときには、該印刷処理の終了に拘わらず、前記構造解析手段による前記他の記述文書における木構造の解析が終了した以降に該指定された記述文書に対する木構造の解析を前記構造解析手段に指示すると共に該指定された記述文書に記述された様式文書に対応する様式データの解析を前記様式解析手段に指示し、前記解析された木構造と前記解析された様式データとの関連付けを行なう解析指示手段と、
レイアウト作成指示がなされたとき、前記解析されて前記データ記憶手段に記憶された木構造と該木構造に関連付けられた様式データと前記サイズ設定手段により設定された前記媒体のサイズとに基づいてオブジェクトの前記媒体へのレイアウトをページ毎に作成すると共に該作成したページ毎のレイアウトを前記データ記憶手段に記憶させるレイアウト作成手段と、
印刷実行指示がなされたとき、前記データ記憶手段に記憶されたページ毎のレイアウトに基づいてオブジェクトを取得すると共にレイアウトして印刷する印刷実行手段と、
を備え
前記URL記憶手段は、前記構造解析手段による前記記述文書の解析中であるか否かに拘わらず前記指定されているURLを前記データ記憶手段に記憶させる手段であり、
前記解析指示手段は、前記指定された記述文書に記述された様式文書に対応する様式データの解析を前記様式解析手段に指示する際には、前記指定された記述文書に記述された様式文書の識別情報に基づいて前記データ記憶手段に該様式文書に対応する様式データが記憶されているか否かを判定すると共に記憶されていると判定したときには該様式データが記憶された日時が所定期間内であるか否かを判定し、前記データ記憶手段に前記様式文書に対応する様式データが記憶されていないときあるいは前記様式データが記憶された日時が前記所定期間内でないときには該様式文書の解析を前記様式解析手段に指示すると共に該指示に基づいて解析された様式データと前記解析された木構造との関連付けを行ない、前記データ記憶手段に該様式文書に対応する様式データが記憶されており且つ該様式データが前記所定期間内に記憶されているときには該様式データと前記解析された木構造との関連付けを行なう手段である
印刷装置。
A printing apparatus that analyzes a description document in which printable objects are hierarchically described in a predetermined first format and prints it on a medium such as paper,
Size setting means for setting the size of the medium;
Data storage means for storing data;
URL storage means for determining whether or not a URL for specifying the descriptive document is specified every predetermined time, and when specified, URL storage means for storing the specified URL in the data storage means;
A structure analysis means for analyzing a hierarchical tree structure of an object in a description document and storing the analyzed tree structure in the data storage means;
Analyzing a form document described in a predetermined second form with respect to the form at the time of printing the object , storing the form data as the analysis result in the data storage means, and identifying information for identifying the form document for the analysis, Form analysis means for storing the date and time when the form data is stored in the data storage means in association with the form data ;
When a descriptive document is designated with the designation of the URL, when the print processing is executed for another descriptive document designated before the designation, the structure analyzing means is executed regardless of the end of the print processing. After the analysis of the tree structure in the other description document according to is completed, the structure analysis means is instructed to analyze the tree structure for the specified description document and corresponds to the form document described in the specified description document. Analyzing the form data to be instructed to the form analyzing means, and analyzing instruction means for associating the analyzed tree structure with the analyzed form data;
When a layout creation instruction is given, an object is created based on the tree structure analyzed and stored in the data storage means, the style data associated with the tree structure, and the size of the medium set by the size setting means. Creating a layout for each page of the medium and storing the created layout for each page in the data storage means;
Print execution means for acquiring an object based on the layout for each page stored in the data storage means and performing layout printing when a print execution instruction is made; and
Equipped with a,
The URL storage means is means for storing the designated URL in the data storage means regardless of whether or not the description document is being analyzed by the structure analysis means,
When the analysis instruction unit instructs the form analysis unit to analyze the form data corresponding to the form document described in the specified description document, the analysis instruction unit stores the form document described in the specified description document. Based on the identification information, it is determined whether or not form data corresponding to the form document is stored in the data storage means. When it is determined that the form data is stored, the date and time when the form data is stored is within a predetermined period. It is determined whether or not the form document corresponding to the form document is stored in the data storage means, or the analysis of the form document is performed when the date and time when the form data is stored is not within the predetermined period. An instruction is given to the form analysis means, the form data analyzed based on the instruction is associated with the analyzed tree structure, and the form is stored in the data storage means. Printing apparatus is a means for association with the analyzed tree structure and該様formula data when and該様formula data formatted data is stored corresponding to the write is stored in the predetermined period.
請求項1記載の印刷装置であって、
前記様式データは、ページサイズを含み、
前記レイアウト作成手段は、前記様式データに含まれるページサイズが前記サイズ設定手段により設定された媒体のサイズより大きいときには、前記ページサイズに代えて前記設定された媒体のサイズを用いてレイアウトする手段である
印刷装置。
The printing apparatus according to claim 1,
The format data includes a page size,
The layout creating means is means for laying out using the set medium size instead of the page size when the page size included in the format data is larger than the medium size set by the size setting means. There is a printing device.
請求項2記載の印刷装置であって、
前記様式データは、オブジェクトのサイズを含み、
前記レイアウト作成手段は、前記様式データに含まれるオブジェクトのサイズが前記サイズ設定手段により設定された媒体のサイズに対応する最大オブジェクトサイズより大きいときには、前記オブジェクトのサイズに代えて最大オブジェクトサイズを用いてレイアウトする手段である
印刷装置。
The printing apparatus according to claim 2,
The format data includes the size of the object,
The layout creation means uses the maximum object size instead of the object size when the size of the object included in the format data is larger than the maximum object size corresponding to the size of the medium set by the size setting means. A printing device that is a means for layout.
前記解析指示手段は、前記データ記憶手段に記憶された木構造を指定して前記レイアウト作成手段に前記レイアウト作成指示を行なう手段である請求項1ないしいずれか記載の印刷装置。 It said analysis instructing means, said data storage means to specify a stored tree structure the claims 1 is means for performing layout creation instruction to the layout generation unit 3 printing apparatus according to any one. 請求項記載の印刷装置であって、
前記レイアウト作成手段は、前記レイアウトの作成を完了した以降に前記解析指示手段に所定の終了信号を出力する手段であり、
前記解析指示手段は、前記所定の終了信号を受け付けた以降に該所定の終了信号に係る木構造の次に解析された木構造を指定して前記レイアウト作成指示を行なう手段である
印刷装置。
The printing apparatus according to claim 4 , wherein
The layout creation means is means for outputting a predetermined end signal to the analysis instruction means after completing the creation of the layout,
The printing apparatus according to claim 1, wherein the analysis instruction means designates a tree structure analyzed next to a tree structure related to the predetermined end signal after receiving the predetermined end signal, and issues the layout creation instruction.
前記レイアウト作成手段は、レイアウトの作成が完了したページ毎に前記印刷実行指示を前記印刷実行手段に行なう手段である請求項1ないしいずれか記載の印刷装置。 It said layout generation means, the printing apparatus in accordance with claim 1, which is a means for performing the printing execution instruction for each page to create the layout has been completed to said print execution means 5. 前記レイアウト作成手段は、1ページ分のレイアウトの作成が完了したときに前記印刷実行指示を前記印刷実行手段に行なう手段である請求項1ないしいずれか記載の印刷装置。 Said layout generation means, one page of the printing apparatus of a means for performing the print execution instruction to said print execution means when the creation is completed is claims 1 to 6, wherein any layout. 前記記述文書は、マークアップ言語により記述されてなる請求項1ないしいずれか記載の印刷装置。 The description document claims 1 becomes described by a markup language 7 printing apparatus according to any. 前記マークアップ言語は、XHTML言語である請求項記載の印刷装置。 The printing apparatus according to claim 8 , wherein the markup language is an XHTML language. 前記オブジェクトは、テキスト,画像,表の少なくとも一つを含む請求項1ないしいずれか記載の印刷装置。 The object, text, images, printing apparatus according to any one of claims 1 to 9 comprising at least one table. カラーインクジェットプリンタである請求項1ないし1いずれか記載の印刷装置。 Color claims 1 to an ink jet printer to 1 0 the printing apparatus according to any. 紙などの媒体のサイズを設定するサイズ設定手段とデータを記憶するデータ記憶手段とを有し、印刷可能なオブジェクトを所定の第1書式により階層的に記述した記述文書を解析して前記媒体に印刷する印刷装置における印刷方法であって
(a)所定時間毎に前記記述文書を特定するためのURLの指定があるか否かを判定し、指定があるときには該指定されているURLを前記データ記憶手段に記憶し、
(b)木構造の解析指示がなされたとき、記述文書におけるオブジェクトの階層的な木構造を解析すると共に該解析した木構造を前記データ記憶手段に記憶し、
(c)様式データの解析指示がなされたとき、オブジェクトの印刷時の様式について所定の第2書式により記述した様式文書を解析し、該解析結果としての様式データを前記データ記憶手段に記憶させると共に前記解析にかかる様式文書を識別する識別情報と前記様式データを記憶した日時とを該様式データに関連付けて前記データ記憶手段に記憶し、
(d)前記URLの指定を伴って記述文書が指定されたとき、該指定の前に指定された他の記述文書に対する印刷処理を実行しているときには、該印刷処理の終了に拘わらず、前記他の記述文書における木構造の解析が終了した以降に該指定された記述文書に対する木構造の解析を指示すると共に該指定された記述文書に記述された様式文書に対応する様式データの解析を指示し、前記解析された木構造と前記解析された様式データとの関連付けを行ない、
(e)レイアウト作成指示がなされたとき、前記解析されて前記データ記憶手段に記憶された木構造と該木構造に関連付けられた様式データと前記サイズ設定手段により設定された前記媒体のサイズとに基づいてオブジェクトの前記媒体へのレイアウトをページ毎に作成すると共に該作成したページ毎のレイアウトを前記データ記憶手段に記憶し、
(f)印刷実行指示がなされたとき、前記データ記憶手段に記憶されたページ毎のレイアウトに基づいてオブジェクトを取得すると共にレイアウトして印刷し、
前記ステップ(a)では、前記ステップ(b)による前記記述文書の解析中であるか否かに拘わらず前記指定されているURLを前記データ記憶手段に記憶し、
前記ステップ(d)では、前記指定された記述文書に記述された様式文書に対応する様式データの解析を指示する際には、前記指定された記述文書に記述された様式文書の識別情報に基づいて前記データ記憶手段に該様式文書に対応する様式データが記憶されているか否かを判定すると共に記憶されていると判定したときには該様式データが記憶された日時が所定期間内であるか否かを判定し、前記データ記憶手段に前記様式文書に対応する様式データが記憶されていないときあるいは前記様式データが記憶された日時が前記所定期間内でないときには該様式文書の解析を指示すると共に該指示に基づいて解析された様式データと前記解析された木構造との関連付けを行ない、前記データ記憶手段に該様式文書に対応する様式データが記憶されており且つ該様式データが前記所定期間内に記憶されているときには該様式データと前記解析された木構造との関連付けを行なう
印刷方法。
A size setting unit configured to set a size of a medium such as paper and a data storage unit configured to store data; a description document in which printable objects are hierarchically described in a predetermined first format is analyzed and the medium is stored in the medium; A printing method in a printing apparatus for printing ,
(A) It is determined whether or not a URL for specifying the descriptive document is specified every predetermined time, and when specified, the specified URL is stored in the data storage means,
(B) When a tree structure analysis instruction is given, the hierarchical tree structure of the object in the description document is analyzed, and the analyzed tree structure is stored in the data storage means;
(C) When an instruction to analyze the form data is given, the form document described in the predetermined second form with respect to the form at the time of printing the object is analyzed, and the form data as the analysis result is stored in the data storage means. The identification information for identifying the form document to be analyzed and the date and time when the form data is stored are stored in the data storage means in association with the form data,
(D) When a descriptive document is designated with the designation of the URL, when a print process is executed for another descriptive document designated before the designation, the print process is executed regardless of the end of the print process. Instructs analysis of the tree structure for the specified description document and analysis of form data corresponding to the format document described in the specified description document after the analysis of the tree structure in another description document is completed. And associating the analyzed tree structure with the analyzed style data,
(E) When a layout creation instruction is given, the tree structure analyzed and stored in the data storage means, the style data associated with the tree structure, and the size of the medium set by the size setting means Creating a layout of the object on the medium based on each page and storing the created layout for each page in the data storage means;
(F) When a print execution instruction is given, an object is acquired based on the layout for each page stored in the data storage unit, and the object is laid out and printed.
In the step (a), the specified URL is stored in the data storage means regardless of whether or not the description document in the step (b) is being analyzed.
In the step (d), when instructing the analysis of the form data corresponding to the form document described in the specified description document, the identification information of the form document described in the specified description document is used. It is determined whether or not form data corresponding to the form document is stored in the data storage means, and if it is determined that the form data is stored, whether or not the date and time when the form data is stored is within a predetermined period. When the form data corresponding to the form document is not stored in the data storage means, or when the date and time when the form data is stored is not within the predetermined period, the form document is instructed and analyzed. The form data analyzed based on the form is associated with the analyzed tree structure, and the form data corresponding to the form document is stored in the data storage means. Printing methods are and該様expression data for performing the association between the tree structure that is the analysis and該様expression data when stored within the predetermined period.
紙などの媒体のサイズを設定するサイズ設定手段とデータを記憶するデータ記憶手段とを有し、印刷可能なオブジェクトを所定の第1書式により階層的に記述した記述文書を解析して前記媒体に印刷する印刷装置
所定時間毎に前記記述文書を特定するためのURLの指定があるか否かを判定し、指定があるときには該指定されているURLを前記データ記憶手段に記憶させるURL記憶手段と、
記述文書におけるオブジェクトの階層的な木構造を解析すると共に該解析した木構造を前記データ記憶手段に記憶させる構造解析手段と、
オブジェクトの印刷時の様式について所定の第2書式により記述した様式文書を解析し、該解析結果としての様式データを前記データ記憶手段に記憶させると共に前記解析にかかる様式文書を識別する識別情報と前記様式データを記憶した日時とを該様式データに関連付けて前記データ記憶手段に記憶させる様式解析手段と、
前記URLの指定を伴って記述文書が指定されたとき、該指定の前に指定された他の記述文書に対する印刷処理を実行しているときには、該印刷処理の終了に拘わらず、前記構造解析手段による前記他の記述文書における木構造の解析が終了した以降に該指定された記述文書に対する木構造の解析を前記構造解析手段に指示すると共に該指定された記述文書に記述された様式文書に対応する様式データの解析を前記様式解析手段に指示し、前記解析された木構造と前記解析された様式データとの関連付けを行なう解析指示手段と、
レイアウト作成指示がなされたとき、前記解析されて前記データ記憶手段に記憶された木構造と該木構造に関連付けられた様式データと前記サイズ設定手段により設定された前記媒体のサイズとに基づいてオブジェクトの前記媒体へのレイアウトをページ毎に作成すると共に該作成したページ毎のレイアウトを前記データ記憶手段に記憶させるレイアウト作成手段と、
印刷実行指示がなされたとき、前記データ記憶手段に記憶されたページ毎のレイアウトに基づいてオブジェクトを取得すると共にレイアウトして印刷する印刷実行手段と、
を備え、
前記URL記憶手段は、前記構造解析手段による前記記述文書の解析中であるか否かに拘わらず前記指定されているURLを前記データ記憶手段に記憶させる手段であり、
前記解析指示手段は、前記指定された記述文書に記述された様式文書に対応する様式データの解析を前記様式解析手段に指示する際には、前記指定された記述文書に記述された様式文書の識別情報に基づいて前記データ記憶手段に該様式文書に対応する様式データが記憶されているか否かを判定すると共に記憶されていると判定したときには該様式データが記憶された日時が所定期間内であるか否かを判定し、前記データ記憶手段に前記様式文書に対応する様式データが記憶されていないときあるいは前記様式データが記憶された日時が前記所定期間内でないときには該様式文書の解析を前記様式解析手段に指示すると共に該指示に基づいて解析された様式データと前記解析された木構造との関連付けを行ない、前記データ記憶手段に該様式文書に対応する様式データが記憶されており且つ該様式データが前記所定期間内に記憶されているときには該様式データと前記解析された木構造との関連付けを行なう手段である
印刷装置として機能させるためのプログラム。
And a data storage means for storing size setting means and the data to set the size of the medium such as paper, by a printable object predetermined first format by analyzing the description document was described hierarchically the medium Printing device to print on
URL storage means for determining whether or not a URL for specifying the descriptive document is specified every predetermined time, and when specified, URL storage means for storing the specified URL in the data storage means;
A structure analysis means for analyzing a hierarchical tree structure of an object in a description document and storing the analyzed tree structure in the data storage means;
Analyzing a form document described in a predetermined second form with respect to the form at the time of printing the object, storing the form data as the analysis result in the data storage means, and identifying information for identifying the form document for the analysis, Form analysis means for storing the date and time when the form data is stored in the data storage means in association with the form data;
When a descriptive document is designated with the designation of the URL, when the print processing is executed for another descriptive document designated before the designation, the structure analyzing means is executed regardless of the end of the print processing. After the analysis of the tree structure in the other description document according to is completed, the structure analysis means is instructed to analyze the tree structure for the specified description document and corresponds to the form document described in the specified description document. Analyzing the form data to be instructed to the form analyzing means, and analyzing instruction means for associating the analyzed tree structure with the analyzed form data;
When a layout creation instruction is given, an object is created based on the tree structure analyzed and stored in the data storage means, the style data associated with the tree structure, and the size of the medium set by the size setting means. Creating a layout for each page of the medium and storing the created layout for each page in the data storage means;
Print execution means for acquiring an object based on the layout for each page stored in the data storage means and performing layout printing when a print execution instruction is made; and
With
The URL storage means is means for storing the designated URL in the data storage means regardless of whether or not the description document is being analyzed by the structure analysis means,
When the analysis instruction unit instructs the form analysis unit to analyze the form data corresponding to the form document described in the specified description document, the analysis instruction unit stores the form document described in the specified description document. Based on the identification information, it is determined whether or not form data corresponding to the form document is stored in the data storage means. When it is determined that the form data is stored, the date and time when the form data is stored is within a predetermined period. It is determined whether or not the form document corresponding to the form document is stored in the data storage means, or the analysis of the form document is performed when the date and time when the form data is stored is not within the predetermined period. An instruction is given to the form analysis means, the form data analyzed based on the instruction is associated with the analyzed tree structure, and the form is stored in the data storage means. Is a means for association with the analyzed tree structure and該様formula data when and該様formula data formatted data is stored corresponding to the write is stored in the predetermined period
A program that causes a printer to function .
JP2003345870A 2003-10-03 2003-10-03 Printing apparatus, printing method, and program for printing apparatus Expired - Fee Related JP4449398B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003345870A JP4449398B2 (en) 2003-10-03 2003-10-03 Printing apparatus, printing method, and program for printing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003345870A JP4449398B2 (en) 2003-10-03 2003-10-03 Printing apparatus, printing method, and program for printing apparatus

Publications (2)

Publication Number Publication Date
JP2005111710A JP2005111710A (en) 2005-04-28
JP4449398B2 true JP4449398B2 (en) 2010-04-14

Family

ID=34539009

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003345870A Expired - Fee Related JP4449398B2 (en) 2003-10-03 2003-10-03 Printing apparatus, printing method, and program for printing apparatus

Country Status (1)

Country Link
JP (1) JP4449398B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4958481B2 (en) 2006-06-01 2012-06-20 キヤノン株式会社 WEB service execution method and information processing apparatus
JP5071007B2 (en) * 2007-09-06 2012-11-14 セイコーエプソン株式会社 Printing apparatus, data processing apparatus for printing apparatus, and printing method
JP5094443B2 (en) * 2008-01-24 2012-12-12 キヤノン株式会社 Printing apparatus, printing apparatus control method, and program
JP5446625B2 (en) * 2009-09-07 2014-03-19 株式会社リコー Printer driver, information processing apparatus, and computer-readable recording medium recording printer driver

Also Published As

Publication number Publication date
JP2005111710A (en) 2005-04-28

Similar Documents

Publication Publication Date Title
JP2005131915A (en) Printing apparatus, printing method and program for printing apparatus
US7207735B2 (en) Device and its operation method for enabling printer to print page of desired design
JP4186678B2 (en) Print job management apparatus, program used therefor, and print job management method
US8634100B2 (en) Image forming apparatus for detecting index data of document data, and control method and program product for the same
JP2004318581A (en) Information processor and method of displaying print preview
US20050213154A1 (en) Printing device and medium type setting method
US20050036170A1 (en) Image processing apparatus and image forming apparatus
US8199967B2 (en) Image processing apparatus, image processing method, and storage medium
JP4438380B2 (en) Printing apparatus, printing method, and program for printing apparatus
JP4761535B2 (en) Document management apparatus and method, program
JP2007148486A (en) Method for supporting document browsing, system for the same, document processor, and program
JP4449398B2 (en) Printing apparatus, printing method, and program for printing apparatus
US20060092454A1 (en) Printing device and printing method
US20060092447A1 (en) Printing device and corresponding printing method used therein
JP2005111795A (en) Printer, printing method and program for printer
JP2013120401A (en) Image processor
JP4599950B2 (en) Processing apparatus and processing method
JP4165366B2 (en) Document analysis apparatus and method, program for document analysis apparatus, and printing apparatus
JP5915091B2 (en) Image forming apparatus, image forming system, output image data processing method, program, and recording medium
JP2005111711A (en) Printer, printing method and program for printer
JP2005246796A (en) Printing device and its printing method
JP2005111794A (en) Printer, printing method and program for printer
JP2005208809A (en) Document analysis device and method, program for document analysis device, and printer
JP2005208810A (en) Document analysis device and method, program for document analysis device, and printer
JP2010214746A (en) Printing processing system, printing processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060811

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090804

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090930

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: 20100105

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100118

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130205

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130205

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees