JP4549379B2 - Document processing apparatus, document processing method, and program - Google Patents

Document processing apparatus, document processing method, and program Download PDF

Info

Publication number
JP4549379B2
JP4549379B2 JP2007279382A JP2007279382A JP4549379B2 JP 4549379 B2 JP4549379 B2 JP 4549379B2 JP 2007279382 A JP2007279382 A JP 2007279382A JP 2007279382 A JP2007279382 A JP 2007279382A JP 4549379 B2 JP4549379 B2 JP 4549379B2
Authority
JP
Japan
Prior art keywords
page
template
layout
sub
content data
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
JP2007279382A
Other languages
Japanese (ja)
Other versions
JP2008117393A (en
Inventor
斉 尾坂
聡 太田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2007279382A priority Critical patent/JP4549379B2/en
Publication of JP2008117393A publication Critical patent/JP2008117393A/en
Application granted granted Critical
Publication of JP4549379B2 publication Critical patent/JP4549379B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、たとえばデータベースに登録されたレコードの各フィールドを予め定めた位置に配置して文書を完成させる自動レイアウト機能を有する文書処理装置及び文書処理方法に関するものである。   The present invention relates to a document processing apparatus and a document processing method having an automatic layout function for completing a document by arranging fields of records registered in a database at predetermined positions, for example.

近年、商品の多品種化で商品ライフが短くなっていること、インターネット利用の普及による消費者のカスタマイズサービス指向などの要因からCRM(カスタマ・リレーションシップ・マネージメント)や、One−to−One(1対1)マーケティングの必要性が注目されている。これらの手法により顧客満足度を高め、顧客の開拓や囲い込みを目指すものである。   In recent years, CRM (Customer Relationship Management) and One-to-One (1) due to factors such as the shortening of product life due to the increase in product variety and the orientation of consumer customization services due to the widespread use of the Internet. 1) The need for marketing is drawing attention. These methods aim to increase customer satisfaction and to cultivate and retain customers.

カスタマ・リレーションシップ・マネージメントとは、顧客のデータベースをもとに、個々のニーズに即した対応を実施して、顧客の満足度を高め、会社の収益性を向上させる仕組みである。また1対1マーケティングは、データベース・マーケティングの一種で、顧客の年齢、性別、趣味、嗜好、購買履歴等の個人属性情報をデータベース化し、その内容を分析して、顧客のニーズに合った提案を行うマーケティング手法であり、その代表的な適用例としてバリアブルプリントが挙げられる。ここ最近、DTP(デスクトップパブリッシング)技術の進展とデジタル印刷装置の普及に伴って、文書を顧客毎にカスタマイズして出力するバリアブルプリントシステムが開発され、顧客毎に異なる量のコンテンツを最適にレイアウトした文書の作成が求められるようになった。   Customer relationship management is a mechanism that enhances customer satisfaction and improves the profitability of a company by responding to individual needs based on a customer database. One-to-one marketing is a type of database marketing that creates a database of personal attribute information such as customer's age, gender, hobbies, preferences, purchase history, etc., analyzes the content, and makes proposals that meet customer needs. This is a marketing method to be performed, and a typical application example is variable print. Recently, with the advancement of DTP (desktop publishing) technology and the spread of digital printing devices, a variable print system that customizes and outputs documents for each customer has been developed and optimally laid out different amounts of content for each customer. It is now required to create a document.

従来、バリアブルプリントシステムでは、ドキュメント上にレイアウト枠(コンテナともいう)が作成され、各コンテナのコンテンツとしてデータベースの一定の条件を満たすレコードやフィールドが関連づけられる。こうしてデータベースとレイアウトとを関連付けることにより、バリアブルプリントは実現されていた。   Conventionally, in a variable print system, a layout frame (also referred to as a container) is created on a document, and records and fields that satisfy certain conditions of a database are associated as contents of each container. In this way, variable printing has been realized by associating the database with the layout.

しかし、テキストおよびイメージのコンテナのサイズが固定であったため、データベース内のデータがコンテナに挿入されたときに、データ量がコンテナサイズより多いとテキストのオーバーラップおよびイメージのクリッピングが発生する。またデータ量がコンテナサイズより小さいと隙間が空いてしまう。   However, since the sizes of the text and image containers are fixed, when the data in the database is inserted into the container, if the amount of data exceeds the container size, text overlap and image clipping occur. Further, if the data amount is smaller than the container size, a gap is left.

それらの問題を解決するための技術として、ある文字領域のサイズが大きくなった場合、隣接した領域のサイズを小さくする技術が特許文献1に開示されており、文字領域に対して文字を入力するに従い該文字領域サイズを拡張していき、該文字領域と隣接する領域サイズを縮小することが記載されている。   As a technique for solving these problems, a technique for reducing the size of an adjacent area when the size of a certain character area increases is disclosed in Patent Document 1, and characters are input to the character area. According to the document, the size of the character region is expanded and the size of the region adjacent to the character region is reduced.

このように、従来の自動レイアウト技術には、入力されるテキスト量に応じて、レイアウト枠(コンテナ)のサイズを動的に変化させることが可能なものが存在する。   As described above, some conventional automatic layout techniques can dynamically change the size of a layout frame (container) in accordance with the amount of input text.

また、特許文献2には、複数の商品情報(商品レコード)をページ内のレイアウト領域に配置する技術も記載されている。   Patent Document 2 also describes a technique for arranging a plurality of product information (product records) in a layout area in a page.

この技術では、レイアウト(たとえば商品名、イメージ、価格などの配置)をあらかじめ設定したマスタ部品(本件のサブテンプレートに相当)を用意しておき、商品情報ごとにどのマスタ部品を使用するかを設定する。そして、商品情報が有するデータ(商品名やイメージ、価格など)を、設定されたマスタ部品内の所定の領域に配置して、ページ内に指定されたレイアウト領域に順次配置する。なお、本願ではサブテンプレートに従って1レコードの情報を配置し、複数のサブテンプレートをフローエリアに順次配置する機能をマルチレコード機能と呼び、その動作を、サブテンプレートをフローエリアに流しこむ、と表現する。
特開平7−129658号 特開2000−48216号(段落0025〜0055、図2、図11)
In this technology, a master part (equivalent to the sub template in this case) with a preset layout (for example, placement of product name, image, price, etc.) is prepared, and which master part is used for each product information To do. Then, data (product name, image, price, etc.) included in the product information is arranged in a predetermined area in the set master part and sequentially arranged in a layout area designated in the page. In the present application, the function of arranging information of one record according to the sub template and sequentially arranging a plurality of sub templates in the flow area is called a multi-record function, and the operation is expressed as flowing the sub template into the flow area. .
JP-A-7-129658 JP 2000-48216 (paragraphs 0025 to 0055, FIGS. 2 and 11)

しかしながら、特許文献1に記載の技術には、テキストの入力に応じて文字領域が拡大されていくことが記載されているが、文字領域のサイズが大きくなった場合、隣接した領域は間隔を保つべく縮小されてしまうため、入力されるテキスト量が増加するに従い、隣接した領域は縮小され続けてしまうといった問題点があった。   However, the technique described in Patent Document 1 describes that the character area is enlarged in accordance with the input of the text. However, when the size of the character area increases, the adjacent areas are kept apart. As the amount of input text increases, the adjacent area continues to be reduced.

更に特許文献1では、上述したようなデータベースと各領域を関連付けてコンテンツデータを流し込むことで、顧客毎にカスタマイズした文書を作成するバリアブルプリントシステムについては考慮されていなかった。   Furthermore, Patent Document 1 does not consider a variable print system that creates a customized document for each customer by associating the above-described database with each region and flowing content data.

また、特許文献2に記載の技術では、レコードごとにどのマスタ部品を使用すべきかを予め設定しなければならず、例えばレコード数が膨大な量であった場合、レコード数の増加に応じて設定するための操作回数も増加するためユーザの操作性を低下させることとなる。   Moreover, in the technique described in Patent Document 2, it is necessary to set in advance which master part should be used for each record. For example, when the number of records is enormous, it is set according to an increase in the number of records. Therefore, the number of operations for doing so increases, and the operability for the user is lowered.

また、ユーザによっては同じようなデータ属性を有するレコードは同じマスタ部品を使用したいと考えることが想定される。例えば、レコード1〜10を用いて文書を作成する場合、レコード2およびレコード5には同じ価格データが設定されているとする。この場合、ユーザはレコード内のデータ属性が同じであるレコード2および5に関しては同じマスタ部品を使用して文書を作成したいと考える場合がある。   Further, it is assumed that some users want to use the same master part for records having similar data attributes. For example, when creating a document using records 1 to 10, it is assumed that the same price data is set in record 2 and record 5. In this case, the user may want to create a document using the same master part for records 2 and 5 having the same data attribute in the record.

このような場合、特許文献2に記載の技術では、レコード毎にどのマスタ部品を使用すべきかを予め設定しなければならないためレコード2で使用したマスタ部品を覚えておき、レコード5にマスタ部品を設定する際に、ユーザの記憶を頼りにマスタ部品を選択しなければならない。しかしながら、通常パンフレットやカタログを作成する際のレコード数は膨大な数となることが予想され、さらに多くの種類のマスタ部品が使用される。この際に、ユーザの記憶のみでマスタ部品を選択していく手法が最適であるとは言い難い。   In such a case, in the technique described in Patent Document 2, it is necessary to preset which master part should be used for each record. Therefore, the master part used in record 2 is remembered, and the master part is stored in record 5. When setting, the master part must be selected based on the user's memory. However, the number of records for creating a pamphlet or catalog is normally expected to be enormous, and more types of master parts are used. At this time, it is difficult to say that the method of selecting the master part only by the user's memory is optimal.

また、特許文献2では、レイアウト領域に配置すべきレコード数によっては、指定されたレイアウト領域にレコードを収めることができない場合がある。1ページ分のレイアウト領域しか設定していなかった場合、特許文献2では次のレイアウト候補位置に移動して配置することになるが、次のレイアウト候補位置へ移動できない場合の処理については記載されておらず、結果として、データをレイアウトすることができないという問題が発生する。   In Patent Document 2, depending on the number of records to be arranged in the layout area, there are cases where the record cannot be stored in the designated layout area. In the case where only one page of layout area has been set, Patent Document 2 moves to the next layout candidate position and arranges it, but the process in the case where it cannot move to the next layout candidate position is described. As a result, there arises a problem that data cannot be laid out.

また、このように全レコードをレイアウトすることができない場合の一般的な処理として、レイアウトすべきデータを縮小する方法などが考えられるが、レイアウトすべきデータのサイズを変更することにより、ユーザの所望とするレイアウトサイズが得られなくなる可能性がある。   In addition, as a general process when it is not possible to lay out all the records in this way, a method of reducing the data to be laid out can be considered, but by changing the size of the data to be laid out, the user's desired The layout size may not be obtained.

このように、ユーザが当該顧客の好みそうなカタログやパンフレットを作成することを想定すると、従来技術だけではユーザに対して良好な操作性を提供しつつ、多様にわたる顧客の趣向に応じた文書を作成することが困難となる。   In this way, assuming that the user creates a catalog or pamphlet that the customer seems to like, the conventional technology alone provides a good operability for the user, and documents according to various customer preferences. It becomes difficult to create.

また、従来のマルチレコード印刷(複数のレコードを1つのドキュメントに配置して文書を印刷する機能)では、レコードの特定の項目が変更された(例えば、顧客名が変わった)ときだけ、ドキュメントを分割する(たとえば顧客別にドキュメントを分割する)という、単純な1階層の分割しかできなかった。これでは、たとえば商品毎にページを改めたい場合など、所望の位置に文書区切り(ブレークとも呼ぶ。)を挿入することができず、整然とした文書あるいは所望の区切り目を設けた文書の作成が困難であった。   In addition, with conventional multi-record printing (a function for printing a document by arranging a plurality of records in one document), a document is only printed when a specific item of the record is changed (for example, a customer name is changed). Dividing (for example, dividing a document for each customer) could only be done in one simple hierarchy. This makes it difficult to insert a document break (also called a break) at a desired position, for example, when the user wants to change the page for each product, making it difficult to create an orderly document or a document with a desired break. Met.

本発明は上記課題を鑑みてなされたもので、ユーザの操作性を保持したまま顧客の趣向に応じた多種多様な出力結果を得ることを実現するために、テンプレート上の領域に条件式を設定し、該条件式に基づいて抽出されたレコードデータを複数種類のサブテンプレートにレイアウトし、所定の領域内に配置する自動レイアウト機能をもった文書処理装置及び方法を提供することを目的とする。   The present invention has been made in view of the above problems, and in order to achieve a variety of output results according to customer preferences while maintaining user operability, conditional expressions are set in regions on the template. It is another object of the present invention to provide a document processing apparatus and method having an automatic layout function for laying out record data extracted based on the conditional expression into a plurality of types of sub-templates and arranging them in a predetermined area.

また、配置すべきデータのサイズを縮小することなく、ユーザの所望とする出力結果をえるために、抽出されたレコードを領域内に配置できない場合、該領域を有するページを生成する自動レイアウト機能をもった文書処理装置及び方法を提供することを目的とする。   In addition, in order to obtain an output result desired by the user without reducing the size of data to be arranged, an automatic layout function for generating a page having the area when the extracted record cannot be arranged in the area is provided. An object of the present invention is to provide a document processing apparatus and method.

また、文書の区切り挿入の自由度を高め、それにより整然としたレイアウトあるいはユーザの意志を反映したレイアウトを実現できるマルチレコード対応の自動レイアウト機能をもった文書処理装置及び方法を提供することを目的とする。   Another object of the present invention is to provide a document processing apparatus and method having a multi-record automatic layout function that can increase the degree of freedom of document delimiter insertion and thereby realize an orderly layout or a layout reflecting the user's will. To do.

あるいは、コンテンツデータを配置するための領域を有する第1および第2ページを用いてレイアウト処理を実行する文書処理装置であって、
前記コンテンツデータを取得する取得手段と、
前記取得手段により取得されたコンテンツデータが前記第1および第2ページの領域から溢れ、かつ、前記第1ページに含まれる領域が第2ページに含まれる領域よりも大きい場合、前記第1および第2ページの領域と前記第1ページに基づいて生成した新たなページの領域とに前記コンテンツデータを配置し、前記取得手段により取得されたコンテンツデータが前記第1および第2ページの領域から溢れ、かつ、前記第2ページに含まれる領域が第1ページに含まれる領域よりも大きい場合、前記第1および第2ページの領域と前記第2ページに基づいて生成した新たなページの領域とに前記コンテンツデータを配置する配置手段とを有する。
Alternatively, a document processing apparatus that executes layout processing using first and second pages having areas for arranging content data,
Obtaining means for obtaining the content data;
When the content data acquired by the acquisition unit overflows from the areas of the first and second pages and the area included in the first page is larger than the area included in the second page, the first and second The content data is arranged in a two-page area and a new page area generated based on the first page, and the content data acquired by the acquisition unit overflows from the first and second page areas, When the area included in the second page is larger than the area included in the first page, the first and second page areas and a new page area generated based on the second page Arrangement means for arranging content data.

本発明によれば、抽出されたレコードを領域内に配置できない場合、該領域を有するテンプレートを生成するようにしたため、配置すべきデータのサイズを縮小することなく、ユーザの所望とするレイアウト文書を作成することが可能となる。   According to the present invention, when an extracted record cannot be arranged in an area, a template having the area is generated. Therefore, a layout document desired by the user can be obtained without reducing the size of data to be arranged. It becomes possible to create.

あるいは、本発明によれば、複数のレコードの1つのレコードに含まれるコンテンツデータをサブテンプレートに含まれる部分領域に入力して当該サブテンプレート内のレイアウトを決定する処理を実行することで得られた複数のサブテンプレートを領域内に配置できない場合、抽出条件が設定された領域を有するテンプレートを新たに生成する。   Alternatively, according to the present invention, the content data included in one of the plurality of records is input to the partial area included in the subtemplate, and the process for determining the layout in the subtemplate is executed. If a plurality of sub-templates cannot be arranged in the region, a template having a region for which extraction conditions are set is newly generated.

[第1実施形態]
<実施形態の概要>
本発明の実施例を適用するのに好適な実施形態について説明を行う。まず発明の概略について説明する。本実施形態は、ドキュメントテンプレート(単にテンプレートとも呼ぶ。)に定義されたコンテナ(データが流し込まれる部分領域:フィールド領域とも呼ばれる。)に従って、データベースのレコード等を配置した文書を作成する、いわゆるバリアブルプリントと呼ばれる機能をコンピュータにより実現するためのコンピュータソフトウエアに関する。このソフトウエアが実行可能にロードされたコンピュータは、自動レイアウトシステム(あるいは文書処理装置)として機能する。本実施形態では特に、データをテンプレートに従って配置するのみならず、テンプレートに従って文書の一部を作成し、その文書の一部を、別途テンプレートに定義された領域(フローエリアと呼ぶ。)に挿入してドキュメントを完成させる機能(マルチレコード機能)を持つソフトウエアを開示している。挿入できる文書の一部の数はひとつのフローエリアについて一つとは限らない。さらに、テンプレートに複数のフローエリアが定義されている場合、一定の条件に従って、作成済みの文書の一部をフローエリア毎に振り分ける技術も開示される。なおフローエリア内に配置されるテンプレートを特にサブテンプレートと呼ぶ。また、フローエリアを含むテンプレートを特にマスタテンプレートと呼ぶ。
[First Embodiment]
<Outline of Embodiment>
An embodiment suitable for applying the example of the present invention will be described. First, an outline of the invention will be described. In the present embodiment, a so-called variable print that creates a document in which a database record or the like is arranged in accordance with a container (a partial area into which data is flowed: also called a field area) defined in a document template (also called a template). The present invention relates to computer software for realizing a function called as “computer”. A computer loaded with this software executable functions as an automatic layout system (or document processing apparatus). In this embodiment, in particular, not only data is arranged according to a template, but also a part of a document is created according to the template, and the part of the document is inserted into an area (referred to as a flow area) separately defined in the template. Software with a function to complete a document (multi-record function) is disclosed. The number of documents that can be inserted is not necessarily one for one flow area. Furthermore, when a plurality of flow areas are defined in the template, a technique for distributing a part of a created document for each flow area according to a certain condition is also disclosed. A template arranged in the flow area is particularly called a sub template. A template including a flow area is particularly called a master template.

ここで、本実施形態の自動レイアウトシステムには2つの特徴的機能がある。第1は、レコードが1ページに入りきらない場合、たとえばレコード数が非常に多い場合など、新たなページにそのレコードを配置して、複数ページの文書を自動的に生成する機能である。第2は、個々のレコードについて、そのレコードに応じた形式(サブテンプレート)を用いて配置し、文書のレイアウトの自由度を高めるための機能である。次に、本発明を適用可能な本実施形態におけるコンピュータシステムの構成、およびアプリケーション構成について説明する。   Here, the automatic layout system of this embodiment has two characteristic functions. The first function is to automatically generate a multi-page document by arranging the record on a new page when the record does not fit on one page, for example, when the number of records is very large. The second is a function for arranging individual records using a format (sub-template) corresponding to the records to increase the degree of freedom of document layout. Next, the configuration of the computer system and the application configuration in the present embodiment to which the present invention is applicable will be described.

<システム構成図>
図1Aはバリアブルデータドキュメントを印刷するシステム100を図示している。本明細書で示された方法は図1Bで詳しく説明される汎用コンピュータモジュール101で所定のプログラムを実行することで実践される。図1Aに記述されるプロセスは、コンピュータモジュール101で実行され、システム100上で実施可能となるレイアウト編集アプリケーションプログラム121のように、ソフトウェアの全体あるいは一部分で実行される。特にレイアウト編集や印刷のステップは、本発明の文書処理装置であるコンピュータ101によって実行されるソフトウェアの指示によって実施される。ソフトウェアは例えば以下に記述されるような記憶装置を含むコンピュータの可読媒体に格納される。ソフトウェアはコンピュータの可読媒体からコンピュータにロードされ、コンピュータ101によって実行される。そのようなソフトウェアや媒体に記録されたコンピュータプログラムを持つコンピュータの可読媒体はコンピュータプログラム製品である。コンピュータでそのコンピュータプログラム製品を使用することで、ドキュメントのレイアウト編集やバリアブルデータ印刷を行える装置として、そのコンピュータは機能する。
<System configuration diagram>
FIG. 1A illustrates a system 100 for printing a variable data document. The method described herein is implemented by executing a predetermined program on the general-purpose computer module 101 described in detail in FIG. 1B. The process described in FIG. 1A is executed by the computer module 101 and executed by the whole or a part of software such as the layout editing application program 121 that can be executed on the system 100. In particular, the layout editing and printing steps are performed by software instructions executed by the computer 101 which is the document processing apparatus of the present invention. The software is stored in a computer readable medium including a storage device as described below, for example. The software is loaded into the computer from the computer readable medium and executed by the computer 101. A computer readable medium having a computer program recorded on such software or medium is a computer program product. By using the computer program product on a computer, the computer functions as an apparatus that can perform document layout editing and variable data printing.

コンピュータモジュール101にはキーボード132やマウス133のようなポインティングデバイスなどの入力装置がつながれ、ディスプレイ装置144や状況に応じてはローカルプリンタ145を含む出力装置が連結される。入力/出力インターフェース138はコンピュータモジュール101をネットワーク接続107から接続してシステム100の他のコンピュータ装置につなげることができる。そのネットワーク接続107の典型はローカルエリアネットワーク(LAN)、あるいはワイドエリアネットワーク(WAN)である。   The computer module 101 is connected to an input device such as a keyboard 132 and a pointing device such as a mouse 133, and an output device including a display device 144 and a local printer 145 depending on the situation. The input / output interface 138 can connect the computer module 101 from the network connection 107 to connect to other computer devices in the system 100. A typical network connection 107 is a local area network (LAN) or a wide area network (WAN).

コンピュータモジュール101は、一般的には少なくとも1つのプロセッサーユニット135、例えば半導体のランダムアクセスメモリ(RAM)やリードオンリーメモリ(ROM)から構成されるメモリユニット136、ビデオインタフェース137を含むINPUT/OUTPUT(I/O)インターフェース、キーボード132やマウス133のためのI/Oインターフェース143を含んでいる。   The computer module 101 generally includes at least one processor unit 135, for example, a memory unit 136 composed of a semiconductor random access memory (RAM) or a read only memory (ROM), and an INPUT / OUTPUT (I / O) Interface, I / O interface 143 for keyboard 132 and mouse 133 is included.

記憶装置139は、一般的にはハードディスクドライブ140やフレキシブルディスクドライブ141を含んでいる。図1Bには示されていないが磁気テープドライブもまた使用される可能性がある。CD−ROMドライブ142は不揮発性のデータソースとして提供される。コンピュータモジュール101は、GNU/LINUX(登録商標)やマイクロソフト社のウィンドウズ(登録商標)のようなオペレーティングシステムに従って、あるいはコンピュータシステムの常套的なオペレーションモードによる方法によって、相互接続バス134を介して通信を行うコンピュータモジュール101に含まれる各構成要素(符号135〜符号143)を利用する。   The storage device 139 generally includes a hard disk drive 140 and a flexible disk drive 141. Although not shown in FIG. 1B, a magnetic tape drive may also be used. The CD-ROM drive 142 is provided as a nonvolatile data source. The computer module 101 communicates via the interconnect bus 134 in accordance with an operating system such as GNU / LINUX® or Microsoft Windows®, or by a method according to the conventional operating mode of the computer system. Each component (reference numeral 135 to reference numeral 143) included in the computer module 101 to be performed is used.

図1Aのレイアウト編集アプリケーションプログラム121は、通常は図1Bのハードディスクドライブ140に常駐し、プロセッサ135により実行、読み込み、コントロールされる。いくつかの事例では、アプリケーションプログラム121がCD−ROMやフレキシブルディスク上にエンコードされており、対応するフレキシブルディスクドライブ142やCD−ROMドライブ141を通じて読み込まれてユーザに提供される。あるいはもう一つの方法として、アプリケーションプログラム121はネットワーク接続107からユーザによって読み込まれてもよい。さらにソフトウェアは、磁気テープまたはROMまたは集積回路、光磁気ディスクまたは無線またはコンピュータモジュール101とその他のデバイス間の赤外線通信、PCMCIAカードのようなコンピュータ可読カード、そしてEメール通信やWEBサイト上の記録情報を持つインターネットやイントラネットを含む、他の適当な大きさのコンピュータ可読媒体からコンピュータモジュール101内にロードされる可能性もある。上記の例は単に関連するコンピュータ可読メディアの一例である。他のコンピュータ可読媒体も使用される可能性はある。   The layout editing application program 121 of FIG. 1A normally resides in the hard disk drive 140 of FIG. 1B, and is executed, read and controlled by the processor 135. In some cases, the application program 121 is encoded on a CD-ROM or flexible disk, and is read through the corresponding flexible disk drive 142 or CD-ROM drive 141 and provided to the user. Alternatively, the application program 121 may be read from the network connection 107 by the user. In addition, software includes magnetic tape or ROM or integrated circuits, magneto-optical disks or wireless or infrared communication between computer module 101 and other devices, computer readable cards such as PCMCIA cards, and recorded information on email communications and WEB sites. May be loaded into the computer module 101 from other suitably sized computer readable media, including the Internet and Intranets. The above examples are merely examples of related computer readable media. Other computer readable media may also be used.

またレイアウト編集アプリケーション121は、バリアブルデータ印刷(VDP)を行うよう指示し、2つのソフトウェアコンポーネントを含んでいる。これらのうち第1のコンポーネントはレイアウトエンジン105であり、これは長方形のコンテナで与えられた制限やサイズによって、コンテナを構成する矩形および線の位置を計算するためのソフトウェアコンポーネントである。なお、レイアウトエンジン105は、コンテナのみならずその他のオブジェクトについても位置等を計算することが可能である。レイアウトエンジン105は各部分領域(たとえばコンテナ)のサイズと位置を決定するアプリケーションとして動作し、図示省略したプリンタドライバに描画情報を出力することで、プリンタドライバがバリアブルデータドキュメントのイメージ描画処理を行い、印刷データを生成する。   The layout editing application 121 instructs to perform variable data printing (VDP) and includes two software components. Among these, the first component is a layout engine 105, which is a software component for calculating the positions of rectangles and lines constituting the container according to the restrictions and sizes given by the rectangular container. The layout engine 105 can calculate the position and the like not only for the container but also for other objects. The layout engine 105 operates as an application for determining the size and position of each partial area (for example, a container), and outputs drawing information to a printer driver (not shown) so that the printer driver performs image drawing processing of a variable data document. Generate print data.

第2のコンポーネントであるユーザインターフェース103は、ユーザにドキュメントテンプレートを作成させ、ドキュメントテンプレート内でデータソースと関連付けるメカニズムを提供する。ドキュメントテンプレートとは、たとえば定型的な文や上述したコンテナを文書上に配置した雛形となるデータである。ドキュメントテンプレートの所定の領域、たとえばコンテナ内にデータベースから取り込んだテキストや画像等のデータを流しこむことでひとつの文書が完成する。   The second component, the user interface 103, provides a mechanism for allowing a user to create a document template and associate it with a data source within the document template. The document template is data that becomes a template in which a fixed sentence or the above-described container is arranged on a document, for example. A document is completed by flowing data such as text and images taken from a database into a predetermined area of the document template, for example, a container.

ユーザインターフェース103とレイアウトエンジン105はコミュニケーションチャネル123を介して通信する。ドキュメント生成のためのデータソースは、一般的にデータベースアプリケーションを動かしている他のコンピュータによって構成されたデータベースサーバ117上にある一般的なデータベース119である。ホストコンピュータ101はネットワーク接続107によってデータベースサーバ117と通信する。バリアブルデータ印刷アプリケーション121はホストコンピュータ101か一般的に他のコンピュータで構成されるファイルサーバ115に保存されるドキュメントテンプレートを生成する。またバリアブルデータ印刷アプリケーション121はデータとマージされたドキュメントテンプレートによって構成されたドキュメントを生成する。これらのドキュメントはホストコンピュータ101のローカルファイルシステムに保存されるか、ファイルサーバ115に保存されるか、あるいはプリンタ113に直接印刷される。プリントサーバ109は直接ネットワークにつながっていないプリンタにネットワーク機能を提供するコンピュータである。プリントサーバ109とプリンタ113は一般的な通信チャネル111を介して接続される。   The user interface 103 and the layout engine 105 communicate via a communication channel 123. The data source for document generation is a general database 119 that resides on a database server 117 that is typically configured by another computer running a database application. Host computer 101 communicates with database server 117 via network connection 107. The variable data printing application 121 generates a document template stored in the file server 115 configured by the host computer 101 or generally another computer. The variable data printing application 121 generates a document composed of a document template merged with data. These documents are stored in the local file system of the host computer 101, stored in the file server 115, or printed directly on the printer 113. The print server 109 is a computer that provides a network function to a printer that is not directly connected to the network. The print server 109 and the printer 113 are connected via a general communication channel 111.

テンプレートデータ131はドキュメントテンプレートとも呼び、データベース等から読み出したレコードを埋め込むコンテナと呼ぶ領域や、固定されたデータ等が定義された文書の雛形データである。この構成は図23、図24を参照して後で説明する。   The template data 131 is also called a document template, and is template data of a document in which an area called a container in which a record read from a database or the like is embedded, fixed data, or the like is defined. This configuration will be described later with reference to FIGS.

図34は本実施形態によるバリアブルデータプリントの概略を説明する図である。レイアウト編集アプリケーション121のユーザインターフェースモジュール103(以下、ユーザインタフェース103と記載する)により、ユーザからの操作指示に従いページ上に複数のコンテナ345〜347を配置し、各コンテナに位置やサイズに関する制約条件を付与することによりドキュメントテンプレート344が生成される。     FIG. 34 is a diagram for explaining the outline of variable data printing according to this embodiment. A user interface module 103 (hereinafter referred to as user interface 103) of the layout editing application 121 arranges a plurality of containers 345 to 347 on a page in accordance with an operation instruction from the user, and places constraints on positions and sizes in each container. By assigning, a document template 344 is generated.

また、ユーザインターフェース103はドキュメントテンプレート344とデータソース340(図1ではデータベース119)との関連付け、更に各コンテナとデータソース340内の各データフィールドとの関連付けを行う。各コンテナとデータソース340内の各データフィールドとの関連付けた情報は、ドキュメントテンプレート内に記述され、該ドキュメントテンプレートは、HDD140またはメモリユニット136に格納される。   The user interface 103 associates the document template 344 with the data source 340 (database 119 in FIG. 1), and further associates each container with each data field in the data source 340. Information associated with each container and each data field in the data source 340 is described in a document template, and the document template is stored in the HDD 140 or the memory unit 136.

また、データソース340は、レコード単位で項目データ(バリアブルデータ)が記載されているファイルであり、HDD140に格納されている。レイアウトエンジン105は、ユーザからの印刷指示もしくはプレビュー指示に応じて、ドキュメントテンプレートの各コンテナ345〜347に、関連付けられたバリアブルデータをデータソース340から読み込み、レコード単位で流し込み(例えば、データレコード1のデータフィールドA〜Cをコンテナ345〜347へ流し込む)、流し込まれるべきデータのサイズに応じて各コンテナのサイズ等を調整(レイアウト調整)する。なお、レイアウト調整の方法については後述する。   The data source 340 is a file in which item data (variable data) is described in record units, and is stored in the HDD 140. In response to a print instruction or preview instruction from the user, the layout engine 105 reads the associated variable data from the data source 340 into each of the containers 345 to 347 of the document template and flows it in record units (for example, the data record 1). The data fields A to C are poured into the containers 345 to 347), and the size and the like of each container are adjusted (layout adjustment) according to the size of the data to be poured. The layout adjustment method will be described later.

プレビュー指示の場合は、レイアウト調整されたドキュメントイメージを生成し、ビデオディスプレイ144の画面上にプレビューとして表示するべく出力される。また印刷指示の場合は、レイアウトエンジン105もしくはプリンタドライバを用いて生成したドキュメントイメージを印刷データとしてプリントサーバ109へ出力する。データレコード1,2,3…を順次処理することにより、バリアブルデータプリントが実現されることになる。   In the case of a preview instruction, a document image whose layout has been adjusted is generated and output to be displayed as a preview on the screen of the video display 144. In the case of a print instruction, a document image generated using the layout engine 105 or the printer driver is output as print data to the print server 109. By sequentially processing the data records 1, 2, 3,..., Variable data printing is realized.

ドキュメント生成のためのデータソース(340)は、例えば、データベースアプリケーションを動かしている他のコンピュータによって構成されたデータベースサーバ117上の一般的なデータベース119であってもよい。この場合、ホストコンピュータ101はネットワーク107を介してデータベースサーバ117と通信し、データソースを取得できる。また、レイアウト編集アプリケーション121によって生成された、バリアブルデータプリントのためのドキュメントテンプレート(344)は、ホストコンピュータ101或いは他のコンピュータで構成されるファイルサーバ115に保存される。図1Cで上述したように、レイアウト編集アプリケーション121のレイアウトエンジン105は、データとマージされたドキュメントテンプレートによって構成されたバリアブルデータドキュメントを生成する。これらのドキュメントは、ホストコンピュータ101のローカルファイルシステムに保存されるか、ファイルサーバ115に保存されるか、あるいはプリンタ113に送信されて印刷される。プリントサーバ109はネットワークと直接にはつながっていないプリンタにネットワーク機能を提供するためのコンピュータである。プリントサーバ109とプリンタ113は一般的な通信チャネル111を介して接続される。   The data source (340) for document generation may be, for example, a general database 119 on a database server 117 configured by another computer running a database application. In this case, the host computer 101 can communicate with the database server 117 via the network 107 and acquire a data source. The document template (344) for variable data printing generated by the layout editing application 121 is stored in the file server 115 constituted by the host computer 101 or another computer. As described above with reference to FIG. 1C, the layout engine 105 of the layout editing application 121 generates a variable data document constituted by a document template merged with data. These documents are stored in the local file system of the host computer 101, stored in the file server 115, or transmitted to the printer 113 and printed. The print server 109 is a computer for providing a network function to a printer that is not directly connected to the network. The print server 109 and the printer 113 are connected via a general communication channel 111.

図2は、図1Aの構成から、レイアウトエンジン225を独立させてエンジンサーバ227によりレイアウトエンジンを実行させるための構成を示す。エンジンサーバ227は一般的なコンピュータである。ファイルサーバ115に保存されたドキュメントテンプレートは印刷や他の目的がある際、レイアウトエンジン225によってドキュメントを生成するためにデータベース119に保存されたデータと結合することができる。そのようなオペレーションはユーザインターフェース103を介して要求されるか、特定のレコードのみ印刷するように要求される。   FIG. 2 shows a configuration for causing the layout engine 225 to be executed independently by the engine server 227 from the configuration of FIG. 1A. The engine server 227 is a general computer. The document template stored in the file server 115 can be combined with data stored in the database 119 to generate a document by the layout engine 225 when printing or for other purposes. Such an operation is requested via the user interface 103 or only certain records are required to be printed.

<アプリケーション構成図>
(メインウインドウ)
図3で参照されるように、ユーザインターフェース101は、操作時にビデオディスプレイ144に表示されるアプリケーションウインドウ301によって形成されたユーザインターフェースを含んでいる。ウインドウ301は、メニューバー302とツールバー303、そしてマウス133の位置・動作によって場所を移動可能なワークエリア306とオプションのパレット311とカーソル/ポインタデバイス313から特徴付けされる。
<Application configuration diagram>
(Main window)
As shown in FIG. 3, the user interface 101 includes a user interface formed by an application window 301 displayed on the video display 144 during operation. The window 301 is characterized by a menu bar 302, a tool bar 303, a work area 306 that can be moved by the position / motion of the mouse 133, an optional palette 311, and a cursor / pointer device 313.

メニューバー302は周知の技術であり、メニューオプションの階層の下に拡張される多くのメニューアイテム304を持つ。   Menu bar 302 is a well-known technique and has a number of menu items 304 that extend below the hierarchy of menu options.

ツールバー303は、アプリケーションの特別なモードによって非表示にする、または表示することが可能な多くのツールボタン等のウィジット305を持つ。オプションのルーラー308はワークエリア内のポインター、ページ、ライン、マージンガイド、レイアウト枠(すなわちコンテナ)またはオブジェクトの位置を示すために使われる。パレット311はバリアブルデータを読み込んで表示するライブラリのような追加機能にアクセスするために使われる。パレット311は移動、リサイズ、クローズをするためのウインドウコントロール312を持つ。   The toolbar 303 has a widget 305 such as a number of tool buttons that can be hidden or displayed depending on the particular mode of the application. An optional ruler 308 is used to indicate the position of a pointer, page, line, margin guide, layout frame (ie container) or object within the work area. The palette 311 is used to access additional functions such as a library that reads and displays variable data. The palette 311 has a window control 312 for moving, resizing, and closing.

ツールバーエリア303は少なくとも、次のユーザ選択可能な「ボタン」を持つ。
(1)選択ツールボタン403:コンテナの辺を選択、移動、サイズ変更、リサイズそしてロック・ロック解除するために使われる。コンテナは、複数のコンテナの周りに選択ボックスをドラッグする、あるいは複数コンテナを選択する間にCTRLキーを押しつづけることによって、複数選択を可能にする。
(2)イメージコンテナツールボタン404:スタティック(固定)あるいはバリアブルイメージを持つコンテナを作成するために使われる。
(3)テキストコンテナツールボタン405:スタティック(固定)あるいはバリアブルテキストを持つコンテナを作成するために使われる。
(4)リンクツールボタン406:コンテナ間に関連付けを行うリンクを作成するために使われ、リンクの距離をコントロールするために使われる。
これらのボタンは、周知の技術であるように操作状況に合わせて変化するアイコンのツールチップとして実装される。
The toolbar area 303 has at least the following “button” that can be selected by the user.
(1) Selection tool button 403: Used to select, move, resize, resize, and lock / unlock a container edge. Containers allow multiple selection by dragging a selection box around multiple containers or holding down the CTRL key while selecting multiple containers.
(2) Image container tool button 404: used to create a container having a static (fixed) or variable image.
(3) Text container tool button 405: used to create a container having static (fixed) or variable text.
(4) Link tool button 406: used to create a link for associating containers, and used to control the link distance.
These buttons are implemented as tooltips of icons that change according to the operation status, as is well known in the art.

レイアウト編集アプリケーション121の図3に示したアプリケーションウインドウ301は、ページ内に各コンテナやリンクをレイアウトすることで、基本レイアウトを決定することができる。基本レイアウトとは、バリアブルデータプリントで基本となるレイアウトのことである。基本レイアウト内の各コンテナが固定コンテナである場合は、すべてのレコードの印刷結果のレイアウトは同じになる。また、基本レイアウト内の各コンテナが後述する可変コンテナである場合は、レコード単位に読み込まれるデータの量やサイズにより各コンテナのサイズや位置が、後述する制約の範囲内で変動することになる。よって、レイアウト編集アプリケーション121で作成されるドキュメントテンプレートは、あくまで基本レイアウトを決定するものであり、可変コンテナが含まれる場合は、最終的な印刷物のレイアウトは読み込まれるデータによりレイアウト調整されることになる。   The application window 301 shown in FIG. 3 of the layout editing application 121 can determine a basic layout by laying out containers and links in a page. The basic layout is a basic layout for variable data printing. If each container in the basic layout is a fixed container, the layout of the print results of all records is the same. In addition, when each container in the basic layout is a variable container described later, the size and position of each container varies within the constraints described later depending on the amount and size of data read in units of records. Therefore, the document template created by the layout editing application 121 determines the basic layout to the last, and when a variable container is included, the layout of the final printed matter is adjusted by the read data. .

(ドキュメントテンプレート)
ワークエリア306はドキュメントテンプレートのデザインを表示および編集するために使われる。これはユーザに下準備で印刷されたドキュメントの概観をデザインすること、そしてマージされたドキュメントが、バリアブルデータの量またはサイズに基づいてどのように変化するかを理解することを可能にする。
(Document template)
A work area 306 is used to display and edit the design of the document template. This allows the user to design an overview of the prepared printed document and to understand how the merged document changes based on the amount or size of variable data.

もし外部データソース(例えばデータベースのレコード等)がテンプレートにリンクされていたら、現在のドキュメントのプレビューができるように、バリアブルテキストとイメージがコンテナに表示される。   If an external data source (such as a database record) is linked to the template, variable text and images are displayed in the container so that you can preview the current document.

ドキュメントの構造とバリアブルデータのコンテナの描写をする視覚的な手がかりとなるオブジェクトは、カーソルをコンテナ上に移動させたときや、コンテナを選択したときにいつも表示される。   Objects that provide visual clues to depict the document structure and variable data containers are always displayed when the cursor is moved over the container or when a container is selected.

ワークエリア306はスクロールバー307とオプションのルーラ308とドキュメントテンプレート309により特徴付けられる。ドキュメントテンプレート309はページが複数あることを示すことができる。   The work area 306 is characterized by a scroll bar 307, an optional ruler 308, and a document template 309. The document template 309 can indicate that there are a plurality of pages.

与えられたドキュメントテンプレートのページサイズは、周知の技術によりユーザによって指定される。例えばメニューの「ファイル」から「ページ設定」を選択することでページサイズを設定するダイアログを表示し、そこでユーザが指定したページサイズが反映されることになる。それぞれのドキュメントでの実際のページ数はバリアブルデータによって変化する可能性がある。もし1ページ内に収めることができず、所定の用紙サイズのページに各コンテナを収めるような制約が基本レイアウトになかった場合、追加のページは自動的に作成される。それぞれのページ内の境界線は、ページ上の印刷可能なオブジェクトの最大幅を示す、任意のページマージン310である。   The page size of a given document template is specified by the user using well-known techniques. For example, by selecting “Page Setup” from “File” in the menu, a dialog for setting the page size is displayed, and the page size specified by the user is reflected there. The actual number of pages in each document may vary depending on the variable data. If the basic layout does not have a constraint to fit each container on a page of a predetermined paper size, an additional page is automatically created. The border within each page is an optional page margin 310 that indicates the maximum width of a printable object on the page.

また、図3には1ページのドキュメントテンプレート309上に表示することが可能なオブジェクトの例も示されている。それらは、複数のコンテナ407、408と、固定されていない辺410、リンク412そしてスライダ413を持つ。なお、各オブジェクトの機能については後述する。   FIG. 3 also shows an example of objects that can be displayed on the document template 309 of one page. They have a plurality of containers 407, 408, unfixed sides 410, links 412 and sliders 413. The function of each object will be described later.

(コンテナ)
コンテナは、ドキュメントテンプレート内に固定あるいは可変のテキストやイメージが流しこまれて描画されるスペースであり、他のコンテナやオブジェクトと相互に作用しながらレイアウトされる。コンテナはポインティングデバイス133を操作してポインタ313を使い、図3のユーザインターフェースで示され、移動やサイズ調整そして再作成されることができる。
(container)
A container is a space in which fixed or variable text and images are drawn and drawn in a document template, and is laid out while interacting with other containers and objects. The container can be moved, resized and recreated using the pointer 313 by manipulating the pointing device 133 and shown in the user interface of FIG.

より正確にはコンテナは、設定の集まり、視覚的表現そしてインタラクションと編集動作をもっている。下記にコンテナの定義について説明する。
(1)コンテナは固定あるいは可変のコンテンツが流し込まれる。可変コンテンツは、データソース(たとえばデータベースのレコード)から取得され、異なるドキュメントでは異なるデータに応じてコンテナサイズを可変するという意味でダイナミック(動的)である。可変コンテンツとしては、アニメーション化されたもの、あるいは他の方法で時間に応じて変化するものは印刷に適合していないため含まない。固定コンテンツはひとつのテンプレートを用いて生成される全てのドキュメントで同じように表示される。けれども、可変コンテンツとリンクが設定されている場合、可変コンテンツを含むコンテナの位置やサイズの変化によって、固定コンテンツを含むコンテナはそれぞれのドキュメントで位置が異なる可能性がある。
More precisely, a container has a collection of settings, a visual representation, and interaction and editing operations. The container definition is explained below.
(1) Fixed or variable content is poured into the container. Variable content is obtained from a data source (eg a database record) and is dynamic in the sense that different documents vary the container size according to different data. Variable content is not included because it is not suitable for printing, as it is animated or otherwise changes over time. Fixed content is displayed in the same way for all documents generated using a single template. However, when the variable content and the link are set, the position of the container including the fixed content may be different in each document due to a change in the position or size of the container including the variable content.

(2)コンテナは、コンテンツに適用される背景色、ボーダー、フォントスタイルといったテキスト設定のような装飾機能を持っている。このような設定をコンテナ属性と呼ぶ。コンテナ属性は、コンテナごとに設定可能であるが、あるコンテナと同じコンテナ属性であるという設定を行うことも可能である。   (2) The container has a decoration function such as a text setting such as a background color, a border, and a font style applied to the content. Such a setting is called a container attribute. The container attribute can be set for each container, but it is also possible to set the same container attribute as a certain container.

(3)コンテナはドキュメントを生成したときにデータソースからのデータとマージされる。可変コンテンツはデータソースからの特定のデータとして得られ、表示あるいは印刷される。コンテナに収められるコンテンツは、例えば印刷されるか、スクリーン144上で表示されるか、あるいはその両方により出力され得る。   (3) The container is merged with data from the data source when the document is generated. Variable content is obtained as specific data from a data source and is displayed or printed. The content contained in the container can be output, for example, printed, displayed on the screen 144, or both.

(4)コンテナはユーザインターフェースを持つ。例えばコンテナの編集そして表示設定のためのインタラクティブなGUIを持つ。ユーザインタフェースの要素は普通はスクリーン144上に表示される。ユーザインターフェース103は、背景色やフォントのようなコンテナの装飾機能のいくつかを表示する。そしてコンテナの設定の編集や表示を行わせるための機能も有する。ユーザインターフェース機能の目的の例としては、ボーダー、あるいは、コンテナのサイズや位置を対話的に変更、表示するための角アイコン、あるいはコンテナがデータソースからデータをマージされたとき、コンテナの動作を示すための上塗りした数、線、アイコン、テキストがある。しかしそれらの要素はドキュメント上には印刷されない。   (4) The container has a user interface. For example, it has an interactive GUI for container editing and display settings. User interface elements are usually displayed on screen 144. The user interface 103 displays some of the container decoration functions such as background color and font. It also has a function for editing and displaying container settings. Examples of user interface feature objectives include borders, corner icons for interactively changing and displaying the size and position of containers, or showing container behavior when the container is merged with data from a data source There are overcoated numbers, lines, icons, and text. However, those elements are not printed on the document.

(コンテナ制約)
コンテナはそれぞれのドキュメントで表示または印刷されるコンテンツをどのようにコンテナに収めるか制御するための制約を持つ(すなわち定義可能である)。これらの制約は、固定・可変コンテンツをコンテナと結びつけると共に、ユーザが一つのドキュメントテンプレートによって多数のドキュメントをコントロールする主要な手段である。制約の一例としては「このコンテナのコンテンツの高さは、最大値4インチです。」というものがある。他の制約の例としては「コンテナのコンテンツの左エッジは、それぞれのドキュメントで同じ水平位置で表示しなければならない。」というものもある。ここに記述される内容は、GUIを使ってこのような制約を表示、編集するためのいろいろな方法である。
(Container constraints)
Containers have constraints (ie, can be defined) to control how the content displayed or printed in each document fits in the container. These constraints are the primary means by which a user can control a large number of documents with a single document template, as well as linking fixed and variable content with a container. An example of the restriction is “the content height of this container is a maximum value of 4 inches”. Another example of the constraint is “the left edge of the container contents must be displayed in the same horizontal position in each document”. The contents described here are various methods for displaying and editing such constraints using a GUI.

イメージがページ上に定義された場所を持っているように、固定コンテンツの配置を指定するコンテンツプレイスホルダは、デジタル印刷技術でよく知られている。以下の説明において、コンテナは位置とサイズとを持ち、それらは公知の技術で知られている手法で編集され、表示することができる。ここでは、バリアブルデータ印刷における表示・編集に焦点を合わせて説明する。   Content placeholders that specify the placement of fixed content so that the image has a defined location on the page are well known in digital printing technology. In the following description, a container has a position and a size, which can be edited and displayed in a manner known in the art. Here, a description will be given focusing on display / editing in variable data printing.

ユーザは、コンテナの位置やサイズ、制約等を指定することで、ドキュメントのコンテンツのサイズおよび位置を指定することができる。複数のドキュメントが一つのドキュメントテンプレートから生成されるので、コンテナの指定可能な設定と制約を指定および表示させるためにユーザインターフェースを使わなければならない。コンテナはそのユーザインターフェースとしても利用される。   The user can specify the size and position of the content of the document by specifying the position, size, constraints, and the like of the container. Since multiple documents are generated from a single document template, the user interface must be used to specify and display the container's specifiable settings and constraints. The container is also used as the user interface.

<テンプレート作成モード(コンテナ表示・編集)>
バリアブル印刷されるドキュメントの作成手順は、テンプレートを作成するテンプレート作成処理(テンプレート作成モード)と、作成されたテンプレートにコンテンツを挿入してドキュメントを作成するドキュメント作成処理(ドキュメントをプレビュー表示する場合を特にプレビューモードと呼ぶ。)という2つのフェーズに分けることができる。まず、テンプレート作成モードについて説明する。
<Template creation mode (container display / edit)>
The procedure for creating a variable-printed document includes a template creation process for creating a template (template creation mode) and a document creation process for creating a document by inserting content into the created template (especially when previewing a document). This can be divided into two phases. First, the template creation mode will be described.

(新規コンテナの作成方法)
コンテナは、テキストコンテナとイメージコンテナの2種類で記述される。テキストコンテナはテキスト、そして埋め込みのイメージを持つ(収納する)。イメージコンテナは、イメージだけを持つ(収納する)。可変というのは前述のとおり、レコード毎に異なり得る、という意味である。
(How to create a new container)
Containers are described in two types: text containers and image containers. A text container has text and an embedded image. An image container has (stores) only images. The variable means that it can be different for each record as described above.

新規テキストコンテナとイメージコンテナは、ウィジット305からマウス133でクリックして選択するテキストコンテナツール404とイメージコンテナツール405それぞれにより四角形の領域をドラッグすることによって、ドキュメントテンプレート309上に作成される。   A new text container and an image container are created on the document template 309 by dragging a rectangular area with the text container tool 404 and the image container tool 405 that are selected by clicking with the mouse 133 from the widget 305.

あるいはコンテナは、同様に適切なツール404,405をアクティブにした後に、ドキュメントテンプレート309上でクリックすることによって単純に作成されてもかまわない。この場合、デフォルトサイズのコンテナが挿入されるか、新規コンテナの寸法を入れるために、ダイアログボックスが提供される。あるいは他の案が考えられるかも知れない。このようにしてユーザインターフェース上でユーザにより指定された矩形の位置およびサイズが、そのままテンプレート上におけるコンテナの位置およびサイズとして、ドキュメントテンプレートの保存時に、ドキュメントテンプレートファイルとしてハードディスク等に保存される。   Alternatively, the container may be simply created by clicking on the document template 309 after activating the appropriate tools 404, 405 as well. In this case, a default size container is inserted or a dialog box is provided to enter the dimensions of the new container. Or other ideas may be considered. In this way, the position and size of the rectangle designated by the user on the user interface are directly stored in the hard disk or the like as a document template file when the document template is stored as the position and size of the container on the template.

(コンテナの表示方法)
コンテナの辺は、関連付けられたコンテンツがドキュメント内で表示される際の、仮想の境界線を定義するものである。コンテナをユーザインターフェイスとして利用するに際して、例えばコンテナの左辺は、関連付けられたコンテンツがどんなドキュメント内でも表示可能である最も左の辺として扱われる。同様に、コンテナの高さは生成されたドキュメントで関連付けられたコンテンツを表示可能な高さの制限として理解できるであろう。本特許提案では、ユーザインターフェース103を通してコンテナの辺あるいは大きさを変化させることを前提としている。
(Container display method)
The sides of the container define a virtual boundary line when the associated content is displayed in the document. When using a container as a user interface, for example, the left side of the container is treated as the leftmost side where the associated content can be displayed in any document. Similarly, the height of a container may be understood as a limitation on the height at which the associated content can be displayed in the generated document. In this patent proposal, it is assumed that the side or size of the container is changed through the user interface 103.

(ユーザインターフェースの定義)
次に、コンテンツのレイアウトを制限するために使われるいくつかのユーザインターフェイスとレイアウトの関係のルールの定義を説明する。添付した図面に示すレイアウト例もこの定義に従って表示されている。
(User interface definition)
Next, some user interface and layout relationship definitions used to limit the layout of content will be described. The layout example shown in the attached drawings is also displayed according to this definition.

(1)もしコンテナの左右の辺が実線なら、コンテナの幅は固定である。コンテナの幅が固定なら、関連付けられたコンテンツに割り当てられる幅は、全てのドキュメントで同じになる。しかしコンテナの高さは変わる可能性がある。
(2)もしコンテナの上下の辺が実線なら、コンテナの高さは固定である。もしコンテナの高さが固定なら、関連付けられたコンテンツに割り当てられる高さは、全てのドキュメントで同じになる。
(3)もし距離の制約が固定なら、指定された距離は全てのドキュメントで同じになる。
(4)もしコンテナの実線辺と他のコンテナを後述するリンクを用いて関連付けると、実線辺のコンテナはリンクによって関連付けられた他のコンテナによって押され、位置を変える場合がある。上下辺に対するリンクは縦方向の位置変更を、左右辺に対するリンクは横方向の位置変更をもたらす。「固定」の反対は、辺、位置、あるいはドキュメント制約がドキュメントごとに変化するかもしれないことを意味している「可変」である。可変を実現するためのユーザインターフェイスとレイアウトの関係のルールの例は、例えば以下のようである。
(5)もしコンテナの左右の辺が点線なら、コンテナの幅は可変である。コンテナの幅が可変なら、関連付けられたコンテンツに割り当てられる幅は、ドキュメントごとに変化する。
(6)もしコンテナの上下の辺が点線なら、コンテナの高さは可変である。もしコンテナの高さが可変なら、関連付けられたコンテンツに割り当てられる高さは、ドキュメントごとに変化する。
(7)もし距離の制約が可変なら、指定された距離はドキュメントごとに変化する可能性がある。距離の制約に対する設定により、最大長・最小長の制限の枠内でコンテナの距離を調整するレイアウトを行なうことができる。
(8)もしコンテナの点線辺と他のコンテナを後述するリンクを用いて関連付けると、そのコンテナはリンクによって関連付けられた他のコンテナを押し(または押され)、位置を変える場合がある。上下辺に対するリンクは縦方向の位置変更を、左右辺に対するリンクは横方向の位置変更をもたらす。
(1) If the left and right sides of the container are solid lines, the width of the container is fixed. If the container width is fixed, the width assigned to the associated content is the same for all documents. However, the height of the container can change.
(2) If the upper and lower sides of the container are solid lines, the height of the container is fixed. If the container height is fixed, the height assigned to the associated content is the same for all documents.
(3) If the distance constraint is fixed, the specified distance is the same for all documents.
(4) If the solid line side of the container is associated with another container using a link described later, the container on the solid line side may be pushed by another container associated with the link and change its position. Links to the upper and lower sides cause a change in position in the vertical direction, and links to the left and right sides cause a change in position in the horizontal direction. The opposite of “fixed” is “variable” meaning that the edge, position, or document constraints may change from document to document. An example of a rule regarding the relationship between the user interface and the layout for realizing the variable is as follows, for example.
(5) If the left and right sides of the container are dotted lines, the width of the container is variable. If the container width is variable, the width assigned to the associated content will vary from document to document.
(6) If the upper and lower sides of the container are dotted lines, the height of the container is variable. If the height of the container is variable, the height assigned to the associated content varies from document to document.
(7) If the distance constraint is variable, the specified distance may change from document to document. By setting the distance restriction, it is possible to perform a layout for adjusting the container distance within the limit of the maximum length / minimum length.
(8) If a dotted line side of a container and another container are associated with each other using a link described later, the container may push (or be pushed) another container associated with the link and change its position. Links to the upper and lower sides cause a change in position in the vertical direction, and links to the left and right sides cause a change in position in the horizontal direction.

図4は、上記のルールに基づくコンテナの辺の状態を示している。一般的に、コンテナの辺の状態はドキュメントテンプレートのデザインの手助けとして表示される要素であるため、印刷物には描画されない。コンテナの制約として設定される幅・高さの最小値・最大値の設定値は、副次的なダイアログウインドウ311(図3参照)に表示される。   FIG. 4 shows the state of the sides of the container based on the above rule. In general, the state of the side of a container is an element that is displayed as an aid for designing a document template, and thus is not drawn on a printed matter. The set values of the minimum value and maximum value of the width and height set as the constraints of the container are displayed in a secondary dialog window 311 (see FIG. 3).

なお、上述したユーザインターフェース上の表示とコンテナ自身の制約あるいはコンテナ間の制約は、そのユーザインターフェースを用いるユーザの観点から説明したもので、このユーザインターフェースを実現するために実行されるプログラムの観点からは因果関係が逆となる。上記規則をプログラムの観点から言い換えると以下のようになる。   Note that the above-described display on the user interface and the constraints of the container itself or between the containers are described from the viewpoint of the user using the user interface, and from the viewpoint of the program executed to realize the user interface. Is the opposite of causality. In other words, the above rules are as follows:

(1)もしコンテナの幅が固定であるとデータ上設定されていれば、コンテナの左右の辺を実線で表示する。
(2)もしコンテナの高さが固定であるとデータ上設定されていれば、コンテナの上下の辺を実線で表示する。
(3)もし固定値で指定された距離は、全てのドキュメントで同じ距離とする。
(4)コンテナ幅あるいは高さが固定であるとデータ上設定されており、その固定された辺について他のコンテナとの距離(コンテナ制約)が設定されている場合、当該コンテナの位置は、前記他のコンテナのサイズ等に応じて決定される。
(5)もしコンテナの幅が可変であるとデータ上設定されていれば、コンテナの左右の辺を点線で表示する。
(6)もしコンテナの高さが可変であるとデータ上設定されていれば、コンテナの上下の辺を点線で表示する。
(7)もしコンテナ間の距離の制約が可変とデータ上設定されていれば、距離の最大長・最小長の制限の枠内でコンテナの距離を調整するレイアウトを行なうことができる。
(8)コンテナ幅あるいは高さが可変であるとデータ上設定されており、その固定された辺について他のコンテナとの距離(コンテナ制約)が設定されている場合、当該コンテナの幅または高さに応じて、前記他のコンテナの位置が決定される。
(1) If the data indicates that the container width is fixed, the left and right sides of the container are displayed with solid lines.
(2) If the height of the container is fixed in the data, the upper and lower sides of the container are displayed with solid lines.
(3) If the distance specified by a fixed value is the same for all documents.
(4) When the container width or height is set in the data to be fixed, and the distance (container constraint) with the other container is set for the fixed side, the position of the container is It is determined according to the size of other containers.
(5) If the container width is set to be variable, the left and right sides of the container are displayed with dotted lines.
(6) If the height of the container is set to be variable, the upper and lower sides of the container are displayed with dotted lines.
(7) If the restriction on the distance between the containers is set to be variable, a layout for adjusting the distance between the containers within the limit of the maximum length and the minimum length of the distance can be performed.
(8) When the container width or height is set in the data to be variable, and the distance (container constraint) from the other container is set for the fixed side, the width or height of the container In response, the position of the other container is determined.

図5(A)で、コンテナ501は幅が可変である。この場合、辺503は実線で表現され、可変の辺504は点線で表現される。拡縮アイコン505は、それに隣接する辺504が可変であることを示す、オプションのインジケータである。図5(B)では、コンテナ501は幅・高さ両方が可変である。図5(C)で、コンテナ501も、幅・高さ両方が可変である。また辺の操作を行うためにハンドル502もユーザインターフェース上に表示される。   In FIG. 5A, the width of the container 501 is variable. In this case, the side 503 is represented by a solid line, and the variable side 504 is represented by a dotted line. The scale icon 505 is an optional indicator that indicates that the side 504 adjacent to it is variable. In FIG. 5B, the width and height of the container 501 are variable. In FIG. 5C, the container 501 is also variable in both width and height. A handle 502 is also displayed on the user interface in order to perform edge operations.

<ドキュメントテンプレートのデータの例>
図23は、ドキュメントテンプレートのデータ(テンプレートデータと呼ぶ。)131の一例を示す。図23において、テンプレートデータ131は、メモリ136あるいはハードディスク140に格納されている。テンプレートデータには、以下の要素が含まれる。
<Example of document template data>
FIG. 23 shows an example of document template data (referred to as template data) 131. In FIG. 23, template data 131 is stored in the memory 136 or the hard disk 140. The template data includes the following elements.

(1)全体サイズ2302:テンプレート全体のページのサイズを示す。サイズは、たとえば、縦および横の長さ、または定型用紙サイズなどで示される。   (1) Overall size 2302: Indicates the page size of the entire template. The size is indicated by, for example, vertical and horizontal lengths or a standard paper size.

(2)コンテナ情報2303:テンプレートに配置されるコンテナ毎に、そのコンテナを特定するための識別情報やコンテナの基準の位置(位置情報)、縦横それぞれの辺の長さ(サイズ情報)、コンテナを構成する辺や点の属性(属性情報)、コンテナに関連づけられるコンテンツの情報等を示す。位置情報およびサイズ情報は、図4のユーザインターフェースを介する指定によってテンプレート作成時に定義されたものである。位置情報は、コンテナの作成時にユーザにより設定された、コンテナの基準の位置である。位置が可変のコンテナであれば、コンテナに流し込まれるコンテンツのサイズ(画像サイズ、テキスト量)に応じて大きさが変更され、各コンテナの大きさにより動的に位置が変更されることになる。位置が固定されているコンテナであれば、固定された位置情報を持つ。たとえばコンテナの対角点の位置を特定できる情報を持つことで、位置とサイズとが特定できる。もちろん、全点についてテンプレート上における位置を持ってもよいし、ひとつの点についてはテンプレート上における位置の情報を持ち、他の点については相対的な位置の情報を持つようにしてもよい。すなわち、コンテナの一つの点とコンテナのサイズによって定義することもできる。また、固定されている点についてはテンプレート上における位置で定義し、可変の点については相対的な位置で定義しても良い。   (2) Container information 2303: For each container arranged in the template, identification information for identifying the container, the reference position (position information) of the container, the length of each side (size information), the container It shows the attributes (attribute information) of the sides and points to be configured, content information associated with the container, and the like. The position information and the size information are defined at the time of creating the template by designation through the user interface of FIG. The position information is a reference position of the container set by the user when creating the container. If the container has a variable position, the size is changed according to the size of the content (image size, text amount) to be poured into the container, and the position is dynamically changed according to the size of each container. If the container has a fixed position, it has fixed position information. For example, by having information that can specify the position of the diagonal point of the container, the position and size can be specified. Of course, all points may have positions on the template, one point may have position information on the template, and the other points may have relative position information. That is, it can be defined by one point of the container and the size of the container. Further, a fixed point may be defined by a position on the template, and a variable point may be defined by a relative position.

属性情報は、図3および図5を参照して説明した、コンテナの辺や辺、軸またはそれらの交点等の属性を示す。ひとつのコンテナは、たとえば位置とサイズとにより、上辺、下辺、左辺、右辺、水平軸、垂直軸、各角点、中心点、幅、高さが定まる。それら各要素について、可変であるか、固定されているかが属性情報により定義される。図4のユーザインターフェースによりドキュメントテンプレートを作成した場合、コンテナの辺や点や軸を選択した状態で、パレット311内に表示されるメニュー「固定する」「可変とする」などから、オペレータが所望の項目を選択することで、選択された点や辺に対応して、コンテナ情報2303に「固定」「可変」いずれかの属性が書き込まれる。コンテナ作成直後の既定値はたとえばすべて「可変」としておく。なおこの例では、ひとつの辺や軸について「固定」であるとは、辺や軸の長さや長手方向の位置ではなく、長手方向に直交する方向についての位置が固定されていることを意味している。また、点や辺の属性を設定することで、自動的にその他の点や辺の属性が定まる場合には、その属性も書き込む。たとえば角点を「固定」と指定した場合、それを挟む辺も「固定」とされる。これは逆も同様である。またたとえば、中心点の位置を「固定」と指定すると、中心点の属性に「固定」と書き込まれると共に、水平軸及び垂直軸の属性も「固定」と書き込まれる。この場合、幅や高さは可変のままであれば、幅および高さの属性は「可変」のまま維持される。   The attribute information indicates attributes such as sides, sides, axes, or intersections of the containers described with reference to FIGS. 3 and 5. For example, an upper side, a lower side, a left side, a right side, a horizontal axis, a vertical axis, each corner point, a center point, a width, and a height are determined for one container. Whether each element is variable or fixed is defined by attribute information. When the document template is created by the user interface of FIG. 4, the operator selects a desired one from the menu “fix” or “variable” displayed in the palette 311 with the sides, points, and axes of the container selected. By selecting an item, either “fixed” or “variable” attribute is written in the container information 2303 corresponding to the selected point or side. For example, all the default values immediately after container creation are set to “variable”. In this example, “fixed” for one side or axis means that the position in the direction orthogonal to the longitudinal direction is fixed, not the length or the longitudinal position of the side or axis. ing. If the attributes of other points or sides are automatically determined by setting the attributes of points or sides, the attributes are also written. For example, when a corner point is designated as “fixed”, the sides between the corner points are also “fixed”. The reverse is also true. Further, for example, when the position of the center point is designated as “fixed”, “fixed” is written in the attribute of the center point, and the attribute of the horizontal axis and the vertical axis is also written as “fixed”. In this case, if the width and height remain variable, the width and height attributes remain “variable”.

関連づけられるコンテンツに関する情報(コンテンツ関連情報)には、たとえば、それがテキストコンテナであるかイメージコンテナであるかの種別を示す情報や、そのコンテナに挿入されるデータソースの識別子、たとえばデータベース名、レコード名、フィールド名等の一部又は全部、コンテンツを抽出するための条件式などの関連付け情報が含まれる。また、テキストコンテナの場合には、フォントに関する情報、たとえばフォント種類やサイズ、色、斜体や太字、下線等の文字修飾情報等もコンテンツ関連情報に含まれる。コンテナ情報2303は、ドキュメントテンプレートに設けられたコンテナの数だけ保持される。   The information related to the associated content (content related information) includes, for example, information indicating the type of whether it is a text container or an image container, an identifier of a data source inserted into the container, such as a database name, a record It includes association information such as a conditional expression for extracting a part or all of a name, a field name, etc., and contents. Further, in the case of a text container, information related to fonts, for example, character modification information such as font type and size, color, italic, bold, underline, etc. are also included in the content related information. The container information 2303 is held as many as the number of containers provided in the document template.

(3)リンク情報2304:リンクとはコンテナ間の関連付けるオブジェクトでありコンテナ制約のひとつである。リンク情報は特に、リンクで結ばれた2つのコンテナ間の距離を一定(固定リンク)や可変範囲(可変リンク)とする旨の情報である。リンク情報としては、たとえば、水平方向及び垂直方向それぞれについて、2つのコンテナの識別子、およびそれらコンテナの対向する辺の間にリンクが設定されたことを示す情報や、リンクに沿った方向についてのコンテナ間の距離などを含む。リンク情報は定義されたリンク毎に保持される。リンク情報の形態としては、水平方向及び垂直方向それぞれについて、各コンテナの辺の位置を保持し、その辺の間にリンクが設定された旨を示す情報を保持してもよい。   (3) Link information 2304: A link is an object associated between containers and is one of container constraints. In particular, the link information is information indicating that the distance between two containers connected by a link is constant (fixed link) or variable range (variable link). As link information, for example, for each of the horizontal direction and the vertical direction, identifiers of two containers, information indicating that a link is set between opposing sides of the containers, and containers in the direction along the link Including the distance between. Link information is held for each defined link. As a form of link information, the position of each container side may be held in each of the horizontal direction and the vertical direction, and information indicating that a link is set between the sides may be held.

(4)固定情報2305:可変部分以外の固定部分を定義するための情報が含まれる。たとえば、当該テンプレートが適用されて生成される全ドキュメント(全レコード)に共通の文や画像等が定義できる。文や画像については、そのデータそのものを含まずに、位置情報を定義するだけでも良い。もちろん、テンプレート上において配置される位置を定義するための情報も含む。   (4) Fixed information 2305: Information for defining a fixed part other than the variable part is included. For example, a sentence, an image, or the like common to all documents (all records) generated by applying the template can be defined. For a sentence or an image, the position information may be defined without including the data itself. Of course, it also includes information for defining the position on the template.

図24には、マルチレコード機能のために用いられるテンプレートデータ131'の一例を示す。このデータももちろんメモリ等に保存されている。図24では、ドキュメントテンプレート中にフローエリアという、他のテンプレートをサブテンプレートとして流し込める領域が定義される。1つのフローエリアには、マルチレコードに対応した数のサブテンプレートが流し込まれることになる。図24においては、テンプレートデータ131'には、フローエリア情報2401が含まれる。フローエリア情報は、テンプレートに含まれるフローエリアの数だけテンプレートデータに保持されている。フローエリア情報2401には、以下の要素が含まれる。   FIG. 24 shows an example of template data 131 ′ used for the multi-record function. Of course, this data is also stored in a memory or the like. In FIG. 24, a flow area called a flow area is defined in a document template and can be flowed as another template. A number of sub-templates corresponding to multi-records are poured into one flow area. In FIG. 24, the template data 131 ′ includes flow area information 2401. Flow area information is held in the template data by the number of flow areas included in the template. The flow area information 2401 includes the following elements.

(5)全体の位置やサイズ、フロータイプ等を示すフローエリアの属性情報2402:位置やサイズは図23で説明した通りである。フロータイプは、フローエリアにサブテンプレートを流し込むパターンを定義する符号である。フローエリアに流し込むサブテンプレートの数はマルチレコードのキーカラムにより決定され、可変であるため、フローエリアに流し込むサブテンプレート数により、フローエリア内のサブテンプレートのレイアウトを定義する情報がフロータイプである。   (5) Flow area attribute information 2402 indicating the overall position, size, flow type, etc .: The position and size are as described in FIG. The flow type is a code that defines a pattern in which a sub template is poured into the flow area. Since the number of sub-templates to be flowed into the flow area is determined by the multi-record key column and is variable, information defining the layout of the sub-templates within the flow area is the flow type based on the number of sub-templates to be flowed into the flow area.

(6)サブテンプレート情報2403:サブテンプレート情報2403には、サブテンプレートに配置されるコンテンツと、そのサブテンプレートにしたがってレイアウトされたコンテンツ(これを本明細書ではレイアウト済みコンテンツと呼ぶことにする。)が流し込まれるフローエリアとの対応付けを示す配置情報が含まれる。サブテンプレート情報2403は、たとえば、フローエリアに挿入されるテンプレートを識別するための情報である。その情報には、たとえばテンプレートデータのファイル(テンプレートファイル)の名称などを含む。また、レイアウト済みコンテンツを配置するための配置条件や、どのような順序でレイアウト済みコンテンツを挿入するかを指定するフロータイプも含まれていてもよい。配置条件としては、サブテンプレートによるレイアウト対象となるデータベースの検索条件(検索式)などが保持される。また、フロータイプとしては、Z型、N型、V型など、予め用意した選択肢の内から指定させ、指定されたフロータイプを示す識別子が保持される。あるいは、データベースのレコードに配置情報フィールドを設け、その値と一致する配置条件の値に対応するフローエリアに、そのレイアウト済みコンテンツを挿入するなどしても良い。   (6) Sub-template information 2403: In the sub-template information 2403, content arranged in the sub-template and content laid out in accordance with the sub-template (this will be referred to as laid-out content in this specification). Arrangement information indicating the association with the flow area into which is inserted is included. The sub template information 2403 is information for identifying a template to be inserted into the flow area, for example. The information includes, for example, the name of a template data file (template file). Further, an arrangement condition for arranging the laid-out contents and a flow type for designating in which order the laid-out contents are inserted may be included. As the arrangement condition, a search condition (search expression) of a database to be laid out by the sub template is held. In addition, as a flow type, an identifier indicating the designated flow type is held by specifying from among options prepared in advance, such as Z type, N type, and V type. Alternatively, an arrangement information field may be provided in the record of the database, and the laid-out content may be inserted into the flow area corresponding to the arrangement condition value that matches the value.

さらに本実施形態に特徴的な情報として、フローエリアに挿入されるサブテンプレートを特定するための条件情報2403aが含まれる。たとえば、サブテンプレートに関連づけられたデータベースのレコードのうちの特定のフィールドの値に応じて相異なるサブテンプレートを対応させる条件情報2403aを、サブテンプレート情報として持つことができる。これにより、当該フィールドの値に応じたサブテンプレートがそのレコードのために使用される。   Furthermore, condition information 2403a for specifying a sub-template inserted into the flow area is included as information characteristic of the present embodiment. For example, the condition information 2403a for associating different subtemplates according to the value of a specific field in the database record associated with the subtemplate can be included as the subtemplate information. Thereby, the sub template corresponding to the value of the field is used for the record.

(7)マルチレコード情報2404:フローエリアに関連づけられるデータベース名および各レコードにおけるフィールド名等の識別子が含まれる。指定されたフィールド名について同一の値を有するレコードが指定されたデータベースからフェッチ(読み込まれ)されて、ひとつのフローエリアにレイアウトされる。対象となるレコードがフローエリアのサイズに比して相当多い場合もあり得る。そのような場合にはフローエリアは複数のページにわたるよう拡張されて、それらレコードがレイアウトされる。   (7) Multi-record information 2404: The database name associated with the flow area and an identifier such as a field name in each record are included. Records having the same value for the specified field name are fetched (read) from the specified database and laid out in one flow area. There may be a case where the target record is considerably larger than the size of the flow area. In such a case, the flow area is expanded to cover a plurality of pages, and the records are laid out.

<リンクの設定方法>
図6はリンクの設定方法のUI例を示している。まず、リンクを設定するためには、リンクを設定するためのコンテナ(最低2つ)を作成する。2つのコンテナを作成してリンクを設定する場合の例を示している。次に、前述したリンクツールを選択した状態にする。図6では、コンテナを作成し、リンクツールが選択されていた状態から、リンクを設定する動作を示している。図6(A)−(C)を順に説明していく。
<Link setting method>
FIG. 6 shows a UI example of a link setting method. First, in order to set a link, containers (at least two) for setting a link are created. An example in which two containers are created and links are set is shown. Next, the link tool described above is selected. FIG. 6 shows an operation of creating a container and setting a link from a state in which the link tool is selected. 6A to 6C will be described in order.

図6(A)の0601と0602は、前述した図3の407と408と同じであり、固定されている辺を意味する。0603はマウスポインタを意味している。まず、リンクを設定する片方のコンテナをクリックして選択する。次に図6(B)で示されるように、もう片方のコンテナまでマウスポインタを移動して、クリックする。図6(B)の0604は、図6(A)でクリックをした位置と移動したマウスポインタを結んだ線を示しており、どの位置にリンクが設定されるのかをユーザに示すUIである。図6(B)で2度目のクリックが終わった後、設定した場所に0605で示されるリンクUIが表示され、コンテナは図6(C)の状態になる。0606は、点線で示されている辺であり、前述した通り可変の辺を示している。このようなデザインでは、左のコンテナ0601は右方向に可変のサイズをとれる。また右のコンテナ0602は左方向に可変のサイズをとれる。そのあいだをリンクで接続したことにより、左右のコンテナはその間の距離を保ったまま、相互にサイズを可変に調整するように動作する。   6601 and 0602 in FIG. 6A are the same as 407 and 408 in FIG. 3 described above, and mean fixed sides. Reference numeral 0603 denotes a mouse pointer. First, click to select one of the containers to set the link. Next, as shown in FIG. 6B, the mouse pointer is moved to the other container and clicked. Reference numeral 0604 in FIG. 6B denotes a line connecting the clicked position in FIG. 6A and the moved mouse pointer, and is a UI indicating to the user where the link is set. After the second click in FIG. 6B, a link UI indicated by 0605 is displayed at the set location, and the container is in the state shown in FIG. Reference numeral 0606 denotes a side indicated by a dotted line, and indicates a variable side as described above. In such a design, the left container 0601 can have a variable size in the right direction. The right container 0602 can have a variable size in the left direction. By connecting with a link between them, the left and right containers operate so as to variably adjust their sizes while maintaining the distance between them.

この処理を図23のデータ処理の観点から説明すると以下のようになる。たとえば、コンテナを作成することにより、コンテナ情報3303が定義される。そして、レイアウト編集アプリケーション121は、選択された2つのコンテナ間にリンクが設定された旨を、リンク情報として記憶する。そしてリンクが設定された2つのコンテナの対向する辺の属性を必要に応じて変更する。たとえば、対向する辺の少なくとも一方が可変であれば、辺の属性を変更する必要はない。しかし、双方が固定であれば、リンクを設定する意義が失われるために、少なくとも一方を可変とする。図6の例では、両方を可変に変更している。もちろん、辺の属性が変更された場合には、レイアウト編集アプリケーション121は、変更された属性についてコンテナ情報3303に含まれる属性が変更された辺についてその属性情報を書き換える。   This process is described below from the viewpoint of the data processing in FIG. For example, container information 3303 is defined by creating a container. Then, the layout editing application 121 stores, as link information, that a link has been set between the two selected containers. Then, the attributes of the opposing sides of the two containers to which the link is set are changed as necessary. For example, if at least one of the opposing sides is variable, there is no need to change the attribute of the side. However, if both are fixed, the significance of setting a link is lost, so at least one is made variable. In the example of FIG. 6, both are changed variably. Of course, when the edge attribute is changed, the layout editing application 121 rewrites the attribute information of the changed attribute in the edge whose attribute included in the container information 3303 is changed.

なお、上記記載では「対向する」との表現を用いているが、線どうしが見かけ上対向する場合のほか、線自体は対向していなくとも(すなわち2つの線の長手方向の投影が重複しなくとも)、線の延長線が対向する関係にあれば、その延長線の間でリンクを設定することができる。本明細書ではこのように延長線が対向する場合も含めて、リンクで関連づけられたコンテナに関しては、辺が「対向する」と表現することにする。すなわち、たとえばテンプレートの対角に沿って配置された小コンテナ間にもリンクを設定できる。   In the above description, the expression “opposite” is used. However, in addition to the case where the lines seem to face each other, the lines themselves do not face each other (that is, the projections in the longitudinal direction of the two lines overlap). If not, the link can be set between the extension lines if the extension lines are in a facing relationship. In this specification, including the case where the extension lines face each other as described above, the sides associated with the links are expressed as “opposing”. That is, for example, a link can be set between small containers arranged along the diagonal of the template.

以上のように、リンクで関連づけられたコンテナの対向する辺の一方が可変で他方が固定であれば、コンテンツサイズに応じて可変の辺は移動する可能性がある。そして、その可変の辺の移動量に応じて、固定辺の側のコンテナは、コンテナ自体が平行移動する(アンカーがない場合)。リンクで定義されたコンテナ間の距離(リンクに沿った方向についての距離)は維持される。双方の辺が可変であれば、コンテンツのサイズに応じて量コンテナのサイズが可変となるが、コンテナ間の距離はこの場合も維持される。   As described above, if one of the opposing sides of the containers associated by the link is variable and the other is fixed, the variable side may move depending on the content size. Then, according to the movement amount of the variable side, the container on the fixed side side moves in parallel (when there is no anchor). The distance between containers defined in the link (distance in the direction along the link) is maintained. If both sides are variable, the size of the quantity container is variable according to the size of the content, but the distance between the containers is maintained in this case as well.

<プレビューモード(レイアウト計算)>
図7(A)はプレビューモードにおけるレイアウト計算のフローを示している。レイアウト計算は、ドキュメントテンプレートのコンテナに実データが挿入された場合に、コンテンツのデータサイズ等に応じてコンテナサイズやコンテナ配置を再計算する処理である。図7(A)では、プレビューモードが指定された場合を例としているために、テンプレートにコンテンツを挿入して生成されたドキュメントは、ディスプレイ144に表示される。しかし、印刷モードが指定された場合には、プレビュー表示に変えて、ドキュメントは印刷出力される。なお、本願におけるフローチャートの各処理は情報処理装置(ホストコンピュータ)内のプロセッサ135によって実行されることとなる。
<Preview mode (layout calculation)>
FIG. 7A shows a flow of layout calculation in the preview mode. The layout calculation is a process of recalculating the container size and the container arrangement according to the data size of the content when actual data is inserted into the container of the document template. In FIG. 7A, since the case where the preview mode is designated is taken as an example, the document generated by inserting the content into the template is displayed on the display 144. However, when the print mode is designated, the document is printed out instead of the preview display. Each process of the flowchart in the present application is executed by the processor 135 in the information processing apparatus (host computer).

図7において、まずレイアウト編集アプリケーション121は、プレビューモードが選択されたことを認識する(ステップ0701)。本実施形態の自動レイアウトシステムによる動作モードには、コンテナを作成してそのコンテナ間に関連付けを行い、レイアウトを定義したドキュメントテンプレートを作成するレイアウト設定モードと、作成したレイアウト(テンプレート)にレコードを挿入して、実際にレコードが挿入された後のレイアウト結果をプレビューするプレビューモードとが含まれる。   In FIG. 7, the layout editing application 121 first recognizes that the preview mode has been selected (step 0701). In the operation mode by the automatic layout system of the present embodiment, containers are created and associated with each other, a layout setting mode for creating a document template defining the layout, and a record is inserted into the created layout (template) Then, a preview mode for previewing the layout result after the record is actually inserted is included.

このプレビューモードにおいて、実際のレコードが挿入されてレイアウトが計算される。プレビューモードは表示上でのレイアウト計算である。実際に印刷する場合においてもレコードを挿入してレイアウトを計算するが、その際の計算方法もプレビューモードと同じである。   In this preview mode, the actual record is inserted and the layout is calculated. The preview mode is a layout calculation on the display. Even when printing is actually performed, the layout is calculated by inserting a record, and the calculation method is the same as that in the preview mode.

プレビューモードになったら、レイアウト編集アプリケーション121は、プレビューするレコードが選択されたことを認識する(ステップ0702)。レコードの選択はオペレータに指定されたレコードを選択するものとしても良いし、指定されたデータベースから順次レコードを選択しても良い。レコードの選択が行われると、レイアウト編集アプリケーション121は、そのレコードをテンプレートに従ってレイアウトするために計算を行い(ステップ0703)、フローエリアがテンプレートに含まれていれば、フローエリアについてサブテンプレートに従ってデータを配置する(ステップS0704)。レイアウト編集アプリケーション121は、ステップ0703,S0704の計算結果に従ってレコードをレイアウトし、それを表示し(ステップ0705)、他のレコードについてもプレビューを行うかどうかを判断する(ステップ0706)。この判断はオペレータの指示に基づいても良いし、予め指定された範囲についてのプレビューが終了したか判断するものでもよい。ステップ0706で、レイアウト編集アプリケーション121は、他のレコードについてプレビューを行う必要がないと判断した場合は、プレビューモードを終了する(ステップ0707)。   When the preview mode is set, the layout editing application 121 recognizes that the record to be previewed has been selected (step 0702). The record may be selected by selecting a record designated by the operator, or by sequentially selecting records from a designated database. When the record is selected, the layout editing application 121 performs calculation for laying out the record according to the template (step 0703), and if the flow area is included in the template, the flow area includes data according to the sub-template. Arrange (step S0704). The layout editing application 121 lays out the record according to the calculation result of steps 0703 and S0704, displays it (step 0705), and determines whether or not to preview other records (step 0706). This determination may be based on an instruction from the operator, or it may be determined whether the preview for a predesignated range has been completed. If the layout editing application 121 determines in step 0706 that there is no need to preview another record, it ends the preview mode (step 0707).

一方、他のレコードについてプレビューを行うのであれば、レイアウト編集アプリケーション121は、他のレコードを選択して再度レイアウト計算を行い、レコードをレイアウトしてそのプレビューを行う(ステップ0708)。プレビューモードでなく印刷時においては、印刷対象のレコード全てについて順にレイアウトの計算を行う。したがって、ステップ0701、0707は存在しない。またステップ0706では、印刷対象の全てのレコードについて印刷が終了したか否かが判断される。   On the other hand, when previewing another record, the layout editing application 121 selects another record, performs layout calculation again, lays out the record, and previews the record (step 0708). At the time of printing instead of the preview mode, the layout is calculated in order for all the records to be printed. Therefore, steps 0701 and 0707 do not exist. In step 0706, it is determined whether printing has been completed for all records to be printed.

(レイアウト計算手順)
図7(B)は、図7(A)のステップ0703におけるレイアウト計算の詳細を示したフロー図である。また、図8はそのときのUI表示例を示した図である。なお図7(B)に限らず、本実施形態で説明するフローチャートは、図1A、図1Bあるいは図2のコンピュータにより実行される。
(Layout calculation procedure)
FIG. 7B is a flowchart showing details of layout calculation in step 0703 of FIG. 7A. FIG. 8 is a diagram showing a UI display example at that time. Note that the flowchart described in this embodiment is not limited to FIG. 7B, and is executed by the computer of FIG. 1A, FIG. 1B, or FIG.

まず、レイアウト編集アプリケーション121は、レイアウトを計算するコンテナの集合を求める(ステップ0710)。レイアウト計算は、リンクにより関連付けられたコンテナを一つの集合として行われる。例えば図32を参照すると、ページ上に4つのコンテナがレイアウトされており、各コンテナに関連付けが設定されている。この場合、コンテナAとコンテナB、そしてコンテナCとコンテナDがリンクによって関連付けされている。したがって、コンテナAおよびコンテナBが集合1、コンテナCおよびコンテナDが集合2となる。すなわち、図23に示すテンプレートデータのリンク情報2304を参照し、リンクにより関連づけられたコンテナ群を、ひとつのコンテナ集合と判定できる。   First, the layout editing application 121 obtains a set of containers for calculating a layout (step 0710). The layout calculation is performed as a set of containers associated by links. For example, referring to FIG. 32, four containers are laid out on the page, and an association is set for each container. In this case, container A and container B, and container C and container D are associated by a link. Therefore, container A and container B are set 1, and container C and container D are set 2. That is, with reference to the link information 2304 of the template data shown in FIG. 23, the container group associated by the link can be determined as one container set.

次に、ステップ0710で求めたコンテナの集合から、レイアウト編集アプリケーション121は、レイアウトを計算するために一つコンテナの集合を選択する(ステップ0711)。これは、たとえばテンプレートデータのリンク情報中における出現順などに従えばよい。そして、レイアウト編集アプリケーション121は、選択したコンテナの集合について、レイアウトの計算を行う。ここでは、レイアウトされるコンテナのサイズが、実際のコンテンツのサイズとできる限り差が少なくなるように、レイアウトの最適化を行う(ステップ0712)。   Next, from the set of containers obtained in step 0710, the layout editing application 121 selects one set of containers for calculating the layout (step 0711). For example, the order of appearance in the link information of the template data may be followed. Then, the layout editing application 121 calculates a layout for the selected set of containers. Here, the layout is optimized so that the size of the container to be laid out is as small as possible with the actual content size (step 0712).

レイアウトの最適化は、動的にサイズを変化することが可能なように関連付けられたコンテナにおいて、それぞれに挿入されるコンテンツのサイズとそのコンテンツが挿入されるコンテナサイズとができるだけ同じサイズとなるように行われる。コンテナサイズが固定されている場合には、コンテンツの方が変倍されてコンテナに収められるか、あるいはコンテンツの一部がコンテナに収められる。コンテナ集合に3つ以上のコンテナが含まれる場合にも、各コンテンツのサイズに応じたコンテナサイズ(すなわち各可変の辺の長さ)を計算し、その中点からリンク情報で定義される距離の位置を、辺の位置として決定する。リンクされた辺が固定辺であるコンテナについては、その位置を、関連づけられたコンテナの辺の移動に応じて移動させる。   Layout optimization is such that the size of the content inserted into each associated container is as large as possible in the associated containers so that the size can be changed dynamically. To be done. When the container size is fixed, the content is scaled and stored in the container, or a part of the content is stored in the container. Even when three or more containers are included in the container set, the container size corresponding to the size of each content (that is, the length of each variable side) is calculated, and the distance defined by the link information from the midpoint is calculated. The position is determined as the position of the side. For a container whose linked side is a fixed side, its position is moved according to the movement of the side of the associated container.

以上のようにして、リンクで関連づけられたコンテナを1組として、サイズが可変のコンテナについてはそのサイズを、位置が可変のコンテナについてはその位置を決定する。   As described above, a set of containers linked by a link is determined, and the size of a variable size container is determined, and the position of a variable position container is determined.

上記要領でレイアウの最適化計算を行い、その計算結果がルールに違反していた場合、レイアウト編集アプリケーション121は、再度ルールを違反しないように計算をする(ステップ0713)。ここでルールとは、テンプレート作成時にユーザによって設定される制限であり、コンテナのサイズと位置、リンクの長さなどである。制限は、テンプレートデータ内のコンテナ情報に含まれる辺や点等の属性情報とリンク情報とにより定義されている。特、属性情報において「固定」の値を有する項目とリンク情報がレイアウト上の制限となる。そこで、ステップ0712のレイアウト計算を終了した後、「固定」という属性を持つ計算後の各コンテナの辺や点の位置、サイズ等の項目について、テンプレートデータ中のコンテナ情報と比較し、値が相違している項目があれば制約違反と判定される。また、リンクについても、リンク情報に含まれるリンク長さ(コンテナ間の距離)と、ステップ0712のレイアウト計算終了後のリンクが設定されたコンテナ間の距離とが相違していれば、制約違反と判定される。   The layout optimization calculation is performed as described above, and if the calculation result violates the rule, the layout editing application 121 calculates again so as not to violate the rule (step 0713). Here, the rules are restrictions set by the user at the time of template creation, such as the size and position of the container, the length of the link, and the like. The restriction is defined by attribute information such as sides and points included in the container information in the template data and link information. In particular, items having a “fixed” value in the attribute information and link information are restrictions on the layout. Therefore, after the layout calculation in step 0712 is completed, items such as sides, point positions, and sizes of the calculated containers having the attribute “fixed” are compared with the container information in the template data, and the values are different. If there is any item, it is judged as a constraint violation. Also, regarding links, if the link length (distance between containers) included in the link information is different from the distance between containers in which the link after the layout calculation in step 0712 is set, it is a constraint violation. Determined.

ルールに違反しないようにレイアウトが計算されたら、そのコンテナ集合のレイアウトは完成される。そして、レイアウト編集アプリケーション121は、ステップ0711〜ステップ0713のステップをページ上のすべてのコンテナの集合について施し、ページ全体のレイアウトを計算する(ステップ0714)。   Once the layout is calculated so that it does not violate the rules, the layout of the container set is completed. Then, the layout editing application 121 performs steps 0711 to 0713 for a set of all containers on the page, and calculates the layout of the entire page (step 0714).

なお、テンプレートデータにフローエリア情報が含まれている場合には、ステップ704で、レイアウト計算においてフローエリア内のサブテンプレートのレイアウトを行う必要がある。この処理は、後述する図10,図14,図16A,16B等で説明する。これらの図はプレビューモードではなくテンプレート作成モードの処理であるが、テンプレート作成モードにおいてもそのプレビュー表示を行っており、プレビュー表示の処理については同様だからである。   When the flow area information is included in the template data, it is necessary to perform layout of the sub-template in the flow area in the layout calculation in step 704. This process will be described with reference to FIG. 10, FIG. 14, FIG. These figures are processing in the template creation mode instead of the preview mode, but the preview display is also performed in the template creation mode, and the preview display processing is the same.

図8(A)〜(C)はレイアウト計算時のUI例である。図8(A)は、あるレコードが挿入されレイアウトが決定されている状態を表している。0801と0802は固定された辺、0803は可変の辺、0804と0805は可変の辺の変化方向を示している矢印、0806はリンクをそれぞれ示している。この状態において、レコードを変更し、異なったサイズのコンテンツを挿入する。図8(B)は図8(A)の状態に新しいコンテンツのサイズを重ねて示している。0807はそれぞれのコンテナに挿入されるコンテンツのサイズを表している。そして、レイアウト計算が行われる。図8(C)はレイアウト計算された結果を示している。計算後の各コンテナのサイズは、実際挿入されるコンテンツのサイズと同等に差異があるように計算され、且つ前述したルールを違反しないように計算される。図8(C)で示されるように、図8(B)で示した挿入されるコンテンツサイズ0807と計算後のコンテンツサイズ0808は、双方において同等な差異がある。   FIGS. 8A to 8C are UI examples at the time of layout calculation. FIG. 8A shows a state in which a certain record is inserted and a layout is determined. Reference numerals 0801 and 0802 denote fixed sides, 0803 denotes a variable side, 0804 and 0805 denote arrows indicating change directions of the variable side, and 0806 denotes a link. In this state, the record is changed and contents of different sizes are inserted. FIG. 8B shows the new content size superimposed on the state of FIG. 0807 represents the size of the content inserted into each container. Then, layout calculation is performed. FIG. 8C shows the result of layout calculation. The size of each container after the calculation is calculated so that there is a difference equivalent to the size of the content that is actually inserted, and is calculated so as not to violate the rules described above. As shown in FIG. 8C, the inserted content size 0807 shown in FIG. 8B and the calculated content size 0808 are equivalent to each other.

しかし、単純に同等の差異をもってコンテナサイズを変更するだけでは、図8のような横方向のみのレイアウト計算の場合は問題ないが、図33のように縦方向および横方向を考慮したレイアウト計算を行わなければならない場合、対応できなくなる可能性がある。横方向と縦方向の2次元的なレイアウトを扱う図33の場合、図7(B)のレイアウト計算方法を用いて、まず横方向に調整を行い、後に縦方向に調整を行う。すなわち、コンテナ3301と3302の間で、上述した手順で設定値Dに収まるようレイアウト調整を行い、その後、コンテナ3302と3303の間で設定Gに収まるようレイアウト調整を行えばよい。しかし、横方向に調整を行い、後に縦方向に調整を行うという調整方法では、ユーザが所望とする基本レイアウトからずれたレイアウト結果になることが想定される。   However, if the container size is simply changed with the same difference, there is no problem in the case of the layout calculation only in the horizontal direction as shown in FIG. 8, but the layout calculation considering the vertical direction and the horizontal direction as shown in FIG. 33 is performed. If it must be done, it may not be possible. In the case of FIG. 33 that handles a two-dimensional layout in the horizontal direction and the vertical direction, adjustment is first made in the horizontal direction and then in the vertical direction using the layout calculation method of FIG. That is, the layout adjustment is performed between the containers 3301 and 3302 so as to be within the set value D in the above-described procedure, and then the layout adjustment is performed between the containers 3302 and 3303 so as to be within the setting G. However, with the adjustment method in which adjustment is performed in the horizontal direction and then in the vertical direction, a layout result deviating from the basic layout desired by the user is assumed.

そのため、各コンテナについて、基本パターン(縦横比)からなるべくずれないように、基本パターンの幅とレイアウト調整後の幅の差の2乗と、基本パターンの高さとレイアウト調整後の高さの差の2乗との和を求め、これをすべてのコンテナについて算出する。そして、レイアウト編集アプリケーション121は、各コンテナの2乗の和の合計値が最小となるように、それぞれのコンテナの幅と高さを算出してレイアウト調整を行っても良い。   Therefore, for each container, the difference between the square of the width of the basic pattern and the width after layout adjustment, and the difference between the height of the basic pattern and the height after layout adjustment, so as not to deviate from the basic pattern (aspect ratio) as much as possible. The sum with the square is calculated and calculated for all containers. The layout editing application 121 may perform layout adjustment by calculating the width and height of each container so that the total sum of the squares of the containers is minimized.

この最小2乗法を用いてレイアウト調整を行うことにより、ユーザが当初設定した基本レイアウトから大きく外れることがなく、全体としてバランスのとれた最終レイアウトを決定することができる。なお、コンテナ間には後述する可変リンクが設定されているため、流し込まれるコンテンツデータのサイズに応じて後述するようにリンクサイズは変更する。本願記載のレイアウト編集アプリケーションはこのようなレイアウト調整ユニットを備えることにより、割り当てられたデータサイズに応じて複数の部分表示領域(コンテナ)の配置位置を調整することが可能となる。   By performing layout adjustment using this least square method, the final layout which is balanced as a whole can be determined without greatly deviating from the basic layout initially set by the user. Since a variable link described later is set between the containers, the link size is changed as described later according to the size of the content data to be inserted. By providing such a layout adjustment unit, the layout editing application described in the present application can adjust the arrangement positions of a plurality of partial display areas (containers) according to the allocated data size.

<マルチレコード(マルチデータ)機能>
マルチレコードについて概要を説明する。通常のドキュメントテンプレートでは、1レコードが1ドキュメントに対応しているが、サブテンプレートに対応するマルチレコードは、基準となる項目が変化するブレイク(区切り)が発生するまでのレコードが流し込まれるものであるため、1ドキュメント内に複数のレコードが入ることになる。よって、通常のドキュメントテンプレートに対応するバリアブルデータのデータベースと、サブテンプレートに対応するバリアブルデータのマルチレコードのデータベースとは異なるデータベースとすることが望ましい。
<Multi-record (multi-data) function>
An outline of multi-record will be described. In a normal document template, one record corresponds to one document, but in the multi-record corresponding to the sub template, records until a break (separation) in which a reference item is changed are poured. Therefore, a plurality of records are included in one document. Therefore, it is desirable that the variable data database corresponding to the normal document template and the variable data multi-record database corresponding to the sub-template are different from each other.

