JP6214347B2 - Information processing apparatus, information processing method, and program - Google Patents

Information processing apparatus, information processing method, and program Download PDF

Info

Publication number
JP6214347B2
JP6214347B2 JP2013231348A JP2013231348A JP6214347B2 JP 6214347 B2 JP6214347 B2 JP 6214347B2 JP 2013231348 A JP2013231348 A JP 2013231348A JP 2013231348 A JP2013231348 A JP 2013231348A JP 6214347 B2 JP6214347 B2 JP 6214347B2
Authority
JP
Japan
Prior art keywords
document
arrangement
objects
information processing
character
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
JP2013231348A
Other languages
Japanese (ja)
Other versions
JP2015090674A (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 JP2013231348A priority Critical patent/JP6214347B2/en
Publication of JP2015090674A publication Critical patent/JP2015090674A/en
Application granted granted Critical
Publication of JP6214347B2 publication Critical patent/JP6214347B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • User Interface Of Digital Computer (AREA)

Description

本発明は、情報処理装置、情報処理方法及びプログラムに関する。   The present invention relates to an information processing apparatus, an information processing method, and a program.

従来、ドキュメントの構成が変化する場合、その変化に従ってコンテンツの配置を変える技術、例えば印刷時に綴じ位置の変化に伴って、相対的にページ番号の配置を変える技術があった。   Conventionally, when the configuration of a document changes, there has been a technique for changing the arrangement of contents according to the change, for example, a technique for relatively changing the arrangement of page numbers in accordance with a change in binding position during printing.

特開2007−317225号公報JP 2007-317225 A

特許文献1の技術は、作成文書の範囲を指定し、指定箇所の縦書き、横書きの変換を行っている。
しかしながら、先行技術は作成文書のテキスト部分の縦書き、横書き情報の変換は行うが、テキストに合わせた図や表等の配置の変更は行えなかった。
The technique of Patent Document 1 designates a range of a created document, and performs vertical writing and horizontal writing conversion of a specified portion.
However, although the prior art converts the vertical writing and horizontal writing information of the text portion of the created document, it cannot change the arrangement of a figure, a table, or the like according to the text.

そこで、本発明の情報処理装置は、文書の文字の流れる方向を設定する設定手段と、前記文書のオブジェクトの並びを検知する検知手段と、前記設定手段により設定された前記文書の文字の流れと前記検知手段により検知された前記文書のオブジェクトの並びとが一致しない場合、前記文字の流れと前記オブジェクトの並びとが一致するように前記オブジェクトの並びを変更する変更手段と、を有する。   Therefore, an information processing apparatus according to the present invention includes a setting unit that sets a direction in which characters of a document flow, a detection unit that detects an arrangement of objects of the document, and a character flow of the document set by the setting unit. And changing means for changing the arrangement of the objects so that the character flow matches the arrangement of the objects when the arrangement of the objects of the document detected by the detection means does not match.

本発明によれば、文書の動的な変化に応じて好適に図や表等のオブジェクトのレイアウトを行うことができる。   According to the present invention, it is possible to suitably perform layout of objects such as diagrams and tables in accordance with dynamic changes of a document.

情報処理装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of information processing apparatus. 処理の概要を説明するための図である。It is a figure for demonstrating the outline | summary of a process. データ変換に係る情報処理の一例を示すフローチャートである。It is a flowchart which shows an example of the information processing which concerns on data conversion. 文字の流れる方向を設定するための情報処理の一例を示すフローチャートである。It is a flowchart which shows an example of the information processing for setting the direction through which a character flows. 図の反転処理の概要を示す図である。It is a figure which shows the outline | summary of the inversion process of a figure. 図の上に文字を重ねて表示している一例を示す図である。It is a figure which shows an example which has superimposed and displayed the character on the figure. 図の反転と、図の上に文字領域が設定されていた場合、その領域の反転とを行う情報処理の一例を示すフローチャートである。It is a flowchart which shows an example of the information processing which performs inversion of a figure and the inversion of the area | region when the character area is set on the figure. HTMLとCSSとの表記の一例を示す図である。It is a figure which shows an example of the description of HTML and CSS.

以下、本発明の実施形態について図面に基づいて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、情報処理装置のハードウェア構成の一例を示す図である。
情報処理装置101は、キーボード122やマウス123を始めとするポインティングデバイスからI/Oインタフェイス115を介してデータの入力、編集操作をすることで処理を行う。
情報処理装置101は、典型的に少なくとも一つのプロセッサーユニット(CPU)111と半導体のランダムアクセスメモリ(RAM)やリードオンリーメモリ(ROM)から構成されるメモリユニット116とを含んでいる。
ディスプレイ装置121は、ビデオインタフェイス114と接続され画面への出力を行う。
ネットワークインタフェイス112は、情報処理装置101をネットワークに接続してシステムの他のコンピュータ装置につなげることができる。そのネットワーク接続の典型はローカルエリアネットワーク(LAN)、又はワイドエリアネットワーク(WAN)である。
また、情報処理装置101は、ハードディスクやSSDを始めとする記憶装置113も含んでおり、ここにオペレーションシステムのプログラムが格納される。
CPU111が、記憶装置113等に記憶されているプログラムに基づいて処理を実行することによって、情報処理装置の機能及び後述するフローチャートの処理が実現される。なお、入力手段は、キーボード122やマウス123に限らず、表示手段と一体をなすタッチパネル等であってもよい。
FIG. 1 is a diagram illustrating an example of a hardware configuration of the information processing apparatus.
The information processing apparatus 101 performs processing by inputting and editing data from a pointing device such as a keyboard 122 and a mouse 123 via the I / O interface 115.
The information processing apparatus 101 typically includes at least one processor unit (CPU) 111 and a memory unit 116 including a semiconductor random access memory (RAM) and a read only memory (ROM).
The display device 121 is connected to the video interface 114 and outputs to the screen.
The network interface 112 can connect the information processing apparatus 101 to a network and connect to another computer apparatus of the system. A typical network connection is a local area network (LAN) or a wide area network (WAN).
The information processing apparatus 101 also includes a storage device 113 such as a hard disk or an SSD, in which an operation system program is stored.
The CPU 111 executes processing based on a program stored in the storage device 113 or the like, thereby realizing the functions of the information processing device and the processing of a flowchart described later. The input means is not limited to the keyboard 122 and the mouse 123, and may be a touch panel integrated with the display means.

なお、特に断らない限り以下に示す実施形態の機能が実行されるのであれば、単体の機器であっても複数の機器から成るシステムであってもよい。又は、実行されるソフトウェアがコンピュータのシステムに組み込まれたプリンタドライバであっても、又はプリンタ等の印刷装置上で動作するオペレーティングシステムに組み込まれるものであってもよい。
本明細書では電子書籍の一例としてIDPF(国際電子出版フォーラム)が普及促進している電子書籍用のファイルフォーマットであるePubを挙げて説明を行う。この際、Open Container Format (OCF)に準拠、又は同等の構造を持つファイルフォーマットであるなら特にその種類は問わないものとする。
また、スタイルシートの値を取得、設定する場合は、特に断らない限り、原則指定したコンテンツのタグに対応したスタイルシートのクラス又はIDに対する操作を指すものとする。
以下に示す実施形態の説明を行う前に、文字の流れる方向に関する説明を行う。文字の流れる方向とは、文字がページの左から右へ進むか、右から左へ進むかを示しており、右から左の場合は左方向、左から右の場合は右方向に流れる、のように表記する。より具体的な定義は空白のページに文字を流し込む場合、文字の開始位置と終了位置とが左右どこにあるかで判定が行われる。例えば、横書きの日本語の場合、開始地点は左上、終了地点は右下になるため右に流れる文書として分類される。
As long as the functions of the following embodiments are executed unless otherwise specified, a single device or a system composed of a plurality of devices may be used. Alternatively, the software to be executed may be a printer driver incorporated in a computer system or an operating system operating on a printing apparatus such as a printer.
In this specification, as an example of an electronic book, ePub, which is a file format for an electronic book promoted by IDPF (International Electronic Publishing Forum), will be described. At this time, the file format is not particularly limited as long as the file format conforms to the Open Container Format (OCF) or has an equivalent structure.
Also, when acquiring and setting a style sheet value, unless otherwise specified, in principle, it refers to an operation on a style sheet class or ID corresponding to a specified content tag.
Before describing the embodiment described below, a description will be given of the direction in which characters flow. The direction of the flow of characters indicates whether the characters move from left to right or right to left on the page. The flow from left to right is from right to left, and right from left to right. It describes as follows. More specifically, when a character is poured into a blank page, a determination is made as to where the start position and end position of the character are on the left and right. For example, in horizontal Japanese, the start point is at the upper left and the end point is at the lower right, so it is classified as a document that flows to the right.

<実施形態1>
ここでは、本実施形態のデータ変換処理に関して説明を行う上での、処理の概要を、図2を用いて説明する。図2は、処理の概要を説明するための図である。
まず、ページ301は横書きであり、右に流れる文書である。このページ301のテキスト部304が縦書きに変換されるとページ302になり、左に流れる文書となる。本実施形態では、まず、このように文字の流れる方向の切り替えが行われる。
加えて本実施形態では、図の並び方向の切り替えが行われる。先ほどの例ではページ301は左から右に文字が流れており、図も306、307の並び順でよかった。しかし、ページ302では文字の流れが右から左になったため、2番目に該当する308の方が先に出てくることになってしまう。このため、本実施形態では図の並びも文字の流れる方向に合わせ、ページ303のように図も310、309と逆に並ぶよう変換が行われる。
図や表は、ページ内のオブジェクトの一例である。
<Embodiment 1>
Here, an outline of the process for explaining the data conversion process of the present embodiment will be described with reference to FIG. FIG. 2 is a diagram for explaining the outline of the processing.
First, the page 301 is a horizontally written document that flows to the right. When the text portion 304 of this page 301 is converted to vertical writing, it becomes a page 302, which becomes a document that flows to the left. In the present embodiment, first, the direction in which characters flow is switched as described above.
In addition, in the present embodiment, the arrangement direction of the drawings is switched. In the previous example, characters flowed from the left to the right on the page 301, and the order of 306 and 307 was also good in the figure. However, on page 302, the flow of characters changes from right to left, so the second corresponding 308 comes out first. For this reason, in the present embodiment, conversion is performed so that the arrangement of the figures is also arranged in the reverse direction of 310 and 309 as in the page 303 in accordance with the flowing direction of the characters.
A figure or table is an example of an object in a page.

図3は、データ変換に係る情報処理の一例を示すフローチャートである。
説明を行う上で、まず図2に表示されているページ301とHTML316との対応関係に関して説明する。ページ301のコンテンツ部分に該当する部分がHTML316であり、テキストのコンテンツはdivタグ312、イメージのコンテンツはdivタグ313から成る。ここでdivタグ312はページ301のテキスト部304と対応している。また、divタグ313はイメージ部305と対応している。なお、divタグ313における「display: oeb−page−foot」の定義により、イメージ部305はページ下方に配置されている。ここでの定義は、一例として挙げているだけで「position: absolute, bottom:0px」等の絶対位置指定を始めとする、何れの位置指定方法を用いてページ下部に配置されていても同様の意味を持つ。
FIG. 3 is a flowchart illustrating an example of information processing related to data conversion.
In the description, first, the correspondence relationship between the page 301 and the HTML 316 displayed in FIG. 2 will be described. The portion corresponding to the content portion of the page 301 is HTML 316, the text content is composed of the div tag 312, and the image content is composed of the div tag 313. Here, the div tag 312 corresponds to the text portion 304 of the page 301. The div tag 313 corresponds to the image unit 305. Note that the image unit 305 is arranged at the bottom of the page according to the definition of “display: oeb-page-foot” in the div tag 313. The definition here is only given as an example, and it is the same even if it is placed at the bottom of the page using any position designation method including absolute position designation such as “position: absolute, bottom: 0 px”. Meaningful.

ステップS201では、CPU111は、例えば、ユーザ操作等に基づいて、設定情報(設定の値)の取得を行う。ここでの設定情報とは、ePubのデータ変換に必要なデータを指し、文字の流れる方向を変える設定情報もここに含まれる。より具体的には先ほどの縦書きと横書きの切り替えや、表示言語の切り替え等が文字の流れる方向を変える設定情報に該当する。
ステップS202では、CPU111は、変換対象となるePubのドキュメントを開く処理を行う。この処理はePubのドキュメントをメモリユニット116にロードし、本文であるXMLファイルやHTMLファイルと設定であるCSSファイルとの両方を参照、編集を可能とすることを指す。必要であれば、CPU111は、テンポラリファイルとして記憶装置113へのコピーや、Zip解凍する等の処理を行ってもよい。
ステップS203では、CPU111は、文字の流れる方向を設定する。この処理においてCPU111は、ページ301からページ302までの結果を得る。この処理の詳細は後述する図4等を用いて説明する。
In step S201, the CPU 111 acquires setting information (setting value) based on, for example, a user operation. The setting information here refers to data necessary for ePub data conversion, and includes setting information for changing the direction in which characters flow. More specifically, the switching between the vertical writing and the horizontal writing, the switching of the display language, etc. corresponds to the setting information for changing the direction in which the characters flow.
In step S202, the CPU 111 performs processing for opening an ePub document to be converted. This process means that an ePub document is loaded into the memory unit 116, and both an XML file or HTML file as a main body and a CSS file as a setting can be referred to and edited. If necessary, the CPU 111 may perform processing such as copying to the storage device 113 as a temporary file or decompressing the Zip.
In step S203, the CPU 111 sets the direction in which characters flow. In this process, the CPU 111 obtains the results from page 301 to page 302. Details of this processing will be described with reference to FIG.

ステップS204では、CPU111は、本文であるHTMLファイルから、図、表の情報の読み出しを行う。ここでの読み出し単位は、連続して並んでいるものや図2のdivタグ313のようにひとくくりのグループとして定義されているものを差し、一つとは限らない。
ステップS205では、CPU111は、図の並びの検知を行う。CPU111は、文字の流れる方向と同様に図がページに対してどちらの方向に並んでいるかを検知する。図2のページ301の例ではイメージ部305に対応するdivタグ313内のイメージはCSS317の定義318を指定している。定義318では「float:left」が指定されており、左詰めにコンテンツが配置されていくため、CPU111は、イメージ部305は左から右へ図が並んでいると検知する。
ステップS206では、CPU111は、ステップS203で設定した文字の流れる方向とステップS205で検知した図の並びとが一致するかどうかを判定する。一致している場合は、CPU111は、そのまま次の処理であるステップS208に移行する。一致していない場合は、CPU111は、図の並びを変更するためステップS207に移行する。
In step S <b> 204, the CPU 111 reads out information of a figure and a table from an HTML file that is a text. Here, the number of read units is not limited to one as long as they are continuously arranged or defined as a group of groups such as the div tag 313 in FIG.
In step S205, the CPU 111 detects the arrangement of the figures. The CPU 111 detects in which direction the figure is arranged with respect to the page in the same manner as the direction in which characters flow. In the example of the page 301 in FIG. 2, the image in the div tag 313 corresponding to the image part 305 specifies the definition 318 of the CSS 317. In the definition 318, “float: left” is specified, and the contents are arranged left-justified, so the CPU 111 detects that the image unit 305 is aligned from left to right.
In step S206, the CPU 111 determines whether or not the character flow direction set in step S203 matches the figure sequence detected in step S205. If they match, the CPU 111 proceeds directly to step S208, which is the next process. If they do not match, the CPU 111 proceeds to step S207 to change the arrangement of the figures.

ステップS207では、CPU111は、図の並び順を変更する。図2のイメージ部305を変更する場合、CPU111は、対応するdivタグ313内のクラスに対応するCSSの定義318を検出し、内部の定義の書き換えを行う。図2の例では、CPU111は、「float: left」から「float: right」に書き変える。
また、図2の「float: left」等の詰める方向の指定は使用せず、tableタグを利用して、例えば透明な1行2列の表の中に2つの図をそれぞれ割り当て、左右に並べられている場合がある。このようなCSSの定義が使用できない場合、CPU111は、HTML316を書きかえることで図の並びを入れ替える。CPU111は、HTML316ではイメージタグ315、314の順になるようにHTMLファイルを書き変える。なお、この変換処理例では左右の置き換えのみであるが、横書きと縦書きとが入れ替わる際、CPU111は、図の並びを90度置き換える処理としてもよい。例えば、横書きでは図の並びは左、右の順に並ぶが、CPU111は、縦書きに変更された際は右に90度変換し、上、下の順に並べる。なお、この変換に合わせて、CPU111は、上下左右のマージンも「上、右、下、左」に指定されていたものを、「右、下、左、上」と変更してもよい。
ステップS208では、CPU111は、本文中に図や表が残っているか否かを判定し、残っている場合は、再度、図の取得処理(ステップS204)に移行し、図や表が残っていない場合は、図3に示す処理を終了する。
以上の処理を行うことでCPU111は、ePub文書の変換を行う。
In step S207, the CPU 111 changes the arrangement order of the drawings. When the image unit 305 in FIG. 2 is changed, the CPU 111 detects the CSS definition 318 corresponding to the class in the corresponding div tag 313 and rewrites the internal definition. In the example of FIG. 2, the CPU 111 rewrites “float: left” to “float: right”.
In addition, the designation of the filling direction such as “float: left” in FIG. 2 is not used, and two tables are allocated in a transparent 1-by-2 table, for example, using the table tag, and arranged side by side. May have been. When such a CSS definition cannot be used, the CPU 111 replaces the arrangement of the figures by rewriting the HTML 316. The CPU 111 rewrites the HTML file so that the image tags 315 and 314 are in this order in the HTML 316. In this conversion processing example, only left and right replacement is performed, but when horizontal writing and vertical writing are switched, the CPU 111 may perform processing for replacing the arrangement of the figures by 90 degrees. For example, in horizontal writing, the charts are arranged in the order of left and right, but when changed to vertical writing, the CPU 111 converts them 90 degrees to the right and arranges them in the order of top and bottom. In accordance with this conversion, the CPU 111 may change the “up, right, down, left” designated as “up, right, down, left” to “right, down, left, up”.
In step S208, the CPU 111 determines whether or not a figure or table remains in the text, and if it remains, the process proceeds to the figure acquisition process (step S204) again, and no figure or table remains. In the case, the process shown in FIG.
By performing the above processing, the CPU 111 converts the ePub document.

図4は、文字の流れる方向を設定するための情報処理の一例を示すフローチャートである。
ステップS401では、CPU111は、言語の切り替えが設定されているかどうかを判定し、切り替える必要がある場合は、ステップS402に移行し、切り替える必要の無い場合はステップS403に移行する。なお、この際の判断は図3のフローチャートのステップS201で設定された値に基づき行われるものとする。
ステップS402では、CPU111は、文書内のテキストの置き換えを行う。置き換えを行う場合、CPU111は、予め用意しておいた、別言語の本文HTMLとの置き換えを行う。それとは別に、一つのHTMLファイル内に複数の言語が組み込まれている場合、CPU111は、言語の切り替え部の定義の変更を行う。他にも翻訳エンジンを用いて直接HTMLファイルを書き変える場合、CPU111は、本文の抽出を行い、翻訳エンジンにかけた上で、結果を本文と置き換える。
FIG. 4 is a flowchart illustrating an example of information processing for setting a direction in which characters flow.
In step S401, the CPU 111 determines whether or not language switching is set. If it is necessary to switch, the process proceeds to step S402. If it is not necessary to switch, the process proceeds to step S403. Note that this determination is made based on the value set in step S201 in the flowchart of FIG.
In step S402, the CPU 111 replaces text in the document. When the replacement is performed, the CPU 111 performs replacement with the text HTML of another language prepared in advance. On the other hand, when a plurality of languages are incorporated in one HTML file, the CPU 111 changes the definition of the language switching unit. In addition, when the HTML file is directly rewritten using a translation engine, the CPU 111 extracts the text, applies it to the translation engine, and replaces the result with the text.

ステップS403では、CPU111は、縦書きと横書きとの切り替えを行うかどうかを判定する。これもステップS401と同様、CPU111は、図3のフローチャートのステップS201で設定された値に基づいて行う。CPU111は、縦書きと横書きとの切り替えを行うと判定すると、ステップS404に進み、切り替えを行わないと判定すると、図4に示す処理を終了する。
ステップS404では、CPU111は、本文の解析を行う。HTML316の例では、CPU111は、本文を読み出し、コンテンツとそれに紐付いたCSS317の定義との対応関係の解析を行う。CPU111は、次のステップで置き換えるCSS定義部分を明らかにすると共に、置き換え対象とならない本文部分があるかどうかも解析する。ここでの置き換え対象とならない本文部分とは、そもそも元の本文とは違う部分であり、横書き本文内の縦書き部分や元々一部だけ言語が異なっている部分のことを指す。
In step S403, the CPU 111 determines whether to switch between vertical writing and horizontal writing. Similarly to step S401, the CPU 111 performs this based on the value set in step S201 of the flowchart of FIG. If the CPU 111 determines that switching between vertical writing and horizontal writing is to be performed, the process proceeds to step S404, and if it is determined that switching is not to be performed, the processing illustrated in FIG.
In step S404, the CPU 111 analyzes the text. In the example of HTML 316, the CPU 111 reads the text and analyzes the correspondence between the content and the definition of the CSS 317 associated with the content. The CPU 111 clarifies the CSS definition part to be replaced in the next step and analyzes whether there is a body part that is not a replacement target. The part of the text that is not subject to replacement here is a part that is different from the original text in the first place, that is, a vertically written part in the horizontally written text or a part that is originally different in language.

ステップS405では、CPU111は、ステップS404の解析結果を基に、CSS定義の書き換えを行う。図2の例では、単純に文書全体を書き変える場合、CPU111は、bodyタグ311にCSS定義319を適用すればよい。より具体的には、CPU111は、bodyタグ311の「<body>」の表記を「<body class=""textArea">」とする。この際、CPU111は、直接スタイル指定を行う「<body style="" writing−mode: vertical−rl">」の記載を用いてもよい。また、CPU111は、適用範囲も本文全体であるbodyタグ311を指定せず、本文のテキスト部を示すdivタグ312を始めとする本文部分全てのテキスト部を示すタグを書き変えてもよい。
以上の処理を行うことで、文字の流れる方向の設定が行われる。
In step S405, the CPU 111 rewrites the CSS definition based on the analysis result in step S404. In the example of FIG. 2, when simply rewriting the entire document, the CPU 111 may apply the CSS definition 319 to the body tag 311. More specifically, the CPU 111 designates “<body>” of the body tag 311 as “<body class =“ “textArea”> ””. At this time, the CPU 111 may use a description of “<body style =“ ”writing-mode: vertical-rl”> ”that directly specifies the style. Further, the CPU 111 may rewrite the tags indicating the text part of all body parts including the div tag 312 indicating the text part of the body without specifying the body tag 311 whose application range is the whole body.
By performing the above processing, the direction in which characters flow is set.

<実施形態2>
実施形態1では、文字の流れる方向に合わせて図の並びを入れ替えたが、場合によっては配置を入れ替えるだけでは、読みにくくなってしまう場合等がある。それらに関して、図5、図6を使って説明する。
図5において、イメージ601、602を単に入れ替えた場合、結果603のような結果となる。このように並んだ図が図形のように組み合わさっている場合や、例えば右の図に左の図を指す矢印が入っている等、左右で対応関係ができている場合は、位置を並べ替えただけでは不都合を生じることがある。
また、図6は、図の上に文字を重ねて表示している一例を示す図である。特にイメージ701は図の上に領域702のような多角形の文字領域が設定されているため、文字も領域702の内部に収まるようにレイアウトされる。この際、文字を縦書きに変更するとイメージ703に見られるように文の始まり部分が改行ばかりになり、読みにくくなってしまう。
<Embodiment 2>
In the first embodiment, the arrangement of the figures is changed in accordance with the direction in which the characters flow. However, in some cases, it may be difficult to read by simply changing the arrangement. These will be described with reference to FIGS.
In FIG. 5, when the images 601 and 602 are simply replaced, a result like a result 603 is obtained. When the diagrams arranged in this way are combined like a figure, or when there is a correspondence between the left and right, for example, the right diagram has an arrow pointing to the left diagram, the positions are rearranged. Simply doing so can cause inconvenience.
Moreover, FIG. 6 is a figure which shows an example which has displayed the character superimposed on the figure. In particular, since the image 701 has a polygonal character area such as the area 702 set on the drawing, the characters are also laid out so as to fit within the area 702. At this time, if the character is changed to vertical writing, the beginning of the sentence is just a line feed as seen in the image 703, making it difficult to read.

図7は、上記の問題に対応するために、図の反転と、図の上に文字領域が設定されていた場合、その領域の反転とを行う情報処理の一例を示すフローチャートである。このフローチャートの処理は例えば図3のステップS208の手前で行われる。
ステップS501では、CPU111は、図の反転が必要かどうかの判定を行う。CPU111は、ドキュメントの文字の流れる方向が切り替わっているかどうかで判定を行うが、部分的に別の設定がされていることもある為、図が配置されている章やページ、領域に限定して判定を行ってもよい。CPU111は、図の反転が必要であると判定すると、ステップS502に移行し、図の反転が必要でないと判定すると、ステップS503に移行する。
ステップS502では、CPU111は、図の反転を行う。CPU111は、イメージに対して「transform: scaleX(−1)」を定義することで左右(X軸に対して)反転を行う。また、図5のように左右が重なっている場合、CPU111は、重なり指定部分も反転させる。例えば、イメージ602は左側の一部分をイメージ601と重ねるように指定されており、この際、左側のイメージと40pixel分重ねる場合は「margin−left:−40px」のように左側に40pixelのネガティブマージンが設定される。これを反転し、イメージ604とする場合、CPU111は、左側のマージンと右側のマージンが入れ替わるよう設定を行う。より具体的には、CPU111は、「margin−left:−40px」を「margin−right:−40px」に書き換える。
FIG. 7 is a flowchart showing an example of information processing for performing inversion of the figure and inversion of the area when a character area is set on the figure in order to cope with the above problem. The process of this flowchart is performed, for example, before step S208 in FIG.
In step S501, the CPU 111 determines whether it is necessary to reverse the drawing. The CPU 111 makes a determination based on whether or not the text flow direction of the document has been switched. However, since some other settings may be partially made, the CPU 111 is limited to the chapter, page, or region where the figure is placed. A determination may be made. If the CPU 111 determines that the inversion of the figure is necessary, the process proceeds to step S502. If the CPU 111 determines that the inversion of the figure is not necessary, the process proceeds to step S503.
In step S502, the CPU 111 inverts the figure. The CPU 111 performs left-right inversion (with respect to the X axis) by defining “transform: scaleX (−1)” for the image. When the left and right are overlapped as shown in FIG. 5, the CPU 111 also reverses the overlap designation portion. For example, the image 602 is specified to overlap a part of the left side with the image 601. In this case, when overlapping the left side image by 40 pixels, a negative margin of 40 pixels is set on the left side like “margin-left: −40 px”. Is set. In the case of inverting the image 604, the CPU 111 performs setting so that the left margin and the right margin are interchanged. More specifically, the CPU 111 rewrites “margin-left: −40 px” to “margin-right: −40 px”.

ステップS503では、CPU111は、画像上に文字が配置されているかの判定を行う。CPU111は、画像上に文字が配置されている場合は、ステップS504に移行し、配置されていない場合は、図7に示す処理を終了する。
ステップS504では、CPU111は、画像上の文字領域の反転を行う。領域702を例とすると、ここでは、イメージ705のように領域が指定されている。この際のHTMLとCSSとの表記は図8で、HTML部分は画像の定義801と画像上に配置する文字の定義802となる。また、CSS上では文字の定義802の形状を指定する定義803がされており、これはイメージ705の中の領域706の頂点座標と対応している。本ステップでは、CPU111は、画像の反転に伴い領域の定義を領域708となるよう定義803の書き換えを行う。ここで、「shape−inside: polygon(10px 10px, 150px 10px, 100px 50px, 10px 60px)」となっている定義を例として挙げる。これをCPU111は、「shape−inside: polygon(50px 10px, 190px 10px, 100px 50px, 190px 60px);」と書き換えることで、本ステップの処理を実現する。
以上の処理を行うことで、画像と文字領域との反転が行われる。
In step S503, the CPU 111 determines whether a character is arranged on the image. If a character is placed on the image, the CPU 111 proceeds to step S504, and if not, the process shown in FIG.
In step S504, the CPU 111 inverts the character area on the image. Taking the area 702 as an example, here, an area is designated like an image 705. The notation of HTML and CSS at this time is shown in FIG. 8, and the HTML portion is an image definition 801 and a character definition 802 to be arranged on the image. On the CSS, a definition 803 for designating the shape of the character definition 802 is provided, which corresponds to the vertex coordinates of the area 706 in the image 705. In this step, the CPU 111 rewrites the definition 803 so that the definition of the region becomes the region 708 as the image is inverted. Here, the definition of “shape-inside: polygon (10 px 10 px, 150 px 10 px, 100 px 50 px, 10 px 60 px)” is taken as an example. The CPU 111 rewrites this as “shape-inside: polygon (50px 10px, 190px 10px, 100px 50px, 190px 60px);” to realize the processing of this step.
By performing the above processing, the image and the character area are inverted.

<その他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other embodiments>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

以上、上述した各実施形態によれば、文書の動的な変化に応じて好適に図や表等のオブジェクトのレイアウトを行うことができる。   As described above, according to each of the above-described embodiments, it is possible to suitably lay out objects such as diagrams and tables according to dynamic changes in a document.

以上、本発明の好ましい実施形態について詳述したが、本発明は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。   The preferred embodiments of the present invention have been described in detail above, but the present invention is not limited to such specific embodiments, and various modifications can be made within the scope of the gist of the present invention described in the claims.・ Change is possible.

Claims (13)

文書の文字の流れる方向を設定する設定手段と、
前記文書のオブジェクトの並びを検知する検知手段と、
前記設定手段により設定された前記文書の文字の流れと前記検知手段により検知された前記文書のオブジェクトの並びとが一致しない場合、前記文字の流れと前記オブジェクトの並びとが一致するように前記オブジェクトの並びを変更する変更手段と、
を有する情報処理装置。
Setting means for setting the direction of text flow in the document;
Detecting means for detecting an arrangement of objects of the document;
When the character flow of the document set by the setting unit and the arrangement of the object of the document detected by the detection unit do not match, the character flow and the arrangement of the object match. A change means for changing the arrangement of
An information processing apparatus.
前記変更手段は、文書のページ内でのオブジェクトの配置を入れ替えることによって前記文字の流れと前記オブジェクトの並びとが一致するように前記オブジェクトの並びを変更する請求項1記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the changing unit changes the arrangement of the objects so that the character flow matches the arrangement of the objects by changing the arrangement of the objects in a document page. 前記変更手段は、文書のページ内でのオブジェクトの配置を入れ替えた際に、オブジェクトの反転を行う請求項2記載の情報処理装置。   The information processing apparatus according to claim 2, wherein the changing unit reverses the object when the arrangement of the objects in the document page is changed. 前記変更手段は、文書のページ内でのオブジェクトの配置を入れ替えた際に、文字の流れる方向が切り替わっているか否かに応じて、オブジェクトの反転を行うか否かを判定し、オブジェクトの反転を行うと判定した場合は、オブジェクトの反転を行う請求項3記載の情報処理装置。   The changing means determines whether or not to invert the object according to whether or not the direction in which the characters flow is switched when the arrangement of the objects in the document page is changed, and the object is inverted. The information processing apparatus according to claim 3, wherein when it is determined to perform, the object is inverted. 前記変更手段は、文書のページ内でのオブジェクトの配置を入れ替えた際に、オブジェクトに文字が配置されている場合は、オブジェクトの文字領域を反転させる請求項2記載の情報処理装置。   The information processing apparatus according to claim 2, wherein the change unit reverses the character area of the object when the character is arranged in the object when the arrangement of the object in the page of the document is changed. 前記オブジェクトは、図又は表である請求項1乃至5何れか1項記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the object is a figure or a table. 情報処理装置が実行する情報処理方法であって、
文書の文字の流れる方向を設定する設定ステップと、
前記文書のオブジェクトの並びを検知する検知ステップと、
前記設定ステップにより設定された前記文書の文字の流れと前記検知ステップにより検知された前記文書のオブジェクトの並びとが一致しない場合、前記文字の流れと前記オブジェクトの並びとが一致するように前記オブジェクトの並びを変更する変更ステップと、
を含む情報処理方法。
An information processing method executed by an information processing apparatus,
A setting step for setting the direction of text flow in the document;
A detection step of detecting an array of objects of the document;
If the character flow of the document set by the setting step does not match the object sequence of the document detected by the detection step, the character flow and the object sequence are matched. A change step to change the order of
An information processing method including:
コンピュータに、
文書の文字の流れる方向を設定する設定ステップと、
前記文書のオブジェクトの並びを検知する検知ステップと、
前記設定ステップにより設定された前記文書の文字の流れと前記検知ステップにより検知された前記文書のオブジェクトの並びとが一致しない場合、前記文字の流れと前記オブジェクトの並びとが一致するように前記オブジェクトの並びを変更する変更ステップと、
を実行させるためのプログラム。
On the computer,
A setting step for setting the direction of text flow in the document;
A detection step of detecting an array of objects of the document;
If the character flow of the document set by the setting step does not match the object sequence of the document detected by the detection step, the character flow and the object sequence are matched. A change step to change the order of
A program for running
前記変更ステップでは、文書のページ内でのオブジェクトの配置を入れ替えることによって前記文字の流れと前記オブジェクトの並びとが一致するように前記オブジェクトの並びを変更する請求項8記載のプログラム。   9. The program according to claim 8, wherein in the changing step, the arrangement of the objects is changed so that the character flow and the arrangement of the objects coincide with each other by changing the arrangement of the objects in the page of the document. 前記変更ステップでは、文書のページ内でのオブジェクトの配置を入れ替えた際に、オブジェクトの反転を行う請求項9記載のプログラム。   The program according to claim 9, wherein in the changing step, the object is inverted when the arrangement of the objects in the document page is changed. 前記変更ステップでは、文書のページ内でのオブジェクトの配置を入れ替えた際に、文字の流れる方向が切り替わっているか否かに応じて、オブジェクトの反転を行うか否かを判定し、オブジェクトの反転を行うと判定した場合は、オブジェクトの反転を行う請求項10記載のプログラム。   In the changing step, when the arrangement of the objects in the document page is changed, it is determined whether or not the object is reversed depending on whether or not the direction in which the characters flow is switched. The program according to claim 10, wherein if it is determined to be performed, the object is inverted. 前記変更ステップでは、文書のページ内でのオブジェクトの配置を入れ替えた際に、オブジェクトに文字が配置されている場合は、オブジェクトの文字領域を反転させる請求項9記載のプログラム。   10. The program according to claim 9, wherein, in the changing step, when the arrangement of the objects in the document page is changed, if a character is arranged in the object, the character area of the object is inverted. 前記オブジェクトは、図又は表である請求項8乃至12何れか1項記載のプログラム。   The program according to claim 8, wherein the object is a figure or a table.
JP2013231348A 2013-11-07 2013-11-07 Information processing apparatus, information processing method, and program Expired - Fee Related JP6214347B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013231348A JP6214347B2 (en) 2013-11-07 2013-11-07 Information processing apparatus, information processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013231348A JP6214347B2 (en) 2013-11-07 2013-11-07 Information processing apparatus, information processing method, and program

Publications (2)

Publication Number Publication Date
JP2015090674A JP2015090674A (en) 2015-05-11
JP6214347B2 true JP6214347B2 (en) 2017-10-18

Family

ID=53194145

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013231348A Expired - Fee Related JP6214347B2 (en) 2013-11-07 2013-11-07 Information processing apparatus, information processing method, and program

Country Status (1)

Country Link
JP (1) JP6214347B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001052112A (en) * 1999-08-11 2001-02-23 Fujitsu Ltd Recognizing processing method, information processor and recording medium
JP4943573B2 (en) * 1999-12-09 2012-05-30 アドリア リミテッド ライアビリティ カンパニー Information processing method and apparatus, medium
JP5527947B2 (en) * 2008-05-30 2014-06-25 富士ゼロックス株式会社 Information processing apparatus, information processing system, and information processing program
JP2010123002A (en) * 2008-11-20 2010-06-03 Canon Inc Document image layout device
JP5664055B2 (en) * 2010-09-16 2015-02-04 富士ゼロックス株式会社 Video playback device and video playback program

Also Published As

Publication number Publication date
JP2015090674A (en) 2015-05-11

Similar Documents

Publication Publication Date Title
JP4945813B2 (en) Print structured documents
KR101890831B1 (en) Method for Providing E-Book Service and Computer Program Therefore
US9460089B1 (en) Flow rendering of annotation characters
WO2013109463A1 (en) Low resolution placeholder content for document navigation
US20130326343A1 (en) Systems and methods for developing adaptive layouts for electronic content
JP2014197341A (en) Electronic book production device, electronic book system, electronic book production method and program
CN105468318A (en) Information processing apparatus and display method
US11714953B2 (en) Facilitating dynamic document layout by determining reading order using document content stream cues
US9779091B2 (en) Restoration of modified document to original state
CN104111913A (en) Processing method and device of streaming document
JP6053291B2 (en) Image processing apparatus, image processing apparatus control method, and program
CN109271607A (en) User Page layout detection method and device, electronic equipment
JP2012203491A (en) Document processing device and document processing program
US9619126B2 (en) Computer-readable non-transitory storage medium with image processing program stored thereon, element layout changed material generating device, image processing device, and image processing system
JP6214347B2 (en) Information processing apparatus, information processing method, and program
Pacey Starterator guide
JP2009087270A (en) Image processing device and program
CN114154095A (en) Page picture generation method, device, equipment and storage medium
KR20130105509A (en) Method and apparatus e-book providing
CN105512100A (en) Layout analysis method and device
JP5325744B2 (en) Image processing apparatus and image processing program
US20130104014A1 (en) Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium
JP2011146852A (en) Control apparatus and control method
JP2007299321A (en) Information processor, information processing method, information processing program and information storage medium
JP2006113630A (en) Information display

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161021

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170810

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170919

R151 Written notification of patent or utility model registration

Ref document number: 6214347

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees