JP2005246796A - Printing apparatus and printing method therefor - Google Patents
Printing apparatus and printing method therefor Download PDFInfo
- Publication number
- JP2005246796A JP2005246796A JP2004060961A JP2004060961A JP2005246796A JP 2005246796 A JP2005246796 A JP 2005246796A JP 2004060961 A JP2004060961 A JP 2004060961A JP 2004060961 A JP2004060961 A JP 2004060961A JP 2005246796 A JP2005246796 A JP 2005246796A
- Authority
- JP
- Japan
- Prior art keywords
- page
- page break
- layout
- analyzed
- contents
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims description 63
- 239000012536 storage buffer Substances 0.000 description 14
- 238000006243 chemical reaction Methods 0.000 description 5
- 239000004973 liquid crystal related substance Substances 0.000 description 5
- 239000000872 buffer Substances 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 239000011800 void material Substances 0.000 description 2
- 238000009792 diffusion process Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000000049 pigment Substances 0.000 description 1
Images
Landscapes
- Editing Of Facsimile Originals (AREA)
- Record Information Processing For Printing (AREA)
Abstract
【課題】 改ページ禁止の指定がなされたオブジェクトやそのグループに改ページが必要なときでも迅速にレイアウトする。
【解決手段】 改ページの必要性が判定され改ページする際(S406)、改ページの禁止が指定されているときには(S408)、それまでに解析した内容をメモリに一時的に記憶し(S410)、改ページして新たなページボックスを作成した後に記憶した内容を改ページ後に解析されたものとして反映し(S414,S416)、その後の解析を再開する(S418,S420)。この結果、改ページされた後に改めて解析し直すものに比して、迅速にレイアウトを作成することができる。
【選択図】 図7
PROBLEM TO BE SOLVED: To quickly lay out even when a page break is necessary for an object or its group for which page break prohibition is designated.
When the necessity of a page break is determined and a page break is made (S406), when page break prohibition is designated (S408), the contents analyzed so far are temporarily stored in a memory (S410). ), The contents stored after the page break is created and the new page box is created are reflected as analyzed after the page break (S414, S416), and the subsequent analysis is resumed (S418, S420). As a result, it is possible to create a layout more quickly than in the case of reanalyzing after a page break.
[Selection] Figure 7
Description
本発明は、印刷装置およびその印刷方法に関し、詳しくは、印刷可能なオブジェクトを階層的に記述した記述文書を解析して紙などの媒体に印刷する印刷装置およびその印刷方法に関する。 The present invention relates to a printing apparatus and a printing method therefor, and more particularly to a printing apparatus that analyzes a description document in which printable objects are hierarchically described and prints them on a medium such as paper and a printing method therefor.
従来、この種の印刷装置としては、SVG文書を解析して印刷するプリンタとHTML文書をSVG文書に変換するフォーマッティングサーバとにより構成されたプリンタシステムが提案されている(例えば、特許文献1参照)。このシステムでは、HTML文書を受け付けると、フォーマッティングサーバにより受け付けたHTML文書をSVG文書に変換し、この変換したSVG文書をプリンタで解析して印刷する。
しかしながら、上述のプリンタシステムでは、プリンタとフォーマッティングサーバとから構成されていることから大型化し、家庭のリビングなどの限られたスペースに設置する場合には不向きである。また、HTML文書を受け付けたときには、フォーマッティングサーバによりSVG文書に変換すると共にこの変換したSVG文書を解析して印刷するから、変換や解析に時間を要し、迅速な印刷を行なうことができない。HTML文書に記述されたオブジェクトによっては印刷時に途中で改ページすることにより見づらくなるなどの不都合を生じるものもある。 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. Some objects described in the HTML document may cause inconvenience such as being difficult to see due to page breaks during printing.
本発明の印刷装置およびその印刷方法は、HTML文書やこれを拡張したXHTML文書などのような記述文書をより適切に解析して印刷することを目的の一つとする。また、本発明の印刷装置およびその印刷方法は、HTML文書やこれを拡張したXHTML文書などのような記述文書を解析して印刷する際に記述文書に記述されたオブジェクトのうち改ページ禁止の指定がなされたオブジェクトやオブジェクトのグループについては途中で改ページされないように印刷することを目的の一つとする。さらに、本発明の印刷装置およびその印刷方法は、改ページ禁止の指定がなされたオブジェクトやオブジェクトのグループを改ページなしにレイアウトする際であっても迅速にレイアウトすることを目的の一つとする。 An object of the printing apparatus and printing method of the present invention is to more appropriately analyze and print a descriptive document such as an HTML document or an XHTML document obtained by extending the HTML document. In addition, the printing apparatus and the printing method of the present invention specify page break prohibition among objects described in a description document when analyzing and printing a description document such as an HTML document or an XHTML document extended from the HTML document. One of the purposes is to print an object or a group of objects so that no page breaks occur during the process. Further, it is an object of the printing apparatus and the printing method of the present invention to quickly lay out an object or a group of objects for which page break prohibition is designated even when laying out without page break.
本発明の印刷装置およびその印刷方法は、上述の目的の少なくとも一部を達成するために以下の手段を採った。 The printing apparatus and printing method of the present invention employ the following means in order to achieve at least a part of the above object.
本発明の第1の印刷装置は、
印刷可能なオブジェクトを階層的に記述した記述文書を解析して紙などの媒体に印刷する印刷装置であって、
記述文書におけるオブジェクトの階層的な木構造と該オブジェクトの書式とを解析する構造書式解析手段と、
前記解析された木構造と書式とに基づいてオブジェクトを順次解析して配置する手法をもってレイアウトすることにより前記媒体へのページ毎のレイアウトを作成する際に、少なくとも一つのオブジェクトを含み改ページ禁止の指定がなされた改ページ禁止グループに属するオブジェクトについては、改ページが必要になるまでは該改ページ禁止グループに属するオブジェクトを順次解析して配置し、改ページが必要になったときには該改ページ禁止グループに属するオブジェクトのうち該改ページが必要になるまでに行なわれたオブジェクトの解析および配置を該改ページ後に行なわれたオブジェクトの解析および配置として適用すると共に該改ページが必要になったときに解析していたオブジェクト以降のオブジェクトを順次解析して配置することにより、ページ毎のレイアウトを作成するレイアウト作成手段と、
前記作成されたページ毎のレイアウトに基づいてオブジェクトをレイアウトして前記媒体に印刷する印刷実行手段と、
を備えることを要旨とする。
The first printing apparatus of the present invention includes:
A printing device that analyzes a description document that hierarchically describes printable objects and prints it on a medium such as paper,
A structure format analysis means for analyzing the hierarchical tree structure of the object in the description document and the format of the object;
When creating a layout for each page on the medium by laying out with a method of sequentially analyzing and arranging objects based on the analyzed tree structure and format, page breaks including at least one object are prohibited. For the objects belonging to the specified page break prohibition group, the objects belonging to the page break prohibition group are sequentially analyzed and arranged until a page break is required, and the page break is prohibited when a page break is required. When the analysis and arrangement of the objects performed before the page break is necessary among the objects belonging to the group are applied as the analysis and arrangement of the objects performed after the page break, and the page break is necessary Sequentially analyze and distribute objects after the object being analyzed By, the layout creating means for creating a layout for each page,
Print execution means for laying out an object based on the created layout for each page and printing on the medium;
It is a summary to provide.
この本発明の第1の印刷装置では、記述文書におけるオブジェクトの階層的な木構造とオブジェクトの書式とを解析し、この解析した木構造と書式とに基づいてオブジェクトを順次解析して配置する手法をもってレイアウトすることにより紙などの媒体へのページ毎のレイアウトを作成し、作成したページ毎のレイアウトに基づいてオブジェクトをレイアウトして紙などの媒体に印刷する。したがって、記述文書をより適切に解析して印刷することができる。しかも、少なくとも一つのオブジェクトを含み改ページ禁止の指定がなされた改ページ禁止グループに属するオブジェクトについては、改ページが必要になるまでは改ページ禁止グループに属するオブジェクトを順次解析して配置し、改ページが必要になったときには改ページ禁止グループに属するオブジェクトのうち改ページが必要になるまでに行なわれたオブジェクトの解析および配置を改ページ後に行なわれたオブジェクトの解析および配置として適用すると共に改ページが必要になったときに解析していたオブジェクト以降のオブジェクトを順次解析して配置するから、改ページ禁止グループに属するオブジェクトをグループ内で改ページを行なうことなくレイアウトすることができる。また、改ページが必要になるまでに行なわれたオブジェクトの解析および配置を改ページ後に行なわれたオブジェクトの解析および配置として適用するから、改ページ禁止グループに属するオブジェクトのレイアウトについても迅速に行なうことができる。 In the first printing apparatus of the present invention, a method of analyzing a hierarchical tree structure of an object and a format of an object in a description document, and sequentially analyzing and arranging the objects based on the analyzed tree structure and the format. The layout for each page on a medium such as paper is created by laying out the object, and the objects are laid out based on the created layout for each page and printed on the medium such as paper. Therefore, the description document can be analyzed and printed more appropriately. In addition, for objects belonging to a page break prohibition group that includes at least one object and page break prohibition is specified, objects belonging to the page break prohibition group are sequentially analyzed and arranged until a page break is required. When a page is required, the analysis and placement of objects that belong to the page break prohibition group before the page break is required are applied as the analysis and placement of the object after the page break and the page break Since the objects after the object that has been analyzed when it becomes necessary are sequentially analyzed and arranged, objects belonging to the page break prohibition group can be laid out without performing page breaks within the group. In addition, since the analysis and arrangement of the object performed before the page break is necessary are applied as the analysis and arrangement of the object performed after the page break, the layout of the objects belonging to the page break prohibition group can be quickly performed. Can do.
こうした本発明の第1の印刷装置において、前記レイアウト作成手段は、前記改ページ禁止グループに属するオブジェクトを配置している途中で改ページが必要になったときには該改ページ禁止グループに属するオブジェクトのうち改ページ前に解析して配置したオブジェクトについては該改ページの前ページのレイアウトから削除する手段であるものとすることもできる。こうすれば、改ページの前後のページに同一内容がレイアウトされるのを抑止することができる。 In the first printing apparatus of the present invention, when the layout creation means needs a page break in the middle of arranging the objects belonging to the page break prohibition group, The object analyzed and arranged before the page break can be a means for deleting from the layout of the previous page of the page break. In this way, it is possible to prevent the same content from being laid out on the pages before and after the page break.
本発明の第2の印刷装置は、
印刷可能なオブジェクトを階層的に記述した記述文書を解析して紙などの媒体に印刷する印刷装置であって、
記述文書におけるオブジェクトの階層的な木構造と該オブジェクトの書式とを解析する構造書式解析手段と、
前記解析された木構造と書式とに基づいてオブジェクトを該オブジェクトの内容を順次解析して配置する手法をもってレイアウトすることにより前記媒体へのページ毎のレイアウトを作成する際に、前記オブジェクトのうち改ページ禁止の指定がなされた改ページ禁止オブジェクトについては、改ページが必要になるまでは該改ページ禁止オブジェクトの内容を順次解析して配置し、改ページが必要になったときには該改ページ禁止オブジェクトの内容のうち該改ページが必要になるまでに行なわれた内容の解析および配置を該改ページ後に行なわれた内容の解析および配置として適用すると共に該改ページが必要になったときに解析していた内容以降の内容を順次解析して配置することにより、ページ毎のレイアウトを作成するレイアウト作成手段と、
前記作成されたページ毎のレイアウトに基づいてオブジェクトをレイアウトして前記媒体に印刷する印刷実行手段と、
を備えることを要旨とする。
The second printing apparatus of the present invention is
A printing device that analyzes a description document that hierarchically describes printable objects and prints it on a medium such as paper,
A structure format analysis means for analyzing the hierarchical tree structure of the object in the description document and the format of the object;
When creating a layout for each page on the medium by laying out an object based on the analyzed tree structure and format by a method of sequentially analyzing and arranging the contents of the object, the object is modified. For a page break prohibition object for which page prohibition is specified, the contents of the page break prohibition object are sequentially analyzed and arranged until a page break is required, and when a page break is required, the page break prohibition object The analysis and arrangement of the contents performed before the page break is necessary are applied as the analysis and arrangement of the contents performed after the page break and are analyzed when the page break is necessary. A layout that creates a layout for each page by sequentially analyzing and arranging the contents after the previous contents And forming means,
Print execution means for laying out an object based on the created layout for each page and printing on the medium;
It is a summary to provide.
この本発明の第2の印刷装置では、記述文書におけるオブジェクトの階層的な木構造とオブジェクトの書式とを解析し、この解析した木構造と書式とに基づいてオブジェクトをオブジェクトの内容を順次解析して配置する手法をもってレイアウトすることにより紙などの媒体へのページ毎のレイアウトを作成し、作成したページ毎のレイアウトに基づいてオブジェクトをレイアウトして紙などの媒体に印刷する。したがって、記述文書をより適切に解析して印刷することができる。しかも、改ページ禁止の指定がなされた改ページ禁止オブジェクトについては、改ページが必要になるまでは改ページ禁止オブジェクトの内容を順次解析して配置し、改ページが必要になったときには改ページ禁止オブジェクトの内容のうち改ページが必要になるまでに行なわれた内容の解析および配置を改ページ後に行なわれた内容の解析および配置として適用すると共に改ページが必要になったときに解析していた内容以降の内容を順次解析して配置するから、改ページ禁止オブジェクトの途中で改ページを行なうことなくレイアウトすることができる。また、改ページが必要になるまでに行なわれた内容の解析および配置を改ページ後に行なわれた内容の解析および配置として適用するから、改ページ禁止オブジェクトのレイアウトについても迅速に行なうことができる。 In the second printing apparatus of the present invention, the hierarchical tree structure of the object and the format of the object in the description document are analyzed, and the contents of the object are sequentially analyzed based on the analyzed tree structure and the format. A layout for each page on a medium such as paper is created by laying out using a layout method, and objects are laid out based on the created layout for each page and printed on a medium such as paper. Therefore, the description document can be analyzed and printed more appropriately. In addition, for the page break prohibition object for which page break prohibition is specified, the contents of the page break prohibition object are sequentially analyzed and arranged until a page break is necessary, and page break is prohibited when a page break is required. The analysis and arrangement of the contents of the object before the page break is necessary are applied as the analysis and arrangement of the contents performed after the page break and are analyzed when the page break is necessary. Since the contents after the contents are sequentially analyzed and arranged, layout can be performed without performing a page break in the middle of a page break prohibited object. In addition, since the analysis and arrangement of the contents performed until the page break is necessary are applied as the contents analysis and arrangement performed after the page break, the layout of the page break prohibition object can be quickly performed.
こうした本発明の第2の印刷装置において、前記レイアウト作成手段は、前記改ページ禁止オブジェクトの内容を配置している途中で改ページが必要になったときには該改ページ禁止オブジェクトの内容のうち改ページ前に解析して配置した内容については該改ページの前ページのレイアウトから削除する手段であるものとすることもできる。こうすれば、改ページの前後のページに同一内容がレイアウトされるのを抑止することができる。 In such a second printing apparatus of the present invention, the layout creation means, when a page break is necessary during the placement of the contents of the page break prohibited object, the page break of the contents of the page break prohibited object. The contents analyzed and arranged before may be a means for deleting from the layout of the previous page of the page break. In this way, it is possible to prevent the same content from being laid out on the pages before and after the page break.
これら本発明の第1または第2の印刷装置において、前記レイアウト作成手段はレイアウトの作成が完了したページ毎に印刷実行指示を前記印刷実行手段に行なう手段であるものとすることもできるし、前記レイアウト作成手段は1ページ分のレイアウトの作成が完了した以降に印刷実行指示を前記印刷実行手段に行なう手段であるものとすることもできる。 In the first or second printing apparatus of the present invention, the layout creation means may be a means for giving a print execution instruction to the print execution means for each page for which layout creation has been completed. The layout creation means may be means for giving a print execution instruction to the print execution means after the creation of the layout for one page is completed.
また、本発明の第1または第2の印刷装置において、前記記述文書は、マークアップ言語により記述されてなるものとすることもできる。この場合、前記マークアップ言語はXHTML言語であるものとすることもできる。 In the first or second printing apparatus of the present invention, the description document can be described in a markup language. In this case, the markup language may be an XHTML language.
さらに、本発明の第1または第2の本発明の印刷装置において、前記オブジェクトは、テキスト,画像,表の少なくとも一つを含むものとすることもできるし、印刷装置はカラーインクジェットプリンタであるものとすることもできる。 Furthermore, in the printing apparatus according to the first or second aspect of the present invention, the object may include at least one of a text, an image, and a table, and the printing apparatus is a color inkjet printer. You can also.
本発明の第1の印刷方法は、
印刷可能なオブジェクトを階層的に記述した記述文書を解析して紙などの媒体に印刷する印刷装置における印刷方法であって、
(a)記述文書におけるオブジェクトの階層的な木構造と該オブジェクトの書式とを解析し、
(b)前記解析した木構造と書式とに基づいてオブジェクトを順次解析して配置する手法をもってレイアウトすることにより前記媒体へのページ毎のレイアウトを作成する際に、少なくとも一つのオブジェクトを含み改ページ禁止の指定がなされた改ページ禁止グループに属するオブジェクトについては、改ページが必要になるまでは該改ページ禁止グループに属するオブジェクトを順次解析して配置し、改ページが必要になったときには該改ページ禁止グループに属するオブジェクトのうち該改ページが必要になるまでに行なわれたオブジェクトの解析および配置を該改ページ後に行なわれたオブジェクトの解析および配置として適用すると共に該改ページが必要になったときに解析していたオブジェクト以降のオブジェクトを順次解析して配置することにより、ページ毎のレイアウトを作成し、
(c)前記作成したページ毎のレイアウトに基づいてオブジェクトをレイアウトして前記媒体に印刷する
ことを要旨とする。
The first printing method of the present invention includes:
A printing method in a printing apparatus that analyzes a description document in which printable objects are hierarchically described and prints on a medium such as paper,
(A) Analyzing the hierarchical tree structure of the object in the description document and the format of the object;
(B) When creating a layout for each page on the medium by laying out with a method of sequentially analyzing and arranging objects based on the analyzed tree structure and format, the page break includes at least one object. For the objects belonging to the page break prohibition group for which prohibition is specified, the objects belonging to the page break prohibition group are sequentially analyzed and arranged until a page break is necessary. Of the objects belonging to the page prohibition group, the analysis and arrangement of the object performed until the page break is necessary are applied as the analysis and arrangement of the object performed after the page break, and the page break is necessary. Analyze objects after the object that was being analyzed By arrangement, to create a layout for each page,
(C) The gist is to lay out an object based on the created layout for each page and print it on the medium.
この本発明の第1の印刷方法では、記述文書におけるオブジェクトの階層的な木構造とオブジェクトの書式とを解析し、この解析した木構造と書式とに基づいてオブジェクトを順次解析して配置する手法をもってレイアウトすることにより紙などの媒体へのページ毎のレイアウトを作成し、作成したページ毎のレイアウトに基づいてオブジェクトをレイアウトして紙などの媒体に印刷する。したがって、記述文書をより適切に解析して印刷することができる。しかも、少なくとも一つのオブジェクトを含み改ページ禁止の指定がなされた改ページ禁止グループに属するオブジェクトについては、改ページが必要になるまでは改ページ禁止グループに属するオブジェクトを順次解析して配置し、改ページが必要になったときには改ページ禁止グループに属するオブジェクトのうち改ページが必要になるまでに行なわれたオブジェクトの解析および配置を改ページ後に行なわれたオブジェクトの解析および配置として適用すると共に改ページが必要になったときに解析していたオブジェクト以降のオブジェクトを順次解析して配置するから、改ページ禁止グループに属するオブジェクトをグループ内で改ページを行なうことなくレイアウトすることができる。また、改ページが必要になるまでに行なわれたオブジェクトの解析および配置を改ページ後に行なわれたオブジェクトの解析および配置として適用するから、改ページ禁止グループに属するオブジェクトのレイアウトについても迅速に行なうことができる。 In the first printing method of the present invention, a hierarchical tree structure of an object in a description document and an object format are analyzed, and objects are sequentially analyzed and arranged based on the analyzed tree structure and format. The layout for each page on a medium such as paper is created by laying out the object, and the objects are laid out based on the created layout for each page and printed on the medium such as paper. Therefore, the description document can be analyzed and printed more appropriately. In addition, for objects belonging to a page break prohibition group that includes at least one object and page break prohibition is specified, objects belonging to the page break prohibition group are sequentially analyzed and arranged until a page break is required. When a page is required, the analysis and placement of objects that belong to the page break prohibition group before the page break is required are applied as the analysis and placement of the object after the page break and the page break Since the objects after the object that has been analyzed when it becomes necessary are sequentially analyzed and arranged, objects belonging to the page break prohibition group can be laid out without performing page breaks within the group. In addition, since the analysis and arrangement of the object performed before the page break is necessary are applied as the analysis and arrangement of the object performed after the page break, the layout of the objects belonging to the page break prohibition group can be quickly performed. Can do.
本発明の第2の印刷方法は、
印刷可能なオブジェクトを階層的に記述した記述文書を解析して紙などの媒体に印刷する印刷装置における印刷方法であって、
(a)記述文書におけるオブジェクトの階層的な木構造と該オブジェクトの書式とを解析し、
(b)前記解析した木構造と書式とに基づいてオブジェクトを該オブジェクトの内容を順次解析して配置する手法をもってレイアウトすることにより前記媒体へのページ毎のレイアウトを作成する際に、前記オブジェクトのうち改ページ禁止の指定がなされた改ページ禁止オブジェクトについては、改ページが必要になるまでは該改ページ禁止オブジェクトの内容を順次解析して配置し、改ページが必要になったときには該改ページ禁止オブジェクトの内容のうち該改ページが必要になるまでに行なわれた内容の解析および配置を該改ページ後に行なわれた内容の解析および配置として適用すると共に該改ページが必要になったときに解析していた内容以降の内容を順次解析して配置することにより、ページ毎のレイアウトを作成し、
(c)前記作成したページ毎のレイアウトに基づいてオブジェクトをレイアウトして前記媒体に印刷する
ことを要旨とする。
The second printing method of the present invention includes:
A printing method in a printing apparatus that analyzes a description document in which printable objects are hierarchically described and prints on a medium such as paper,
(A) Analyzing the hierarchical tree structure of the object in the description document and the format of the object;
(B) When creating a layout for each page on the medium by laying out an object based on the analyzed tree structure and format by a method of sequentially analyzing and arranging the contents of the object, Among the page break prohibition objects for which page break prohibition is specified, the contents of the page break prohibition object are sequentially analyzed and arranged until a page break is necessary. When the analysis and arrangement of the contents of the prohibited object before the page break is necessary are applied as the analysis and arrangement of the contents performed after the page break and the page break is necessary Create a layout for each page by sequentially analyzing and arranging the contents after the analyzed contents,
(C) The gist is to lay out an object based on the created layout for each page and print it on the medium.
この本発明の第2の印刷方法では、記述文書におけるオブジェクトの階層的な木構造とオブジェクトの書式とを解析し、この解析した木構造と書式とに基づいてオブジェクトをオブジェクトの内容を順次解析して配置する手法をもってレイアウトすることにより紙などの媒体へのページ毎のレイアウトを作成し、作成したページ毎のレイアウトに基づいてオブジェクトをレイアウトして紙などの媒体に印刷する。したがって、記述文書をより適切に解析して印刷することができる。しかも、改ページ禁止の指定がなされた改ページ禁止オブジェクトについては、改ページが必要になるまでは改ページ禁止オブジェクトの内容を順次解析して配置し、改ページが必要になったときには改ページ禁止オブジェクトの内容のうち改ページが必要になるまでに行なわれた内容の解析および配置を改ページ後に行なわれた内容の解析および配置として適用すると共に改ページが必要になったときに解析していた内容以降の内容を順次解析して配置するから、改ページ禁止オブジェクトの途中で改ページを行なうことなくレイアウトすることができる。また、改ページが必要になるまでに行なわれた内容の解析および配置を改ページ後に行なわれた内容の解析および配置として適用するから、改ページ禁止オブジェクトのレイアウトについても迅速に行なうことができる。 In the second printing method of the present invention, the hierarchical tree structure of the object and the format of the object in the description document are analyzed, and the contents of the object are sequentially analyzed based on the analyzed tree structure and the format. A layout for each page on a medium such as paper is created by laying out using a layout method, and objects are laid out based on the created layout for each page and printed on a medium such as paper. Therefore, the description document can be analyzed and printed more appropriately. In addition, for the page break prohibition object for which page break prohibition is specified, the contents of the page break prohibition object are sequentially analyzed and arranged until a page break is necessary, and page break is prohibited when a page break is required. The analysis and arrangement of the contents of the object before the page break is necessary are applied as the analysis and arrangement of the contents performed after the page break and are analyzed when the page break is necessary. Since the contents after the contents are sequentially analyzed and arranged, layout can be performed without performing a page break in the middle of a page break prohibited object. In addition, since the analysis and arrangement of the contents performed until the page break is necessary are applied as the contents analysis and arrangement performed after the page break, the layout of the page break prohibition object can be quickly performed.
次に、本発明を実施するための最良の形態を実施例を用いて説明する。 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)ツリーを作成すると共にCSS(Cascading Style Sheets)により記述されたCSS文書を読み込んでスタイルオブジェクトを作成してメモリ50に書き込む解析部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とを備える。
FIG. 1 is a configuration diagram showing an outline of the configuration of a
信号処理部24は、入力された信号が直ちに印刷可能な印刷用データの場合には印刷実行部48のイメージバッファ46にデータを出力し、RGBデータの場合にはメモリ50の印刷用画面格納領域に出力し、XHTML文書で記述されたファイルの場合には解析部30に出力する。
The
解析部30は、XHTML文書の解析を指示することによりDOMツリーを作成するコア32と、コア32からの指示に基づいてXHTML文書を解析するXMLパーサー34と、作成されたDOMツリーのlinkタグ内の初期化処理により依頼されたCSS文書を解析するCSSプラグイン(以下、CSSPIという)36とから構成されている。CSSPI36は、CSS文書で記述されたファイルがXHTML文書に記述されているときにそのファイルを読み込んで解析し、スタイルオブジェクトを作成する。CSS文書で記述されたファイルについてはXHTML文書に記述されておらず、XHTML文書内に各要素に対してスタイル(書式や様式)が直接記述されているときには、コア32がスタイルを解析し、DOMツリーの要素の情報に加える。
The
操作部60は、プリンタ正面に配置された液晶ディスプレイ61と、その横に設けられた二つの操作ボタン62と、内部にワンチップとして構成されたCPU63,ROM64,ディスプレイコントローラ(以下、LCDCという)65,メモリ66と、を備える。この操作部60により設定する内容としては、例えば、装着されている印刷用紙の種類やサイズ,インクの種類などであり、設定は、操作ボタン62の操作に基づいてROM64に予め記憶された処理プログラムが起動され、この処理プログラムにより液晶ディスプレイ61に表示されるメニューに従って行なわれる。例えば、用紙種類の設定の場合、メニューから用紙種類を選択し、液晶ディスプレイ61にトグルして表示される「普通紙」や「写真紙」などから選択することにより設定し、用紙サイズの設定の場合、メニューから用紙サイズを選択し、液晶ディスプレイ61にトグルして表示される「A4縦」や「B5縦」などから選択することにより設定するのである。こうして設定した内容は、メモリ66に書き込まれる。なお、実施例では、操作部60による設定を行なわなくても、デフォルトとして、例えば印刷用紙の種類としては「普通紙」,用紙サイズとしては「A4縦」,インクの種類としては「顔料系」などが設定されている。こうした操作部60による設定処理は、本発明の中核をなさないからこれ以上の説明については省略する。
The
次に、こうして構成された実施例のカラーインクジェットプリンタ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
続いて、メモリ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文書を解析してスタイルオブジェクトが作成され、関連付けられてメモリ50のDOMツリー用格納領域とスタイルオブジェクト用格納領域とに記憶される。このとき、DOMツリーには識別情報としてDOMツリーIDが付与され、スタイルオブジェクトには識別情報としてスタイルオブジェクトIDが付与される。解析処理の詳細については後述する。
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
次に、レイアウタ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
こうした解析レイアウト指示処理は、前述したように繰り返し実行されるから、解析部30ではURLが指定される毎にXHTML文書の解析中であるか否かに拘わらずに指定されたURLをメモリ50のURL格納用バッファ領域に格納する。また、メモリ50のURL格納用バッファ領域にURLが格納されているときには、レイアウタ38によるレイアウトの実行中であるか否かに拘わらずにXHTML文書の解析を順次行なう。従って、メモリ50のURL格納用バッファ領域には複数のURLが格納される場合が生じ、DOMツリー用格納領域に複数のDOMツリーが格納される場合が生じ、スタイルオブジェクト用格納領域に複数のスタイルオブジェクトが格納される場合が生じる。実施例では、複数のURLを格納することができるようにURL格納用バッファ領域が設定されており、複数のDOMツリーを格納することができるようにDOMツリー用格納領域が設定されており、複数のスタイルオブジェクトを格納することができるようにスタイルオブジェクト用格納領域が設定されている。
Since such an analysis layout instruction process is repeatedly executed as described above, every time the URL is specified in the
次に、解析部30により実行される解析処理について説明する。解析処理は、前述したように図3に例示するフローチャートに基づいて行なわれる。説明の容易のために具体例として図4に例示するXHTML文書を用いて説明する。解析レイアウト指示処理により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ツリーを図5に示す。
Next, analysis processing executed by the
こうしてDOMツリーを作成すると、XHTML文書に指定されたCSS文書を読み出し(ステップS220)、読み込出したCSS文書を解析してスタイルオブジェクトを作成する(ステップS230)。CSS文書の読み出しは、具体的には、DOMツリーのlinkタグ内の初期化処理内の依頼により依頼されたCSSPI36が行なう。CSS文書の解析およびスタイルオブジェクトの作成は、具体的には、CSSPI36がCSS文書を最初から順に解析して各ルールをメモリ50のスタイルオブジェクト用格納領域に格納することにより行なう。図4の例では、XHTML文書内で直接スタイルについては記述されており、CSS文書の指定がないため、スタイルオブジェクトは作成されない。
When the DOM tree is created in this way, the CSS document designated as the XHTML document is read (step S220), and the read CSS document is analyzed to create a style object (step S230). Specifically, the
こうしてDOMツリーとスタイルオブジェクトが作成されると、作成したDOMツリーとスタイルオブジェクトの関連付け処理を実行し(ステップS240)、URL格納用バッファ領域から解析の対象のURLを削除して(ステップS250)、解析処理を終了する。 When the DOM tree and style object are created in this way, the created DOM tree and style object are associated with each other (step S240), and the URL to be analyzed is deleted from the URL storage buffer area (step S250). End the analysis process.
次に、レイアウタ38の処理について説明する。図6は、解析部30によりDOMツリーを指定してレイアウト開始指示がなされたときにレイアウタ38により実行されるレイアウト描画指示処理の一例を示すフローチャートである。レイアウト描画指示処理が実行されると、レイアウタ38は、まず、指定されたDOMツリーに基づいてレイアウトを開始する(ステップS300)。レイアウトは、図7に例示するレイアウト処理により実行される。説明の都合上、ここで、レイアウト処理について説明する。
Next, processing of the
レイアウト処理では、レイアウタ38は、まず、DOMツリーの各要素に対してその要素の特性に従って要素ボックスを作成する(ステップS400)。例えば、要素が画像であればイメージボックスを作成し、要素がテキストであればテキストボックスを作成するのである。続いて、第1ページに対応するページボックスを作成し(ステップS402)、そのページボックスの下にbodyタグ内の要素ボックスをレイアウトできなくなるまで順にレイアウトする(ステップS404〜S424)。要素ボックスのレイアウトは、まず、要素ボックスを解析し(ステップS404)、改ページの必要性を判定する(ステップS406)。こうした解析と改行の必要性の判定は、要素ボックスがテキストのときには、そのサイズや背景色などを解析し、文字毎にそのサイズに基づいて対象となっている行に配置し、配置できないときには改行して配置し、改行の際に改ページが必要であるか否かを判定することにより行ない、要素ボックスが画像のときには、そのサイズや背景色などを解析し、対象となっている行の縦のサイズを画像のサイズとしたときに配置可能か否かにより改行の必要性を判定することにより行ない、要素ボックスが表組みのときには、表組みを構成する各セルの横サイズを計算して表組みの幅を決定し、セルを行毎に組み、セルを行に組み込む際に改ページの必要性を判定することにより行なう。解析の結果、改ページが不要であれば、解析した要素ボックスをレイアウトして(ステップS422)、次の要素ボックスの存在を判定する(ステップS424)。
In the layout process, the
改ページが必要と判定されたときには、改ページが禁止されているか否かを判定する(ステップS408)。改ページ禁止の判定は、例えば、図4の例では、bodyタグの下、2行目のtableタグ中に下線を付した「pege−break−inside:avoid」により指定される。この例では、tableタグにより解析されて配置される表組み内での改ページが禁止される。改ページが禁止されていないときには、改ページが必要と判定されるまでに解析して配置した内容についてレイアウトし(ステップS409)、改ページが禁止されているときには、それまでに解析した内容を一時的にメモリ50に記憶し(ステップS410)、次ページのページボックスを作成する(ステップS412)。そして、改ページの必要性が判定されるまでに解析した内容をメモリ50に一時的に記憶したときには解析した内容を改ページ後に行なったものとして反映する(ステップS414,S416)。なお、改ページが禁止されていないときには、改ページされる前にそれまでに解析した内容については前ページにレイアウトされている。そして、解析途中であるか否かを判定し(ステップS418)、解析途中であるときには解析を再開する(ステップS420)。そして、改ページ後に解析した内容をレイアウトし(ステップS422)、次の要素ボックスの存在を判定する(ステップS424)。図4のXHTML文書の例では、図8に示すように、画像(イメージ)がレイアウトされ、その後、tableタグに対応する要素ボックスを解析して表組みしている最中(表組みの3行目を解析する際)に改ページの必要性が判定され、改ページが禁止されているため、それまでに解析された内容(表組みの2行目まで)がメモリ50に一時的に記憶され、改ページ後にメモリ50に記憶された内容(表組みの2行目まで)が反映され、表組みの3行目以降がその後に解析されてレイアウトされることになる。即ち、第1ページには画像(イメージ)だけがレイアウトされ、第2ページには表組みのすべてがレイアウトされることになる。図9に具体例のDOMツリーを用いてレイアウトした際の各ページのページボックスを示す。
When it is determined that a page break is necessary, it is determined whether or not page break is prohibited (step S408). For example, in the example of FIG. 4, the page break prohibition determination is specified by “peg-break-inside: void” underlined in the table tag in the second row under the body tag. In this example, a page break is prohibited in a table set analyzed and arranged by the table tag. When page breaks are not prohibited, the contents analyzed and arranged until it is determined that page breaks are necessary are laid out (step S409). When page breaks are prohibited, the contents analyzed so far are temporarily stored. Then, it is stored in the memory 50 (step S410), and a page box for the next page is created (step S412). When the analyzed contents until the necessity of page break is determined are temporarily stored in the
こうしてすべての要素ボックスをレイアウトすると、指定されたDOMツリーをメモリ50のDOMツリー用格納領域から削除して(ステップS426)、レイアウト処理を終了する。このように、レイアウト処理を終了するときに用いたDOMツリーをメモリ50のDOMツリー用格納領域から削除することにより、DOMツリー用格納領域に不要なDOMツリーが格納された状態が継続されるのを回避することができる。この結果、解析部30によって作成される新たなDOMツリーの格納領域を確保することができる。
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 S426), 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
レイアウト描画指示処理(図6)の説明に戻る。レイアウトを開始すると、最初のページ分のレイアウトが完了するのを待って(ステップS310)、レイアウトが完了したページを指定してRPI40に描画開始指示を出力する(ステップS320)。ページ分のレイアウトが完了したか否かの判定は、次ページに対応するページボックスが作成されたか否かにより、1ページだけしかないときにはレイアウト処理が終了したか否かにより行なうことができる。描画開始指示されたRPI40は、図10に例示する描画処理を実行し、ページボックスに従ってテキストや画像をメモリ50の印刷用画像格納領域を用いてRGBデータとして描画し(ステップS500)、描画が終了したときに色変換部42に色変換指示を出力すると共に(ステップS510)、描画終了をレイアウタ38に出力する(ステップS520)。なお、画像の描画については、画像ファイルを読み出し、ファイル形式によっては展開等を行なって描画する。図11に具体例の印刷結果の一例を示す。
Returning to the description of the layout drawing instruction process (FIG. 6). 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
描画開始指示を出力した後はそのページの描画が終了するのを待って(ステップ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
図12に他の具体例のXHTML文書を示し、図13に図12の具体例のDOMツリーの一例を示し、図14に図12の具体例のレイアウトを解析している様子を示し、図15に図12の具体例の印刷結果の一例を示す。図12の具体例では、bodyタグの下、4行目のpタグ中に下線を付した「pege−break−inside:avoid」が記載されることにより、このpタグ内における改ページが禁止される。このpタグ内には、図13のDOMツリーに示すように、3個の画像(img)の要素ボックスが作成されているから、3個の画像のいずれかで改ページの必要性が判定されると、3個すべての画像が改ページ後にレイアウトされることになる。例えば、図14に示すように、3個目の画像(img3)に改ページの必要性が判定されると、図15に示すように、すべての画像(img1〜img3)が改ページ後に配置されることになる。 FIG. 12 shows an XHTML document of another specific example, FIG. 13 shows an example of the DOM tree of the specific example of FIG. 12, FIG. 14 shows how the layout of the specific example of FIG. Shows an example of the print result of the specific example of FIG. In the specific example of FIG. 12, “page-break-side: void” with an underline in the p tag on the fourth line below the body tag is described, thereby preventing page breaks in the p tag. The In this p tag, as shown in the DOM tree of FIG. 13, element boxes of three images (img) are created, and the necessity of a page break is determined in one of the three images. Then, all three images are laid out after the page break. For example, as shown in FIG. 14, when the necessity for a page break is determined for the third image (img3), all the images (img1 to img3) are arranged after the page break as shown in FIG. Will be.
以上説明した実施例のカラーインクジェットプリンタ20によれば、改ページの禁止が指定されているときには、改ページの必要性が判定されるまでに解析した内容を一時的にメモリ50に記憶し、この記憶した内容を改ページ後のものとして適用し、その後の解析を続行するから、改ページ後に新たに解析し直す場合に比して、迅速にレイアウトを作成することができる。この結果、XHTML文書を迅速に解析して印刷することができる。しかも、改ページの禁止の指定は、オブジェクト毎に行なうこともできるし、複数のオブジェクトを含むグループに対しても行なうことができる。
According to the color
また、実施例のカラーインクジェットプリンタ20によれば、URLが指定される毎にXHTML文書の解析中であるか否かに拘わらずに指定されたURLをメモリ50のURL格納用バッファ領域に格納することができる。また、メモリ50のURL格納用バッファ領域にURLが格納されているときには、レイアウタ38によるレイアウトの実行中であるか否かに拘わらずにXHTML文書の解析を順次行なうことができる。この結果、レイアウタ38によるレイアウトの実行中であるか否かに拘わらず、URLの指定を格納し、URLにより特定されるXHTML文書を読み込んで解析することができる。したがって、印刷を完了する毎にURLにより特定されるXHTML文書を読み込んで解析して印刷するものに比して、迅速に解析して印刷することができる。
Further, according to the
ここで、実施例のカラーインクジェットプリンタ20では、XMLパーサー34が構造書式解析手段に相当し、レイアウタ38がレイアウト作成手段に相当し、RPI40と色変換部42と2値化部44とイメージバッファ46と印刷実行部48とが印刷実行手段に相当する。
Here, in the
実施例のカラーインクジェットプリンタ20では、改ページの禁止の指定をオブジェクト毎に行なうことができるだけでなく、複数のオブジェクトを含むグループに対しても行なうことができるものとしたが、改ページの禁止の指定は、オブジェクト毎にだけしか行なうことができないものとしたり、少なくとも一つのオブジェクトを含むグループに対してだけしか行なうことができないものとしてもよい。
In the color
実施例のカラーインクジェットプリンタ20では、メモリ50のURL格納用バッファ領域にURLが格納されているときには、メモリ50のDOMツリー用格納領域に格納されているDOMツリーの数に拘わらずに、XHTML文書の解析を順次行なうものとしたが、メモリ50のDOMツリー用格納領域に格納されているDOMツリーが所定数のときには所定数未満となるまで次のXHTML文書の解析を保留するものとしてもよい。所定数としては例えば値2とすることができる。こうすれば、メモリ50のDOMツリー用格納領域を小さくすることができる。
In the
実施例のカラーインクジェットプリンタ20では、メモリ50のURL格納用バッファ領域にURLが格納されているときには、XHTML文書の解析を終了次第、直ちに次のXHTML文書を解析するものとしたが、XHTML文書の解析を終了した以降であれば如何なるタイミングで次のXHTML文書を解析するものとしてもよい。
In the
実施例のカラーインクジェットプリンタ20では、URLが指定される毎にXHTML文書の解析中であるか否かに拘わらずに指定されたURLをメモリ50のURL格納用バッファ領域に格納すると共にメモリ50のURL格納用バッファ領域にURLが格納されているときにはレイアウタ38によるレイアウトの実行中であるか否かに拘わらずにXHTML文書の解析を順次行なうものとしたが、レイアウトの実行中などの印刷処理を実行しているときにはXHTML文書の解析を行なわないものとしてもよい。この場合、URLの受け付けも印刷処理が終了したときに行なうものとしても差し支えない。
In the
実施例のカラーインクジェットプリンタ20では、記述文書としてXHTMLにより記述されたXHTML文書を解析して印刷するものとしたが、他のマークアップ言語により記述された記述文書を解析して印刷するものとしてもよい。また、マークアップ言語以外の言語により記述された文書を解析して印刷するものとしても差し支えない。
In the
実施例のカラーインクジェットプリンタ20では、入力インターフェース22に接続される機器としてコンピュータ10やデジタルテレビ12やデジタルカメラ14などを記載したが、如何なる機器を接続するものとしても差し支えない。
In the
実施例では、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.
10 コンピュータ、12 デジタルテレビ、14 デジタルカメラ、20 カラーインクジェットプリンタ、22 入力インターフェース、24 信号処理部、30 解析部、32 コア、34 XMLパーサー、36 CSSPI、38 レイアウタ、40 RPI、42 色変換部、44 2値化部、46 イメージバッファ、48 印刷実行部、50 メモリ、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, 60 operation unit, 61 liquid crystal display, 62 operation button, 63 CPU, 64 ROM, 65 display controller (LCDC), 66 memory.
Claims (12)
記述文書におけるオブジェクトの階層的な木構造と該オブジェクトの書式とを解析する構造書式解析手段と、
前記解析された木構造と書式とに基づいてオブジェクトを順次解析して配置する手法をもってレイアウトすることにより前記媒体へのページ毎のレイアウトを作成する際に、少なくとも一つのオブジェクトを含み改ページ禁止の指定がなされた改ページ禁止グループに属するオブジェクトについては、改ページが必要になるまでは該改ページ禁止グループに属するオブジェクトを順次解析して配置し、改ページが必要になったときには該改ページ禁止グループに属するオブジェクトのうち該改ページが必要になるまでに行なわれたオブジェクトの解析および配置を該改ページ後に行なわれたオブジェクトの解析および配置として適用すると共に該改ページが必要になったときに解析していたオブジェクト以降のオブジェクトを順次解析して配置することにより、ページ毎のレイアウトを作成するレイアウト作成手段と、
前記作成されたページ毎のレイアウトに基づいてオブジェクトをレイアウトして前記媒体に印刷する印刷実行手段と、
を備える印刷装置。 A printing device that analyzes a description document that hierarchically describes printable objects and prints it on a medium such as paper,
A structure format analysis means for analyzing the hierarchical tree structure of the object in the description document and the format of the object;
When creating a layout for each page on the medium by laying out with a method of sequentially analyzing and arranging objects based on the analyzed tree structure and format, page breaks including at least one object are prohibited. For the objects belonging to the specified page break prohibition group, the objects belonging to the page break prohibition group are sequentially analyzed and arranged until a page break is required, and the page break is prohibited when a page break is required. When the analysis and arrangement of the objects performed before the page break is necessary among the objects belonging to the group are applied as the analysis and arrangement of the objects performed after the page break, and the page break is necessary Sequentially analyze and distribute objects after the object being analyzed By, the layout creating means for creating a layout for each page,
Print execution means for laying out an object based on the created layout for each page and printing on the medium;
A printing apparatus comprising:
記述文書におけるオブジェクトの階層的な木構造と該オブジェクトの書式とを解析する構造書式解析手段と、
前記解析された木構造と書式とに基づいてオブジェクトを該オブジェクトの内容を順次解析して配置する手法をもってレイアウトすることにより前記媒体へのページ毎のレイアウトを作成する際に、前記オブジェクトのうち改ページ禁止の指定がなされた改ページ禁止オブジェクトについては、改ページが必要になるまでは該改ページ禁止オブジェクトの内容を順次解析して配置し、改ページが必要になったときには該改ページ禁止オブジェクトの内容のうち該改ページが必要になるまでに行なわれた内容の解析および配置を該改ページ後に行なわれた内容の解析および配置として適用すると共に該改ページが必要になったときに解析していた内容以降の内容を順次解析して配置することにより、ページ毎のレイアウトを作成するレイアウト作成手段と、
前記作成されたページ毎のレイアウトに基づいてオブジェクトをレイアウトして前記媒体に印刷する印刷実行手段と、
を備える印刷装置。 A printing device that analyzes a description document that hierarchically describes printable objects and prints it on a medium such as paper,
A structure format analysis means for analyzing the hierarchical tree structure of the object in the description document and the format of the object;
When creating a layout for each page on the medium by laying out an object based on the analyzed tree structure and format by a method of sequentially analyzing and arranging the contents of the object, the object is modified. For a page break prohibition object for which page prohibition is specified, the contents of the page break prohibition object are sequentially analyzed and arranged until a page break is required, and when a page break is required, the page break prohibition object The analysis and arrangement of the contents performed before the page break is necessary are applied as the analysis and arrangement of the contents performed after the page break and are analyzed when the page break is necessary. A layout that creates a layout for each page by sequentially analyzing and arranging the contents after the previous contents And forming means,
Print execution means for laying out an object based on the created layout for each page and printing on the medium;
A printing apparatus comprising:
(a)記述文書におけるオブジェクトの階層的な木構造と該オブジェクトの書式とを解析し、
(b)前記解析した木構造と書式とに基づいてオブジェクトを順次解析して配置する手法をもってレイアウトすることにより前記媒体へのページ毎のレイアウトを作成する際に、少なくとも一つのオブジェクトを含み改ページ禁止の指定がなされた改ページ禁止グループに属するオブジェクトについては、改ページが必要になるまでは該改ページ禁止グループに属するオブジェクトを順次解析して配置し、改ページが必要になったときには該改ページ禁止グループに属するオブジェクトのうち該改ページが必要になるまでに行なわれたオブジェクトの解析および配置を該改ページ後に行なわれたオブジェクトの解析および配置として適用すると共に該改ページが必要になったときに解析していたオブジェクト以降のオブジェクトを順次解析して配置することにより、ページ毎のレイアウトを作成し、
(c)前記作成したページ毎のレイアウトに基づいてオブジェクトをレイアウトして前記媒体に印刷する
印刷方法。 A printing method in a printing apparatus that analyzes a description document in which printable objects are hierarchically described and prints on a medium such as paper,
(A) Analyzing the hierarchical tree structure of the object in the description document and the format of the object;
(B) When creating a layout for each page on the medium by laying out with a method of sequentially analyzing and arranging objects based on the analyzed tree structure and format, the page break includes at least one object. For the objects belonging to the page break prohibition group for which prohibition is specified, the objects belonging to the page break prohibition group are sequentially analyzed and arranged until a page break is necessary. Of the objects belonging to the page prohibition group, the analysis and arrangement of the object performed until the page break is necessary are applied as the analysis and arrangement of the object performed after the page break, and the page break is necessary. Analyze objects after the object that was being analyzed By arrangement, to create a layout for each page,
(C) A printing method in which an object is laid out based on the created layout for each page and printed on the medium.
(a)記述文書におけるオブジェクトの階層的な木構造と該オブジェクトの書式とを解析し、
(b)前記解析した木構造と書式とに基づいてオブジェクトを該オブジェクトの内容を順次解析して配置する手法をもってレイアウトすることにより前記媒体へのページ毎のレイアウトを作成する際に、前記オブジェクトのうち改ページ禁止の指定がなされた改ページ禁止オブジェクトについては、改ページが必要になるまでは該改ページ禁止オブジェクトの内容を順次解析して配置し、改ページが必要になったときには該改ページ禁止オブジェクトの内容のうち該改ページが必要になるまでに行なわれた内容の解析および配置を該改ページ後に行なわれた内容の解析および配置として適用すると共に該改ページが必要になったときに解析していた内容以降の内容を順次解析して配置することにより、ページ毎のレイアウトを作成し、
(c)前記作成したページ毎のレイアウトに基づいてオブジェクトをレイアウトして前記媒体に印刷する
印刷方法。 A printing method in a printing apparatus that analyzes a description document in which printable objects are hierarchically described and prints on a medium such as paper,
(A) Analyzing the hierarchical tree structure of the object in the description document and the format of the object;
(B) When creating a layout for each page on the medium by laying out an object based on the analyzed tree structure and format by a method of sequentially analyzing and arranging the contents of the object, Among the page break prohibition objects for which page break prohibition is specified, the contents of the page break prohibition object are sequentially analyzed and arranged until a page break is necessary. When the analysis and arrangement of the contents of the prohibited object before the page break is necessary are applied as the analysis and arrangement of the contents performed after the page break and the page break is necessary Create a layout for each page by sequentially analyzing and arranging the contents after the analyzed contents,
(C) A printing method in which an object is laid out based on the created layout for each page and printed on the medium.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004060961A JP2005246796A (en) | 2004-03-04 | 2004-03-04 | Printing apparatus and printing method therefor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004060961A JP2005246796A (en) | 2004-03-04 | 2004-03-04 | Printing apparatus and printing method therefor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2005246796A true JP2005246796A (en) | 2005-09-15 |
Family
ID=35027748
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004060961A Pending JP2005246796A (en) | 2004-03-04 | 2004-03-04 | Printing apparatus and printing method therefor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2005246796A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011068060A (en) * | 2009-09-28 | 2011-04-07 | Brother Industries Ltd | Printer and program |
-
2004
- 2004-03-04 JP JP2004060961A patent/JP2005246796A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011068060A (en) * | 2009-09-28 | 2011-04-07 | Brother Industries Ltd | Printer and program |
| US8743412B2 (en) | 2009-09-28 | 2014-06-03 | Brother Kogyo Kabushiki Kaisha | Printing device which prints first object and second object on the same page |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2005131915A (en) | Printing apparatus, printing method, and program for printing apparatus | |
| JP4298362B2 (en) | Information processing apparatus and print preview display method | |
| US8634100B2 (en) | Image forming apparatus for detecting index data of document data, and control method and program product for the same | |
| US20050128516A1 (en) | Document processing apparatus and document processing method | |
| US20090204888A1 (en) | Document processing apparatus, document processing method, and storage medium | |
| CN101951452A (en) | Printing state set device, method, system and storage medium | |
| US20160219164A1 (en) | Image processing device, image processing method, and image forming system | |
| US20050036170A1 (en) | Image processing apparatus and image forming apparatus | |
| JP4438380B2 (en) | Printing apparatus, printing method, and program for printing apparatus | |
| JP2008311930A (en) | Image processing apparatus, image processing method, computer program, and storage medium | |
| JP5031788B2 (en) | Printing apparatus and program | |
| JP2010055582A (en) | Printing system, printer and terminal device constituting the printing system | |
| JP2005208723A (en) | Printing apparatus and medium type setting method | |
| JP4449398B2 (en) | Printing apparatus, printing method, and program for printing apparatus | |
| JP2005246796A (en) | Printing apparatus and printing method therefor | |
| US9253343B2 (en) | Information processing apparatus, control method, and storage medium for providing a preview and/or display of a main display document generated from all parts of a print document | |
| US20060092454A1 (en) | Printing device and printing method | |
| JP5915091B2 (en) | Image forming apparatus, image forming system, output image data processing method, program, and recording medium | |
| JP2005208809A (en) | Document analysis apparatus and method, program for document analysis apparatus, and printing apparatus | |
| JP4599950B2 (en) | Processing apparatus and processing method | |
| US20060092447A1 (en) | Printing device and corresponding printing method used therein | |
| JP4165366B2 (en) | Document analysis apparatus and method, program for document analysis apparatus, and printing apparatus | |
| JP2005111711A (en) | Printing apparatus, printing method, and program for printing apparatus | |
| JP2005208810A (en) | Document analysis apparatus and method, program for document analysis apparatus, and printing apparatus | |
| US8913294B2 (en) | Image processing apparatus and image processing system |