図9は、マルチレコードとそのレイアウト方法の概要の一例を示した図である。0901はドキュメント、0902はページ、0903はサブテンプレート、0904はデータベースを示している。0904で示すデータベースを見てみると、No1〜7のデータが表示されている。1レコード1ドキュメントのバリアブルプリントでは、7つレコードがあるので、この場合7ドキュメントが作成される。しかし、多レコード1ドキュメントのマルチレコードをサポートするバリアブルプリントでは、次のような処理を行う。まずマルチレコードを指定するカラムをユーザが任意に指定する。指定はたとえばテンプレート作成時になされる。この指定されたフィールドを特定するための情報は、図24のマルチレコード情報2404の一部として保存される。この例ではフィールド名:Nameが指定されたものとする。すると、その指定されたフィールドの値が同じレコードは、1ドキュメントにレイアウトされるレコードであると判定されて、これも別途指定されたサブテンプレート(図24のサブテンプレート情報に保存される。)を用いてレイアウトされ、1つのフローエリアに流しこまれる。図9の例では、No1〜4のレコードはフィールドNameの値が「Tom」であるため、ひとつのフローエリアに流しこまれ、ひとつのドキュメント上にレイアウトされる。No5〜7のレコードは、フィールドNameの値が「Nancy」であるため、「Tom」と同じテンプレートを用いて、しかし異なるドキュメント上にレイアウトされる。すなわち、いったん「Tom」のドキュメントを完結させ、「Nancy」のドキュメントを作成する。このように指定カラムのデータが変更されることに応じて、新しいドキュメントが作成されることとなる。   FIG. 9 is a diagram showing an example of an outline of a multi-record and its layout method. Reference numeral 0901 denotes a document, 0902 denotes a page, 0903 denotes a sub template, and 0904 denotes a database. Looking at the database indicated by 0904, data Nos. 1 to 7 are displayed. In the variable print of one record and one document, there are seven records. In this case, seven documents are created. However, in the variable print that supports multiple records of multiple records and one document, the following processing is performed. First, the user arbitrarily specifies a column for specifying a multi-record. The designation is made, for example, when creating a template. Information for specifying the designated field is stored as a part of the multi-record information 2404 in FIG. In this example, it is assumed that the field name: Name is specified. Then, a record having the same value in the designated field is determined to be a record laid out in one document, and this is also designated as a separately designated sub template (stored in the sub template information in FIG. 24). Used and laid out in one flow area. In the example of FIG. 9, the records of No. 1 to No. 4 have the field Name value “Tom”, so they are poured into one flow area and laid out on one document. The records of Nos. 5 to 7 are laid out on a different document using the same template as “Tom” because the value of the field Name is “Nancy”. That is, once the document “Tom” is completed, a document “Nancy” is created. In this way, a new document is created in accordance with the change of the data in the designated column.

具体的には、たとえばテンプレートデータにおける設定に従って「Tom」のドキュメントにフッタ等を付加(不図示)してから改ページする。これにより「Tom」のドキュメントは完結する。次にそれまでと同じテンプレートデータを用いて、「Nancy」のドキュメントのヘッダ等を新たなページに付加する(不図示)。そしてテンプレートに定義されたフローエリアに、これもサブテンプレート情報として設定されたサブテンプレートを用いて、NAMEフィールドの値が「Tom」のレコードについてレイアウトしてフローエリアに流しこむ。これが通常のマルチレコードである。   Specifically, for example, according to the setting in the template data, a page break is made after adding a footer or the like (not shown) to the “Tom” document. This completes the document “Tom”. Next, using the same template data as before, a “Nancy” document header or the like is added to a new page (not shown). Then, using the sub-template that is also set as the sub-template information in the flow area defined in the template, the record having the value of the NAME field “Tom” is laid out and poured into the flow area. This is a normal multi-record.

ただし本実施形態では、NancyとTomとでは、同じテンプレートデータを用いるが、個々のレコードについて同じサブテンプレートを用いるとは限らない。別途指定した条件に応じたサブテンプレートを用いることができるためである。   However, in the present embodiment, the same template data is used for Nancy and Tom, but the same sub-template is not necessarily used for each record. This is because a sub-template corresponding to a separately specified condition can be used.

<テンプレート作成モード処理の全体フロー>
図10、11は本発明に係るレイアウト編集システムによるテンプレート作成モードの処理フローとその説明UIを示している。図10のフローの各ステップを図11のUI図と合わせながら説明していく。レイアウト編集アプリケーション121が実行され、新たなテンプレートの作成の指示をユーザが入力することで、図11の画面(ただし矩形1104,1106,1105は除く。)が表示される。図10の手順は、その状態からユーザの指示に応じて遂行されるレイアウト編集アプリケーションの手順である。
<Overall flow of template creation mode processing>
10 and 11 show a processing flow of the template creation mode by the layout editing system according to the present invention and a description UI thereof. Each step of the flow of FIG. 10 will be described with reference to the UI diagram of FIG. When the layout editing application 121 is executed and the user inputs an instruction to create a new template, the screen shown in FIG. 11 (except for the rectangles 1104, 1106, and 1105) is displayed. The procedure of FIG. 10 is a procedure of the layout editing application that is executed in accordance with a user instruction from the state.

まず、レイアウト編集アプリケーション121が、図11のアイコン1103が押下されたことを認識することにより、フローエリア作成モードへと遷移し(S1001)、ページマージンのエリア1102において、ユーザのマウスのドラッグによる矩形をフローエリアとして描画する(S1002)。レイアウト編集アプリケーション121は、描画された矩形の位置およびサイズを、フローエリア1106の位置及びサイズとしてテンプレートデータの一部としてメモリユニット136に保存する(S1003)。コンテナ1104や1105は、フローエリア1106外に定義されるテキストコンテナやイメージコンテナである。これらのコンテナは、フローエリア内にコンテンツを流しこむ処理とは関係がないが、たとえばヘッダ、フッタとして設けておくことができる。これらコンテナもまた、入力されたその位置及びサイズがテンプレートデータの一部としてメモリユニット136に保存される。フローエリア1106は、それらのコンテナとは色や線種などの矩形UIを異ならせることにより、ユーザに視覚的に認識しやすいようにする。   First, when the layout editing application 121 recognizes that the icon 1103 in FIG. 11 has been pressed, the layout editing application 121 shifts to the flow area creation mode (S1001). In the page margin area 1102, a rectangle created by dragging the user's mouse. Is drawn as a flow area (S1002). The layout editing application 121 stores the position and size of the drawn rectangle in the memory unit 136 as a part of the template data as the position and size of the flow area 1106 (S1003). Containers 1104 and 1105 are text containers and image containers defined outside the flow area 1106. These containers are not related to the processing of flowing content into the flow area, but can be provided as headers and footers, for example. These containers are also stored in the memory unit 136 with their input position and size as part of the template data. The flow area 1106 makes the user easily recognizable visually by making the rectangular UI such as color and line type different from those containers.

次に、レイアウト編集アプリケーション121は、作成されたフローエリアにマルチレコードフィールドを関連づける(S1004)。これは、たとえばフローエリアに関連づけられるデータベース名および各レコードにおけるフィールド名等の識別子を入力する処理である。操作上は、たとえばフローエリアをクリックするなどして対象のフローエリアを特定し、そこで一定の操作の流れに従ってこれら必要な情報を入力させる。その情報が図24に示すテンプレートデータのマルチレコード情報としてメモリユニット136に保存される。これはステップS1006,S1007のプロパティと同時に入力することもできる。   Next, the layout editing application 121 associates a multi-record field with the created flow area (S1004). This is a process of inputting an identifier such as a database name associated with the flow area and a field name in each record. In operation, for example, a target flow area is specified by clicking a flow area, and the necessary information is input in accordance with a certain operation flow. The information is stored in the memory unit 136 as multi-record information of the template data shown in FIG. This can be input simultaneously with the properties in steps S1006 and S1007.

次に、レイアウト編集アプリケーション121は、作成されたフローエリアに各種設定を施すかどうかを判断する(S1005)。プロパティを設定するのであれば、レイアウト編集アプリケーション121が、フローエリアでマウスポインタをクリックされたことを認識することなどにより、プロパティダイアログを表示する(S1006)。そして、レイアウト編集アプリケーションは、表示されたプロパティダイアログを用いて設定された内容を認識して、設定する(S1007)。プロパティダイアログおよび設定方法については、後で詳細に記述する。なお、設定された各種情報はメモリユニット136に保持されることとなる。フローエリアの作成および設定が終了したら、レイアウト編集アプリケーション121は、レイアウトをプレビューするかどうかを確認し(S1008)、プレビューするのであれば、プレビューモードへ遷移して、レイアウト計算を行う(S1009)。このレイアウト計算は図7Bで示したフローと同じ処理を行う。   Next, the layout editing application 121 determines whether to make various settings for the created flow area (S1005). If the property is set, the layout editing application 121 displays a property dialog by recognizing that the mouse pointer is clicked in the flow area (S1006). The layout editing application recognizes and sets the content set using the displayed property dialog (S1007). The property dialog and setting method will be described in detail later. Various set information is held in the memory unit 136. When the creation and setting of the flow area is completed, the layout editing application 121 confirms whether or not to preview the layout (S1008), and if previewing, transitions to the preview mode and performs layout calculation (S1009). This layout calculation performs the same processing as the flow shown in FIG. 7B.

次に、レイアウト編集アプリケーション121は、設定されているフローエリアのレイアウト計算を行う(S1010)。この処理については後で図17を参照して詳細に記述する。最後にレイアウト結果を表示する(S1011)。ステップS1009,S1010,S1011は、図7AのステップS0703,S0704,S0705に相当する。   Next, the layout editing application 121 performs layout calculation for the set flow area (S1010). This process will be described later in detail with reference to FIG. Finally, the layout result is displayed (S1011). Steps S1009, S1010, and S1011 correspond to steps S0703, S0704, and S0705 in FIG. 7A.

(フローエリアのプロパティ設定)
図12はフローエリアの各種設定(プロパティ設定)を行う設定ダイアログの例を示している。これが、図10のフローチャート中のステップ1006で表示され、その内容をS1007にて反映させるダイアログのUI例となる。なお、文中のサブテンプレートおよび条件式についてはフローチャートの後で説明する。
(Flow area property settings)
FIG. 12 shows an example of a setting dialog for performing various settings (property settings) of the flow area. This is a UI example of a dialog displayed in step 1006 in the flowchart of FIG. 10 and reflecting the content in step S1007. Note that sub-templates and conditional expressions in the sentence will be described after the flowchart.

まず、ユーザがラジオボタン1202によってまずフローエリアに関連付けるものがサブテンプレートであるか、それとも条件式であるかを選択する。その後、サブテンプレートの関連づけが選択されている場合には、リストボックス1203からフローエリアで使用するサブテンプレートをユーザが指定する。あるいは条件式の関連づけが選択されている場合には、リストボックス1204からフローエリアで使用する条件式をユーザが指定する。サブテンプレートおよび条件式は、編集中のドキュメントテンプレート内に、あるいはテンプレート外であっても所定の場所に、それぞれの特有なUI手段によって別途作成できる。また、条件式は後述する図15のUIにより作成することができる。しかし他の手法としては別のファイルに保存され、この設定ダイアログからはファイルを指定することによって選択指定できるものとしてもかまわない。本実施形態では、ドキュメントテンプレート内のフローエリアに対してそれぞれ複数のサブテンプレートおよび条件式を作成できるが、リストボックスから選択するという特性上からも、それぞれが固有の名前を持ち識別できるように設計されるべきである。その他に、本設定ダイアログからは、サブテンプレートをフローエリアに流しこむ際のフローの方向(すなわちコンテンツを並べる方向)を選択欄1205から選択する。コンテンツの間隔は、縦は設定欄1206、横は設定欄1207で設定することが可能である。   First, the user selects whether a sub-template or a conditional expression is associated with a flow area by using a radio button 1202. Thereafter, when sub-template association is selected, the user designates a sub-template to be used in the flow area from the list box 1203. Alternatively, when the association of the conditional expression is selected, the user specifies a conditional expression to be used in the flow area from the list box 1204. The sub template and the conditional expression can be separately created by each unique UI means in the document template being edited or in a predetermined place even outside the template. In addition, the conditional expression can be created by a UI shown in FIG. However, as another method, the file is saved in a separate file, and can be selected and specified by specifying the file from this setting dialog. In this embodiment, a plurality of sub-templates and conditional expressions can be created for each flow area in the document template. However, from the viewpoint of selecting from the list box, each is designed to have a unique name for identification. It should be. In addition, from this setting dialog, the flow direction (that is, the direction in which contents are arranged) when the sub template is poured into the flow area is selected from the selection column 1205. The content interval can be set in the setting field 1206 in the vertical direction and in the setting field 1207 in the horizontal direction.

以上の設定を確定するには、OKボタン1208を押下する。OKボタンが押されると、そのときの設定が図24のフローエリア情報2401としてメモリユニット136に保存される。たとえば、着目フローエリアがサブテンプレートと関連づけられたのかそれとも条件式と関連づけられたかを示すフラグ情報、そのフラグ情報に応じてサブテンプレート名あるいは条件式名(条件式ファイルの名称)、フロー方向、間隔という情報が、サブテンプレート情報2403および属性情報2402として保存される。また、キャンセルボタン1209を押下すると指定された各種設定はすべてキャンセルされ、保存されない。   To confirm the above settings, an OK button 1208 is pressed. When the OK button is pressed, the setting at that time is stored in the memory unit 136 as the flow area information 2401 in FIG. For example, flag information indicating whether the target flow area is associated with a sub template or a conditional expression, a sub template name or a conditional expression name (name of a conditional expression file) according to the flag information, a flow direction, and an interval Is stored as sub-template information 2403 and attribute information 2402. When a cancel button 1209 is pressed, all the specified settings are canceled and are not saved.

(サブテンプレートのレイアウト例)
前述したサブテンプレートについて、概要を説明する。図13はサブテンプレートのレイアウト例(つまりサブテンプレートを用いてデータをレイアウトした例という意味。以下同じ。)を示している。サブテンプレートは、イメージコンテナ、テキストコンテナを任意数配置して、そのコンテナにレコードのどのデータ(フィールド)を割り当てるかを設定した状態で、テンプレートとして保存してあるデータを指す。同じレイアウトを一つのドキュメントで数多く使う場合に便利である。サブテンプレート内に配置されるコンテナは、前記イメージコンテナ、テキストコンテナと同様であり、各コンテナ間にはリンクを設定することも可能である。したがって、サブテンプレート内に配置されたコンテナに対して、図7Bに記載のレイアウト計算方法を適用することにより、レイアウトサイズを最適に変化させることが可能である。
(Sub template layout example)
An outline of the sub-template described above will be described. FIG. 13 shows a layout example of a sub template (that is, an example in which data is laid out using a sub template. The same applies hereinafter). The sub-template refers to data stored as a template in a state where an arbitrary number of image containers and text containers are arranged and which data (field) of a record is assigned to the container. This is useful if you use the same layout many times in one document. The containers arranged in the sub-template are the same as the image container and the text container, and a link can be set between the containers. Therefore, the layout size can be optimally changed by applying the layout calculation method described in FIG. 7B to the containers arranged in the sub-template.

図13はサブテンプレートのレイアウト例を示している。1302と1305はイメージコンテナ、1303と1306はテキストコンテナ、1307はリンクを示している。   FIG. 13 shows a layout example of the sub-template. Reference numerals 1302 and 1305 denote image containers, 1303 and 1306 denote text containers, and 1307 denotes a link.

図13では、サブテンプレート1301と1302に配置された各コンテナに流し込まれるイメージ、テキストのコンテンツサイズが異なるため、レコードごとにそれぞれ最適なレイアウトを計算してレイアウトを変更している。そのため、同じサブテンプレートを用いているにもかかわらず、サブテンプレート1301と1302ではコンテナ(部分表示領域)の位置およびサイズが異なるレイアウトとなる。なお、サブテンプレート内におけるレイアウト方法は上述した図7(B)の処理を用いて、レイアウト調整を行うこととする。   In FIG. 13, since the image and text content sizes poured into the containers arranged in the sub-templates 1301 and 1302 are different, the optimal layout is calculated for each record and the layout is changed. Therefore, even though the same subtemplate is used, the subtemplates 1301 and 1302 have different layouts with different positions and sizes of containers (partial display areas). As a layout method in the sub-template, layout adjustment is performed using the above-described process of FIG.

(サブテンプレート条件式)
サブテンプレート条件式は、ひとつのフローエリアに対して複数種類のサブテンプレートを選択的に割り当てることができる。なお、条件式はデータベースから条件に一致するコンテンツを抽出するための式でもあるため、本願では抽出条件ともいい、該条件式(抽出条件)が設定されたフローエリアを有するテンプレートが作成されることとなる。また、フローエリアには、サブテンプレートあるいは条件式のいずれかひとつを関連付けることができる。もし、フローエリアに対してサブテンプレートを関連付けた場合、取得されたレコードは関連付けられたサブテンプレート内に流し込まれることとなる。なお、サブテンプレートを関連付ける際に条件式を設定し、該条件式に適合するレコードのみをフローエリアに関連付けられたサブテンプレートに流し込むようにしても構わない。
(Sub template conditional expression)
The sub template conditional expression can selectively assign a plurality of types of sub templates to one flow area. Since the conditional expression is also an expression for extracting content that matches the condition from the database, it is also referred to as an extraction condition in the present application, and a template having a flow area in which the conditional expression (extraction condition) is set is created. It becomes. In addition, any one of the sub template and the conditional expression can be associated with the flow area. If the sub template is associated with the flow area, the acquired record is poured into the associated sub template. Note that a conditional expression may be set when associating the sub-template, and only records that match the conditional expression may be poured into the sub-template associated with the flow area.

また、条件式には条件適合時に適用されるサブテンプレートの識別情報を含む。図15は条件式を設定するUI例であり、フローエリアに設定された条件式に適合するレコードが、該条件式と関連付けられているサブテンプレートと関連付けられて、コンテナに流し込まれることとなる。そして、レコードが流し込まれたサブテンプレートがフローエリアに配置されることとなる。   In addition, the conditional expression includes identification information of a sub template applied when the condition is met. FIG. 15 shows an example of a UI for setting a conditional expression. Records that conform to the conditional expression set in the flow area are associated with the sub-template associated with the conditional expression and flowed into the container. Then, the sub template into which the record is poured is arranged in the flow area.

この入力領域は、条件式に名前を付けるテキストボックス1502と、もっとも基本的な条件判定を構成する要素であるIF文1503とELSE文1504のペアを最低限有している。IF文の入力領域においては、条件の判定対象となるフィールドの選択を行うリストボックス1505と、判定の論理式を設定するリストボックス1506、判定に用いられる値を入力するテキストボックス1507、条件判定が正だったときに動作を決定する、該レコードを挿入するためのサブテンプレートを決定するTHEN_USE処理文1508、また、同じく条件判定結果が不正だったときに該レコードを挿入するためのサブテンプレートを決定するELSE_USE処理文1504からなっている。判定の論理式1506には、「EQUAL(等しい)」、「NOT_EQUAL(等しくない)」、「LESS_THAN(小さい)」、「LARGER_THAN(大きい)」、「START_WITH(で始まる)」、「END_WITH(で終わる)」などさまざまな条件が用意される。   This input area has at least a text box 1502 for naming a conditional expression and a pair of IF statement 1503 and ELSE statement 1504 which are elements constituting the most basic condition determination. In the input area of the IF statement, a list box 1505 for selecting a field for which a condition is determined, a list box 1506 for setting a logical expression for determination, a text box 1507 for inputting a value used for determination, and condition determination A THEN_USE processing statement 1508 that determines the sub-template for inserting the record that determines the operation when the result is positive, and also determines the sub-template for inserting the record when the condition determination result is invalid ELSE_USE processing statement 1504. The determination logical expression 1506 includes “Equal (equal)”, “NOT_EQUAL (not equal)”, “LESS_THAN (small)”, “LARGER_THAN (large)”, “START_WITH (starts with)”, “END_WITH (ends) ) "And so on.

さらに、複雑な条件式を設定するためには、IF文中に複合条件を設定するためにAND/OR接続文コンボボックス1509を有する。このコンボボックスでANDまたはORの複合条件を選択すると、IF文中に条件行が1行追加される。ANDの場合、複数の条件がすべて正であるときのみ、ORの場合いずれかの条件が正であるときにIF文判定が真であると判定される。また、さらに複雑な条件分岐を設定するためには、ELSE_IF文追加ボタン1510を有する。ボタン1510を押下すると、前述IF文とELSE文の間に、あらたにELSE_IF文が追加挿入される。ELSE_IF文の内容と動作は、IF文における内容と同じである。IF文が不正のときにひとつ下のELSE_IF文を判定し、さらに不正のときにもうひとつ下のELSE_IF文を判定し、これを続けて最後にELSE文を判定する、という順に処理を行う。1511は選択されているELSE_IF文を削除する削除ボタンである。ELSE_IF文が多くなった場合、スクロールバー1512を使って条件のリストを表示することが可能である。いずれかのIF文あるいはELSE_IF文で真と判定された場合、そのUSE処理文が実行される。USE処理文にはサブテンプレート名が入力(選択)される。このように、条件式を通して、さまざまな値を取るレコードのそれぞれに、条件に合ったサブテンプレートを自動的に選択することができ、ひとつの条件式においてさまざまなレイアウトを実現することが可能になる。この条件式をフローエリアに関連付けることによって、ひとつのフローエリアにおいて、さまざまなレイアウトを持った複数種類のサブテンプレートをフローエリア内に配置することが可能になる。   Further, in order to set a complicated conditional expression, an AND / OR connection statement combo box 1509 is provided to set a compound condition in the IF statement. When an AND or OR compound condition is selected in this combo box, one condition line is added to the IF statement. In the case of AND, it is determined that the IF statement determination is true only when a plurality of conditions are all positive, and in the case of OR, when any of the conditions is positive. In order to set a more complicated conditional branch, an ELSE_IF statement addition button 1510 is provided. When the button 1510 is pressed, an ELSE_IF statement is newly inserted between the IF statement and the ELSE statement. The contents and operation of the ELSE_IF statement are the same as those in the IF statement. When the IF statement is invalid, the next lower ELSE_IF statement is determined, and when the IF statement is further incorrect, the next lower ELSE_IF statement is determined, followed by the final determination of the ELSE statement. Reference numeral 1511 denotes a delete button for deleting the selected ELSE_IF statement. When the number of ELSE_IF statements increases, a list of conditions can be displayed using the scroll bar 1512. If it is determined to be true by any IF statement or ELSE_IF statement, the USE processing statement is executed. The sub template name is input (selected) to the USE processing statement. In this way, sub-templates that meet the conditions can be automatically selected for each record that has various values through the conditional expression, and various layouts can be realized in one conditional expression. . By associating this conditional expression with a flow area, a plurality of types of sub-templates having various layouts can be arranged in the flow area in one flow area.

ユーザは条件を入力すると、最後にOKボタン1514を押す。OKボタン1514の押下により、UIで設定されたサブテンプレート条件を示す情報が、サブテンプレート情報2403の一部としてメモリユニット136に保存される。このサブテンプレート条件式は、たとえば、図15のUIに記述された(選択された)テキストをそのまま保存したテキストファイルなど、条件と条件が満たされた場合のサブテンプレートを特定できる情報であれば良い。図15の例では、「IF field01 EQUAL value01 AND field02 EQUAL vlue02 THEN USE subtemplate01 ELSEE IF field01 EQUAL value03 AND field02 EQUAL vlue04 THEN USE subtemplate02 ELSE USE subtemplate03」をサブテンプレート条件式の示す情報として保存する。このまま保存しても、簡単な文法で記述されており、しかも図15のようなUIから入力されるので文法的な誤りなどが発生する余地がない。そのために、簡単なプログラムでその条件の記述をパースして適合するサブテンプレートを決定することができる。   When the user inputs the condition, the user finally presses an OK button 1514. When the OK button 1514 is pressed, information indicating the sub template condition set in the UI is stored in the memory unit 136 as a part of the sub template information 2403. This sub-template conditional expression may be any information that can specify the sub-template when the conditions and conditions are satisfied, such as a text file in which the (selected) text described in the UI of FIG. 15 is stored as it is. . In the example of FIG. 15, “IF field01 EQUAL value01 AND field02 EQUAL vlue02 THEN USE subtemplate01 ELSEE IF field01 EQUAL value03 AND field02 EQUAL vlue04 THEN USE subtemplate02 ELSE USE subtemplate03” is stored as information indicating the subtemplate conditional expression. Even if the data is stored as it is, it is described in a simple grammar and is input from the UI as shown in FIG. 15, so there is no room for grammatical errors. Therefore, a suitable sub-template can be determined by parsing the description of the conditions with a simple program.

このように条件式にはデータベースからレイアウトするためのコンテンツデータを抽出するための条件と、該条件に該当した場合に使用するサブテンプレートを関連付けて保持している。よって、抽出されたコンテンツデータは、どのサブテンプレートに配置すべきかが関連付け情報としてメモリユニット136に保持される。また、上述したように複数の条件式を設定することが可能であるため、抽出されたコンテンツデータの各々は、それぞれ関連付けられたサブテンプレートがあるため、各コンテンツデータが配置された複数種類のサブテンプレートがフローエリアにレイアウトされることとなる。   In this way, the conditional expression holds the condition for extracting content data for layout from the database and the sub template used when the condition is met. Therefore, the extracted content data is held in the memory unit 136 as association information indicating which sub-template should be arranged. In addition, since it is possible to set a plurality of conditional expressions as described above, each of the extracted content data has a sub template associated therewith, and therefore, a plurality of types of sub data in which each content data is arranged. The template is laid out in the flow area.

<フローエリアのレイアウト方法>
図17は、レイアウト編集アプリケーションプログラム121による、フローエリア内のレイアウト計算のフローを示している。図17の手順は、図10のステップS1010や、図7AのステップS0704で実行される。なおここでは、フローエリアが一つ設定されているときの説明をする。複数のフローエリアが設定されているテンプレートに関しては、S1701〜S1715の手順をフローエリア毎に繰り返せばよい。
<Flow area layout method>
FIG. 17 shows a flow of layout calculation in the flow area by the layout editing application program 121. The procedure in FIG. 17 is executed in step S1010 in FIG. 10 and step S0704 in FIG. 7A. Here, a description will be given when one flow area is set. For a template in which a plurality of flow areas are set, the steps S1701 to S1715 may be repeated for each flow area.

まず、レイアウト編集アプリケーションプログラム121は、レイアウトするためのデータを、フローエリアに関連付けられているデータベースから取得し(S1701)、レイアウトするレコードの数をnに代入する(S1702)。詳細にはレイアウト編集アプリケーションを構成するモジュールの1つであるユーザインタフェースがレイアウトするためのレコードを含むデータベースと通信することにより、取得すべきレコード数を認識することができる。
レイアウトするレコードの数が0であった場合には、レイアウトの処理は行う必要がないので、処理を行わず終了する(1703)。次に、レイアウト編集アプリケーション121は、1つめのレコードからチェックをするためにレコードのチェック用の変数kに1を代入する(S1704)。また、レイアウトされるサブテンプレートの数を代入する変数Numに0を代入する(S1705)。そして、レイアウト編集アプリケーション121は、k番目のレコードのデータをデータベースから読み出す(S1706)。なお、読み出されたレコードのコンテンツデータは一時的にメモリユニット136に保持される。
First, the layout editing application program 121 obtains data for layout from the database associated with the flow area (S1701), and substitutes the number of records to be laid out for n (S1702). Specifically, the number of records to be acquired can be recognized by communicating with a database including records for layout by a user interface which is one of the modules constituting the layout editing application.
If the number of records to be laid out is 0, there is no need to perform layout processing, so the processing ends without performing processing (1703). Next, the layout editing application 121 assigns 1 to a variable k for checking the record in order to check from the first record (S1704). Also, 0 is substituted into a variable Num that substitutes the number of sub-templates to be laid out (S1705). The layout editing application 121 reads the data of the kth record from the database (S1706). Note that the content data of the read record is temporarily held in the memory unit 136.

次にレイアウト編集アプリケーション121は、着目フローエリアに関するフローエリア情報2401を参照して、サブテンプレートが関連付けられているか、それとも条件式が関連付けられているかを判定する(S1707)。条件式が関連付けられている場合、レイアウト編集アプリケーション121は、後述する図16Aのフローチャートに基づき、k番目のレコードをサブテンプレートに従ってレイアウトする(S1708)。図16Aの手順では、フローエリアにサブテンプレートが関連付けられている場合はそのサブテンプレート情報を読み出し、条件式が関連付けられている場合はステップ1708で条件式を評価し、その結果得られたサブテンプレートを読み出して、k番目のレコードついて、読み出したサブテンプレートに従ってレイアウトを行う。一方、フローエリアに条件式が関連づけられていないと判定された場合には、図14のフローチャートに基づき、そのフローエリアに関連づけられたサブテンプレートに従ってk番目のレコードをレイアウトする(S1709)。ステップS1708、S1709でサブテンプレートに従ってレイアウトされたデータはフローエリアに流しこまれるまでメモリユニット136に保存される。保存されるのは、レイアウト計算の結果得られた、コンテンツを流しこんだ後の各コンテナの相対的な位置関係とサイズおよびコンテナの内容である。たとえば、サブテンプレート上で適当な座標原点を決め、その座標系で各コンテナの位置とサイズとが示されたコンテナの位置及びサイズ情報が保存される。あわせて、コンテナ内に収めるためにコンテンツについても、同じ座標系で位置とその位置に配置されるデータを示す情報とが保存される。これらをレイアウト済みサブテンプレート情報と呼ぶことにする。   Next, the layout editing application 121 refers to the flow area information 2401 regarding the target flow area, and determines whether the sub template is associated or the conditional expression is associated (S1707). When the conditional expression is associated, the layout editing application 121 lays out the kth record according to the sub-template based on the flowchart of FIG. 16A described later (S1708). In the procedure of FIG. 16A, when a sub template is associated with the flow area, the sub template information is read. When the conditional expression is associated, the conditional expression is evaluated in step 1708, and the sub template obtained as a result is obtained. , And the layout for the kth record is performed according to the read sub-template. On the other hand, if it is determined that the conditional expression is not associated with the flow area, the k-th record is laid out according to the sub-template associated with the flow area based on the flowchart of FIG. 14 (S1709). Data laid out in accordance with the sub-template in steps S1708 and S1709 is stored in the memory unit 136 until it is poured into the flow area. What is saved is the relative positional relationship and size of each container after the content is poured, and the contents of the container obtained as a result of the layout calculation. For example, an appropriate coordinate origin is determined on the sub-template, and the container position and size information indicating the position and size of each container in the coordinate system is stored. In addition, for the contents to be stored in the container, the position and information indicating the data arranged at the position are stored in the same coordinate system. These are referred to as laid-out sub template information.

サブテンプレートのレイアウトが終了したら、レイアウト編集アプリケーション121は、変数Numを1増やし(S1710)、次のデータに処理を進めるため、変数kを1増やす(S1711)。そして、レイアウト編集アプリケーション121は、レコードするデータ数nとkを比較する(S1712)。もし、kがn未満であるなら、ステップS1706へ進み、そのk番目のデータについて、処理を繰り返す。kがn以上であるなら、サブテンプレートのレイアウトは終了し、フローエリアにレイアウトされたサブテンプレートをレイアウトする処理へと進む。   When the layout of the sub-template is finished, the layout editing application 121 increases the variable Num by 1 (S1710), and increases the variable k by 1 in order to proceed to the next data (S1711). The layout editing application 121 compares the number n of data to be recorded with k (S1712). If k is less than n, the process proceeds to step S1706, and the process is repeated for the k-th data. If k is greater than or equal to n, the layout of the sub-template ends, and the process proceeds to the process of laying out the sub-template laid out in the flow area.

フローエリアにサブテンプレートをレイアウトするために、レイアウト編集アプリケーション121は、フローエリア情報2401からフローエリアのサイズを取得し(S1713)、レイアウトするサブテンプレートのサイズを取得する(S1714)。詳細には後述する図16のフローチャートによりコンテンツデータを配置すべきサブテンプレートが特定され、さらにサブテンプレート内におけるレイアウトの最適化処理の実行結果がメモリユニット136に保持されているため、レイアウトするサブテンプレートのサイズを取得することが可能となる。なお、本実施形態では、サブテンプレートの外枠のサイズは、サブテンプレート内のコンテナのサイズによって決定する。すなわち、サブテンプレート内での自由なレイアウト処理によって、サブテンプレートのレイアウト後の大きさは、レコードの内容に依存して変化する。そして、サブテンプレートに流し込まれたレコードによるレイアウト結果は上述した通りメモリユニット136に保持されているため、レイアウト編集アプリケーション121は、レイアウトすべきサブテンプレートのサイズを取得することが可能となる。なお、ユーザによってはサブテンプレートの外枠サイズは一定であることを望む場合も考えられるため、所定の処理によりサブテンプレートの外枠サイズを固定にするか可変にするか切り替えられるようにしても構わない。   In order to lay out the sub template in the flow area, the layout editing application 121 acquires the size of the flow area from the flow area information 2401 (S1713), and acquires the size of the sub template to be laid out (S1714). Specifically, a sub template in which content data is to be arranged is specified according to the flowchart of FIG. 16 to be described later, and the execution result of the layout optimization process in the sub template is held in the memory unit 136. Can be obtained. In the present embodiment, the size of the outer frame of the sub template is determined by the size of the container in the sub template. In other words, the size after layout of the sub template changes depending on the contents of the record by the free layout processing in the sub template. Since the layout result by the record poured into the sub template is held in the memory unit 136 as described above, the layout editing application 121 can acquire the size of the sub template to be laid out. Note that, depending on the user, there may be a case where the outer frame size of the sub template is desired to be constant. Therefore, the outer frame size of the sub template may be fixed or variable by a predetermined process. Absent.

レイアウト編集アプリケーションは、フローエリア情報2401に設定されているフロー方向とフロー間隔を適用しながらコンテンツデータがレイアウトされたレイアウト済みのサブテンプレートをフローエリア内に配置する(S1715)。なお、フロー方向とはサブテンプレートの配置方法であり、フロー間隔とはサブテンプレート間の間隔を指す。ここで、フローエリアに配置されるのは、ステップS1708及びステップS1709で保存されたレイアウト済みサブテンプレート情報である。すなわち、具体的には、ステップS1715では、レイアウト済みサブテンプレート内の相対的な座標系で定義されたコンテナの位置及びサイズと、コンテンツの位置及び内容とを、フローエリアの座標系に変換する。このとき、フローエリアに納まらないレイアウト済みテンプレートがあれば、サブテンプレートのサイズについて縮小変換を行う必要がある。なお、サブテンプレートの縮小変換を行いたくない場合は、後述するページ繰り返し機能により対応することも可能である。   The layout editing application arranges the laid out sub template in which the content data is laid out in the flow area while applying the flow direction and the flow interval set in the flow area information 2401 (S1715). The flow direction is a sub-template arrangement method, and the flow interval indicates an interval between sub-templates. Here, what is arranged in the flow area is the sub-template information that has been laid out saved in steps S1708 and S1709. Specifically, in step S1715, the container position and size defined in the relative coordinate system in the laid out sub-template and the content position and content are converted to the flow area coordinate system. At this time, if there is a layout template that does not fit in the flow area, it is necessary to perform reduction conversion on the size of the sub-template. It should be noted that if it is not desired to perform sub-template reduction conversion, it can be handled by a page repetition function described later.

(サブテンプレートのレイアウト(条件式なし))
ステップS1709におけるサブテンプレートこのレイアウト処理のフローは図14に示す通りである。図14において、まずレイアウト編集アプリケーションは、データベースからレイアウトするためのデータを取得し、(S1401)。サブテンプレート内の各コンテナにレイアウトするコンテンツデータのサイズを取得する(S1402)。詳細には、上述したようにレイアウト編集アプリケーション121を構成するモジュールの1つであうユーザインタフェースがデータベースとの関連付け処理を行うことにより、データベースのデータを参照することが可能となり、その際に該データを解釈することによりサイズ等を取得できる。なお、ステップS1401とS1402は同時でも良い。S1402の処理は、レイアウト編集アプリケーション121が、S1401により取得したデータの情報を解析することによりコンテンツデータのサイズを取得することが可能となる。なお、取得されたコンテンツデータのサイズはメモリユニット136に保持されることとなる。
(Sub template layout (no conditional expression))
Sub-template in step S1709 The flow of this layout process is as shown in FIG. In FIG. 14, the layout editing application first acquires data for layout from the database (S1401). The size of the content data to be laid out in each container in the sub template is acquired (S1402). Specifically, as described above, the user interface, which is one of the modules constituting the layout editing application 121, performs the association process with the database, so that the data in the database can be referred to. The size and the like can be acquired by interpretation. Note that steps S1401 and S1402 may be performed simultaneously. In the process of S1402, the layout editing application 121 can acquire the size of the content data by analyzing the data information acquired in S1401. Note that the size of the acquired content data is held in the memory unit 136.

レイアウト編集アプリケーションは、S1402により取得したデータサイズに基づいて、各コンテナについてレイアウト計算を行い(S1403)、レイアウトを最適化する(S1404)。最適化の方法は前述した通り図7Aの処理を用いて実行される。   The layout editing application performs layout calculation for each container based on the data size acquired in S1402 (S1403), and optimizes the layout (S1404). The optimization method is executed using the processing of FIG. 7A as described above.

レイアウト編集アプリケーション121は、S1404により最適化されたレイアウトを決定し(S1405)、レイアウトするデータを流し込み(S1406)、表示する(S1407)。なお、S1405により決定されたレイアウトは一時的にメモリユニットに保持されることとなる。また、S1407の表示はドキュメントが完成したときにまとめて行うのであれば、ステップS1407は不要である。   The layout editing application 121 determines the layout optimized in S1404 (S1405), flows data to be laid out (S1406), and displays it (S1407). Note that the layout determined in S1405 is temporarily held in the memory unit. If the display in S1407 is performed collectively when the document is completed, step S1407 is not necessary.

(サブテンプレートのレイアウト(条件式あり))
図16(A)、図16(B)は、図17のステップS1708において、フローエリアに条件式が設定されている場合に、データベースレコードから条件判定を行い、レコードを挿入するためのサブテンプレートを選択する処理のフローチャートである。
(Sub template layout (with conditional expression))
FIGS. 16A and 16B show sub-templates for performing condition determination from a database record and inserting a record when a conditional expression is set in the flow area in step S1708 of FIG. It is a flowchart of the process to select.

図16(A)においては、レイアウト編集アプリケーション121はまず、データベースからレイアウトするためのデータを取得する(S1601)。   In FIG. 16A, the layout editing application 121 first acquires data for layout from the database (S1601).

次に、レイアウト編集アプリケーション121は、データをレイアウトするサブテンプレートを決定する(S1602)。なお、現在対象としているレコードのコンテンツデータがフローエリアに設定されている条件と合致しない場合は、該対象レコードをレイアウトすることなく次のレコードを対象とする。つまり、条件式に合致するコンテンツデータを有するレコードがレイアウトの対象レコードとして取り扱われる。なお、この詳細については図16(B)で説明する。   Next, the layout editing application 121 determines a sub template for laying out data (S1602). If the content data of the currently targeted record does not match the conditions set in the flow area, the next record is targeted without laying out the targeted record. That is, a record having content data that matches the conditional expression is handled as a layout target record. The details will be described with reference to FIG.

次に、レイアウト編集アプリケーション121は、各コンテナにレイアウトするデータのサイズを渡す(S1603)。詳細には、レイアウト編集アプリケーションがS1601により取得されたデータを解析することにより、レイアウトすべきデータのサイズを認識でき、該データのサイズと各コンテナを関連付けることによりS1603の処理は実現される。   Next, the layout editing application 121 passes the size of data to be laid out to each container (S1603). Specifically, the layout editing application can recognize the size of data to be laid out by analyzing the data acquired in S1601, and the processing of S1603 is realized by associating the size of the data with each container.

そして、レイアウト編集アプリケーション121は、S1603により渡されたデータサイズに基づいて、各コンテナにおいてレイアウト計算し(S1604)、レイアウトを最適化する(S1605)。最適化の方法は前述した通り、コンテンツデータのサイズに応じて調整されるものである。   The layout editing application 121 calculates the layout in each container based on the data size passed in S1603 (S1604), and optimizes the layout (S1605). As described above, the optimization method is adjusted according to the size of the content data.

レイアウト編集アプリケーション121は、最適化されたレイアウトを決定し(S1606)、レイアウトするデータを流し込み(S1607)、フローエリアにレイアウトして表示する(S1608)。なお、表示はドキュメントが完成したときにまとめて行うのであれば、ステップS1608は不要である。   The layout editing application 121 determines an optimized layout (S1606), flows data to be laid out (S1607), and lays out and displays it in the flow area (S1608). Note that step S1608 is unnecessary if the display is performed collectively when the document is completed.

図16(B)は、図16(A)中のサブテンプレートを決定する処理S1602の詳細を記述したフローチャートである。   FIG. 16B is a flowchart describing details of the process S1602 for determining the sub-template in FIG.

レイアウト編集アプリケーション121は、着目フローエリアのフローエリア情報2401に基づいてサブテンプレート条件式ファイルを読み、条件式の最初のIF文を取り出し(S1611)、ステップS1601で受け取ったレコードからIF文の判定対象としているフィールドの値を取り出す(S1612)。なお、データベースから取得した各レコードのフィールドの値は、データベースと通信することにより取得しても構わないし、各レコードのフィールドの値をメモリユニット136に保持することにより、レイアウト編集アプリケーションがメモリユニット136を参照して、フィールドの値を取り出すようにしても構わない。   The layout editing application 121 reads the sub template conditional expression file based on the flow area information 2401 of the flow area of interest, extracts the first IF sentence of the conditional expression (S1611), and determines the IF sentence from the record received in step S1601. The value of the current field is extracted (S1612). Note that the field value of each record acquired from the database may be acquired by communicating with the database, and the layout editing application stores the value of the field of each record in the memory unit 136 so that the memory editing unit 136 The field value may be extracted with reference to FIG.

レイアウト編集アプリケーション121は、S1612により取り出した各フィールドの値がS1611により取り出した条件に合致するかどうかを判定する(S1613)。すなわち、条件式はメモリユニット136に保持されているため、レイアウト編集アプリケーション121がメモリユニットを参照することにより具体的なフィールド値で評価することが可能となり、S1613に記載の判定処理を行える。
レイアウト編集アプリケーション121が、フローエリアに設定されている条件式と判定対象として取り出したフィールドの値が合致すると判定した場合、すなわち評価の結果が真であった場合、その条件に該当するUSE処理を選択し、そこに記述されたサブテンプレート名をメモリユニット136(サブテンプレート情報2403)に保存する(S1614)。この処理により現在対象としており、条件式と合致すると判定されたレコードが有するコンテンツデータを配置するためのサブテンプレートが関連付けられて保持される。なお、この関連付けられた情報も上述の関連付け情報の1つとしてメモリユニットに保持される。
The layout editing application 121 determines whether or not the value of each field extracted in S1612 matches the condition extracted in S1611 (S1613). That is, since the conditional expression is held in the memory unit 136, the layout editing application 121 can evaluate with a specific field value by referring to the memory unit, and the determination process described in S1613 can be performed.
When the layout editing application 121 determines that the conditional expression set in the flow area matches the value of the field extracted as the determination target, that is, when the evaluation result is true, the USE processing corresponding to the condition is performed. The selected sub template name is stored in the memory unit 136 (sub template information 2403) (S1614). By this process, a sub-template for arranging content data included in a record that is currently targeted and determined to match the conditional expression is associated and held. This associated information is also held in the memory unit as one of the above-described association information.

レイアウト編集アプリケーション121は、S1613により合致しないと判定した場合、別のIF文があるかどうかを判定する(S1615)。あれば同様にIF文の判定を続けるため、S1611の処理へ入る。最後にどのIF文にも合致しなかったレコードは、ELSE文のUSE処理を選択し、該当するサブテンプレート名を保存する(S1616)。   If the layout editing application 121 determines that there is no match in S1613, it determines whether there is another IF statement (S1615). If there is, the process proceeds to S1611 in order to continue the IF statement determination. Finally, for a record that does not match any IF statement, the USE processing of the ELSE statement is selected, and the corresponding subtemplate name is stored (S1616).

なお、図16(B)の処理では、S1616があることにより、条件に適合しないレコードもサブテンプレートに流し込まれることとなる。しかし、ELSE文に使用すべきサブテンプレートが指定されていない場合、条件に適合しないレコードはサブテンプレートに流し込まないようにしても構わない。つまり、ELSEの場合に使用すべきサブテンプレートを指定しないことにより、サブテンプレートに流し込まれるレコードをフローエリアに設定された条件式に適合するものに絞り込むことが可能となる。   Note that in the process of FIG. 16B, due to the presence of S1616, records that do not meet the conditions are also poured into the sub-template. However, if the sub template to be used in the ELSE statement is not specified, records that do not meet the conditions may not be flown into the sub template. In other words, by not designating a sub template to be used in the case of ELSE, it is possible to narrow records to be flowed into the sub template to those that match the conditional expression set in the flow area.

以上の処理により、複数種類のサブテンプレートを使用する条件式が設定されている場合、フローエリアには複数種類のレイアウト済みサブテンプレートが配置されることとなる。さらに条件式によっては取得した全レコードをサブテンプレートに流し込むのか、または条件式に適合したレコードのみをサブテンプレートに流し込むのかを切り替えることができる。   As a result of the above processing, when a conditional expression that uses a plurality of types of sub-templates is set, a plurality of types of laid-out sub-templates are arranged in the flow area. Furthermore, depending on the conditional expression, it is possible to switch whether all the acquired records are poured into the sub template or only the records that match the conditional expression are poured into the sub template.

図18(A)は、フローエリア内にサブテンプレートがレイアウトされた例を示している。図18(A)で、1801はページマージン、1802と1803は固定のコンテナ、1804はフローエリア、1805はサブテンプレートを示している。また1806は横フロー間隔であり、1807は縦フロー間隔を現している。フローエリアに4つのサブテンプレートがレイアウトされており、フローエリアの左上を起点として、前記フローエリアの設定ダイアログで設定された適切なフロー間隔を空けてそれぞれが配置されている。   FIG. 18A shows an example in which sub-templates are laid out in the flow area. In FIG. 18A, 1801 is a page margin, 1802 and 1803 are fixed containers, 1804 is a flow area, and 1805 is a sub-template. Reference numeral 1806 denotes a horizontal flow interval, and 1807 denotes a vertical flow interval. Four sub-templates are laid out in the flow area, and each is arranged with an appropriate flow interval set in the flow area setting dialog starting from the upper left of the flow area.

フローエリアにおいて使用される各サブテンプレートは、条件式の結果得られたもので、そのサブテンプレート内の詳細なレイアウトデザインは流し込まれるレコードに含まれるコンテンツデータのサイズが異なるため、レイアウト結果もまちまちである。   Each sub template used in the flow area is obtained as a result of a conditional expression, and the detailed layout design in the sub template is different in the size of the content data included in the flowed records, so the layout results also vary. is there.

図18(B)は、そのような条件式に基づいて得られたさまざまなサブテンプレートによって、フローエリア内のフローが行われている様子を示す。1804はフローエリアであり、その中に1805で表されていたサブテンプレートの詳細レイアウトが記述されている。このように、フローエリアのサイズは、いくつのサブテンプレートがレイアウトされても固定である。もしフローエリアのサイズをはみ出るようなサブテンプレートのレイアウトサイズがあった場合、フローエリアからはみ出る部分はクリッピングされて表示されない。最後に、レイアウト結果を表示して終了する(S1716)。   FIG. 18B shows a state in which a flow in the flow area is performed by various sub-templates obtained based on such a conditional expression. Reference numeral 1804 denotes a flow area, in which a detailed layout of the sub-template represented by 1805 is described. Thus, the size of the flow area is fixed no matter how many sub-templates are laid out. If there is a layout size of the sub template that extends beyond the size of the flow area, the portion that protrudes from the flow area is clipped and not displayed. Finally, the layout result is displayed and the process ends (S1716).

なお、サブテンプレートがフローエリアからはみ出ると判定された場合、フローエリアに収まるようにサブテンプレートを縮小することも考えられる。よって、サブテンプレートがフローエリアをはみ出すと判定された場合、クリッピング処理をするか、縮小処理をするかを指定するためのダイアログが表示されるようにしても構わない。また、図18の(B)には条件式より4種類のレイアウト済みのサブテンプレートが配置されている様子を表している。   If it is determined that the sub template protrudes from the flow area, it is possible to reduce the sub template so that the sub template fits in the flow area. Accordingly, when it is determined that the sub-template protrudes from the flow area, a dialog for designating whether to perform clipping processing or reduction processing may be displayed. FIG. 18B shows a state in which four types of laid out sub-templates are arranged according to the conditional expression.

以上の手順によりフローエリアに配置されるレコードの所望のフィールドの値に応じて、当該レコードの配置のために所望のサブテンプレートを指定することができる。このため、文書におけるオブジェクトのレイアウトの自由度が高くなり、より高品質の文書を作成することができる。   According to the above procedure, a desired sub-template can be designated for the arrangement of the record according to the value of the desired field of the record arranged in the flow area. For this reason, the degree of freedom of layout of objects in the document is increased, and a higher quality document can be created.

また、フローエリアに対して設定される条件式により、全レコードを流し込むのか条件式に適合したレコードのみを流し込むのかを設定することが可能となり、ユーザが所望とするレイアウトを簡易に作成することが可能となる。   In addition, depending on the conditional expression set for the flow area, it is possible to set whether to record all records or only records that conform to the conditional expression, and it is possible to easily create a layout desired by the user. It becomes possible.

図25に具体例を示す。図25(A)に示すフローエリアが定義されたテンプレート2502aにおいて、そのフローエリアには条件式2501が関連づけられ、サブテンプレート情報2403として保存されている。この条件式2501により、フィールドデータAが1であれば、そのレコードにはサブテンプレート2503が、フィールドデータAが2であれば、そのレコードにはサブテンプレート2504が、それ以外の場合にはそのレコードにはサブテンプレート2504が使用されることとなる。レイアウト対象のデータベースには、レコード2506,2507が含まれている。   A specific example is shown in FIG. In the template 2502a in which the flow area shown in FIG. 25A is defined, a conditional expression 2501 is associated with the flow area and stored as sub-template information 2403. According to the conditional expression 2501, if the field data A is 1, the sub template 2503 is included in the record. If the field data A is 2, the sub template 2504 is included in the record. In this case, the sub template 2504 is used. The layout target database includes records 2506 and 2507.

ここで図25(B)に示すように最初にレコード2506をフェッチする。この場合、図17、図16の手順にしたがって、このレコードについてまず条件式「フィールドデータA=1」が評価され、真でないので次に「フィールドデータA=2」が評価される。結局この条件も真でないので、その場合のUSE文によりサブテンプレート2505を用いてレコード2506はレイアウトされる。これがレイアウト例2502bである。ただし、図17の手順では、サブテンプレートをフローエリアに流しこむのはすべてのレコードについてレイアウトしてからなので、図25(B)のようなプレビュー表示は行われない。   Here, as shown in FIG. 25B, the record 2506 is first fetched. In this case, the conditional expression “field data A = 1” is first evaluated for this record according to the procedure of FIGS. 17 and 16, and “field data A = 2” is evaluated next because it is not true. Eventually, this condition is not true either, so the record 2506 is laid out using the sub template 2505 by the USE statement in that case. This is a layout example 2502b. However, in the procedure of FIG. 17, since the sub template is poured into the flow area after all the records are laid out, the preview display as shown in FIG. 25B is not performed.

次にレコード2507がフェッチされる。この場合には条件式「フィールドデータA=1」が真であるので、その場合のUSE文によりサブテンプレート2503を用いてレコード2507はレイアウトされる。   Next, a record 2507 is fetched. In this case, since the conditional expression “field data A = 1” is true, the record 2507 is laid out using the sub template 2503 by the USE statement in that case.

以上より、レコード2506および2507の判定処理が終了し、流し込むべきサブテンプレートが決定されたため、実際にレコードに含まれる各コンテンツデータがサブテンプレート内の関連付けられた各コンテナにおいてレイアウト調整されることによりレイアウト2502cが得られることとなる。このように、レコード毎に相異なるサブテンプレートをユーザが設定した条件式に基づいて使用できる。   As described above, since the determination processing of the records 2506 and 2507 is completed and the sub-template to be inserted is determined, each content data actually included in the record is laid out by adjusting the layout in each associated container in the sub-template. 2502c is obtained. In this way, different sub-templates can be used for each record based on the conditional expression set by the user.

[第2実施形態]
従来、フローエリアは1ページの範囲内に限られ、1ページの範囲内にサブテンプレートを収める処理を行うことによって、はがきなど紙面の限られたドキュメントに対応したレイアウト結果を実現することを目的としていた。そのため、多数のページにわたってサブテンプレートをレイアウトすることは考慮されていない。しかし、顧客ごとにカスタマイズされたドキュメントを作るというニーズの中からは、ページ数を限定せず、顧客の興味の範囲に応じて、自由なページ数の加減のあるドキュメントを作成するという場面が存在する。
[Second Embodiment]
Conventionally, the flow area is limited to a range of one page, and the purpose is to realize a layout result corresponding to a document with a limited page space, such as a postcard, by performing a process of placing a sub-template within a range of one page. It was. Therefore, it is not considered to lay out the sub template over a large number of pages. However, the need to create a customized document for each customer, there is a situation where the number of pages is not limited, and a document with a flexible number of pages is created according to the range of customer interest To do.

本発明の第2実施形態では、フローエリア内にサブテンプレートをレイアウトした結果、サブテンプレートが領域外にオーバーフローする際、フローエリアを有する新しいページを自動的に生成して、そこへ溢れたサブテンプレートを連続してレイアウトする方法を含んだ自動レイアウトシステムについて説明する。なお、このような機能を繰り返しページ機能という。   In the second embodiment of the present invention, when the sub template is laid out in the flow area, when the sub template overflows out of the area, a new page having the flow area is automatically generated, and the sub template overflowed there An automatic layout system including a method for continuously laying out the images will be described. Such a function is called a repeated page function.

この方法の利点は、ひとつのフローエリアを定義しておけば、そのフローエリアに関連づけられたデータベースのレコードはすべてそのフローエリアの定義に従ってレイアウト処理でき、ひとつの文書としてまとめることができることである。なお第1実施形態と共通する部分(図面やその説明)については記載を省略する。   The advantage of this method is that if one flow area is defined, all records in the database associated with the flow area can be laid out according to the definition of the flow area, and can be collected as one document. In addition, description is abbreviate | omitted about the part (drawing and its description) which is common in 1st Embodiment.

<複数ページの中の繰り返しページ>
図19は、複数のページを持つドキュメントに対して、テンプレート作成モードにおいて、フローエリアを挿入する際に呼び出す設定ダイアログのUI例である。ラジオボタン1902からフローエリアのON/OFFを選択し、ONの場合に、テキストボックス1903において、フローエリアを配置するページ番号を設定する。ここで、開始ページは1以上であり、終了ページはそのドキュメントの最大ページ以下になるように、UIによって入力は制限される。
<Repeated page in multiple pages>
FIG. 19 shows an example of a setting dialog UI that is called when a flow area is inserted in a template creation mode for a document having a plurality of pages. The flow area ON / OFF is selected from the radio button 1902. When the flow area is ON, a page number in which the flow area is arranged is set in the text box 1903. Here, the input is limited by the UI so that the start page is 1 or more and the end page is less than or equal to the maximum page of the document.

さらにテキストボックス1904において、配置されたフローエリアの中から、繰り返しインスタンスを生成してサブテンプレートをフローしていく繰り返しページ範囲を設定する。繰り返しページについては後述する。ここで繰り返しページの開始ページは、フローエリアの開始ページ以上であり、終了ページはフローエリアの終了ページ以下であるように、UIによって入力を制限される。また少なくとも1ページは必ず繰り返しページとなるように制限される。これは、ドキュメントの先頭部分と末尾部分には、それぞれ繰返しになじまないヘッダやフッタが含まれることがあるためである。   Further, in a text box 1904, a repeated page range in which repeated instances are generated from the arranged flow areas and the sub-template flows is set. The repeated page will be described later. Here, the input is limited by the UI so that the start page of the repeated page is equal to or more than the start page of the flow area, and the end page is equal to or less than the end page of the flow area. Further, at least one page is always limited to be a repeated page. This is because the header and footer that are not suitable for repetition may be included in the beginning and end of the document.

すなわちフローエリアの開始ページから、繰返しページの設定における開始ページの前のページまでが、繰り返されないページである。また、繰返しページの設定における終了ページの後のページから、フローエリアの終了ページまでが繰り返されないページである。   That is, the page from the start page of the flow area to the page before the start page in the repeated page setting is a page that is not repeated. Further, the page after the end page in the setting of the repeat page to the end page of the flow area is not repeated.

設定ダイアログでOKを押下した場合、設定したページ範囲にしたがってフローエリアが各ページに挿入され、これらの情報は、複数のページをひとまとめにした複数ページにわたるテンプレート情報としてメモリユニット136に保存される。   When OK is pressed in the setting dialog, a flow area is inserted into each page in accordance with the set page range, and these pieces of information are stored in the memory unit 136 as template information covering a plurality of pages collectively.

ひとまとめにするために、たとえばグループの識別情報を、テンプレート情報に持たせることで、ひとまとまりとして扱うことができる。また、設定したラジオボタン1902を示すフローエリア繰返しフラグや、各種ページの設定は、ページごとにフローエリア情報2401の一部としてメモリユニット136に保存される。ただし、フローエリアの位置をのぞけば他の属性情報やサブテンプレート情報、マルチレコード情報は各ページについて同一である。そこで、フローエリアの位置以外の情報については、同一グループに属するテンプレートについては、たとえば先頭ページについて設定された情報を参照する。   In order to make a group, for example, group identification information can be included in the template information so that it can be handled as a group. The flow area repetition flag indicating the set radio button 1902 and various page settings are stored in the memory unit 136 as part of the flow area information 2401 for each page. However, except for the position of the flow area, other attribute information, sub template information, and multi-record information are the same for each page. Thus, for information other than the position of the flow area, for the templates belonging to the same group, for example, the information set for the first page is referred to.

<フローエリアの位置制御>
複数のページにわたって配置されたフローエリアは、それぞれのページでそれぞれの位置と大きさを占めることができる。図20は、各ページにおいてフローエリアの位置と大きさを調整するためのUI例を示している。2001はマージンエリア、2004のフローエリア自体は前述のように、線種や色によって通常のコンテナとは異なる表現でわかりやすく表示されるが、図20のように、フローエリアはレイアウト編集領域内において、図形描画ソフトウェアで公知かつ一般的な、サイズ変更ハンドル2003によってサイズを変更することが可能である。フローエリアにおいては、その存在可能領域をマージンエリア内に限定することが適当である。なお、フローエリアサイズが変更された場合、変更後のサイズがフローエリアの情報としてメモリユニット136に保持される。
<Flow area position control>
A flow area arranged over a plurality of pages can occupy each position and size in each page. FIG. 20 shows an example UI for adjusting the position and size of the flow area in each page. As described above, 2001 is a margin area, and the 2004 flow area itself is displayed in an easy-to-understand manner in a different expression from a normal container depending on the line type and color. However, as shown in FIG. The size can be changed by a size change handle 2003 which is well known and generally used in graphic drawing software. In the flow area, it is appropriate to limit the possible area within the margin area. When the flow area size is changed, the changed size is stored in the memory unit 136 as flow area information.

<繰り返しページ>
図21は、1ドキュメント中の複数のページにわたってフローエリアを配置されている様子と、そのフローエリアに実際のデータを挿入したときにレイアウト済みページの生成される様子の概念図である。
<Repeated page>
FIG. 21 is a conceptual diagram illustrating a state in which a flow area is arranged over a plurality of pages in one document and a state in which a layout-completed page is generated when actual data is inserted into the flow area.

図21(A)の2102は繰り返しページである。2101と2103は繰り返しページではないが、フローエリアの存在するページである。2104はフローエリアをあらわしている。すなわち、図21(A)のテンプレートは、図19に示す例に従って構成されている。また2105と2106は通常のコンテナをあらわしている。これらの通常コンテナはフローエリアとは関係を持たない。通常のコンテナには、そこに関連づけられたコンテンツが収められ、マルチレコード処理の対象とはならない。   In FIG. 21A, reference numeral 2102 denotes a repeated page. Although 2101 and 2103 are not repeated pages, they are pages where a flow area exists. Reference numeral 2104 denotes a flow area. That is, the template of FIG. 21A is configured according to the example shown in FIG. Reference numerals 2105 and 2106 denote ordinary containers. These normal containers are not related to the flow area. A normal container stores contents associated therewith and is not a target of multi-record processing.

フローエリア2104は複数ページにまたがってはいるが、連続したひとつのエリアとしてレイアウト処理アプリケーションに扱われる。すなわち、フローエリアの位置およびサイズを除き、その他のフローエリア情報は共通に参照される。すなわち、フローエリアを繰り返す指定が行われた場合、ユーザは、指定したページに従って複数ページのテンプレートを定義する必要がある。このとき、フローエリアの位置以外の属性は、すべて共通とする。   The flow area 2104 extends over a plurality of pages, but is handled by the layout processing application as one continuous area. That is, except for the position and size of the flow area, other flow area information is commonly referred to. That is, when the flow area is designated to be repeated, the user needs to define a template of a plurality of pages according to the designated page. At this time, all attributes other than the position of the flow area are common.

この様に構成することで、実際のデータを挿入したときには、この図では2101〜2103の3ページに跨るフローエリア全体を使ってデータベースのレコードをすべて配置していくことになる。   With this configuration, when actual data is inserted, all records in the database are arranged using the entire flow area extending over three pages 2101 to 2103 in this figure.

図21(B)に、図21(A)のように設定されたフローエリアに対して実際のデータを挿入し、レイアウト済みドキュメントが得られた状態を示す。2107は1種類のサブテンプレートをあらわしている。ただし、簡単のため実際にフローされるサブテンプレートやコンテナの細部はごく省略して表記している。図21(B)では、繰り返しページに指定された図21(A)での2つ目のページ2102が、レコードの数に応じて自動的に生成され繰り返されていることが示されている。つまり、図21では21個のレコードをフローエリアに流すことになっていたが、図21(A)に記載のページ2101〜ページ2103のフローエリアのみでは、21個のレコードをレイアウトしたサブテンプレートを収めることができないため、全レコードがフローエリアに配置されるまで繰り返しページに指定された2102が自動的に生成されることとなる。   FIG. 21B shows a state in which actual data is inserted into the flow area set as shown in FIG. 2107 represents one type of sub-template. However, for the sake of simplicity, the details of the sub-templates and containers that are actually flowed are omitted. FIG. 21B shows that the second page 2102 in FIG. 21A designated as a repeated page is automatically generated and repeated according to the number of records. That is, 21 records are supposed to flow in the flow area in FIG. 21, but only the flow area of page 2101 to page 2103 shown in FIG. Since all the records cannot be stored, 2102 designated as a repeated page is automatically generated until all the records are arranged in the flow area.

なお、本実施例では予め繰り返しページを指定する場合について記述したが、自動的に繰り返しページが指定されるようにしても良い。その場合、一例としてフローエリアの面積が一番大きいページを繰り返しページとすることが考えられる。これは、サブテンプレートが一番多く配置されるページ(つまり、一番大きいフローエリアを有するページ)を繰り返しページに指定することにより、無駄なページが繰り返し生成されることを防ぐことが可能となるためである。   In this embodiment, the case where the repeated page is designated in advance has been described. However, the repeated page may be automatically designated. In that case, as an example, a page having the largest area of the flow area may be considered as a repeated page. This is because it is possible to prevent unnecessary pages from being repeatedly generated by designating the page where the most sub-templates are arranged (that is, the page having the largest flow area) as the repeated page. Because.

このように複数のページにまたがってフローエリアが存在する場合、ページの性格によって、どのページを繰り返しページにするかを設定できるとドキュメントの表現力向上に効果がある。図21の例でいえば、1ページ目のフローエリアは例えば顧客名を通常コンテナ部に記載して、顧客へのあいさつ文を載せることが考えられる。そのあとからマルチレコードによるレコードデータをフローエリアに表示し、繰り返しページで多数のレコードデータを処理した後、3ページ目のフローエリアで、販売担当者名をいれ、結びのあいさつ文を載せることが考えられる。このように、複数のページにおいて、同じようなレコードデータを多数配置するドキュメントの形態をとりつつも、ページによってその内容に多様性を持たせることが可能になるのである。   When a flow area exists across a plurality of pages as described above, it is effective in improving the expressiveness of the document if it is possible to set which page is repeatedly set according to the nature of the page. In the example of FIG. 21, for example, the flow area of the first page may include a customer name in a normal container part and a greeting to the customer. After that, the multi-record record data is displayed in the flow area, and after processing a large number of record data on the repeated page, the sales person's name is entered in the flow area on the third page, and a closing greeting can be posted. Conceivable. In this way, it is possible to give diversity to the contents of a plurality of pages, while taking the form of a document in which many similar record data are arranged.

<レイアウト処理のフロー>
図22は、本発明の実施形態2における、レイアウト済みコンテンツをフローエリアに流しこむ際のフローチャートである。図22の処理は、第1実施形態における図17のステップS1715として実行される。このフローチャートでは、サブテンプレートを複数のページからなるフローエリアに配置する方法を記述している。
<Flow of layout processing>
FIG. 22 is a flowchart when the laid-out content is poured into the flow area according to the second embodiment of the present invention. The process of FIG. 22 is executed as step S1715 of FIG. 17 in the first embodiment. This flowchart describes a method of arranging a sub template in a flow area composed of a plurality of pages.

まず、レイアウト編集アプリケーション121は、フローエリア内に配置するサブテンプレート数を取得し、nに代入する(S2001)。この数は、図17のステップS1712で確定した値kもしくはnである。もしnが0だった場合には(S2002)、フローエリアにレイアウトする必要はないので、処理を行わず終了する(S2003)。ここまでの処理の詳細については上述してあるため省略する。   First, the layout editing application 121 acquires the number of sub-templates to be arranged in the flow area and substitutes it for n (S2001). This number is the value k or n determined in step S1712 of FIG. If n is 0 (S2002), there is no need to lay out in the flow area, so the process is terminated (S2003). Details of the processing up to this point have been described above, and will be omitted.

次にレイアウト編集アプリケーション121は、変数kを1に初期化する(S2204)。ドキュメントの先頭に、繰り返しページではないフローエリアの存在するページがあるかどうかの情報を取得し、あれば、文書の先頭において繰返しでないページに相当するテンプレート情報をテンプレートデータから読み出す。レイアウト編集アプリケーション121は、その繰り返しページでない開始ページをs、終了ページすなわち繰り返しページの直前のページをeに代入する(S2205)。この情報は、図19のUIによるユーザ入力によりメモリユニット136に保存されたフローエリア情報から読み出される。   Next, the layout editing application 121 initializes a variable k to 1 (S2204). Information on whether there is a page with a flow area that is not a repeated page is obtained at the beginning of the document, and if there is, template information corresponding to a non-repeated page at the beginning of the document is read from the template data. The layout editing application 121 substitutes s for the start page that is not the repeated page, and e for the end page, that is, the page immediately before the repeated page (S2205). This information is read from the flow area information stored in the memory unit 136 by user input through the UI of FIG.

次に、レイアウト編集アプリケーション121は、ページs〜eに、読み出したテンプレートのフローエリア情報にしたがって、先頭から順に着目ページ内(ページs〜e)に収まるだけのサブテンプレートを順にフローしていき(S2206)、フローが終わった時点で、ページs〜eに収まったサブテンプレートの数を求めてtとする(S2207)。この時点でレイアウト編集アプリケーション121は、kにtを代入し(S2208)、kとnとを比較する(S2209)。なお、kの値はメモリユニット136に一時的に保持される。もしkがn未満であるならば全てのサブテンプレートがフローエリアに配置されていないこととなるため、ステップS2210に進む。もしkがnに達していたら、すべてのサブテンプレートをフローし終えたことになるので処理を終了する。   Next, the layout editing application 121 sequentially flows sub-templates that fit within the page of interest (pages s to e) in order from the top in pages s to e in accordance with the flow area information of the read template. In step S2206, when the flow ends, the number of sub-templates contained in the pages s to e is obtained and set as t (S2207). At this time, the layout editing application 121 substitutes t for k (S2208), and compares k and n (S2209). Note that the value of k is temporarily stored in the memory unit 136. If k is less than n, all sub-templates are not arranged in the flow area, and the process advances to step S2210. If k has reached n, all the sub-templates have been flowed, and the process ends.

レイアウト編集アプリケーション121は、まず現在のレイアウト済みページ数pをメモリユニット136に一時的に記憶する(S2210)。次に、レイアウト編集アプリケーション121は、文書の末尾において繰返しでない部分に相当するテンプレート情報をテンプレートデータから読み出す。ドキュメントの後尾から繰り返しページでないフローエリアの存在するページ番号(繰り返しページ範囲に指定された直後のページから最終ページ)を取得し、開始ページをs、終了ページをeに代入する(S2211)。これらの情報も、図19のUIによるユーザ入力によりメモリユニット136に保存されたフローエリア情報から読み出される。   The layout editing application 121 first temporarily stores the current number of laid-out pages p in the memory unit 136 (S2210). Next, the layout editing application 121 reads template information corresponding to a portion that is not repeated at the end of the document from the template data. The page number (the last page from the page immediately after specified in the repeated page range) in the flow area that is not a repeated page is acquired from the tail of the document, and the start page is substituted for s and the end page is substituted for e (S2211). These pieces of information are also read from the flow area information stored in the memory unit 136 by user input through the UI of FIG.

レイアウト編集アプリケーション121は、ページs〜eに、読み出したテンプレートのフローエリア情報にしたがって先頭から順に収まるだけのサブテンプレートを順にフローしていき(S2212)、そのフロー処理が終了したら、ページs〜eに収まったサブテンプレートの数を取得しtとする(S2213)。その次に、レイアウト編集アプリケーション121は、k+tとnとを比較する(S2214)。kの値については上述した通りメモリユニット136に一時的に保持されているため、レイアウト編集アプリケーション121は、kの値を認識することができる。k+tがn未満であったらステップS2215に進む。k+tがnに達していたら、繰返しページを用いずにすべてのサブテンプレートをフローし終えたことになるので処理を終了する。   The layout editing application 121 sequentially flows the sub-templates that can be accommodated in order from the top in accordance with the flow area information of the read template on the pages s to e (S2212), and when the flow processing ends, the pages s to e. The number of sub-templates that fall within is acquired as t (S2213). Next, the layout editing application 121 compares k + t with n (S2214). Since the value of k is temporarily stored in the memory unit 136 as described above, the layout editing application 121 can recognize the value of k. If k + t is less than n, the process advances to step S2215. If k + t has reached n, it means that all the sub-templates have been flowed without using repeated pages, and the process is terminated.

S2214までの処理を終えても図22に記載のフローチャートの処理が終了しない場合、先頭の繰り返しページでないページと後尾の繰り返しページでないページとを合わせてもレイアウトすべきレコード(レイアウト済みのサブテンプレート)がすべて収まらないと判断される。   If the processing of the flowchart shown in FIG. 22 does not end even after the processing up to S2214 is completed, a record to be laid out even if a page that is not the first repeated page and a page that is not the last repeated page are combined (layout-sub template) Is not fit.

そこで、レイアウト編集アプリケーション121は、ステップS2212においてフローしたpより後ろのレイアウト済みページのインスタンス(レイアウトしたデータ)を破棄する(S2215)。つまり、繰り返しページに対してS2212においてフローしたpより後(繰り返しページ範囲に指定された直後のページから最終ページ)のレイアウト済みインスタンスを流し込むためにS2215の処理が行われることとなる。   Therefore, the layout editing application 121 discards the instance (layout data) of the laid out page after p that has flowed in step S2212 (S2215). In other words, the processing of S2215 is performed to flow the laid-out instance after p that has flowed in S2212 to the repeated page (from the page immediately after being specified in the repeated page range to the last page).

レイアウト編集アプリケーション121は、繰返しページ部分に相当するテンプレート情報をメモリユニット136から読み出す。そしてドキュメント内の繰り返しフローエリアのページ番号を取得し、開始ページをs、終了ページをeとする(S2216)。これらの情報もメモリユニット136に保持されているフローエリア情報2401から得る。   The layout editing application 121 reads template information corresponding to the repeated page portion from the memory unit 136. Then, the page number of the repetitive flow area in the document is acquired, and the start page is s and the end page is e (S2216). These pieces of information are also obtained from the flow area information 2401 held in the memory unit 136.

レイアウト編集アプリケーション121は、繰り返しページs〜eのフローエリアに対して収まるだけのサブテンプレート(レイアウト済みインスタンス)をフローする(S2217)。レイアウト編集アプリケーション121は、繰り返しページs〜eに収まったサブテンプレートの数を取得してtに代入し(S2218)、kにtを加えて再度kに代入する(S2219)。ここで、kとnを比較する(S2220)。S2220においてレイアウト編集アプリケーションがNoと判定した場合、つまりS2202で取得した全サブテンプレートを流し込めると判定された場合、図22におけるフローチャートの処理を終了する。   The layout editing application 121 flows as many sub-templates (layout instances) as can fit in the flow area of the repeated pages s to e (S2217). The layout editing application 121 acquires the number of sub-templates that have fallen on the repeated pages s to e and substitutes it for t (S2218), adds t to k, and substitutes it for k again (S2219). Here, k and n are compared (S2220). If the layout editing application determines No in S2220, that is, if it is determined that all the sub-templates acquired in S2202 can be poured, the process of the flowchart in FIG. 22 ends.

しかし、S2220でYesと判定された場合、再度S2210へと進む。S2210の処理に入った後、S2211からS2213までの処理を行い、S2214により再度Yesと判定された場合、S2201で取得した全サブテンプレート(レイアウト済みインスタンス)を先頭の繰り返しページでないページおよび1つめの繰り返しページおよび後尾の繰り返しページでないページにあるフローエリアを用いても収めることができないこととなる。よって、再度S2215へと進み繰り返しフローエリアを含むページが生成されることとなる。以上の処理をS2220でNoと判定されるまで繰り返すことにより、繰り返しページが全サブテンプレートを流し込めると判断されるまで自動的に生成され続ける。なお、この生成しょりは所定のページを複製することにより生成するものであっても構わない。   However, if it is determined Yes in S2220, the process proceeds to S2210 again. After entering the processing of S2210, the processing from S2211 to S2213 is performed, and when it is determined to be Yes again in S2214, all the sub-templates (layout instances) acquired in S2201 are not the first repeated page and the first page. Even if a flow area in a page that is not a repeated page or a tail repeated page is used, it cannot be stored. Therefore, the process proceeds to S2215 again, and a page including the repeated flow area is generated. By repeating the above processing until it is determined No in S2220, the repeated pages are automatically generated until it is determined that all the sub-templates can be loaded. This generation may be generated by copying a predetermined page.

ここで、以上の処理を詳細に説明するために図21を用いて具体的に説明する。まずS2201により取得されたサブテンプレート(レイアウト済みインスタンス)から、ページ2101のフローエリアに収まるだけのサブテンプレートを流し込む。ここまでがS2201からS2208である。   Here, the above processing will be specifically described with reference to FIG. First, from the sub template (layout instance) acquired in S2201, as many sub templates as fit in the flow area of the page 2101 are poured. The steps so far are S2201 to S2208.

続いて、取得した全サブテプレートが流し込まれていないと判定された場合(S2209)、残りのサブテンプレートをページ2103のフローエリアに流し込む。ここまでがS2210からS2213である。   Subsequently, when it is determined that all the acquired sub-teplates are not poured (S2209), the remaining sub-templates are poured into the flow area of the page 2103. The steps so far are S2210 to S2213.

そして、ページ2101および2103のフローエリアを用いてもS2101で取得した全サブテンプレートを流し込むことができないと判定された場合(S2214)、ページ2103に流し込んだサブテンプレートを削除して、該サブテンプレートを繰り返しページであるページ2102のフローエリアに流し込む。ここまでの処理がS2215からS2219である。以上の処理により、S2101で取得されたサブテンプレートが順次ページ2101および2102のフローエリアに流し込まれることとなる。   If it is determined that even if the flow areas of pages 2101 and 2103 are used, it is not possible to flow in all sub templates acquired in S2101 (S2214), the sub templates flowed into page 2103 are deleted, and the sub templates are deleted. It is poured into the flow area of page 2102 which is a repeated page. The processing so far is from S2215 to S2219. Through the above processing, the sub templates acquired in S2101 are sequentially poured into the flow areas of pages 2101 and 2102.

ここでS2101において取得した全サブテンプレートが収まったか否かを判定し(S2220)、収まりきらないと判定した場合、ページ2103のフローエリアへ収まりきらなかったサブテンプレートを再び流し込む。ここまでの処理によっても全サブテンプレートが流し込まれないと判定された場合(S2214−Yes)、再びS2215へと進み、繰り返しページであるページ2102が生成され、該生成されたページ2102のフローエリアにサブテンプレートが流し込まれることとなる。以上の処理を繰り返すことにより、図21(B)に記載されているように、全サブテンプレートが収まるまで繰り返しページである2102のみが繰り返して複製(生成)されることとなる。   Here, it is determined whether or not all the sub-templates acquired in S2101 have been accommodated (S2220). If it is determined that they have not been accommodated, the sub-templates that have not been accommodated are reflowed into the flow area of the page 2103. If it is determined that all the sub-templates are not flown through the processing up to this point (S2214-Yes), the process proceeds again to S2215, and a page 2102 that is a repeated page is generated, and the flow area of the generated page 2102 is displayed. The sub template will be poured. By repeating the above processing, as shown in FIG. 21B, only the repetitive page 2102 is repeatedly replicated (generated) until all the sub-templates are accommodated.

なお、繰り返しページとして複数ページを指定した場合、取得するサブテンプレート数によっては、空白ページが生じてしまうことが考えられる。例えば繰り返しページとして3つのページ群を指定した場合、取得したサブテンプレートを収めることができないことにより、繰り返しページ群が生成されることとなるが、この際に生成されるのは3つのページ群が生成されることとなる。しかし、取得されたサブテンプレート数によっては新たに生成された繰り返しページ群の2ページ目までで収まってしまい、繰り返しページに指定された3ページ目が空白になることが想定される。この場合、空白ページはユーザの設定により自動的に削除されることとなる。   Note that when a plurality of pages are designated as repeated pages, a blank page may occur depending on the number of sub-templates to be acquired. For example, when three page groups are designated as a repeated page, a repeated page group is generated because the acquired sub-template cannot be stored. At this time, three page groups are generated. Will be generated. However, depending on the number of sub-templates acquired, it is assumed that the second page of the newly generated repeated page group fits in, and the third page designated as the repeated page is blank. In this case, blank pages are automatically deleted according to user settings.

このように、本実施形態においては、フローエリアにテンプレートが納まらない場合には、自動的に新しいページを生成して、1ページのフローエリアに入りきらないサブテンプレートを連続してフローさせることにより、ページ制限のないドキュメントを作成することを目的とする。なお、生成される新しいページはユーザによって予め指定された繰り返しページであるためユーザの意図を反映したページを構成することが可能となるだけでなく、上述したように自動的に繰り返しページが設定されるようにすることにより、ユーザの操作性を向上することが可能となる。   As described above, in this embodiment, when the template does not fit in the flow area, a new page is automatically generated, and the sub-template that does not fit in the one-page flow area is continuously flowed. The purpose is to create a document with no page restrictions. Since the new page to be generated is a repeated page designated in advance by the user, it is possible not only to configure a page reflecting the user's intention, but also to automatically set the repeated page as described above. By doing so, it becomes possible to improve the operability of the user.

また、繰り返しページ直前までのページおよび繰り返しページを用いることにより、全てのレイアウト済みサブテンプレートを配置できた場合(S2220−Yesの場合)、図22のフローチャートは終了することとなるが、フッタページが指定されており、フッタページに出力すべきコンテンツデータがある場合には、フッタページを加えた上で処理を終了する。   Further, when all the laid out sub-templates can be arranged by using the page and the repeat page immediately before the repeat page (in the case of S2220-Yes), the flowchart of FIG. If there is content data to be output on the footer page, the process ends after adding the footer page.

また、本実施形態では、複数ページにわたってひとつの連続したフローエリアを定義することができる点に注目して記述しており、特に複数のフローエリアを1ドキュメント中に配置することについては言及していない。しかし、もちろん複数のフローエリアをそれぞれ複数ページにわたって配置することは可能であることはいうまでもない。   Further, in the present embodiment, the description is made by paying attention to the fact that one continuous flow area can be defined over a plurality of pages, and in particular, it refers to arranging a plurality of flow areas in one document. Absent. However, it goes without saying that a plurality of flow areas can be arranged over a plurality of pages.

本発明によれば、データベースから抽出したレコードデータの内容(値)に応じて異なったサブテンプレートを選択して、選択されたサブテンプレートに対してレコードを挿入する。そして、その挿入処理をレコードごとに繰り返すことによって、多種のサブテンプレートとレコードの結びついた部分レイアウトが得られる。そのレイアウト済みサブテンプレートを、フローエリアに順にフローさせることで、従来の流し込みでは実現できない、複雑なレイアウト切り替えを繰り返すフローレイアウトを実現することができる。   According to the present invention, different sub templates are selected according to the contents (values) of record data extracted from the database, and records are inserted into the selected sub templates. Then, by repeating the insertion process for each record, a partial layout in which various sub-templates and records are combined can be obtained. By making the layout-completed sub-template flow in order in the flow area, it is possible to realize a flow layout that repeats complicated layout switching, which cannot be realized by conventional pouring.

また、多数のレコードをフローした結果としてサブテンプレートが1つのフローエリアからあふれてしまう場合、自動的にレイアウトエリア(フローエリア)を含むページを追加生成して、自由度の高いページ数をもつドキュメントを作成することが可能になる。これは、カタログなどの、項目数があらかじめ定まらない、ある程度類似しているが詳細なレイアウト構造が異なるような部分レイアウトを、羅列して表現するようなドキュメントを作成する際に非常に有効な効果となる。   In addition, if a sub template overflows from one flow area as a result of flowing a large number of records, a document having a high number of pages is automatically created by automatically generating additional pages including a layout area (flow area). Can be created. This is a very effective effect when creating a document such as a catalog in which partial layouts that are similar to a certain extent but have a different detailed layout structure and whose number of items is not predetermined are listed. It becomes.

[第3実施形態]
本実施形態では、第1実施形態及び第2実施形態をさらに発展させたものであり、単にフローエリアを複数ページに拡張するのみならず、サブテンプレート間やフローエリアとコンテナとの間などで、区切ることができるレイアウト編集アプリケーションプログラムを説明する。そのために、第2実施形態を下敷きとして、それと共通するする部分、および第1実施形態と共通する部分については説明は省略し、相違する部分について説明する
<サブテンプレート条件式>
条件式は、ひとつのフローエリアに対して複数のサブテンプレートを割り当てるための仕組みである。フローエリアには、サブテンプレートあるいは条件式のいずれかひとつを関連付けることができる。図26は、条件式を設定するUI例の図である。これは第1実施形態と同様である。ただし、本実施形態では、サブテンプレート情報として保存される条件式に、さらにサブテンプレートと同じ条件で区切り情報を含めて入力することができる。
[Third Embodiment]
In this embodiment, the first embodiment and the second embodiment are further developed, not only simply expanding the flow area to a plurality of pages, but also between sub-templates, between the flow area and the container, A layout editing application program that can be divided will be described. Therefore, with the second embodiment as an underlay, the description of the parts common to the second embodiment and the parts common to the first embodiment will be omitted, and different parts will be described. <Sub-template conditional expression>
The conditional expression is a mechanism for assigning a plurality of sub-templates to one flow area. Either a sub template or a conditional expression can be associated with the flow area. FIG. 26 is a diagram illustrating a UI example for setting a conditional expression. This is the same as in the first embodiment. However, in the present embodiment, it is possible to input the conditional expression stored as the sub-template information including the delimiter information under the same conditions as the sub-template.

図26は、データベースからひとつのレコードを受け取って処理を行う、ひとつの条件式を設定するためのUI例である。この入力領域は、条件式に名前を付けるテキストボックス2602と、もっとも基本的な条件判定を構成する要素であるIF文2603とELSE文2604のペアを最低限有している。   FIG. 26 shows an example of a UI for setting one conditional expression for receiving and processing one record from the database. This input area has at least a text box 2602 for naming the conditional expression and a pair of an IF statement 2603 and an ELSE statement 2604 that are elements constituting the most basic condition determination.

IF文の入力領域においては、条件の判定対象となるフィールドの選択を行うリストボックス2605と、判定の論理式を設定するリストボックス2606、判定に用いられる値を入力するテキストボックス2607、条件判定が正だったときに動作を決定する、該レコードを挿入するためのサブテンプレートを決定するTHEN_USE処理文2608。さらに、サブテンプレートが変更されるときに付帯するBreak処理(文書区切り処理)を選択するWITH処理文2609、同じく条件判定結果が不正だったときに該レコードを挿入するためのサブテンプレートを決定するELSE_USE処理文2604からなっている。   In the input area of the IF statement, a list box 2605 for selecting a field that is a condition determination target, a list box 2606 for setting a logical expression for determination, a text box 2607 for inputting a value used for determination, and condition determination A THEN_USE processing statement 2608 for determining a sub-template for inserting the record, which determines an operation when it is positive. Further, a WITH processing statement 2609 for selecting a Break process (document delimiter process) attached when the sub template is changed, and ELSE_USE for determining a sub template for inserting the record when the condition determination result is invalid. It consists of a processing statement 2604.

判定の論理式2606には、EQUAL(等しい)、NOT EQUAL(等しくない)、LESS_THAN(小さい)、LARGER_THAN(大きい)、START_WITH(で始まる)、END_WITH(で終わる)などさまざまな条件が用意される。また、論理式2606で判定される判定値2607に"FieldNN"という具合に、Field値を指定した場合には、2605に入力されたField値と2607に入力されたField値同士を判定し、例えば、マルチレコードのようにレコードのカテゴリが変更された時点で、新規のドキュメントを生成するマルチレコード印刷が可能となる。   Various conditions such as EQUAL (equal), NOT EQUAL (not equal), LESS_THAN (small), LARGER_THAN (large), START_WITH (starting with), END_WITH (ending with) are prepared in the logical expression 2606 for determination. Further, when a field value is designated as the determination value 2607 determined by the logical expression 2606, for example, the field value input to 2605 and the field value input to 2607 are determined. When the record category is changed as in multi-record, multi-record printing for generating a new document becomes possible.

さらに判定の論理式として「change(変化)」も設定可能である。判定の論理式「change」とは、あるフィールド値のデータ値が変更される度に後述するBreak処理を設定する場合に有効である。判定式「change」を設定することによる有効点について一例を挙げて具体的に説明する。   Furthermore, “change” can be set as a logical expression for determination. The logical expression “change” for determination is effective when a Break process, which will be described later, is set every time the data value of a certain field value is changed. An effective point by setting the determination expression “change” will be specifically described with an example.

例えば、膨大な量のレコード情報を用いて、改ドキュメントを伴うレイアウト処理を実行することを想定する。この際、ユーザが設定する条件式の例としては「IF field01 EQUAL value01 with DocumentBreak」および「IF field01 EQUAL value02 WITH DocumentBreak」および「IF field01 EQUAL value03 WITH DocumentBreak」といった設定処理を「field01」に想定されるデータ数分だけ繰り返さなければならない。すなわち想定されるデータ数が多いほど、条件式が増加してしまい煩雑になってしまう。ここで上述した「change」を用いることにより条件式は1つで済む。つまり「IF field01 change value with DocumentBreak」と設定することによりフィールド値1のデータが変更される度に改ドキュメントが実行されるため、想定されるデータ数分だけ条件式を設定する必要はなくなり、ユーザの操作性を向上させることができる。   For example, it is assumed that a layout process with a revised document is executed using a huge amount of record information. At this time, as an example of a conditional expression set by the user, setting processes such as “IF field01 EQUAL value01 with DocumentBreak”, “IF field01 EQUAL value02 WITH DocumentBreak”, and “IF field01 EQUAL value03 WITH DocumentBreak” are assumed to be “field01” It must be repeated for the number of data. That is, as the number of assumed data increases, the conditional expressions increase and become complicated. By using “change” described above, only one conditional expression is required. In other words, by setting “IF field01 change value with DocumentBreak”, the document break is executed each time the data of field value 1 is changed, so there is no need to set conditional expressions for the number of data expected. The operability can be improved.

さらに、WITH処理文には、これまでのレコードレイアウト処理を中断し、フッタページを印刷した後、新しくヘッダページから新しいレコードを印刷するDocBreak(改ドキュメント)。また、これまでのレコードフローを中断し、新しいページを生成後、新しいレコードフローを始めるPageBreak(改ページ)。さらには、次のフローエリアから新しくレコードフローを開始するLineBreak(改行)、Break処理せず、フローを継続するNoneBreak(継続)の4種類のBreak処理が用意される。   Further, in the WITH processing statement, DocBreak (revised document) which interrupts the record layout processing so far, prints a footer page, and then prints a new record from a new header page. Also, Page Break (page break) is started after interrupting the previous record flow, generating a new page, and starting a new record flow. Furthermore, four types of Break processing are prepared: Line Break (new line) for starting a new record flow from the next flow area, and None Break (continuation) for continuing the flow without performing the Break processing.

さらに、複雑な条件式を設定するためには、IF文中に複合条件を設定するためにAND/OR接続文コンボボックス2610を有する。このコンボボックスでANDまたはORの複合条件を選択すると、IF文中に条件行が1行追加される。ANDの場合、複数の条件がすべて正であるときのみ、ORの場合いずれかの条件が正であるときにIF文判定が真であると判定される。   Further, in order to set a complicated conditional expression, an AND / OR connection statement combo box 2610 is provided to set a compound condition in the IF statement. When an AND or OR compound condition is selected in this combo box, one condition line is added to the IF statement. In the case of AND, it is determined that the IF statement determination is true only when a plurality of conditions are all positive, and in the case of OR, when any of the conditions is positive.

また、さらに複雑な条件分岐を設定するためには、ELSE_IF文追加ボタン2611を有する。2611を押下すると、前述IF文とELSE文の間に、あらたにELSE_IF文が追加挿入される。ELSE_IF文の内容と動作は、IF文における内容と同じである。IF文が不正のときにひとつ下のELSE_IF文を判定し、さらに不正のときにもうひとつ下のELSE_IF文を判定し、これを続けて最後にELSE文を判定する、という順に処理を行う。2612は選択されているELSE_IF文を削除する削除ボタンである。ELSE_IF文が多くなった場合、スクロールバー2613を使って条件のリストを表示することが可能である。   In order to set a more complicated conditional branch, an ELSE_IF statement addition button 2611 is provided. When 2611 is pressed, an ELSE_IF statement is newly inserted between the IF statement and the ELSE statement. The contents and operation of the ELSE_IF statement are the same as those in the IF statement. When the IF statement is invalid, the next lower ELSE_IF statement is determined, and when the IF statement is further incorrect, the next lower ELSE_IF statement is determined, followed by the final determination of the ELSE statement. Reference numeral 2612 denotes a delete button for deleting the selected ELSE_IF statement. When the number of ELSE_IF statements increases, a list of conditions can be displayed using the scroll bar 2613.

いずれかのIF文あるいはELSE_IF文で真と判定された場合、関連するUSE処理文、WITH処理文が実行される。このように、条件式を通して、さまざまな値を取るレコードのそれぞれに、条件に合ったサブテンプレートを自動的に選択することができ、また、選択されたサブテンプレートに付帯するBreak処理を併用することで、ひとつの条件式においてさまざまなレイアウトを実現することが可能になる。   If any IF statement or ELSE_IF statement determines true, the related USE processing statement and WITH processing statement are executed. In this way, through the conditional expression, a sub template that matches the condition can be automatically selected for each record having various values, and a Break process attached to the selected sub template is used in combination. Thus, various layouts can be realized with one conditional expression.

この条件式をフローエリアに関連付けることによって、ひとつのフローエリアにおいて、さまざまなレイアウトを持った複数種類のサブテンプレートをエリア内にフローすることが可能になる。   By associating this conditional expression with the flow area, it is possible to flow a plurality of types of sub-templates having various layouts within the area in one flow area.

ユーザは図26のUIから条件を入力すると、最後にOKボタン2615を押す。OKボタン2615の押下により、UIで設定されたサブテンプレート条件を示す情報(サブテンプレート条件式)が、サブテンプレート情報2403の一部としてメモリユニット136に保存される。このサブテンプレート条件式は、たとえば、図26のUIに記述された(選択された)テキストをそのまま保存したテキストファイルなど、条件と条件が満たされた場合のサブテンプレートを特定できる情報であれば良い。図26の例では、「IF field01 EQUAL value01 AND field02 EQUAL vlue02 THEN USE subtemplate01 WITH PageBreak ELSEE IF field01 EQUAL value03 AND field02 EQUAL vlue04 THEN USE subtemplate02 WITH PageBreak ELSE USE subtemplate03 WITH PageBreak」をサブテンプレート条件式を示す情報として保存する。このまま保存しても、簡単な文法で記述されており、しかも図26のようなUIから入力されるので文法的な誤りなどが発生する余地がない。そのために、簡単なプログラムでその条件の記述をパースして適合するサブテンプレートを決定することができる。   When the user inputs conditions from the UI shown in FIG. 26, the user finally presses an OK button 2615. When the OK button 2615 is pressed, information indicating a sub template condition set in the UI (sub template conditional expression) is stored in the memory unit 136 as a part of the sub template information 2403. This sub-template conditional expression may be any information that can specify the sub-template when the conditions and conditions are satisfied, such as a text file in which (selected) text described in the UI of FIG. 26 is stored as it is. . In the example of FIG. 26, “IF field01 EQUAL value01 AND field02 EQUAL vlue02 THEN USE subtemplate01 WITH PageBreak ELSEE IF field01 EQUAL value03 AND field02 EQUAL vlue04 THEN USE subtemplate02 WITH PageBreak ELSE USE subtemplate03 WITH PageBreak” is saved as information indicating the subtemplate conditional expression. To do. Even if the data is stored as it is, it is described in a simple grammar and is input from the UI as shown in FIG. 26, so there is no room for grammatical errors. Therefore, a suitable sub-template can be determined by parsing the description of the conditions with a simple program.

<レイアウト処理>
図27Aは、フローエリアに対して条件式(抽出条件およびブレーク処理)が設定されているテンプレートにおいて、条件判定を行い、条件式に応じたレイアウト処理を実行するためのフローチャートである。図27Aは、第1実施形態の図7AのステップS703,S0704や、図10のステップS1009,S1010を合わせた処理となっている。
<Layout processing>
FIG. 27A is a flowchart for performing condition determination in a template in which conditional expressions (extraction conditions and break processing) are set for the flow area, and executing layout processing according to the conditional expressions. FIG. 27A is a process in which steps S703 and S0704 in FIG. 7A of the first embodiment and steps S1009 and S1010 in FIG. 10 are combined.

なおここでは、テンプレートは、ヘッダページ、フローエリアを含む繰返しページ、フッタページで構成された例で説明する。図27Aにおいては、まず、レイアウト編集アプリケーション121は、レイアウトするデータをデータベースから取得して(S2701)、レコードの終了かどうか判定する(S2702)。レイアウト編集アプリケーション121は、現在どのレコードを対象としているかを一時的に保持しながら処理を行うため、S2702の判定が可能となる。レイアウト編集アプリケーション121は、S2702によりレコードの終了を判定した場合、S2713へ進みフッタページのレイアウト処理を実行して、図27Aのフローチャートの処理を終了する。なお、S2701により取得したレイアウトするレコードの数が0であった場合は、レイアウト処理を実行することはできないため、S2713によるフッタページのレイアウト処理を実行することなく本フローチャートの処理を終了する。   Here, the template will be described as an example including a header page, a repeated page including a flow area, and a footer page. In FIG. 27A, the layout editing application 121 first acquires data to be laid out from the database (S2701), and determines whether or not the record is finished (S2702). Since the layout editing application 121 performs processing while temporarily holding which record is currently targeted, the determination in S2702 is possible. If the layout editing application 121 determines the end of the record in S2702, the process proceeds to S2713 to execute the footer page layout process, and the process of the flowchart in FIG. If the number of records to be laid out acquired in S2701 is 0, the layout process cannot be executed. Therefore, the process of this flowchart is terminated without executing the footer page layout process in S2713.

次に、レイアウト編集アプリケーション121は、最初のレコードかどうか判定する(S2703)。最初のレコードであれば、レイアウト編集アプリケーション121は、ヘッダページのレイアウト処理を実行する(S2704)。詳細には、取得したレコードの内、所定のコンテンツデータを用いてヘッダページを作成することを指す。その際、ヘッダページレイアウト処理は、第1実施形態の図7Aや図14のフローチャートで説明したサブテンプレートのレイアウトの最適化処理と同様に実現される。これは、サブテンプレートが通常のテンプレートと同じくレイアウト定義され、データベースのコンテンツを流し込む際のレイアウト最適化処理が施されることを意味する。   Next, the layout editing application 121 determines whether it is the first record (S2703). If it is the first record, the layout editing application 121 executes header page layout processing (S2704). Specifically, it refers to creating a header page using predetermined content data among the acquired records. At that time, the header page layout processing is realized in the same manner as the sub-template layout optimization processing described in the flowcharts of FIGS. 7A and 14 of the first embodiment. This means that the layout of the sub-template is defined in the same way as a normal template, and the layout optimization process is performed when the contents of the database are poured.

次に、レイアウト編集アプリケーション121は、取得したレコードのコンテンツデータとフローエリアに設定されている条件式から、該取得したレコードのコンテンツデータを配置可能であるか否かを判断し、配置すべきレコードのコンテンツデータであると判断された場合、該条件式に基づいてサブテンプレートおよびBreak処理を特定する(S2705)。詳細には、レイアウト編集アプリケーション121が、フローエリア情報としてメモリユニット136に保存されているサブテンプレート条件式を読み出し、その条件式と取得したレコードに含まれるコンテンツデータを認識することにより条件に適合するサブテンプレート名およびBreak(区切り)処理の内容を特定できる。   Next, the layout editing application 121 determines whether or not the content data of the acquired record can be arranged from the content data of the acquired record and the conditional expression set in the flow area, and the record to be arranged If it is determined that the content data is, the sub-template and the Break process are specified based on the conditional expression (S2705). Specifically, the layout editing application 121 reads the sub-template conditional expression stored in the memory unit 136 as flow area information, and satisfies the condition by recognizing the conditional data and the content data included in the acquired record. The contents of the sub template name and Break (separation) processing can be specified.

次に、レイアウト編集アプリケーション121は、特定した情報に基づいて、Break処理が定義されているか、さらにBreak処理が発生するか否かを判定する(S2706)。まずBreak処理が定義されているか否かの判定は、レイアウト編集アプリケーション121が、S2705によってBreak処理を特定しているため、Break処理が設定されているかを判定可能である。   Next, the layout editing application 121 determines, based on the specified information, whether a Break process is defined and whether a Break process occurs (S2706). First, whether or not the Break processing is defined can be determined because the layout editing application 121 specifies the Break processing in S2705, and therefore whether or not the Break processing is set.

また、Break処理が発生するか否かについては、現在対象としている1つ前のレコードのコンテンツデータを一時的に保持しておき、現在の対象レコードのコンテンツデータと比較することにより、判定を行う。具体的には、Break処理を実行するために指定されているフィールド値(データ項目)の値が変更されていればBreak発生と判断される。   Whether or not the Break processing occurs is determined by temporarily holding the content data of the previous record that is currently targeted and comparing it with the content data of the current target record. . Specifically, if the value of the field value (data item) designated for executing the Break process has been changed, it is determined that a Break has occurred.

S2706の判定の結果、「Breakの設定なし」、または「Breakの発生なし」のいずれか1つを判定した場合現在対象としているレコードのコンテンツデータをサブテンプレートに配置して、上述したようにサブテンプレート内においてレイアウト調整を行い、フローエリアに配置される。(S2714)。すなわちフローエリア情報において指定されている間隔を空けて、レイアウト済みサブテンプレートをフローエリアに配置する。   As a result of the determination in step S2706, when any one of “no break setting” or “no break occurrence” is determined, the content data of the currently targeted record is arranged in the sub template, and as described above The layout is adjusted in the template and placed in the flow area. (S2714). That is, the laid out sub-templates are arranged in the flow area with an interval specified in the flow area information.

S2706によりBreak設定がされており、かつBreak処理が発生すると判断された場合、レイアウト編集アプリケーション121は、DocBreak(改ドキュメント)が指定されているかどうかを判定する(S2707)。なお、S2707の判定処理は、S2705によってBreak処理を特定することにより、どのBreak処理が設定されているかを判定可能である。つまり、レイアウト編集アプリケーション121が、フローエリア情報を読み出すことによりBreak処理が特定されることとなる。   If the Break setting has been made in S2706 and it is determined that the Break process will occur, the layout editing application 121 determines whether DocBreak (revised document) is specified (S2707). In the determination process of S2707, it is possible to determine which Break process is set by specifying the Break process in S2705. In other words, the break processing is specified by the layout editing application 121 reading the flow area information.

S2707により、DocBreak(改ドキュメント)が指定されていると判定された場合、これまでの出力結果を一旦完了するため、レイアウト編集アプリケーション121は、フローエリアに対するレコードの流し込みを中断し、フッタページを新規に生成して、レイアウト処理する(S2708)。その際、同じ処理を繰り返さないように、事前にBreak設定をクリアしておく必要がある。とはいえ、フローエリア情報のサブテンプレート条件式に含まれるBreak設定をクリアすると、設定自体が変更されることになるので、たとえば、着目レコードに関する改ドキュメントのブレーク処理は完了している旨のBreak済みフラグを設け、これをセットする。このBreak済みフラグをセットすることにより、再度S2705、S2706の処理を繰り返す必要がなくなる。   If it is determined in S2707 that DocBreak (revised document) has been specified, the layout editing application 121 interrupts the flow of records into the flow area and completes a new footer page to complete the output result so far. And layout processing (S2708). At that time, it is necessary to clear the Break setting in advance so that the same processing is not repeated. However, if the Break setting included in the sub-template conditional expression of the flow area information is cleared, the setting itself is changed. For example, Break indicating that the break processing of the revised document related to the record of interest has been completed. A completed flag is provided and set. Setting this Breaked flag eliminates the need to repeat the processing of S2705 and S2706 again.

したがって、レイアウト編集アプリケーション121は、ステップS2706においてこのBreak済みフラグがセットされていないことも判定し、ブレークの設定があっても、Break済みフラグがセットされていれば「いいえ」と判定する。そして、レイアウト編集アプリケーション121はS2714へと処理を進め、現在対象としているレコードをサブテンプレートに配置して、対象ページのフローエリアにレイアウトすることとなる。このブレーク完了フラグは着目レコードのレイアウトが終えたならリセットされる。   Therefore, the layout editing application 121 also determines in step S2706 that this Breaked flag is not set, and even if a break is set, it determines “No” if the Breaked flag is set. Then, the layout editing application 121 advances the processing to S2714, and arranges the current target record in the sub template and lays it out in the flow area of the target page. This break completion flag is reset when the layout of the record of interest is completed.

なお、S2708におけるフッタページレイアウト処理はヘッダページレイアウト処理と同様、第1実施形態の図7(A)、図14のフローチャートで説明したサブテンプレートのレイアウトの最適化処理と同様に実現される。   Note that the footer page layout process in S2708 is realized in the same manner as the sub-template layout optimization process described with reference to the flowcharts of FIGS. 7A and 14 of the first embodiment, similarly to the header page layout process.

その後、レイアウト編集アプリケーション121は、再度ヘッダページレイアウト処理(S2704)に戻り、新しくドキュメントを作成する処理から繰り返す。なお、S2708によりフッタページレイアウト処理が終了したあとに、S2704に戻った場合、事前にBreak設定がクリア(すなわちBreak済みフラグがセット)されているため、再度同じ処理を繰り返すことはなく、Break定義されていないと判定される(S2706)。したがって通常のレイアウトを実行し、レコードに格納されたコンテンツをページ上に配置する(S2711)。この結果、レコード処理の途中で改ドキュメントが発生し、マルチレコード印刷が実現される。   Thereafter, the layout editing application 121 returns to the header page layout process (S2704) again, and repeats from the process of creating a new document. When the process returns to S2704 after the footer page layout process is completed in S2708, the Break setting is cleared in advance (that is, the Breaked flag is set), so the same process is not repeated again, and the Break definition It is determined that it has not been performed (S2706). Therefore, the normal layout is executed, and the content stored in the record is arranged on the page (S2711). As a result, a revised document is generated in the middle of record processing, and multi-record printing is realized.

上記改ドキュメントが設定されていることにより、配置すべきコンテンツデータを配置する際に、ドキュメントを改めることができるため、データ属性が変更されるごとに新しいドキュメントが生成されることとなる。   Since the revised document is set, the document can be revised when the content data to be arranged is arranged, so that a new document is generated every time the data attribute is changed.

次に、S2707の判定の結果、改ドキュメントの設定がされていないと判定された場合、レイアウト編集アプリケーション121は、PageBreak(改ページ)が設定されているかどうかを判定する(S2709)。S2709の判定処理はS2707と同様であるため詳細な説明は省略する。   Next, as a result of the determination in S2707, when it is determined that the document break is not set, the layout editing application 121 determines whether Page Break (page break) is set (S2709). Since the determination process of S2709 is the same as that of S2707, detailed description thereof is omitted.

判定の結果、PageBreak(改ページ)が設定されている場合には、レイアウト編集アプリケーション121は、これまでのフローを中断し、新しくページを作成する(S2710)。改ページのためにフローエリアを含んだ新規ページを作成した後、レイアウト編集アプリケーション121は、新規ページのフローエリアに対して現在対象としているレコードのコンテンツデータのサイズを取得し、通常のレイアウトを実行し、レコードに格納されたコンテンツをページ上に配置する(S2714)。この結果、レイアウト済みのサブテンプレートのフローがフローエリア内で新規のフローとして再開される。   As a result of the determination, if Page Break (page break) is set, the layout editing application 121 interrupts the flow so far and creates a new page (S2710). After creating a new page including a flow area for a page break, the layout editing application 121 obtains the size of the content data of the currently targeted record for the flow area of the new page, and executes a normal layout Then, the content stored in the record is arranged on the page (S2714). As a result, the flow of the sub template that has been laid out is resumed as a new flow in the flow area.

これにより、データ属性が変更されるごとに新しいページが生成されるため、例えば、あるユーザに複数の商品を提案する際の、カスタマイズカタログとして、同じ商品群を1つのページに構成することが可能となる。なおPageBreakについても、やはりBreak済みフラグをDocBreakと同じ要領で用いる。なお、Break済みフラグには、DocBreakであったのか、PageBreakであったのかといったBreak属性情報を持たせることができる。   As a result, a new page is generated each time the data attribute is changed. For example, the same product group can be configured as one page as a customized catalog when proposing multiple products to a user. It becomes. For Page Break, the Breaked flag is also used in the same manner as for Doc Break. The Breaked flag can have Break attribute information such as whether it is Doc Break or Page Break.

S2709でPageBreak設定がされていないと判定された場合、レイアウト編集アプリケーション121は、LineBreak(改行)が設定されているかどうかを判定する(S2711)。なお、S2711の判定処理は、S2707の判定処理と同様であるため詳細な説明は省略する。   If it is determined in S2709 that the Page Break setting is not set, the layout editing application 121 determines whether Line Break (line feed) is set (S2711). Note that the determination process in S2711 is the same as the determination process in S2707, and thus detailed description thereof is omitted.

判定の結果、LineBreak(改行)が設定されている場合、レイアウト編集アプリケーション121は、現在のフローエリアから次の行に当たるフローエリアの左端にレイアウト開始ポイントを移動する(S2712)。詳細には、レイアウト編集アプリケーションを構成するモジュールの1つであるレイアウトエンジンがコンテンツデータの配置位置を認識することが可能である。よって、レイアウトエンジンが1つ前のレコードをレイアウトしたサブテンプレート位置を認識して、一時的にメモリユニットに保持しておき、そこからサブテンプレート分改行して、左端にレイアウト開始ポイントを移動することによりS2712の処理が実現される。   If LineBreak is set as a result of the determination, the layout editing application 121 moves the layout start point from the current flow area to the left end of the flow area corresponding to the next line (S2712). Specifically, the layout engine, which is one of the modules constituting the layout editing application, can recognize the arrangement position of the content data. Therefore, the layout engine recognizes the position of the sub template where the previous record was laid out, temporarily stores it in the memory unit, changes the sub template from there, and moves the layout start point to the left end. Thus, the processing of S2712 is realized.

その後、通常のレイアウトを実行し、レコードに格納されたコンテンツをページ上のフローエリアに配置する(S2714)。レイアウト編集アプリケーション121はS2714の処理が終了した場合、対象レコードを次へ進める処理をしておき再度S2701へ戻り、次のレコードを取得する処理に入る。   Thereafter, a normal layout is executed, and the content stored in the record is arranged in the flow area on the page (S2714). When the process of S2714 is completed, the layout editing application 121 performs the process of advancing the target record, returns to S2701, and enters the process of acquiring the next record.

この結果、フローエリアの途中で改行が発生することになる。この場合の改行は、サブテンプレートにレイアウトされたレコードの高さ分移動することを示している。なおLineBreakについても、やはりブレーク済みフラグをDocBreakと同じ要領で用いる。   As a result, a line break occurs in the middle of the flow area. The new line in this case indicates that the record is moved by the height of the record laid out in the sub template. Note that the line break flag is also used in the same manner as Doc Break.

上記改行が設定されていることにより、データ属性の異なるコンテンツデータを配置する際に、行を改めることができるため、同じデータ属性のサブテンプレートを同じ行にレイアウトすることが可能となる。   Since the line feed is set, when content data having different data attributes are arranged, the line can be changed, so that sub-templates having the same data attribute can be laid out on the same line.

以上のBreak処理から、ヘッダページ、フローエリア、フッタページで構成されるドキュメントが、条件式に定義された各種のBreak処理によって、自在に構成を変更できることになり、フローエリアに設定されたBreak処理に従って、改ドキュメントなら新規文書を作成することにより文書を区切ってコンテンツデータを配置し、改ページならば新規ページをさく製することにより文書を区切ってコンテンツデータを配置して出力結果を得ることが可能となり、マルチレコード印刷時における多彩な出力結果を得ることができる。   From the above Break processing, a document composed of a header page, a flow area, and a footer page can be freely changed by various Break processing defined in the conditional expression, and the Break processing set in the flow area is set. Therefore, if the document is a revised document, the content data is arranged by dividing the document by creating a new document, and if it is a page break, the content data is arranged by separating the document by creating a new page, and an output result can be obtained. This makes it possible to obtain various output results during multi-record printing.

図27Bは、図27A中のサブテンプレートを決定する処理S2705の詳細を記述したフローチャートである。レイアウト編集アプリケーション121は条件式の最初のIF文を取り出し(S2721)、S2701で受け取ったレコードからIF文の判定対象としているフィールドの値を取り出す(S2722)。なお、上述した通り条件式はフローエリア情報としてメモリユニットに保存されているため、レイアウト編集アプリケーション121が、メモリユニットを参照することにより、S2721およびS2722の処理は可能となる。   FIG. 27B is a flowchart describing details of the process S2705 for determining the sub-template in FIG. 27A. The layout editing application 121 extracts the first IF statement of the conditional expression (S2721), and extracts the value of the field that is the determination target of the IF statement from the record received in S2701 (S2722). Since the conditional expression is stored in the memory unit as the flow area information as described above, the processing of S2721 and S2722 becomes possible when the layout editing application 121 refers to the memory unit.

続いてレイアウト編集アプリケーション121は、現在対象としているレコードのフィールドの値がS2721により取り出された条件式に合致するかどうかを判定する(S2723)。詳細には、レイアウト編集アプリケーションが現在対象としているレコードのコンテンツデータをメモリユニット136に一時的に保持しておき、フローエリア情報として保持されている条件式と比較することによりS2723の処理が実現される。   Subsequently, the layout editing application 121 determines whether or not the field value of the currently targeted record matches the conditional expression extracted in S2721 (S2723). Specifically, the content data of the record currently targeted by the layout editing application is temporarily stored in the memory unit 136, and the processing of S2723 is realized by comparing with the conditional expression stored as the flow area information. The

レイアウト編集アプリケーションはS2121により取り出された条件式と判定対象としているフィールド値が合致すると判定した場合、その条件文のUSE処理を選択し、サブテンプレートを決定する(S2725)。なお、使用するサブテンプレートが決定した場合、レイアウト編集アプリケーションは現在対象としているレコードと使用するサブテンプレートを対応付けて、メモリユニット136に保持する。   If the layout editing application determines that the conditional expression extracted in S2121 matches the field value to be determined, the layout editing application selects the USE processing of the conditional statement and determines a sub-template (S2725). When the sub template to be used is determined, the layout editing application stores the current target record in association with the sub template to be used in the memory unit 136.

S2723により合致しないと判定された場合、レイアウト編集アプリケーション121は、別の条件式があるかどうかを判定する(S2724)。なお、S2724の判定処理もS2723の処理と同様である。S2724によりレイアウト編集アプリケーションが、別の条件式があれば同様に該別の条件式を用いてS2723の判定を実行する。   If it is determined in S2723 that they do not match, the layout editing application 121 determines whether there is another conditional expression (S2724). Note that the determination processing in S2724 is the same as the processing in S2723. If there is another conditional expression in S2724, the layout editing application similarly performs the determination in S2723 using the other conditional expression.

レイアウト編集アプリケーション121は、現在対象としているレコードのコンテンツデータがどの条件式にも合致しないと判定した場合、ELSE文のUSE処理を選択し、サブテンプレートを決定する(S2726)。なお、ELSE文に関してはユーザにより設定されない場合もありえるため、ELSE文の条件式が無ければS2726の処理は省略されることとなる。   If the layout editing application 121 determines that the content data of the currently targeted record does not match any conditional expression, the layout editing application 121 selects the USE processing of the ELSE statement and determines a sub template (S2726). Since the ELSE sentence may not be set by the user, the processing in S2726 is omitted if there is no ELSE sentence conditional expression.

最後に、レイアウト編集アプリケーション121は、WITH文で定義されているBreak処理を取得して、メモリユニット136に保持する(S2727)。   Finally, the layout editing application 121 acquires the Break process defined by the WITH statement and stores it in the memory unit 136 (S2727).

<サブテンプレート>
次に図27AのステップS2714におけるサブテンプレートのレイアウト処理について、レイアウト処理フローを図28を参照して説明する。
まず、レイアウト編集アプリケーション121は、各コンテナにレイアウトするためのデータのサイズを取得する(S2801)。そして、S2801により取得したデータサイズに基づいて、レイアウト編集アプリケーション121は、各コンテナにおいてレイアウト計算を行い(S2802)、レイアウトを最適化する(S2803)。なおレイアウトの計算処理およびレイアウト最適化の方法は第1実施形態で説明した通りである。
<Sub template>
Next, the layout process flow of the sub-template layout process in step S2714 in FIG. 27A will be described with reference to FIG.
First, the layout editing application 121 acquires the size of data to be laid out in each container (S2801). Then, based on the data size acquired in S2801, the layout editing application 121 performs layout calculation in each container (S2802), and optimizes the layout (S2803). The layout calculation process and the layout optimization method are as described in the first embodiment.

レイアウト編集アプリケーション121は上記処理により最適化されたレイアウトを決定し(S2804)、レイアウトするデータを流し込む(S2805)。この処理も第1実施形態で説明したとおりである。   The layout editing application 121 determines a layout optimized by the above processing (S2804), and flows data to be laid out (S2805). This process is also as described in the first embodiment.

次に、フローエリアにサブテンプレートをレイアウトするために、レイアウト編集アプリケーション121は、フローエリアのサイズを取得し(S2806)、レイアウトするサブテンプレートのサイズを取得する(S2807)。上述した通り、フローエリアのサイズおよびサブテンプレートのサイズはメモリユニット136に保持されているため、サイズ取得可能である。なお、本実施形態では、サブテンプレートの外枠のサイズは、上述した通りサブテンプレート内のコンテナに流し込まれるレコードの内容によって決定する可変サイズであっても、流し込まれるレコードに依存しない固定サイズであっても構わない。   Next, in order to lay out the sub template in the flow area, the layout editing application 121 acquires the size of the flow area (S2806), and acquires the size of the sub template to be laid out (S2807). As described above, since the size of the flow area and the size of the sub template are held in the memory unit 136, the size can be acquired. In the present embodiment, the size of the outer frame of the sub template is a fixed size that does not depend on the record to be flowed, even if it is a variable size determined by the contents of the record flowed into the container in the sub template as described above. It doesn't matter.

レイアウト編集アプリケーション121は、フローエリア内に、設定されているフロー方向とフロー間隔を適用しながらサブテンプレートを配置する(S2808)。最後に、レイアウト結果を表示して終了する(S2809)。最後の表示処理は、図28を呼び出すプログラムで行われるために、なくともよい。   The layout editing application 121 arranges the sub template in the flow area while applying the set flow direction and flow interval (S2808). Finally, the layout result is displayed and the process ends (S2809). Since the last display process is performed by a program that calls FIG.

なお、ステップS2801〜S2805は、図14のステップS1402〜S1406と同様であるし、ステップS2806〜S2809は、図17のステップS1713〜S1716と同様である。   Steps S2801 to S2805 are the same as steps S1402 to S1406 in FIG. 14, and steps S2806 to S2809 are the same as steps S1713 to S1716 in FIG.

(フローエリアのBreak例)
図27の処理を図29および図35を用いて具体的に説明する。図29は、DocBreak(改ドキュメント)処理により、複数のドキュメントが生成された例を示している。
(Break example of flow area)
The processing of FIG. 27 will be specifically described with reference to FIGS. 29 and 35. FIG. 29 shows an example in which a plurality of documents are generated by DocBreak (modified document) processing.

図29の2901はサブテンプレートを流し込むために設定されたフローエリアであり、フローエリアにはサブテンプレート2902)、サブテンプレート2903、サブテンプレート2904のいずれかを用いるための条件式が設定されている。条件式には、レコードの宛先フィールド(データA)が「1」であれば、THEN USE "サブテンプレート2902" WITH "DocBreak"を実行することが設定されている。さらに、レコードの宛先フィールド(データA)が「2」であれば、THEN USE "サブテンプレート2903" WITH "DocBreak"を実行することが設定されている。レコードの宛先フィールドが「3」であれば、THEN USE "サブテンプレート2904" WITH "DocBreak"を実行することが設定されている。   In FIG. 29, reference numeral 2901 denotes a flow area set for pouring a sub-template, and a conditional expression for using any of the sub-template 2902), the sub-template 2903, and the sub-template 2904 is set in the flow area. The conditional expression is set to execute THEN USE “sub-template 2902” WITH “DocBreak” if the destination field (data A) of the record is “1”. Furthermore, if the destination field (data A) of the record is “2”, it is set to execute THEN USE “subtemplate 2903” WITH “DocBreak”. If the destination field of the record is “3”, it is set to execute THEN USE “subtemplate 2904” WITH “DocBreak”.

つまり、データAの項目が変更することに応じて、改ドキュメントが実行されることとなる。   In other words, the revised document is executed in accordance with the change of the item of data A.

ここで図27Aと図29を用いて処理の流れを具体的に説明する。レイアウト編集アプリケーション121は、データ2900にある「レコード1」を取得する。ここでレコード1は最初のレコードであるため、関連付け情報に従ってレコード1に含まれるデータAの「1」がヘッダページのコンテナにレイアウトされることとなる。ここまでの処理が図27のS2701〜S2704に該当する。   Here, the flow of processing will be specifically described with reference to FIGS. 27A and 29. The layout editing application 121 acquires “record 1” in the data 2900. Here, since record 1 is the first record, “1” of data A included in record 1 is laid out in the container of the header page according to the association information. The processing so far corresponds to S2701 to S2704 in FIG.

レイアウト編集アプリケーション121は、レコード1の「データA=1」であることを認識すると共に、メモリユニット136の条件式を参照して「レコードの宛先フィールド(データA)が「1」であれば、THEN USE "サブテンプレート1" WITH "DocBreak"」を認識する。以上より、レコード1に関してはサブテンプレート1を使用することが特定されると共に、改ドキュメントが設定されていることも認識する。   The layout editing application 121 recognizes that “data A = 1” of the record 1 and refers to the conditional expression of the memory unit 136 and if “the record destination field (data A) is“ 1 ”, THEN USE “Sub-template 1” WITH “DocBreak” ”is recognized. As described above, regarding the record 1, it is specified that the sub template 1 is used, and it is recognized that the revised document is set.

しかしながら、レコード1においては前レコードとの比較により所定のフィールド値が変更することにより発生するBreak処理が生じないため、レコード1のコンテンツデータをサブテンプレートへ流し込むS2714の処理へ進むこととなる。この処理が図27AのS2706に該当する。なお、レコード1のコンテンツデータは上述したように一時的にメモリユニット136に保持されることとなる。   However, since the Break process that occurs when the predetermined field value is changed in comparison with the previous record does not occur in the record 1, the process proceeds to S2714 in which the content data of the record 1 is flowed into the sub-template. This process corresponds to S2706 in FIG. 27A. Note that the content data of the record 1 is temporarily held in the memory unit 136 as described above.

続いてレイアウト編集アプリケーション121はS2714の後、S2701へ戻り、次のレコード2を対象レコードとして処理を進める。レコード2はレコードの終了ではなく、さらに最初のレコードでもないためS2705へと進む。ここでレイアウト編集アプリケーションはレコード2のコンテンツデータ「データA=2」と条件式「レコードの宛先フィールド(データA)が「2」であれば、THEN USE "サブテンプレート2" WITH "DocBreak"」により、レコード2で使用されるサブテンプレートはサブテンプレート2であると特定すると共に、改ドキュメントが設定されていることも認識する。   Subsequently, the layout editing application 121 returns to S2701 after S2714 and proceeds with the next record 2 as a target record. Since record 2 is not the end of the record and is not the first record, the process advances to step S2705. Here, the layout editing application uses the contents data “data A = 2” of record 2 and the conditional expression “THEN USE“ subtemplate 2 ”WITH“ DocBreak ”” if the record destination field (data A) is “2”. The sub-template used in the record 2 is identified as the sub-template 2, and it is recognized that the revised document is set.

さらに、レイアウト編集アプリケーション121は、一時的に保持しているレコード1のコンテンツデータとレコード2のコンテンツデータを比較すると、レコード1では「データA=1」であったのに対し、レコード2では「データA=2」に変化していることが認識できる。これにより、レコード2を流し込む際にBreak処理が発生することとなる。   Further, the layout editing application 121 compares the content data of the record 1 and the content data of the record 2 that are temporarily held, and “data A = 1” in the record 1, whereas “ It can be recognized that the data A is changed to “2”. As a result, the Break process occurs when the record 2 is poured.

以上から、レイアウト編集アプリケーションはS2706の処理において、「Break処理設定あり」および「Break処理発生」を認識するため、S2707へと処理を進める。ここでレコード2に該当する条件式には「改ドキュメント」が設定されているため、レイアウト編集アプリケーションはレコード1用のフッタページ2907を作成する。なお、ここで使用されるコンテンツデータはレコード1に含まれるコンテンツデータである。さらに、レイアウト編集アプリケーション121は、上述したBreak済みフラグを設定する。   From the above, the layout editing application advances the process to S2707 in order to recognize “Break process is set” and “Break process occurs” in the process of S2706. Here, since the “revision document” is set in the conditional expression corresponding to the record 2, the layout editing application creates the footer page 2907 for the record 1. The content data used here is content data included in the record 1. Furthermore, the layout editing application 121 sets the above-described Breaked flag.

ここまでの処理により図29に記載したドキュメント(a)を構成する2905および2906および2907が生成される。続いてレイアウト編集アプリケーション121は、S2704に処理を進め、レコード2用のヘッダページ2908を作製する。なお、上述したBreak済みフラグが設定されているため、S2705の処理は省略され、さらにS2706では「いいえ」と判定される。これにより、レコード2のコンテンツデータはサブテンプレート2に配置され、新規文書であるドキュメント(b)のページ2909のフローエリアに対してレイアウトされることとなる。   Through the processing so far, 2905, 2906, and 2907 constituting the document (a) shown in FIG. 29 are generated. Subsequently, the layout editing application 121 advances the process to S2704 to create a header page 2908 for the record 2. Since the above-described Breaked flag is set, the process of S2705 is omitted, and further, “No” is determined in S2706. Thereby, the content data of the record 2 is arranged in the sub template 2 and is laid out with respect to the flow area of the page 2909 of the document (b) which is a new document.

続いてレコード3、レコード4についても同様の処理を行うと、レコード3および4に関しては「データA=2」であり、レコード2のデータAと同じためBreak処理は発生しない。よって、レイアウト編集アプリケーション121は、S2714へと処理を進めレコード3および4のコンテンツデータはドキュメント(b)のフローエリアへとレイアウトされることとなる。なお、通常であればレコード4のコンテンツデータもドキュメント(b)のページ2909のフローエリアへレイアウトされるべきであるが、流し込まれるコンテンツデータが多く、1つのフローエリアに納めることができなかったため、繰り返しページ機能により新たにページ2910が生成されている。   Subsequently, when the same processing is performed for the records 3 and 4, “data A = 2” is obtained for the records 3 and 4, and the same processing as the data A of the record 2, so that the Break processing does not occur. Therefore, the layout editing application 121 proceeds to S2714, and the content data of the records 3 and 4 are laid out in the flow area of the document (b). Normally, the content data of the record 4 should also be laid out in the flow area of the page 2909 of the document (b), but since there is a lot of content data to be flown in, it could not be put in one flow area. A new page 2910 is generated by the repeated page function.

このように、サブテンプレートが変更されることに応じてドキュメントを変更することが可能となる。   In this way, the document can be changed in accordance with the change of the sub template.

続いて、図27および図35を用いてにPageBreak(改ページ)の具体例を示す。例えばデータ3500に含まれるレコードを流し込む場合を想定する。   Next, a specific example of PageBreak (page break) will be described with reference to FIGS. 27 and 35. FIG. For example, a case where a record included in the data 3500 is poured is assumed.

3501はサブテンプレートを流し込むために設定されたフローエリアであり、フローエリアにはサブテンプレート3502、サブテンプレート3503、サブテンプレート3504のいずれかを用いるための条件式が設定されている。条件式の1つ目は、データAが変化(change)すれば、WITH"DocBreak"が設定されている。つまり、データAが変化することに応じて改ドキュメントが実行されることとなる。そして条件式の2つ目には、データBが「X」であれば、THEN USE "サブテンプレート3502" WITH "PageBreak"を実行することが設定されている。さらに、データBが「Y」であれば、THEN USE "サブテンプレート3503" WITH "PageBreak"を実行することが設定されている。データBが「Z」であれば、THEN USE "サブテンプレート3504" WITH "PageBreak"を実行することが設定されている。つまり、データBのデータ値が変更することに応じて、改ページが実行される。   Reference numeral 3501 denotes a flow area set for pouring a sub template, and a conditional expression for using any one of the sub template 3502, the sub template 3503, and the sub template 3504 is set in the flow area. In the first conditional expression, when data A changes, WITH “DocBreak” is set. That is, the revised document is executed in accordance with the change of the data A. The second conditional expression is set to execute THEN USE “sub template 3502” WITH “Page Break” if the data B is “X”. Further, if the data B is “Y”, it is set to execute THEN USE “sub-template 3503” WITH “Page Break”. If the data B is “Z”, it is set to execute THEN USE “sub-template 3504” WITH “Page Break”. That is, a page break is executed in response to a change in the data value of data B.

ここで図27Aと図35を用いて処理の流れを具体的に説明する。レイアウト編集アプリケーション121は、データ3500にある「レコード1」を取得する。ここでレコード1は最初のレコードであるため、関連付け情報に従ってレコード1に含まれるデータAの「1」がヘッダページのコンテナにレイアウトされる。   Here, the flow of processing will be specifically described with reference to FIGS. 27A and 35. The layout editing application 121 acquires “record 1” in the data 3500. Here, since record 1 is the first record, “1” of data A included in record 1 is laid out in the container of the header page according to the association information.

レイアウト編集アプリケーション121は、レコード1の「データA=1」および「データB=X」であることを認識すると共に、メモリユニット136の条件式を参照して「データBが「X」であれば、THEN USE "サブテンプレート3502" WITH "PageBreak"」を認識する。以上より、レコード1に関してはサブテンプレート3502を使用することが特定されると共に、改ページが設定されていることも認識する。しかしながら、レコード1においてはBreak処理が生じないため、レコード1のコンテンツデータをサブテンプレート3502へ流し込むS2714の処理へ進む。なお、レコード1のコンテンツデータは上述したように一時的にメモリユニット136に保持されることとなる。   The layout editing application 121 recognizes that “data A = 1” and “data B = X” of the record 1, and refers to the conditional expression of the memory unit 136 if “data B is“ X ”. , THEN USE “sub template 3502” WITH “Page Break” ”is recognized. As described above, regarding the record 1, it is specified that the sub template 3502 is used, and it is recognized that a page break is set. However, since the Break process does not occur in the record 1, the process proceeds to S2714 in which the content data of the record 1 is flowed into the sub template 3502. Note that the content data of the record 1 is temporarily held in the memory unit 136 as described above.

続いてレイアウト編集アプリケーション121はS2714の後、S2701へ戻り、次のレコード2を対象レコードとして処理を進める。レコード2はレコードの終了ではなく、さらに最初のレコードでもないためS2705へと進む。ここでレイアウト編集アプリケーション121は、レコード2の「データB=Y」および条件式「データBが「Y」であれば、THEN USE "サブテンプレート3503" WITH "PageBreak"」を認識することにより、レコード2において使用するサブテンプレートを3503と特定すると共に、改ページが設定されていることも認識する。   Subsequently, the layout editing application 121 returns to S2701 after S2714 and proceeds with the next record 2 as a target record. Since record 2 is not the end of the record and is not the first record, the process advances to step S2705. Here, the layout editing application 121 recognizes the record “Data B = Y” and the conditional expression “If the data B is“ Y ”, the THEN USE“ sub template 3503 ”WITH“ Page Break ”” 2 is identified as 3503, and it is recognized that a page break is set.

さらに、レイアウト編集アプリケーション121は、一時的に保持しているレコード1のコンテンツデータとレコード2のコンテンツデータを比較すると、レコード1は「データA=1」であったのに対し、レコード2も「データA=1」であるため改ドキュメントは発生しない。しかしながら、レコード1の「データB=X」であったのに対し、レコード2の「データB=Y」であるため、Break処理(改ページ処理)が発生する。つまり、レイアウト編集アプリケーション121は、S2706において「Break設定あり」および「Break処理発生」と認識するため、S2707へと進みレコード2に対して実行すべきBreak処理を特定する。   Furthermore, when the layout editing application 121 compares the content data of the record 1 and the content data of the record 2 that are temporarily held, the record 1 is “data A = 1”, whereas the record 2 is “ Since the data A = 1 ”, the revised document is not generated. However, since “Data B = X” of Record 1 is “Data B = Y” of Record 2, Break processing (page break processing) occurs. That is, the layout editing application 121 recognizes that “Break setting is present” and “Break processing has occurred” in S2706, and thus proceeds to S2707 and specifies the Break processing to be executed for the record 2.

上述した通り、レコード2に適用される条件式は「データBが「Y」であれば、THEN USE "サブテンプレート3503" WITH "PageBreak"」であるため、改ページが実行されると特定できる。よってレイアウト編集アプリケーション121は、S2709により「Yes」と判定し、新規ページ3507を生成する。   As described above, since the conditional expression applied to the record 2 is “THEN USE“ sub template 3503 ”WITH“ Page Break ”if data B is“ Y ”, it can be specified that a page break is executed. Therefore, the layout editing application 121 determines “Yes” in S <b> 2709 and generates a new page 3507.

レイアウト編集アプリケーションはレコード2のコンテンツデータをサブテンプレート3503に配置して、S2710において新たに生成されたページ3507のフローエリアにレイアウトする。   The layout editing application arranges the content data of the record 2 in the sub-template 3503 and lays it out in the flow area of the page 3507 newly generated in S2710.

また、レコード3および4は「データA=1」であり、「データB=Y」であるため改ドキュメントおよび改ページは実行されない。よって、レイアウト編集アプリケーション121は、ページ3507のフローエリアにレコード3および4のコンテンツデータをレイアウトする。なお、通常であればレコード4のコンテンツデータものページ3507のフローエリアへレイアウトされるべきであるが、流し込まれるコンテンツデータが多く、1つのフローエリアに納めることができなかったため、繰り返しページ機能により新たにページ3508が生成されている。   Further, since records 3 and 4 are “data A = 1” and “data B = Y”, the document break and page break are not executed. Therefore, the layout editing application 121 lays out the content data of the records 3 and 4 in the flow area of the page 3507. Normally, the content data of the record 4 should be laid out in the flow area of the page 3507, but since there is a lot of content data that cannot be put in one flow area, a new page function can be used to repeat it. A page 3508 is generated.

さらに、レコード5に関しても上述の処理を実行する。レコード5のコンテンツデータは「データA=1」であり、「データB=Z」であるため、改ドキュメントは実行されないが、改ページ処理が実行される。   Further, the above-described processing is executed for the record 5 as well. Since the content data of the record 5 is “data A = 1” and “data B = Z”, the page break process is executed although the page break process is not executed.

よって、レイアウト編集アプリケーション121は、レコード5のコンテンツデータを配置するために、サブテンプレート3504にレコード5のコンテンツデータを配置して、改ページ処理により新たに生成されたページ3509のフローエリアにレイアウトすることとなる。   Therefore, the layout editing application 121 arranges the content data of the record 5 in the sub template 3504 and arranges the content data of the record 5 in the flow area of the page 3509 newly generated by the page break process. It will be.

続いてレイアウト編集アプリケーション121は、レコード7を対象レコードとして処理を進める。レコード7のコンテンツデータは「データA=2」であるため、レコード1〜6のデータAとは異なるデータ値となっている。よって、条件式1である「データAが「change」WITH"DocBreak"」が適用され、改ドキュメントであると特定される。すなわちレイアウト編集アプリケーションは、レコード7において「Break処理の設定あり」および「Break処理が発生」と判定するため、S2707へと処理を進める。   Subsequently, the layout editing application 121 proceeds with the process using the record 7 as a target record. Since the content data of the record 7 is “data A = 2”, the data value is different from the data A of the records 1 to 6. Therefore, conditional expression 1 “data A is“ change ”WITH“ DocBreak ”” is applied and the document is identified as a revised document. In other words, the layout editing application advances the processing to S2707 in order to determine that “Break processing is set” and “Break processing occurs” in record 7.

さらに、レイアウト編集アプリケーション121は、設定されているBreak処理が改ドキュメントであるため、フッタページ3510を生成して、上述したBreak完了フラグを設定する。   Further, the layout editing application 121 generates the footer page 3510 and sets the above-described Break completion flag because the set Break processing is a revised document.

これにより、レイアウト編集アプリケーションは、レコード1〜6を用いてページ3505〜ページ3510から構成される1つの文書を生成し、レコード7から新規文書の作成処理にはいる。Break処理として改行が設定されていた場合、上述したものと同様の処理が行われることとなる。   As a result, the layout editing application generates one document composed of pages 3505 to 3510 using records 1 to 6 and starts a new document creation process from record 7. When a line break is set as the Break process, the same process as described above is performed.

なお、フローエリアをブレークにより分割した場合、分割された各フローエリアについては同一の属性情報を持つものとして、レイアウト等の処理が行われる。   When the flow area is divided by breaks, the divided flow areas are subjected to processing such as layout, assuming that they have the same attribute information.

[第4実施形態]
本発明の第4実施形態は、テンプレートに定義された条件式をオーバーライド(上書き)できる外部条件式ファイルとして利用する場合の処理を示している。テンプレートには、条件式が図30で示すようなXML準拠の形式で記述されており、テンプレートの定義自体もXML準拠のタグ形式となっている。ここでは、テンプレート自体のフォーマットは関係ないので説明は割愛する。
[Fourth Embodiment]
The fourth embodiment of the present invention shows processing in the case where the conditional expression defined in the template is used as an external conditional expression file that can be overwritten (overwritten). In the template, the conditional expressions are described in an XML-compliant format as shown in FIG. 30, and the template definition itself is also in an XML-compliant tag format. Here, the format of the template itself is irrelevant and will not be described.

図30は、外部条件式ファイルとなる条件式ファイルのフォーマットを示している。図26の条件式設定UIの設定内容を保存する際の形式と同じであり、UI画面に表示された内容をそのままタグ形式に当てはめたものとなり、<CONDITIONAL>タグ、<IF>タグ、<ELSEIF>タグ、<ELSE>タグで構成される。また、<IF>タグには、判断式を記述する<FIELD>タグ、判断結果を記述する<USE>タグが含まれる。<USE>タグには、WITH識別子にBreak種別が記述される。<CONDITIONAL>タグには、条件式を識別するための名称が記述される。<IF>タグの<FIELD>タグには、Field名、判断文、判定値の組が定義され、複数の判断文がある場合には、AND識別子、OR識別子で繋ぐことができる。<ELSEIF>タグは、<IF>タグと同様に記述され、<IF>タグの分岐先となる。最後に、<ELSE>タグは、どの判断文にも一致しない場合の分岐先であり、<USE>タグのみ記述される。   FIG. 30 shows a format of a conditional expression file that is an external conditional expression file. It is the same as the format for saving the setting contents of the conditional expression setting UI in FIG. 26, and the contents displayed on the UI screen are directly applied to the tag format, and the <CONDITIONAL> tag, <IF> tag, <ELSEIF > Tag and <ELSE> tag. The <IF> tag includes a <FIELD> tag describing a determination formula and an <USE> tag describing a determination result. In the <USE> tag, the Break type is described in the WITH identifier. In the <CONDITIONAL> tag, a name for identifying the conditional expression is described. In the <FIELD> tag of the <IF> tag, a set of a field name, a judgment sentence, and a judgment value is defined, and when there are a plurality of judgment sentences, they can be connected by an AND identifier and an OR identifier. The <ELSEIF> tag is described in the same manner as the <IF> tag and is a branch destination of the <IF> tag. Finally, the <ELSE> tag is a branching destination when it does not match any judgment sentence, and only the <USE> tag is described.

図31は、外部条件式ファイルをオーバーライド(上書き)する処理を記述したフローチャートである。図31の処理は、第3実施形態の図27Aの先頭において行われる。   FIG. 31 is a flowchart describing a process for overriding an external conditional expression file. The process of FIG. 31 is performed at the head of FIG. 27A of the third embodiment.

レイアウト編集アプリケーションを構成するモジュールの1つであるレイアウトエンジン225は、入力パラメータで指定されたテンプレートをメモリ136に読み込む(S3101)。XML準拠のファイルフォーマットであるため、レイアウトエンジン225は、テンプレートファイルをパースしてXMLのオブジェクトツリーに展開する(S3102)。次に、レイアウト編集アプリケーション121は、入力パラメータに外部条件式ファイルがあるかどうか判定する(S3103)。この判定は、たとえば外部条件式ファイルについては特定の拡張子や名称を与えておくことで実現できる。判定の結果外部条件式がある場合に、レイアウト編集アプリケーション121は、条件式ファイルをメモリ136に読み込む(S3104)。次に、条件式をパースして条件式オブジェクトツリーに展開する(S3105)。次に、レイアウト編集アプリケーション121は、ステップS3101で読み込んだテンプレートに記述された条件式オブジェクトツリーを、外部参照で読み込んだ条件式オブジェクトツリーで書き換える(1906)。XML準拠であるため、オブジェクト単位の入れ換え処理は既知の技術で可能となる。その後、図S27Aで説明したBreak処理を実行(S3107)することで、テンプレートに設定された条件式を印刷時に動的に変更することができるため、流し込むバリアブルデータに応じて、サブテンプレートの変更条件を変更することができるため、より多彩なバリアブルプリントが実現できる。   The layout engine 225, which is one of the modules constituting the layout editing application, reads the template specified by the input parameter into the memory 136 (S3101). Since the file format conforms to XML, the layout engine 225 parses the template file and expands it into an XML object tree (S3102). Next, the layout editing application 121 determines whether there is an external conditional expression file as an input parameter (S3103). This determination can be realized, for example, by giving a specific extension or name to the external conditional expression file. If there is an external conditional expression as a result of the determination, the layout editing application 121 reads the conditional expression file into the memory 136 (S3104). Next, the conditional expression is parsed and expanded into a conditional expression object tree (S3105). Next, the layout editing application 121 rewrites the conditional expression object tree described in the template read in step S3101 with the conditional expression object tree read by external reference (1906). Since it conforms to XML, replacement processing in units of objects can be performed by a known technique. After that, by executing the Break process described in FIG. S27A (S3107), the conditional expression set in the template can be dynamically changed at the time of printing. Therefore, the sub-template change condition according to the variable data to be flown Since this can be changed, more various variable prints can be realized.

なお、条件式オブジェクトツリーの評価は、たとえばツリー構造にしたがってスタックマシンにより演算子を実行することで実現できる。また、上記手順においては、条件式をパースする前にXML形式のまま条件式の上書きを行ってからパースしても良い。   The evaluation of the conditional expression object tree can be realized by executing an operator by a stack machine according to a tree structure, for example. In the above procedure, parsing may be performed after overwriting the conditional expression in the XML format before parsing the conditional expression.

このように構成することで、条件式をたとえばテキストエディタなどで編集して設定することが可能となる。   With this configuration, the conditional expression can be set by editing it with a text editor, for example.

以上のように、本発明に係る各実施形態のレイアウト編集システムによれば、データベースから抽出したレコードデータの内容(フィールド値)に応じて異なったサブテンプレートを選択して、選択されたサブテンプレートに対してレコードを挿入する。そして、その挿入処理をレコードごとに繰り返すことによって、多種のサブテンプレートとレコードの結びついた部分レイアウトが得られる。その多種の部分レイアウトを、レイアウトエリアに順にフローさせることで、従来の流し込みでは実現できない、複雑なレイアウト切り替えを繰り返すフローレイアウトを実現することができる。   As described above, according to the layout editing system of each embodiment according to the present invention, different sub templates are selected according to the contents (field values) of record data extracted from the database, and the selected sub templates are selected. Insert a record. Then, by repeating the insertion process for each record, a partial layout in which various sub-templates and records are combined can be obtained. By making the various partial layouts flow in order in the layout area, it is possible to realize a flow layout in which complicated layout switching that cannot be realized by conventional pouring is repeated.

また、その多種の部分レイアウトを製本時の章に見立て、改ページBreak処理によってページ制御することで小冊子のようなドキュメントを生成することが可能となる。また、ヘッダあるいはフッタを構成するテンプレートで改ドキュメントBreak処理した場合には、顧客毎のドキュメントを1つのテンプレートとマルチレコードで同時に生成することが可能となる。   Further, it is possible to generate a document such as a booklet by regarding the various partial layouts as chapters at the time of bookbinding and performing page control by page break break processing. In addition, when the document break processing is performed with a template that forms a header or footer, a document for each customer can be generated simultaneously with one template and multiple records.

これは、カスタマイズカタログの様に、顧客毎にアピールする商品カテゴリが違うようなドキュメントを一度に生成するオンデマンド印刷で非常に有効となる。   This is very effective for on-demand printing, such as a customized catalog, in which a document with different product categories appealing to each customer is generated at one time.

なお、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用してもよい。また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても達成される。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコード自体およびプログラムコードを記憶した記憶媒体は本発明を構成することになる。   Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, and a printer), and a device (for example, a copying machine and a facsimile device) including a single device. You may apply to. Another object of the present invention is to supply a storage medium (or recording medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (or CPU or (MPU) can also be achieved by reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the program code itself and the storage medium storing the program code constitute the present invention.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。   Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. A case where part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing is also included. Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is based on the instruction of the program code. This includes a case where the CPU of the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.

本発明の実施形態に係るコンピュータシステム構成図Computer system configuration diagram according to an embodiment of the present invention 本発明の実施形態に係るコンピュータシステム構成図Computer system configuration diagram according to an embodiment of the present invention 本発明の実施形態に係るコンピュータモジュールの概略図Schematic diagram of a computer module according to an embodiment of the present invention 本発明の実施形態に係るメニューバー、ツールバー、ワークエリア、フローティングパレットを含む典型的なアプリケーションのメインウインドウとコンテナ間のリンクを持つ典型的なコンテナの一例を示す図The figure which shows an example of the typical container which has the link between the main window of the typical application including the menu bar, the tool bar, the work area, and the floating palette according to the embodiment of the present invention, and the container 本発明の実施形態に係るインターフェイスの一例によるコンテナの表現の16パターンの一例を示す図The figure which shows an example of 16 patterns of the expression of the container by an example of the interface which concerns on embodiment of this invention 本発明の実施形態に係る典型的なコンテナルールの一例を示す図The figure which shows an example of the typical container rule which concerns on embodiment of this invention 本発明の実施形態に係るリンクを作成するUIの一例を示す図The figure which shows an example of UI which produces the link which concerns on embodiment of this invention 本発明の実施形態に係るレイアウト計算のフローの一例を示す図The figure which shows an example of the flow of the layout calculation which concerns on embodiment of this invention 本発明の実施形態に係るレイアウト計算のフローの一例を示す図The figure which shows an example of the flow of the layout calculation which concerns on embodiment of this invention 本発明の実施形態に係る図7のフローに対応するUIの一例を示す図The figure which shows an example of UI corresponding to the flow of FIG. 7 which concerns on embodiment of this invention. 本発明の実施形態に係るマルチレコードの概要図Overview of multi-record according to an embodiment of the present invention 第1実施形態における全体フローの一例を示す図The figure which shows an example of the whole flow in 1st Embodiment. 第1実施形態における図10のUIの一例を示す図The figure which shows an example of UI of FIG. 10 in 1st Embodiment. 第1実施形態におけるフローエリアの設定ダイアログのUIの一例を示す図The figure which shows an example of UI of the setting dialog of the flow area in 1st Embodiment 第1実施形態におけるサブテンプレートのレイアウトの一例を示す図The figure which shows an example of the layout of the sub template in 1st Embodiment. 第1実施形態におけるサブテンプレートのレイアウトフローの一例を示す図The figure which shows an example of the layout flow of the sub template in 1st Embodiment. 第1実施形態における条件式の設定UIの一例を示す図The figure which shows an example of setting UI of the conditional expression in 1st Embodiment 第1実施形態における条件式を判定するフローの一例を示す図The figure which shows an example of the flow which determines the conditional expression in 1st Embodiment. 第1実施形態における条件式を判定するフローの一例を示す図The figure which shows an example of the flow which determines the conditional expression in 1st Embodiment. 第1実施形態におけるフローエリア内レイアウト計算フローの一例を示す図The figure which shows an example of the layout calculation flow in the flow area in 1st Embodiment. 第1実施形態におけるサブテンプレートのレイアウトの一例を示す図The figure which shows an example of the layout of the sub template in 1st Embodiment. 複数ページにわたるフローエリアを設定するUIの一例を示す図The figure which shows an example of UI which sets the flow area over several pages フローエリアの位置とサイズを変更するUIの一例を示す図The figure which shows an example of UI which changes the position and size of a flow area 繰り返しのあるフローエリアとそれにデータを挿入したときの概念図Conceptual diagram of a flow area with repetition and data inserted into it 複数ページにわたるフローエリアにサブテンプレートをレイアウトするフローの一例を示す図The figure which shows an example of the flow which lays out a sub template in the flow area which extends over multiple pages テンプレートデータの構成の一例を示す図A figure which shows an example of composition of template data マルチレコードのテンプレートデータの構成の一例を示す図The figure which shows an example of a structure of the template data of a multi record 第1実施形態のレイアウト編集システムの動作を説明する概略図Schematic explaining operation | movement of the layout editing system of 1st Embodiment. 第3実施形態における条件式の設定UI例を示す図The figure which shows the example of setting UI of the conditional expression in 3rd Embodiment 第3実施形態におけるレイアウト処理フローの図Diagram of layout processing flow in the third embodiment 第3実施形態におけるテンプレート決定処理のフロー図Flow chart of template determination processing in the third embodiment 第3実施形態におけるサブテンプレートのレイアウトフロー図Sub template layout flow diagram in the third embodiment 第3実施形態におけるBreak処理の例を示す図The figure which shows the example of the Break process in 3rd Embodiment 第4実施形態における外部参照できる条件式のフォーマットを示す図The figure which shows the format of the conditional expression which can be referred externally in 4th Embodiment 第4実施形態における外部条件式の読み込み処理フロー図Flow chart for reading external conditional expressions in the fourth embodiment レイアウト計算時におけるコンテナの集合について説明した図Diagram explaining a set of containers at the time of layout calculation レイアウト最適化処理を説明するための図Diagram for explaining layout optimization processing バリアブルプリントの一例を示した図Figure showing an example of variable print 第3実施形態におけるBreak処理の例を示す図The figure which shows the example of the Break process in 3rd Embodiment

Claims (15)

コンテンツデータを配置するための領域を有する第1および第2ページを用いてレイアウト処理を実行する文書処理装置であって、
前記コンテンツデータを取得する取得手段と、
前記取得手段により取得されたコンテンツデータが前記第1および第2ページの領域から溢れ、かつ、前記第1ページに含まれる領域が第2ページに含まれる領域よりも大きい場合、前記第1および第2ページの領域と前記第1ページに基づいて生成した新たなページの領域とに前記コンテンツデータを配置し、前記取得手段により取得されたコンテンツデータが前記第1および第2ページの領域から溢れ、かつ、前記第2ページに含まれる領域が第1ページに含まれる領域よりも大きい場合、前記第1および第2ページの領域と前記第2ページに基づいて生成した新たなページの領域とに前記コンテンツデータを配置する配置手段と
を有することを特徴とする文書処理装置。
A document processing apparatus that executes layout processing using first and second pages having areas for arranging content data,
Obtaining means for obtaining the content data;
When the content data acquired by the acquisition unit overflows from the areas of the first and second pages and the area included in the first page is larger than the area included in the second page, the first and second The content data is arranged in a two-page area and a new page area generated based on the first page, and the content data acquired by the acquisition unit overflows from the first and second page areas, When the area included in the second page is larger than the area included in the first page, the first and second page areas and a new page area generated based on the second page A document processing apparatus comprising arrangement means for arranging content data.
前記新たなページは、前記取得手段により取得されたコンテンツデータが収まるまで繰り返し生成されることを特徴とする請求項に記載の文書処理装置。 The document processing apparatus according to claim 1 , wherein the new page is repeatedly generated until the content data acquired by the acquisition unit is accommodated. データベースからレイアウトすべきコンテンツデータを抽出するための抽出条件を前記領域に設定する設定手段を更に有し、
前記取得手段は、前記抽出条件を満たすコンテンツデータを前記データベースから取得することを特徴とする請求項1または2に記載の文書処理装置。
A setting means for setting an extraction condition for extracting content data to be laid out from the database in the area;
The acquisition unit, the document processing apparatus according to claim 1 or 2, characterized in that to obtain the contents data satisfying the extraction condition from the database.
前記新たなページは、前記抽出条件が設定された領域を備えることを特徴とする請求項に記載の文書処理装置。 The document processing apparatus according to claim 3 , wherein the new page includes an area in which the extraction condition is set. 前記コンテンツデータは、関連付けられた複数の小領域にテキストデータまたは画像データを挿入することにより得られる小領域群であることを特徴とする請求項1乃至のいずれか1項に記載の文書処理装置。 The content data, document processing according to any one of claims 1 to 4, characterized in that a group of small areas obtained by inserting the text data or image data into a plurality of small regions associated apparatus. 取得手段と配置手段とを有する文書処理装置における、コンテンツデータを配置するための領域を有する第1および第2ページを用いてレイアウト処理を実行するための文書処理方法であって、
前記取得手段が、前記コンテンツデータを取得する取得工程と、
前記配置手段が、前記取得工程により取得されたコンテンツデータが前記第1および第2ページの領域から溢れ、かつ、前記第1ページに含まれる領域が第2ページに含まれる領域よりも大きい場合、前記第1および第2ページの領域と前記第1ページに基づいて生成した新たなページの領域とに前記コンテンツデータを配置し、前記取得工程により取得されたコンテンツデータが前記第1および第2ページの領域から溢れ、かつ、前記第2ページに含まれる領域が第1ページに含まれる領域よりも大きい場合、前記第1および第2ページの領域と前記第2ページに基づいて生成した新たなページの領域とに前記コンテンツデータを配置する配置工程と
を有することを特徴とする文書処理方法。
A document processing method for executing layout processing using first and second pages having areas for arranging content data in a document processing apparatus having an acquisition unit and an arrangement unit,
An obtaining step in which the obtaining means obtains the content data;
When the content data acquired by the acquiring step overflows from the areas of the first and second pages, and the area included in the first page is larger than the area included in the second page, The content data is arranged in a region of the first page and the second page and a region of a new page generated based on the first page, and the content data acquired by the acquisition step is the first and second pages. A new page generated based on the areas of the first and second pages and the second page when the area overflows from the area and the area included in the second page is larger than the area included in the first page. A document processing method comprising: arranging the content data in an area of the document.
前記新たなページは、前記取得工程により取得されたコンテンツデータが収まるまで繰り返し生成されることを特徴とする請求項に記載の文書処理方法。 The document processing method according to claim 6 , wherein the new page is repeatedly generated until the content data acquired in the acquisition step is accommodated. 前記文書処理装置は設定手段を更に有しており、
前記設定手段が、データベースからレイアウトすべきコンテンツデータを抽出するための抽出条件を前記領域に設定する設定工程を更に有し、
前記取得工程では、前記抽出条件を満たすコンテンツデータを前記データベースから取得することを特徴とする請求項6または7に記載の文書処理方法。
The document processing apparatus further includes setting means,
The setting means further includes a setting step for setting an extraction condition for extracting content data to be laid out from a database in the area;
8. The document processing method according to claim 6 , wherein in the obtaining step, content data satisfying the extraction condition is obtained from the database.
前記新たなページは、前記抽出条件が設定された領域を備えることを特徴とする請求項に記載の文書処理方法。 The document processing method according to claim 8 , wherein the new page includes an area in which the extraction condition is set. 前記コンテンツデータは、関連付けられた複数の小領域にテキストデータまたは画像データを挿入することにより得られる小領域群であることを特徴とする請求項6乃至9のいずれか1項に記載の文書処理方法。 The document processing according to any one of claims 6 to 9 , wherein the content data is a small area group obtained by inserting text data or image data into a plurality of associated small areas. Method. コンテンツデータを配置するための領域を有する第1および第2ページを用いてレイアウト処理を実行する文書処理装置としてコンピュータを機能させるためのプログラムであって、
前記コンテンツデータを取得する取得手段と、
前記取得手段により取得されたコンテンツデータが前記第1および第2ページの領域から溢れ、かつ、前記第1ページに含まれる領域が第2ページに含まれる領域よりも大きい場合、前記第1および第2ページの領域と前記第1ページに基づいて生成した新たなページの領域とに前記コンテンツデータを配置し、前記取得手段により取得されたコンテンツデータが前記第1および第2ページの領域から溢れ、かつ、前記第2ページに含まれる領域が第1ページに含まれる領域よりも大きい場合、前記第1および第2ページの領域と前記第2ページに基づいて生成した新たなページの領域とに前記コンテンツデータを配置する配置手段と
してコンピュータを機能させるためのプログラム。
A program for causing a computer to function as a document processing device that executes layout processing using first and second pages having areas for arranging content data,
Obtaining means for obtaining the content data;
When the content data acquired by the acquisition unit overflows from the areas of the first and second pages and the area included in the first page is larger than the area included in the second page, the first and second The content data is arranged in a two-page area and a new page area generated based on the first page, and the content data acquired by the acquisition unit overflows from the first and second page areas, When the area included in the second page is larger than the area included in the first page, the first and second page areas and a new page area generated based on the second page A program for causing a computer to function as arrangement means for arranging content data.
前記新たなページは、前記取得手段により取得されたコンテンツデータが収まるまで繰り返し生成されることを特徴とする請求項11に記載のプログラム。 12. The program according to claim 11 , wherein the new page is repeatedly generated until the content data acquired by the acquisition unit is accommodated. データベースからレイアウトすべきコンテンツデータを抽出するための抽出条件を前記領域に設定する設定手段としてコンピュータを更に機能させ、
前記取得手段は、前記抽出条件を満たすコンテンツデータを前記データベースから取得することを特徴とする請求項11または12に記載のプログラム。
Causing the computer to further function as a setting means for setting extraction conditions for extracting content data to be laid out from the database in the area;
The program according to claim 11 or 12 , wherein the acquisition unit acquires content data satisfying the extraction condition from the database.
前記新たなページは、前記抽出条件が設定された領域を備えることを特徴とする請求項13に記載のプログラム。 The program according to claim 13 , wherein the new page includes an area where the extraction condition is set. 前記コンテンツデータは、関連付けられた複数の小領域にテキストデータまたは画像データを挿入することにより得られる小領域群であることを特徴とする請求項11乃至14のいずれか1項に記載のプログラム。 The program according to any one of claims 11 to 14 , wherein the content data is a small area group obtained by inserting text data or image data into a plurality of associated small areas.
JP2007279382A 2007-10-26 2007-10-26 Document processing apparatus, document processing method, and program Expired - Fee Related JP4549379B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007279382A JP4549379B2 (en) 2007-10-26 2007-10-26 Document processing apparatus, document processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007279382A JP4549379B2 (en) 2007-10-26 2007-10-26 Document processing apparatus, document processing method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2005054534A Division JP4095617B2 (en) 2005-02-28 2005-02-28 Document processing apparatus, document processing method, and computer program

Publications (2)

Publication Number Publication Date
JP2008117393A JP2008117393A (en) 2008-05-22
JP4549379B2 true JP4549379B2 (en) 2010-09-22

Family

ID=39503209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007279382A Expired - Fee Related JP4549379B2 (en) 2007-10-26 2007-10-26 Document processing apparatus, document processing method, and program

Country Status (1)

Country Link
JP (1) JP4549379B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210128A (en) * 2010-03-30 2011-10-20 Dainippon Printing Co Ltd Composition device, small group forming method and small group forming program
JP2014053040A (en) * 2013-11-20 2014-03-20 Canon Inc Information processing device, information processing method, and program
JP6954229B2 (en) * 2018-05-25 2021-10-27 京セラドキュメントソリューションズ株式会社 Image processing device and image forming device
JP7322494B2 (en) * 2019-05-09 2023-08-08 株式会社島津製作所 Analysis instrument reporting device, method and program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61241865A (en) * 1985-04-19 1986-10-28 Hitachi Ltd Document editing device
JPH06187333A (en) * 1992-12-15 1994-07-08 Fuji Xerox Co Ltd Document preparing device
JPH07129658A (en) * 1993-11-02 1995-05-19 Toppan Printing Co Ltd Layout design device
US5845303A (en) * 1994-12-06 1998-12-01 Netpodium, Inc. Document processing using frame-based templates with hierarchical tagging
JP2001067345A (en) * 1999-08-30 2001-03-16 Hitachi Ltd Document preparing device
JP2002297572A (en) * 2001-03-30 2002-10-11 Seiko Epson Corp System and program for creation of digital contents

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61241865A (en) * 1985-04-19 1986-10-28 Hitachi Ltd Document editing device
JPH06187333A (en) * 1992-12-15 1994-07-08 Fuji Xerox Co Ltd Document preparing device
JPH07129658A (en) * 1993-11-02 1995-05-19 Toppan Printing Co Ltd Layout design device
US5845303A (en) * 1994-12-06 1998-12-01 Netpodium, Inc. Document processing using frame-based templates with hierarchical tagging
JP2001067345A (en) * 1999-08-30 2001-03-16 Hitachi Ltd Document preparing device
JP2002297572A (en) * 2001-03-30 2002-10-11 Seiko Epson Corp System and program for creation of digital contents

Also Published As

Publication number Publication date
JP2008117393A (en) 2008-05-22

Similar Documents

Publication Publication Date Title
JP4095617B2 (en) Document processing apparatus, document processing method, and computer program
JP4208858B2 (en) Layout processing method, layout processing apparatus, and layout processing program
JP4756870B2 (en) Document processing apparatus, document processing method, and program
JP4332477B2 (en) Layout adjusting method, apparatus and program
KR100716084B1 (en) Layout adjustment method and apparatus
US7500203B2 (en) Document processing method and system
US9436419B2 (en) Selectively printing portions of a web page based on user selection
JP5252933B2 (en) Document processing apparatus, document processing method, and program
US7814417B2 (en) Document processing method and system therefor
JP4732029B2 (en) Layout determining method, information processing apparatus, and layout determining program
JP4298642B2 (en) Layout processing method, layout processing apparatus, and layout processing program
JP5173246B2 (en) Information processing apparatus, information processing method, and program
JP2005242992A (en) Layout control method, apparatus, and program
JP2008129702A (en) Information processor, control method and control program
US8788936B2 (en) Information processing apparatus and method
US20100131566A1 (en) Information processing method, information processing apparatus, and storage medium
US20090276693A1 (en) Document processing apparatus and document processing method
JP4549379B2 (en) Document processing apparatus, document processing method, and program
JP2006107038A (en) Information processor, document editing method, storage medium storing computer-readable program, and program
JP2006293430A (en) Information processor and information processing method
JP2008305414A (en) Layout control method, layout control apparatus, and layout control program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091214

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100329

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100525

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

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

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

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees