JP2012048435A - Page number printing position automatic detection method, and data processing device with the function - Google Patents

Page number printing position automatic detection method, and data processing device with the function Download PDF

Info

Publication number
JP2012048435A
JP2012048435A JP2010189040A JP2010189040A JP2012048435A JP 2012048435 A JP2012048435 A JP 2012048435A JP 2010189040 A JP2010189040 A JP 2010189040A JP 2010189040 A JP2010189040 A JP 2010189040A JP 2012048435 A JP2012048435 A JP 2012048435A
Authority
JP
Japan
Prior art keywords
page number
printing
designated
common margin
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010189040A
Other languages
Japanese (ja)
Inventor
Akiko Shinomiya
明子 篠宮
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.)
Hitachi Solutions Ltd
Original Assignee
Hitachi Solutions Ltd
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 Hitachi Solutions Ltd filed Critical Hitachi Solutions Ltd
Priority to JP2010189040A priority Critical patent/JP2012048435A/en
Publication of JP2012048435A publication Critical patent/JP2012048435A/en
Pending legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)
  • Facsimiles In General (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

【課題】文字または罫線の上にページ番号の印字を行わないようにし、共通余白エリアの中から印字位置を自動的に決定できるページ番号印字位置自動検出方法を提供する。
【解決手段】共通余白検出エリア113に重ね書きすることにより、全ての原稿に於ける共通余白部分を取得するステップと、指定された第1優先指定位置範囲エリア内のページ番号印字位置で、ページ番号の印字が可能であるかの判定を行うステップと、不可能である場合、第1優先指定位置範囲エリア内にページ番号の印字に必要な共通余白部分があるかの判定を行うステップと、ないと判定された場合、優先度順に、他の指定位置範囲エリアで同様の判定を繰り返すステップと、共通余白部分があると判定された場合は、その共通余白部分をページ番号印字位置と決定し、決定又は再指定されたページ番号印字位置を各原稿格納エリア112の該当個所へ設定するステップ等を備える。
【選択図】図1
The present invention provides a page number printing position automatic detection method capable of automatically determining a printing position from a common blank area without printing page numbers on characters or ruled lines.
A page is obtained by overwriting in a common margin detection area 113 to obtain a common margin portion in all originals and a page number printing position in a designated first priority designation position range area. A step of determining whether the number can be printed; a step of determining whether there is a common margin necessary for printing the page number in the first priority designated position range area if not possible; If it is determined that there is no common margin part, the common margin part is determined as the page number printing position. And a step of setting the determined or redesignated page number printing position to a corresponding position in each document storage area 112.
[Selection] Figure 1

Description

本発明は、コピー機またはプリンタ等の各種データ処理装置に備わっているページ番号印字機能に係るページ番号印字位置自動検出方法およびその機能を備えたデータ処理装置に関するものである。   The present invention relates to a page number printing position automatic detection method related to a page number printing function provided in various data processing apparatuses such as a copier or a printer, and a data processing apparatus having the function.

複数のページにわたる様々な書類をまとめてひとつの資料として配布する場合、書類ごとにページ番号が振られていると、ひとつの資料に同一のページ番号が複数存在しページを特定することが困難である。
そのような資料の管理上の便宜を図るため、一般的に複数の書類をひとつの資料として複数部作成する場合は、例えばコピー機のページ番号印字機能により、ページ番号の印字位置を指定すると、コピー対象の全書類に対し指定の形式で指定位置に通し番号でページ番号を印字することが可能である。
When distributing various documents across multiple pages together as a single document, if each document is assigned a page number, it will be difficult to identify the page because there are multiple identical page numbers in one document. is there.
In order to facilitate the management of such materials, generally when creating multiple copies of multiple documents as one material, for example, by specifying the page number printing position by the page number printing function of the copier, It is possible to print page numbers with serial numbers at specified positions in a specified format for all documents to be copied.

本発明に関連する公知技術文献としては下記の先行技術文献がある。
まず、特許文献1では多種多様なページ番号形式の選択が可能であり、選択された形式のページ番号を印刷対象の用紙イメージに表示した状態で、ページ番号を印字する位置の選定を可能とした装置が提案されている。
特許文献2では、1つの電子文書データを構成している文字パターンと線パターンとの配置を示す物理構造データを抽出・分析し、ある特定の単語を見つけて当該単語に隣接する空白領域を認識する方法が提案されている。
特許文献3では、OCR用の特別な用紙以外の文字が記載された用紙上の文字データ等をコンピュータへ入力可能とした文字データ入力方式が提案されている。
There are the following prior art documents as known technical documents related to the present invention.
First, in Patent Document 1, a wide variety of page number formats can be selected, and a page number printing position can be selected in a state where the page number of the selected format is displayed on a paper image to be printed. A device has been proposed.
In Patent Document 2, physical structure data indicating the arrangement of character patterns and line patterns constituting one electronic document data is extracted and analyzed, a specific word is found, and a blank area adjacent to the word is recognized. A method has been proposed.
Patent Document 3 proposes a character data input method in which character data on paper on which characters other than special paper for OCR are written can be input to a computer.

特開平1−121969号公報Japanese Patent Laid-Open No. 1-121969 特開平3−179570号公報JP-A-3-179570 特開平4−343190号公報JP-A-4-343190

従来のコピー機のページ番号印字機能では、余白の範囲が異なる複数の形式の書類をひとつの資料としてまとめる場合でも、ページ番号の印字位置を指定すると全ての書類に対して必ず指定位置にページ番号を印字する。
しかし、原稿にページ番号の印字指定位置と同じ位置に文字または罫線がある場合についてもページ番号で文字を上書き印字してしまい、コピー後にページ番号部分の文字を読み取れなくなってしまうのが現状である。
With the page number printing function of a conventional copier, even when multiple types of documents with different margin ranges are combined as a single document, if the page number printing position is specified, the page number is always in the specified position for all documents. Is printed.
However, even if there is a character or ruled line at the same position as the page number printing specified position on the document, the character is overwritten and printed with the page number, and the character of the page number part cannot be read after copying. .

以上の現状に鑑み、本発明は、ページ番号印字機能を使用して余白の範囲が異なる複数の形式の書類をコピー又はプリントする際に、全書類に対する共通余白エリアを検出し、指定のページ番号印字位置が文字または罫線である場合には、その上にページ番号の印字を行わないよう制御し、検出した共通余白エリアの中から印字位置を自動的に決定することができるページ番号印字位置自動検出方法およびその機能を備えたデータ処理装置を提供することを目的とする。   In view of the above situation, the present invention detects a common margin area for all documents and copies a specified page number when copying or printing a plurality of types of documents with different margin ranges using the page number printing function. If the print position is a character or ruled line, control is performed so that the page number is not printed on it, and the print position can be automatically determined from the detected common blank area. It is an object of the present invention to provide a detection method and a data processing device having the function.

上記の課題を解決すべく、本発明は以下の構成を提供する。
請求項1に係る発明は、読み込んだ原稿を画素の配列に分割してデータメモリ内の原稿格納エリアに格納するステップと、
原稿格納エリアの格納データを共通余白検出エリアに順次重ね書きして、文字または罫線が存在する画素位置の更新を行い、全ての原稿に於ける共通余白部分を取得するステップと、
共通余白検出エリア上で文字または罫線と認識された最左端及び最右端を全ての行に対して取得し、最上端及び最下端を全ての列に対して取得して、共通余白検出エリア上の文字または罫線が存在する画素位置の外枠を取得するステップと、
取得した前記外枠内の共通余白部分を文字または罫線ありに更新するステップと
利用者により指定された第1優先指定位置範囲エリア内のページ番号印字位置で、ページ番号の印字が可能であるかの判定を行うステップと、
指定された第1優先指定位置範囲エリア内のページ番号印字位置で印字が不可能である場合、第1優先指定位置範囲エリア内にページ番号の印字に必要な画素数分、共通余白部分があるかの判定を行うステップと、
第1優先指定位置範囲エリア内でページ番号の印字に必要な画素数分、共通余白部分がないと判定された場合、優先度順に、他の指定位置範囲エリアでページ番号の印字に必要な画素数分、共通余白部分があるか前記判定と同様の判定を繰り返すステップと、
ページ番号の印字に必要な画素数分、共通余白部分がないと判定された場合は、ページ番号印字位置の検出が不可である旨のメッセージを表示装置の画面に表示させるステップと、
利用者により再指定されたページ番号印字位置を取得するステップと、
ページ番号の印字に必要な画素数分、共通余白部分があると判定された場合は、その共通余白部分をページ番号印字位置と決定し、決定したページ番号印字位置、又は、利用者により再指定された前記ページ番号印字位置を表示装置の画面に印字レイアウトとして表示させるステップと、
決定又は再指定されたページ番号印字位置を各原稿格納エリアの該当個所へ設定するステップとを備えたことを特徴とするページ番号印字位置自動検出方法を提供するものである。
In order to solve the above problems, the present invention provides the following configurations.
The invention according to claim 1 divides the read original into an array of pixels and stores it in an original storage area in the data memory;
Sequentially overwriting the data stored in the document storage area in the common margin detection area, updating the pixel position where the character or ruled line is present, and acquiring the common margin portion in all documents;
The leftmost and rightmost edges recognized as characters or ruled lines in the common margin detection area are obtained for all rows, and the topmost and bottommost edges are obtained for all columns, and the common margin detection area is displayed. Obtaining an outer frame of a pixel position where a character or ruled line exists;
Is it possible to print the page number at the step of updating the acquired common margin part in the outer frame with characters or ruled lines and the page number printing position in the first priority designated position range area designated by the user? A step of determining
When printing is not possible at the page number printing position in the designated first priority designation position range area, there are common margin portions in the first priority designation position range area for the number of pixels necessary for printing the page number. A step of determining whether or not
If it is determined that there are no common margins for the number of pixels necessary for printing the page number in the first priority designated position range area, the pixels necessary for printing the page number in the other designated position range area in order of priority. Repeating the same determination as the above determination whether there is a common margin part for several minutes;
When it is determined that there are no common margins for the number of pixels necessary for printing the page number, a message indicating that the page number printing position cannot be detected is displayed on the screen of the display device; and
Obtaining the page number printing position re-designated by the user;
If it is determined that there is a common margin part for the number of pixels required for printing the page number, the common margin part is determined as the page number printing position, and the designated page number printing position or specified again by the user. Displaying the printed page number print position on the screen of the display device as a print layout;
There is provided a method for automatically detecting a page number printing position, comprising the step of setting the determined or redesigned page number printing position to a corresponding position in each document storage area.

請求項2に係る発明は、指定されたページ番号のフォント、フォントサイズ、ページ番号の形式、ページ番号印字位置、及び、読み込んだ原稿枚数に基づき、指定されたページ番号の形式に必要な幅と高さの画素数を算出するステップを備えたことを特徴とする請求項1記載のページ番号印字位置自動検出方法を提供するものである。   The invention according to claim 2 is based on the font of the designated page number, the font size, the page number format, the page number printing position, and the width necessary for the designated page number format. The page number printing position automatic detection method according to claim 1, further comprising a step of calculating the number of pixels of height.

請求項3に係る発明は、原稿の読み込みを行う手段と、
読み込んだ原稿を画素の配列に分割してデータメモリ内の原稿格納エリアに格納する手段と、
原稿格納エリアの格納データを共通余白検出エリアに順次重ね書きして、文字または罫線が存在する画素位置の更新を行い、全ての原稿に於ける共通余白部分を取得する手段と、
共通余白検出エリア上で文字または罫線と認識された最左端及び最右端を全ての行に対して取得し、最上端及び最下端を全ての列に対して取得して、共通余白検出エリア上の文字または罫線が存在する画素位置の外枠を取得する手段と、
取得した前記外枠内の共通余白部分を文字または罫線ありに更新する手段と
利用者により指定された第1優先指定位置範囲エリア内のページ番号印字位置で、ページ番号の印字が可能であるかの判定を行う手段と、
指定された第1優先指定位置範囲エリア内のページ番号印字位置で印字が不可能である場合、第1優先指定位置範囲エリア内にページ番号の印字に必要な画素数分、共通余白部分があるかの判定を行う手段と、
第1優先指定位置範囲エリア内でページ番号の印字に必要な画素数分、共通余白部分がないと判定された場合、優先度順に、他の指定位置範囲エリアでページ番号の印字に必要な画素数分、共通余白部分があるか前記判定と同様の判定を繰り返す手段と、
ページ番号の印字に必要な画素数分、共通余白部分がないと判定された場合は、ページ番号印字位置の検出が不可である旨のメッセージを表示装置の画面に表示させる手段と、
利用者により再指定されたページ番号印字位置を取得する手段と、
ページ番号の印字に必要な画素数分、共通余白部分があると判定された場合は、その共通余白部分をページ番号印字位置と決定し、決定したページ番号印字位置、又は、利用者により再指定された前記ページ番号印字位置を表示装置の画面に印字レイアウトとして表示させる手段と、
決定又は再指定されたページ番号印字位置を各原稿格納エリアの該当個所へ設定する手段と、
前記原稿格納エリアに格納された各原稿のデータを印字すると共に、各原稿の設定された前記ページ番号印字位置に連番でページ番号の印字を行い、書類出力を行う手段と、
前記書類出力を利用者に指定された部数分繰り返し行う手段とを備えたことを特徴とするデータ処理装置を提供するものである。
The invention according to claim 3 includes means for reading a document;
Means for dividing the read original into an array of pixels and storing it in an original storage area in the data memory;
Means for sequentially overwriting the data stored in the document storage area in the common margin detection area, updating pixel positions where characters or ruled lines exist, and acquiring a common margin portion in all documents;
The leftmost and rightmost edges recognized as characters or ruled lines in the common margin detection area are obtained for all rows, and the topmost and bottommost edges are obtained for all columns, and the common margin detection area is displayed. Means for obtaining an outer frame of a pixel position where a character or ruled line exists;
Is it possible to print the page number at the page number printing position in the first priority designation position range area designated by the user and the means for updating the acquired common margin part in the outer frame with characters or ruled lines? Means for determining
When printing is not possible at the page number printing position in the designated first priority designation position range area, there are common margin portions in the first priority designation position range area for the number of pixels necessary for printing the page number. Means for determining whether or not
If it is determined that there are no common margins for the number of pixels necessary for printing the page number in the first priority designated position range area, the pixels necessary for printing the page number in the other designated position range area in order of priority. Means for repeating the same determination as the above determination whether there is a common margin part for several minutes;
Means for displaying on the screen of the display device a message that the detection of the page number printing position is impossible when it is determined that there is no common margin part for the number of pixels necessary for printing the page number;
Means for obtaining the page number printing position re-designated by the user;
If it is determined that there is a common margin part for the number of pixels required for printing the page number, the common margin part is determined as the page number printing position, and the designated page number printing position or specified again by the user. Means for displaying the printed page number print position on the screen of the display device as a print layout;
Means for setting the determined or redesignated page number printing position to the corresponding location in each document storage area;
Means for printing the data of each document stored in the document storage area, printing the page number with a serial number at the set page number printing position of each document, and outputting the document;
And a means for repeating the document output for the number of copies designated by the user.

請求項4に係る発明は、指定されたページ番号のフォント、フォントサイズ、ページ番号の形式、ページ番号印字位置、及び、読み込んだ原稿枚数に基づき、指定されたページ番号の形式に必要な幅と高さの画素数を算出する手段を備えたことを特徴とする請求項3記載のデータ処理装置を提供するものである。   The invention according to claim 4 includes a width necessary for the designated page number format based on the font of the designated page number, the font size, the page number format, the page number printing position, and the number of read originals. 4. A data processing apparatus according to claim 3, further comprising means for calculating the number of pixels of height.

本発明のページ番号印字位置自動検出方法およびその機能を備えたデータ処理装置によれば、次のような効果がある。
(1)ページ番号印字機能を使用して余白の範囲が異なる複数の形式の書類をコピー又はプリントする際に、全書類に対する共通余白エリアを検出することが可能である。
(2)指定のページ番号印字位置が文字または罫線である場合には、その上にページ番号の印字を行わないよう制御し、検出した共通余白エリアの中からページ番号の印字位置を自動的に決定することが可能である。
According to the page number printing position automatic detection method of the present invention and the data processing apparatus having the function, the following effects are obtained.
(1) When a plurality of types of documents having different margin ranges are copied or printed using the page number printing function, a common margin area for all documents can be detected.
(2) If the specified page number printing position is a character or ruled line, control is performed so that the page number is not printed on it, and the page number printing position is automatically selected from the detected common blank area. It is possible to determine.

本発明に係るデータ処理装置を概略的に示す機能ブロック図である。1 is a functional block diagram schematically showing a data processing apparatus according to the present invention. 本発明に係るコピー機能の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the copy function which concerns on this invention. 本発明に係る原稿入力処理の概要を示すフローチャートである。5 is a flowchart showing an outline of document input processing according to the present invention. 本発明に係る共通余白検出エリア更新処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the common margin detection area update process which concerns on this invention. 本発明に係るページ番号印字位置決定処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the page number printing position determination process based on this invention. 本発明に係る左端画素位置取得処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the left end pixel position acquisition process based on this invention. 本発明に係る右端画素位置取得処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the right end pixel position acquisition process based on this invention. 本発明に係る上端画素位置取得処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the upper end pixel position acquisition process which concerns on this invention. 本発明に係る下端画素位置取得処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the lower end pixel position acquisition process which concerns on this invention. 本発明に係る枠内空白画素更新処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the blank pixel update process in a frame which concerns on this invention. 本発明に係る共通余白検出エリアの更新方法を示す具体例の説明図である。It is explanatory drawing of the specific example which shows the update method of the common margin detection area which concerns on this invention. 本発明に係るページ番号印字位置検索処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the page number printing position search process based on this invention. 本発明に係る指定印字位置テーブルのデータ構成図である。It is a data block diagram of the designation | designated printing position table which concerns on this invention. 本発明に係る指定位置範囲テーブルのデータ構成図である。It is a data block diagram of the designated position range table which concerns on this invention. 本発明に係る指定印字位置と指定位置範囲を示す具体例の説明図である。It is explanatory drawing of the specific example which shows the designated printing position and designated position range which concern on this invention. 図15中の下中央エリアを拡大した説明図である。It is explanatory drawing which expanded the lower center area in FIG. 本発明に係る印字位置自動検出処理の概要を示すフローチャートである。5 is a flowchart showing an outline of print position automatic detection processing according to the present invention. 本発明に係る上下方向検出処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the up-down direction detection process based on this invention. 本発明に係る範囲内印字位置検出処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the in-range printing position detection process which concerns on this invention. 本発明に係る印字位置空白チェックの概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the printing position blank check based on this invention.

以下、実施例を示した図面を参照しつつ本発明の実施の形態を説明する。
尚、上記各ステップ又は手段は、コンピュータのCPUが必要なコンピュータプログラムを読み込んで実行することにより実現されるステップ又は手段であり、下記中央処理装置がコンピュータのCPUである。
Hereinafter, embodiments of the present invention will be described with reference to the drawings showing examples.
Each step or means described above is a step or means realized by reading and executing a necessary computer program by the computer CPU, and the following central processing unit is the computer CPU.

図1は、本発明の実施の形態の一例としてコピー処理装置の内部構造を概略的に示す機能ブロック図である。
このコピー処理装置は、利用者により指定されたデータを表示するための表示装置100、表示されたデータに対してメニューを選択するなどの操作を行うためのキーボード101とタッチパネルなどのポインティングデバイス102、原稿を読み込むための書類入力装置103、コピー後の書類を出力するための書類出力装置104、必要な演算処理、制御処理等を行う中央処理装置105、中央処理装置105での処理に必要なプログラムを格納するプログラムメモリ106、中央処理装置105での処理に必要なデータを格納するデータメモリ107、プログラム実行時に必要な指定印字位置のデータを格納している指定印字位置テーブル114、指定印字位置の範囲データを格納している指定位置範囲テーブル115を備えている。
FIG. 1 is a functional block diagram schematically showing the internal structure of a copy processing apparatus as an example of an embodiment of the present invention.
The copy processing apparatus includes a display device 100 for displaying data designated by the user, a keyboard 101 for performing operations such as selecting a menu for the displayed data, and a pointing device 102 such as a touch panel. Document input device 103 for reading a document, document output device 104 for outputting a document after copying, a central processing unit 105 for performing necessary arithmetic processing, control processing, and the like, a program necessary for processing in the central processing unit 105 A program memory 106 for storing data, a data memory 107 for storing data necessary for processing in the central processing unit 105, a specified print position table 114 for storing data of specified print positions necessary for program execution, A designated position range table 115 storing range data is provided.

プログラムメモリ106はメイン処理部108、原稿入力処理部109、印字処理部110、書類出力処理部111を含んでいる。データメモリ107は読み込んだ原稿データを格納するための原稿格納エリア112、全ての原稿に対する共通余白部分の検出に必要となるデータを格納するための共通余白検出エリア113を含んでいる。   The program memory 106 includes a main processing unit 108, a document input processing unit 109, a print processing unit 110, and a document output processing unit 111. The data memory 107 includes a document storage area 112 for storing read document data, and a common margin detection area 113 for storing data necessary for detecting a common margin portion for all documents.

図2は、プログラムメモリ106に格納されるコピー処理のメイン処理の基本的実施例のフローチャートを示す。まず、コピー開始ボタンが選択されたか判定し(ステップ200)、選択された場合、原稿入力処理で原稿の読み込みを行いながら原稿枚数をカウントする(ステップ201)。ページ番号の印字指定があればステップ201の処理で全ての原稿に対する共通余白部分を検出し、最終的なページ番号の印字位置を決定することになる。その後、読み込んだ原稿が存在するかどうか原稿枚数により判定を行い(ステップ202)、存在する場合はステップ201で読み込んだ原稿枚数を1部の資料として、コピー対象のデータと、ページ番号の印字指定があればステップ201で決定したページ番号印字位置に連番でページ番号の印字を行い(ステップ203)、書類出力を行う(ステップ204)。この処理を利用者に指定された部数分繰り返し行う。   FIG. 2 shows a flowchart of a basic embodiment of the main process of the copy process stored in the program memory 106. First, it is determined whether the copy start button has been selected (step 200). If selected, the number of documents is counted while reading the document in the document input process (step 201). If page number printing is designated, a common margin portion for all originals is detected in the process of step 201, and the final page number printing position is determined. Thereafter, it is determined whether or not the read original exists based on the number of originals (step 202). If there is a read original, the number of originals read in step 201 is regarded as one document and the data to be copied and the page number printing designation. If there is a page number, the page number is sequentially printed at the page number printing position determined in step 201 (step 203), and the document is output (step 204). This process is repeated for the number of copies specified by the user.

図3は、ステップ201の原稿入力処理で実行されるサブルーチンプログラムの処理概要を示す。図において、変数Lnはn行目の左端画素位置、Rnはn行目の右端画素位置、Umはm列目の上端画素位置、Dmはm列目の下端画素位置を示す。
本プログラムでは、まずページ番号印字要求があるかの判定を行い(ステップ300)、要求がある場合は、コピー対象となる全ての書類の共通余白部分を検出するための共通余白検出エリア113の初期化(ステップ301)と、Ln、Rn、Um、Dmの初期化(ステップ302)を行う。
FIG. 3 shows an outline of processing of a subroutine program executed in the document input process in step 201. In the figure, the variable Ln is the leftmost pixel position in the nth row, Rn is the rightmost pixel position in the nth row, Um is the uppermost pixel position in the mth column, and Dm is the lowermost pixel position in the mth column.
In this program, it is first determined whether or not there is a page number printing request (step 300). If there is a request, the initial value of the common margin detection area 113 for detecting the common margin portion of all documents to be copied is determined. (Step 301) and initialization of Ln, Rn, Um, and Dm (step 302).

次に、ステップ303で読み込み対象の原稿があるかの判定を行い(ステップ303)、原稿があると判定された場合は、原稿枚数に1を加算(ステップ304)し、ステップ305の原稿読み込み処理にて読み込んだ2次元的な1枚の原稿を画素と呼ばれる小さな点の配列に分割した状態でデータメモリ107における原稿格納エリア112へ格納する。なお、原稿の読み込み処理とデータメモリ107における原稿格納エリア112への格納は、特開平3−179570号公報に含まれる画像入力と同様の処理を行えばよい。   Next, in step 303, it is determined whether there is a document to be read (step 303). If it is determined that there is a document, 1 is added to the number of documents (step 304), and the document reading process in step 305 is performed. Is stored in the document storage area 112 in the data memory 107 in a state of being divided into an array of small dots called pixels. The document reading process and the storage in the document storage area 112 in the data memory 107 may be performed in the same manner as the image input included in Japanese Patent Laid-Open No. 3-179570.

その後、原稿格納エリア112の格納データを共通余白検出エリア113に順次重ね書きして、文字または罫線が存在する画素位置の更新を行い、全ての原稿に於ける、文字または罫線が存在しない共通余白部分を取得する(ステップ306)。ここで、原稿格納エリア112は原稿枚数分の領域が確保されるとし、原稿格納エリア1つにつき原稿1枚のデータが格納されることとする。共通余白検出エリア113は1つの原稿格納エリア112と同じ大きさの領域とする。   Thereafter, the data stored in the document storage area 112 is sequentially overwritten in the common margin detection area 113 to update the pixel position where the character or ruled line exists, and the common margin where no character or ruled line exists in all the documents. A part is acquired (step 306). Here, it is assumed that an area for the number of documents is secured in the document storage area 112, and data for one document is stored for each document storage area. The common margin detection area 113 is an area having the same size as one document storage area 112.

読み込み対象の原稿がなくなるまでステップ304〜306の処理を繰り返し行うと、原稿枚数分のデータが1枚ずつ各原稿格納エリア112へ格納され、全ての原稿格納エリア112の格納データをもとに共通余白検出エリア113が更新されることになる。読み込み対象の原稿がなくなった場合は、原稿枚数がゼロより大きいか判定を行い(ステップ309)、読み込んだ原稿が存在すれば、更新後の共通余白検出エリア113をもとにページ番号印字位置決定処理を行い(ステップ310)、決定したページ番号印字位置を各原稿格納エリア112の該当箇所へ設定する(ステップ311)。   When the processes in steps 304 to 306 are repeated until there are no more originals to be read, data for the number of originals is stored one by one in each original storage area 112 and is common based on the stored data in all original storage areas 112. The margin detection area 113 is updated. When there are no more originals to be read, it is determined whether the number of originals is greater than zero (step 309). If there is a read original, the page number printing position is determined based on the updated common margin detection area 113. Processing is performed (step 310), and the determined page number printing position is set to the corresponding location in each document storage area 112 (step 311).

またステップ300の判定で、ページ番号印字要求がない場合は読み込み対象の原稿があるかの判定を行い(ステップ307)、原稿がある場合はページ番号の印字を行う必要がないため、ステップ308、305を行い、原稿読み込み処理を原稿枚数分、繰り返し行うことになる。   If it is determined in step 300 that there is no page number print request, it is determined whether there is a document to be read (step 307). If there is a document, it is not necessary to print the page number. Step 305 is performed, and the document reading process is repeated for the number of documents.

図4は前記ステップ201の原稿入力処理で呼び出される共通余白検出エリア更新処理(ステップ306)の詳細フローチャートを示す。図において、変数nは原稿格納エリア112の上下方向画素位置、mは左右方向画素位置、Nは原稿格納エリア112に格納されている原稿1枚あたりの領域の高さ、Mはその領域の幅、p(x,y)は画素(x,y)の濃度、BL(x,y)は共通余白検出エリア113上の画素(x,y)の状態を示す。本処理は、原稿を読み込むたびにコピー対象の内容を共通余白検出エリア113の対応する画素位置に更新していくことで、最終的に全ての原稿における共通余白部分を取得することを目的とする。   FIG. 4 is a detailed flowchart of the common margin detection area update process (step 306) called in the original input process of step 201. In the figure, variable n is the vertical pixel position of the document storage area 112, m is the horizontal pixel position, N is the height of the area of one document stored in the document storage area 112, and M is the width of the area. , P (x, y) indicates the density of the pixel (x, y), and BL (x, y) indicates the state of the pixel (x, y) on the common margin detection area 113. The purpose of this process is to update the content of the copy target to the corresponding pixel position in the common margin detection area 113 every time the document is read, thereby finally acquiring the common margin portion in all the documents. .

まずステップ400〜403に従い、原稿格納エリア112の(1,1)から順に参照し、ステップ404で(m,n)が文字または罫線である(p(m,n)>ゼロ)場合は、対応する共通余白検出エリア113上の対応画素位置に1を設定する(ステップ405)。その後、次の画素位置を参照(ステップ406)し、n行目が終わるまでステップ404〜406の処理を同様に行う。また、n行目に関する処理が完了したら(ステップ403)、次の行について処理を行い(ステップ407)、最終的に(M,N)まで同様の処理を繰り返し行う。図4の処理が全て終了した時点で、BL(m,n)=ゼロの画素位置が全ての原稿に対する共通余白部分となる。   First, reference is made sequentially from (1, 1) in the document storage area 112 according to steps 400 to 403, and if (m, n) is a character or a ruled line (p (m, n)> zero) in step 404, it is handled. 1 is set to the corresponding pixel position on the common margin detection area 113 (step 405). Thereafter, the next pixel position is referred to (step 406), and the processing in steps 404 to 406 is similarly performed until the n-th row is completed. When the process for the nth line is completed (step 403), the next line is processed (step 407), and the same process is repeated until (M, N) finally. When all the processes in FIG. 4 are completed, the pixel position of BL (m, n) = 0 is the common margin for all the originals.

図5は前記ステップ201の原稿入力処理で呼び出されるページ番号印字位置決定処理(ステップ310)の処理概要である。まずページ番号印字位置の初期化を行い(ステップ500)、共通余白検出エリア113上で文字または罫線と認識された最も左端にある画素位置と最も右端にある画素位置を全ての行に対して取得し、同様に上端、下端にある画素位置を全ての列に対して取得を行う(ステップ501〜504)。この時点で、共通余白検出エリア113上の文字または罫線が存在する画素位置の外枠を取得できたことになる。   FIG. 5 shows an outline of the page number printing position determination process (step 310) called in the original input process in step 201. First, the page number printing position is initialized (step 500), and the leftmost pixel position and the rightmost pixel position recognized as characters or ruled lines on the common margin detection area 113 are obtained for all lines. Similarly, the pixel positions at the upper end and the lower end are acquired for all the columns (steps 501 to 504). At this point, the outer frame of the pixel position where the character or ruled line on the common margin detection area 113 exists has been acquired.

次に取得した枠内の共通余白部分に対してページ番号印字可能と判断されないように、該当の画素位置の更新処理(ステップ505)を行う。この時点の共通余白検出エリア113をもとに、ページ番号の指定印字位置のエリアに対して共通余白部分があるかの検索処理を行う(ステップ506)。その結果、印字可能フラグがゼロであるかの判定を行い(ステップ507)、ゼロである場合はページ番号印字位置の検出が不可である旨のメッセージを表示装置100の画面に表示させ(ステップ508)、ページ番号印字位置をポインティングデバイス102により利用者に指定させる。その後指定入力されたページ番号印字位置を取得し(ステップ509)、取得したページ番号印字位置を返す(ステップ512)。   Next, update processing of the corresponding pixel position (step 505) is performed so that it is not determined that the page number can be printed on the common blank portion in the acquired frame. Based on the common margin detection area 113 at this time, a search process is performed as to whether there is a common margin portion with respect to the page number designated print position area (step 506). As a result, it is determined whether the printable flag is zero (step 507). If it is zero, a message indicating that the page number print position cannot be detected is displayed on the screen of the display device 100 (step 508). ), The user designates the page number printing position by the pointing device 102. Thereafter, the designated page number printing position is acquired (step 509), and the acquired page number printing position is returned (step 512).

ステップ507で印字可能フラグがゼロ以外である場合は、ページ番号印字位置が検出されたと判断し、検出したページ番号印字位置をステップ510で表示装置100の画面に印字レイアウトとして表示させる。このとき、画面に再指定ボタンと実行ボタンも共に表示させる。再指定ボタンか選択されたかを判定し(ステップ511)、選択された場合はステップ508、509を行う。実行ボタンが選択された場合は、ステップ506で返されたページ番号印字位置を返す(ステップ512)。   If the printable flag is not zero in step 507, it is determined that the page number print position has been detected, and the detected page number print position is displayed on the screen of the display device 100 as a print layout in step 510. At this time, both the redesignation button and the execution button are displayed on the screen. It is determined whether the redesignation button has been selected (step 511), and if selected, steps 508 and 509 are performed. If the execute button is selected, the page number printing position returned in step 506 is returned (step 512).

図6はステップ310のページ番号印字位置決定処理で呼び出される左端画素位置取得処理(ステップ501)の詳細フローチャートを示す。本処理は共通余白検出エリア113のp(1,1)から右方向に順に参照し、mがM以下かつLnが未更新であるかの判定を行い(ステップ603)、条件に該当した場合は処理中の画素位置が文字または罫線であるかの判定を行う(ステップ604)。処理中の画素位置が空白の場合は次の画素位置に対して同様の判定を行い、参照行の中で最初に検出された文字または罫線の画素位置の左右方向画素位置mをLnに設定する(ステップ605)。ステップ603の条件を満たさない場合、つまりLnに値が設定されるか、または、参照行の最後の画素位置まで文字・罫線が検出されなかった場合は、次の行を参照し(ステップ607)、ステップ603〜606と同様の処理を行う。この処理を(M,N)まで繰り返し行う。   FIG. 6 shows a detailed flowchart of the left end pixel position acquisition process (step 501) called in the page number printing position determination process of step 310. This processing refers to the common margin detection area 113 in the right direction from p (1,1) in order, and determines whether m is M or less and Ln is not updated (step 603). It is determined whether the pixel position being processed is a character or a ruled line (step 604). When the pixel position being processed is blank, the same determination is made for the next pixel position, and the left-right pixel position m of the character position of the first detected character or ruled line in the reference line is set to Ln. (Step 605). If the condition of step 603 is not satisfied, that is, if a value is set in Ln or no character / ruled line is detected up to the last pixel position of the reference line, the next line is referred to (step 607). The same processing as in steps 603 to 606 is performed. This process is repeated until (M, N).

図7はステップ310のページ番号印字位置決定処理で呼び出される右端画素位置取得処理(ステップ502)の詳細フローチャートを示す。本処理では、共通余白検出エリア113のp(M,1)から左方向に順に参照し、ステップ703、704において処理中の画素位置が参照行の中で最初に検出した文字または罫線であれば、ステップ705でその画素位置の左右方向画素位置mをRnに設定する。Rnに値が設定されるか、または、参照行の最後の画素位置まで文字・罫線が検出されなかった場合は、次の行を参照し(ステップ707)、ステップ703〜706と同様の処理を行う。この処理を(1,N)まで繰り返し行う。   FIG. 7 shows a detailed flowchart of the right end pixel position acquisition process (step 502) called in the page number printing position determination process of step 310. In this process, reference is made sequentially to the left from p (M, 1) in the common margin detection area 113, and if the pixel position being processed in steps 703 and 704 is the first character or ruled line detected in the reference line, In step 705, the horizontal pixel position m of the pixel position is set to Rn. When a value is set in Rn, or when a character / ruled line is not detected up to the last pixel position of the reference line, the next line is referenced (step 707), and the same processing as in steps 703 to 706 is performed. Do. This process is repeated up to (1, N).

図8はステップ310のページ番号印字位置決定処理で呼び出される上端画素位置取得処理(ステップ503)の詳細フローチャートを示す。本処理は先に述べた図6の左端画素位置取得処理と類似した処理となっており、図6の処理は左から右方向に対して参照中の画素位置が文字または罫線であるかの判定を順に行っているが、本処理は上から下方向に対して同様の処理を行い、上端の画素位置を列ごとに取得する処理になっている。
図9はステップ310のページ番号印字位置決定処理で呼び出される下端画素位置取得処理(ステップ504)の詳細フローチャートを示す。本処理も図7の右端画素位置取得処理と類似した処理となっており、図7の処理は右から左方向に対して参照中の画素位置が文字または罫線であるかの判定を順に行っているが、本処理は下から上方向に対して同様の処理を行い、下端の画素位置を列ごとに取得する処理になっている。
FIG. 8 is a detailed flowchart of the upper end pixel position acquisition process (step 503) called in the page number printing position determination process in step 310. This process is similar to the left end pixel position acquisition process of FIG. 6 described above, and the process of FIG. 6 determines whether the pixel position being referred to is a character or a ruled line from the left to the right. In this processing, the same processing is performed from the top to the bottom, and the upper end pixel position is obtained for each column.
FIG. 9 shows a detailed flowchart of the lower end pixel position acquisition process (step 504) called in the page number printing position determination process of step 310. This process is also similar to the right end pixel position acquisition process of FIG. 7, and the process of FIG. 7 sequentially determines whether the pixel position being referred to is a character or a ruled line from right to left. However, this process is a process for performing the same process from the bottom to the top and obtaining the pixel position of the lower end for each column.

図10はステップ310のページ番号印字位置決定処理で呼び出される枠内空白画素更新処理(ステップ505)の詳細フローチャートを示す。本処理は前記図6〜9の処理で取得したLn、Rn、Um、Dmを使用して、共通余白検出エリア113上の左右方向の文字または罫線がある両端画素位置の間または上下方向の両端画素位置の間にある空白部分(BL(m,n)=ゼロ)についてページ番号の印字を不可とするために、該当部分に「1」を設定して文字または罫線ありとみなすことを目的としている。   FIG. 10 shows a detailed flowchart of the in-frame blank pixel update process (step 505) called in the page number print position determination process of step 310. This process uses the Ln, Rn, Um, and Dm acquired in the processes of FIGS. 6 to 9 and uses the left and right characters or ruled lines on the common margin detection area 113 between both end pixel positions or both ends in the vertical direction. In order to make it impossible to print the page number for the blank part (BL (m, n) = 0) between the pixel positions, the purpose is to set “1” in the corresponding part and consider that there is a character or ruled line. Yes.

まず、共通余白検出エリア113上のBL(1,1)から順に空白であるかの判定を行い(ステップ1000〜1004)、空白である場合は、左右方向画素位置mが左端Lnと右端Rnの間である、または、上下方向画素位置nが上端Umと下端Dmの間である場合(ステップ1005)に、参照中のBL(m,n)に1を設定する(ステップ1006)。その後、次の画素位置について参照し(ステップ1007)、同様の処理(ステップ1003〜1007)を行う。参照行について処理が完了したら(ステップ1003)、次の行を参照し(ステップ1008)、BL(M,N)まで同様の処理を行う。   First, it is determined whether or not the blank is sequentially from BL (1, 1) on the common margin detection area 113 (steps 1000 to 1004). If the blank is blank, the left-right direction pixel position m is the left end Ln and the right end Rn. When the vertical pixel position n is between the upper end Um and the lower end Dm (step 1005), 1 is set to BL (m, n) being referred to (step 1006). Thereafter, the next pixel position is referred to (step 1007), and the same processing (steps 1003 to 1007) is performed. When processing is completed for the reference row (step 1003), the next row is referenced (step 1008), and the same processing is performed up to BL (M, N).

図11はここまでの処理についての具体例として略図で示す。図において、1100はステップ305の原稿読み込み処理で読み込んだ原稿の1ページ目のデータが格納されている原稿格納エリア(1)で、1103は原稿の2ページ目のデータが格納されている原稿格納エリア(2)を示す。また、1101、1104の黒い部分は文字または罫線が存在することを示し、1102、1105の白い部分は空白であることを示す。1106は共通余白検出エリア113を示し、ステップ306の共通余白検出エリア更新処理において、まず原稿格納エリア(1)上の文字または罫線が存在する画素位置に対応する共通余白検出エリア113上の画素位置に1で更新していく。次に原稿格納エリア(2)についても同一の共通余白検出エリア113に対して重ね書きにより更新し、2つの原稿データの更新後の状態が1106となる。   FIG. 11 schematically shows a specific example of the processing so far. In the figure, reference numeral 1100 denotes a document storage area (1) in which data of the first page of the document read in the document reading process in step 305 is stored. Reference numeral 1103 denotes a document storage in which data of the second page of the document is stored. Area (2) is shown. Black portions 1101 and 1104 indicate that characters or ruled lines are present, and white portions 1102 and 1105 indicate blanks. Reference numeral 1106 denotes a common margin detection area 113. In the common margin detection area update process in step 306, first, a pixel position on the common margin detection area 113 corresponding to a pixel position where a character or ruled line exists on the document storage area (1). It will be updated with 1. Next, the document storage area (2) is also updated by overwriting the same common margin detection area 113, and the updated state of the two document data becomes 1106.

その後、ステップ501〜504の処理を行うと、2行目の左端L2には2が設定され、右端R2には図中1108に該当する左右方向の画素位置が設定される。同様に2列目の上端U2には2が設定され、下端D2には図中1109に該当する上下方向の画素位置が設定される。そしてステップ505の枠内空白画素更新処理で図中1110の画素(2,3)のようなU2とD2の間にある、または、L3とR3の間にある画素位置の値を1で更新していく。図中の1107はステップ505の処理が完了した状態を示し、この時点で0である画素位置が共通余白部分であり、ページ番号の印字が可能な位置であることを示す。   Thereafter, when the processing in steps 501 to 504 is performed, 2 is set at the left end L2 of the second row, and the pixel position in the horizontal direction corresponding to 1108 in the drawing is set at the right end R2. Similarly, 2 is set at the upper end U2 of the second column, and the vertical pixel position corresponding to 1109 in the figure is set at the lower end D2. Then, in the frame blank pixel update process in step 505, the value of the pixel position between U2 and D2, or between L3 and R3, such as the pixel (2, 3) of 1110 in the figure, is updated with 1. To go. Reference numeral 1107 in the drawing indicates a state in which the processing in step 505 is completed, and the pixel position that is 0 at this time is the common blank portion, and indicates that the page number can be printed.

図12はステップ310のページ番号印字位置決定処理で呼び出されるページ番号印字位置検索処理(ステップ506)の詳細フローチャートである。本処理では、共通余白検出エリア113をもとに指定のページ番号形式で指定位置の範囲が印字可能であるかの検索を行うことを目的とする。   FIG. 12 is a detailed flowchart of the page number print position search process (step 506) called in the page number print position determination process in step 310. The purpose of this processing is to search whether the range of the designated position can be printed in the designated page number format based on the common margin detection area 113.

図13において、指定印字位置テーブルはページ番号印字位置の始点と終点が印字位置ごとに定義されている。これは利用者によりページ番号印字位置を指定された時に優先的に印字する位置を示す。図13はテーブルの詳細を示しており、1レコードは印字位置1300、優先度1301、位置始点1302、位置終点1303で構成されている。図15は共通余白検出エリア113を示しており、当該図を具体例として説明すると、利用者により指定されたページ番号の印字位置が「下中央」の場合、1504の枠の始点と終点が指定印字位置テーブルに格納されている。1510の下中央エリアを拡大したものが図16であり、指定印字位置は1601に該当する。この枠の始点が1602、終点が1603であり、指定印字位置テーブルの印字位置1300が「下中央」の位置始点1302には1602の画素位置、位置終点1303には1603の画素位置が格納されることになる。ここで、図13の優先度1301にはデフォルトの値が設定されているが、利用者が変更することも可能である。   In FIG. 13, in the designated print position table, the start point and end point of the page number print position are defined for each print position. This indicates a position where printing is preferentially performed when a page number printing position is designated by the user. FIG. 13 shows details of the table, and one record includes a print position 1300, a priority 1301, a position start point 1302, and a position end point 1303. FIG. 15 shows the common margin detection area 113. This figure will be described as a specific example. When the print position of the page number designated by the user is “lower center”, the start point and end point of the frame 1504 are designated. Stored in the print position table. FIG. 16 is an enlarged view of the lower center area 1510, and the designated print position corresponds to 1601. The start point of this frame is 1602, the end point is 1603, the pixel position 1602 is stored in the position start point 1302 where the print position 1300 of the designated print position table is “lower center”, and the pixel position 1603 is stored in the position end point 1303. It will be. Here, although a default value is set for the priority 1301 in FIG. 13, the user can change it.

次に図14における指定位置範囲テーブルは指定印字位置を含むエリアの始点と終点が定義されているテーブルである。テーブル構成は前記の指定印字位置テーブルと類似しており、具体例として図14に示す。1レコードは印字位置1300、優先度1301、範囲始点1400、範囲終点1401で定義されており、印字位置1300に対する優先度1301には、前記の指定印字位置テーブルと同じ値で定義される。範囲始点1400、範囲終点1401は指定位置のエリアについて定義されており、図15で説明すると指定印字位置1504を含む下中央エリア1510の枠の始点と終点、つまり図16の1604、1605の画素位置がテーブルに格納されている。範囲始点1400、範囲終点1401は用紙の大きさにより自動算出され、処理対象の用紙の大きさをもとに値が決定されることとする。   Next, the specified position range table in FIG. 14 is a table in which the start point and end point of the area including the specified print position are defined. The table configuration is similar to the above-described designated print position table, and a specific example is shown in FIG. One record is defined by a print position 1300, a priority 1301, a range start point 1400, and a range end point 1401. The priority 1301 for the print position 1300 is defined by the same value as that in the specified print position table. The range start point 1400 and the range end point 1401 are defined for the area of the designated position. If described with reference to FIG. 15, the frame start point and end point of the lower center area 1510 including the designated print position 1504, that is, the pixel positions of 1604 and 1605 in FIG. Is stored in the table. The range start point 1400 and the range end point 1401 are automatically calculated based on the paper size, and the values are determined based on the size of the paper to be processed.

まず準備処理として、利用者により入力指定されたページ番号のフォント、フォントサイズ、ページ番号の形式、ページ番号印字位置と読み込んだ原稿枚数をもとに、指定されたページ番号の形式に必要な幅xと高さyの画素数(図16参照)を算出する(ステップ1200)。ここで、ページ番号印字位置については一例として「下中央」「下右側」「下左側」「上中央」「上右側」「上左側」から選択可能とする。また、指定のページ番号印字位置に共通余白部分を検出することができず、ページ番号の印字が不可能だった場合に備えて、上記で述べたとおり、あらかじめ各印字位置に対して優先度を設定できるようにし、最初に利用者により指定されたページ番号の印字位置は最も優先度を高くして処理することとする。以下優先度順に行う処理について述べる。   First, as a preparatory process, the width required for the specified page number format based on the page number font, font size, page number format, page number printing position and number of scanned originals specified by the user. The number of pixels of x and height y (see FIG. 16) is calculated (step 1200). Here, as an example, the page number printing position can be selected from “lower center”, “lower right”, “lower left”, “upper center”, “upper right”, and “upper left”. In addition, as described above, a priority is assigned to each print position in advance in case the common page margin cannot be detected at the specified page number print position and the page number cannot be printed. The print position of the page number designated by the user first is processed with the highest priority. Processing performed in order of priority will be described below.

まず優先度1301をもとに指定印字位置テーブルの検索を行い、指定のページ番号印字位置の位置始点1302と位置終点1303を取得する(ステップ1203)。次に指定位置範囲テーブルを検索し、優先度1301をもとにページ番号指定印字位置を含むエリアの範囲始点1400と範囲終点1401を取得する(ステップ1204)。   First, the designated print position table is searched based on the priority 1301, and the position start point 1302 and position end point 1303 of the designated page number print position are obtained (step 1203). Next, the designated position range table is searched, and the range start point 1400 and range end point 1401 of the area including the page number designated print position are acquired based on the priority 1301 (step 1204).

その後、印字位置自動検出処理(ステップ1206)の入力パラメータであるA1、B1にステップ1204で取得したエリアの範囲始点1400の画素位置を設定し、A2、B2に範囲終点1401の画素位置を設定する。またステップ1203で取得した指定のページ番号印字位置の位置始点1302の画素位置をa1、b1に設定し、位置終点1303の画素位置をa2、b2に設定し(ステップ1205)、xにはステップ1200で取得したページ番号の印字に必要な幅の画素数、yにはその高さの画素数を設定し(ステップ1205)、印字位置自動検出処理を行う(ステップ1206)。ステップ1206の処理後に印字可能フラグがゼロであるかの判定を行い(ステップ1207)、ゼロである場合は指定位置を含むエリアでの印字が不可能であるとみなし、次の優先度のエリアについて(ステップ1208)ステップ1202〜1208を繰り返し行う。印字可能フラグがゼロ以外となった時点で、ステップ1206の印字位置自動検出処理で出力されたページ番号印字位置を返す(ステップ1209)。   Thereafter, the pixel position of the range start point 1400 of the area acquired in step 1204 is set to A1 and B1 which are input parameters of the print position automatic detection process (step 1206), and the pixel position of the range end point 1401 is set to A2 and B2. . Further, the pixel position of the position start point 1302 of the designated page number printing position acquired in step 1203 is set to a1 and b1, the pixel position of the position end point 1303 is set to a2 and b2 (step 1205), and step 1200 is set to x. The number of pixels having the width necessary for printing the page number acquired in step S4 and the number of pixels having the height are set in y (step 1205), and print position automatic detection processing is performed (step 1206). After the processing of step 1206, it is determined whether the printable flag is zero (step 1207). If it is zero, it is considered that printing in the area including the designated position is impossible, and the next priority area is determined. (Step 1208) Steps 1202-1208 are repeated. When the printable flag becomes non-zero, the page number print position output in the print position automatic detection process in step 1206 is returned (step 1209).

図17はステップ506のページ番号印字位置検索処理から呼び出される印字位置自動検出処理(ステップ1206)の概要図を示す。まず、全ての入力パラメータを退避する(ステップ1700)。この退避先の変数はそれぞれ図16に示す変数に対応している。退避した情報をもとに、範囲内にページ番号の印字が可能であるかの判定を範囲内印字位置検出処理で行う(ステップ1701)。ここでは、利用者により指定されたページ番号の印字位置で印字可能であるかの検出処理を行うことになる。   FIG. 17 shows a schematic diagram of the print position automatic detection process (step 1206) called from the page number print position search process in step 506. First, all input parameters are saved (step 1700). The save destination variables correspond to the variables shown in FIG. Based on the saved information, it is determined whether the page number can be printed within the range by the in-range print position detection process (step 1701). Here, a process for detecting whether printing is possible at the page number printing position designated by the user is performed.

ステップ1701の処理後に印字可能フラグがゼロかどうかの判定を行い(ステップ1702)、ゼロの場合は指定印字位置での印字が不可能であるとみなし、指定印字位置(図16の1601)を中心としてエリア内(図16の1600)を上方向または下方向に少しずつずらしながら、ページ番号の印字に必要な画素数分、共通余白部分があるかの判定を行う(ステップ1703)。ステップ1703の処理後、印字可能フラグがゼロであるかの判定を行い(ステップ1704)、ゼロである場合、ステップ1703と同様に指定印字位置を中心としてエリア内を左方向または右方向に少しずつずらしながら、共通余白部分があるかの判定を行う(ステップ1705)。その後も同様に印字可能であるかの判定を行い(ステップ1706)、印字不可能であれば指定位置を中心として対角線上に少しずつずらしながら共通余白部分があるかの判定を行う(ステップ1707)。   After the processing in step 1701, it is determined whether the printable flag is zero (step 1702). If it is zero, it is considered that printing at the designated printing position is impossible, and the designated printing position (1601 in FIG. 16) is the center. As shown in FIG. 16, it is determined whether there is a common margin part by the number of pixels necessary for printing the page number while gradually shifting the area (1600 in FIG. 16) upward or downward (step 1703). After the processing in step 1703, it is determined whether the printable flag is zero (step 1704). If it is zero, in the same manner as in step 1703, the area within the area is gradually moved leftward or rightward with the designated print position as the center. While shifting, it is determined whether there is a common margin (step 1705). Thereafter, similarly, it is determined whether printing is possible (step 1706). If printing is impossible, it is determined whether there is a common blank portion while shifting little by little on the diagonal line around the designated position (step 1707). .

ステップ1707の処理後に印字可能フラグがゼロであるかの判定を行い(ステップ1708)、ゼロである場合は処理時点の印字可能フラグとページ番号印字位置を返す(ステップ1709)。また、これまでの処理で印字可能フラグがゼロ以外となった時点で、印字可能とみなし、その時点の処理対象のページ番号印字位置を返す(ステップ1709)。   After the processing in step 1707, it is determined whether the printable flag is zero (step 1708). If it is zero, the printable flag and page number printing position at the time of processing are returned (step 1709). Further, when the printable flag becomes non-zero in the processing so far, it is considered that printing is possible, and the page number printing position to be processed at that time is returned (step 1709).

図18はステップ1206の印字位置自動検出処理から呼び出される上下方向検出処理(ステップ1703)の詳細フローチャートを示す。まず、印字可能フラグがゼロであるかの判定を行い(ステップ1800)、ゼロである場合、始点(sm,sn)から終点(em,en)の検出対象エリアの画素位置を全体的に上方向に1つずらしながら(ステップ1802)、そのエリアに対して共通余白部分であるかの検出処理を行い(ステップ1701)、印字可能フラグがゼロ以外になるか上方向の端Snまでステップ1701の範囲内印字位置検出処理を行う。上方向の端Snまで検出処理が完了し、印字可能フラグがゼロの場合は、検出対象エリアを指定印字位置の位置始点1302の画素位置(a1,b1)、位置終点1303の画素位置(a2,b2)に戻し(ステップ1803)、今度は下方向に1つずつずらしながら(ステップ1805)、共通余白部分であるかの検出処理を行い(ステップ1701)、印字可能フラグがゼロ以外になるか下方向の端Enまでステップ1701の範囲内印字位置検出処理を行う。   FIG. 18 is a detailed flowchart of the vertical direction detection process (step 1703) called from the print position automatic detection process of step 1206. First, it is determined whether or not the printable flag is zero (step 1800). If the flag is zero, the pixel position of the detection target area from the start point (sm, sn) to the end point (em, en) is generally upward. (Step 1802), a process of detecting whether the area is a common blank portion is performed (step 1701), and the range of step 1701 is reached until the printable flag is other than zero or the upper end Sn. The internal print position detection process is performed. When the detection process is completed up to the upper end Sn and the printable flag is zero, the detection target area is set to the pixel position (a1, b1) of the position start point 1302 of the designated print position and the pixel position (a2, b2) of the position end point 1303. Returning to b2) (step 1803), this time, shifting one by one downward (step 1805), the common blank portion is detected (step 1701), and the printable flag is set to a value other than zero or lower. The in-range print position detection process in step 1701 is performed up to the direction end En.

図19はステップ1206の印字位置自動検出処理、ステップ1703の上下方向検出処理(ステップ1701)から呼び出される範囲内印字位置検出処理の詳細フローチャートを示す。まず、ステップ1901の印字位置空白チェックの入力パラメータであるm1、n1に検出対象エリアの位置始点1302の画素位置(sm、sn)を設定し、m2、n2にその位置終点1303の画素位置(em,en)をそれぞれ設定する(ステップ1900)。設定した入力パラメータをもとに印字位置空白チェックを行い(ステップ1901)、出力された印字可能フラグと検出対象エリアであるページ番号印字位置を返す(ステップ1902)。   FIG. 19 shows a detailed flowchart of the in-range print position detection process called from the print position automatic detection process in step 1206 and the vertical direction detection process in step 1703 (step 1701). First, the pixel position (sm, sn) of the position start point 1302 of the detection target area is set in m1 and n1, which are input parameters for the print position blank check in step 1901, and the pixel position (em) of the position end point 1303 is set in m2 and n2. , En) are set respectively (step 1900). A print position blank check is performed based on the set input parameters (step 1901), and the output printable flag and the page number print position which is the detection target area are returned (step 1902).

図20はステップ1701の範囲内印字位置検出処理から呼び出される印字位置空白チェック(ステップ1901)の詳細フローチャートを示す。まず、入力パラメータを退避し(ステップ2000)、印字可能フラグに初期値として印字可能であることを示す1を設定する(ステップ2001)。検出対象エリアの始点から順に参照中の共通余白検出エリア113上のBL(i,j)が文字または罫線であるかの判定を行い(ステップ2007)、文字または罫線である場合は、入力パラメータのエリアを印字不可とみなし、印字可能フラグにゼロを設定する(ステップ2008)。同様の処理を検出対象エリアの終点まで行う。最後にステップ2011で印字可能フラグを返す。   FIG. 20 is a detailed flowchart of the print position blank check (step 1901) called from the in-range print position detection process in step 1701. First, the input parameters are saved (step 2000), and 1 indicating that printing is possible is set as an initial value in the printable flag (step 2001). It is determined whether BL (i, j) on the common margin detection area 113 being referred to in order from the start point of the detection target area is a character or a ruled line (step 2007). The area is regarded as unprintable, and the printable flag is set to zero (step 2008). Similar processing is performed up to the end point of the detection target area. Finally, in step 2011, a printable flag is returned.

100 表示装置
107 データメモリ
112,1100,1103 原稿格納エリア
113,1106 共通余白検出エリア
1108,1109 画素位置
1110 画素
100 Display device 107 Data memory 112, 1100, 1103 Document storage area 113, 1106 Common margin detection area 1108, 1109 Pixel position 1110 pixels

Claims (4)

読み込んだ原稿を画素の配列に分割してデータメモリ内の原稿格納エリアに格納するステップと、
原稿格納エリアの格納データを共通余白検出エリアに順次重ね書きして、文字または罫線が存在する画素位置の更新を行い、全ての原稿に於ける共通余白部分を取得するステップと、
共通余白検出エリア上で文字または罫線と認識された最左端及び最右端を全ての行に対して取得し、最上端及び最下端を全ての列に対して取得して、共通余白検出エリア上の文字または罫線が存在する画素位置の外枠を取得するステップと、
取得した前記外枠内の共通余白部分を文字または罫線ありに更新するステップと
利用者により指定された第1優先指定位置範囲エリア内のページ番号印字位置で、ページ番号の印字が可能であるかの判定を行うステップと、
指定された第1優先指定位置範囲エリア内のページ番号印字位置で印字が不可能である場合、第1優先指定位置範囲エリア内にページ番号の印字に必要な画素数分、共通余白部分があるかの判定を行うステップと、
第1優先指定位置範囲エリア内でページ番号の印字に必要な画素数分、共通余白部分がないと判定された場合、優先度順に、他の指定位置範囲エリアでページ番号の印字に必要な画素数分、共通余白部分があるか前記判定と同様の判定を繰り返すステップと、
ページ番号の印字に必要な画素数分、共通余白部分がないと判定された場合は、ページ番号印字位置の検出が不可である旨のメッセージを表示装置の画面に表示させるステップと、
利用者により再指定されたページ番号印字位置を取得するステップと、
ページ番号の印字に必要な画素数分、共通余白部分があると判定された場合は、その共通余白部分をページ番号印字位置と決定し、決定したページ番号印字位置、又は、利用者により再指定された前記ページ番号印字位置を表示装置の画面に印字レイアウトとして表示させるステップと、
決定又は再指定されたページ番号印字位置を各原稿格納エリアの該当個所へ設定するステップとを備えたことを特徴とするページ番号印字位置自動検出方法。
Dividing the read original into an array of pixels and storing it in an original storage area in the data memory;
Sequentially overwriting the data stored in the document storage area in the common margin detection area, updating the pixel position where the character or ruled line is present, and acquiring the common margin portion in all documents;
The leftmost and rightmost edges recognized as characters or ruled lines in the common margin detection area are obtained for all rows, and the topmost and bottommost edges are obtained for all columns, and the common margin detection area is displayed. Obtaining an outer frame of a pixel position where a character or ruled line exists;
Is it possible to print the page number at the step of updating the acquired common margin part in the outer frame with characters or ruled lines and the page number printing position in the first priority designated position range area designated by the user? A step of determining
When printing is not possible at the page number printing position in the designated first priority designation position range area, there are common margin portions in the first priority designation position range area for the number of pixels necessary for printing the page number. A step of determining whether or not
If it is determined that there are no common margins for the number of pixels necessary for printing the page number in the first priority designated position range area, the pixels necessary for printing the page number in the other designated position range area in order of priority. Repeating the same determination as the above determination whether there is a common margin part for several minutes;
When it is determined that there are no common margins for the number of pixels necessary for printing the page number, a message indicating that the page number printing position cannot be detected is displayed on the screen of the display device; and
Obtaining the page number printing position re-designated by the user;
If it is determined that there is a common margin part for the number of pixels required for printing the page number, the common margin part is determined as the page number printing position, and the designated page number printing position or specified again by the user. Displaying the printed page number print position on the screen of the display device as a print layout;
And a step of setting the determined or redesignated page number printing position to a corresponding location in each document storage area.
指定されたページ番号のフォント、フォントサイズ、ページ番号の形式、ページ番号印字位置、及び、読み込んだ原稿枚数に基づき、指定されたページ番号の形式に必要な幅と高さの画素数を算出するステップを備えたことを特徴とする請求項1記載のページ番号印字位置自動検出方法。   Based on the font of the specified page number, font size, page number format, page number printing position, and the number of scanned documents, the number of pixels of the width and height required for the specified page number format is calculated. The page number printing position automatic detection method according to claim 1, further comprising a step. 原稿の読み込みを行う手段と、
読み込んだ原稿を画素の配列に分割してデータメモリ内の原稿格納エリアに格納する手段と、
原稿格納エリアの格納データを共通余白検出エリアに順次重ね書きして、文字または罫線が存在する画素位置の更新を行い、全ての原稿に於ける共通余白部分を取得する手段と、
共通余白検出エリア上で文字または罫線と認識された最左端及び最右端を全ての行に対して取得し、最上端及び最下端を全ての列に対して取得して、共通余白検出エリア上の文字または罫線が存在する画素位置の外枠を取得する手段と、
取得した前記外枠内の共通余白部分を文字または罫線ありに更新する手段と
利用者により指定された第1優先指定位置範囲エリア内のページ番号印字位置で、ページ番号の印字が可能であるかの判定を行う手段と、
指定された第1優先指定位置範囲エリア内のページ番号印字位置で印字が不可能である場合、第1優先指定位置範囲エリア内にページ番号の印字に必要な画素数分、共通余白部分があるかの判定を行う手段と、
第1優先指定位置範囲エリア内でページ番号の印字に必要な画素数分、共通余白部分がないと判定された場合、優先度順に、他の指定位置範囲エリアでページ番号の印字に必要な画素数分、共通余白部分があるか前記判定と同様の判定を繰り返す手段と、
ページ番号の印字に必要な画素数分、共通余白部分がないと判定された場合は、ページ番号印字位置の検出が不可である旨のメッセージを表示装置の画面に表示させる手段と、
利用者により再指定されたページ番号印字位置を取得する手段と、
ページ番号の印字に必要な画素数分、共通余白部分があると判定された場合は、その共通余白部分をページ番号印字位置と決定し、決定したページ番号印字位置、又は、利用者により再指定された前記ページ番号印字位置を表示装置の画面に印字レイアウトとして表示させる手段と、
決定又は再指定されたページ番号印字位置を各原稿格納エリアの該当個所へ設定する手段と、
前記原稿格納エリアに格納された各原稿のデータを印字すると共に、各原稿の設定された前記ページ番号印字位置に連番でページ番号の印字を行い、書類出力を行う手段と、
前記書類出力を利用者に指定された部数分繰り返し行う手段とを備えたことを特徴とするデータ処理装置。
Means for reading the manuscript;
Means for dividing the read original into an array of pixels and storing it in an original storage area in the data memory;
Means for sequentially overwriting the data stored in the document storage area in the common margin detection area, updating pixel positions where characters or ruled lines exist, and acquiring a common margin portion in all documents;
The leftmost and rightmost edges recognized as characters or ruled lines in the common margin detection area are obtained for all rows, and the topmost and bottommost edges are obtained for all columns, and the common margin detection area is displayed. Means for obtaining an outer frame of a pixel position where a character or ruled line exists;
Is it possible to print the page number at the page number printing position in the first priority designation position range area designated by the user and the means for updating the acquired common margin part in the outer frame with characters or ruled lines? Means for determining
When printing is not possible at the page number printing position in the designated first priority designation position range area, there are common margin portions in the first priority designation position range area for the number of pixels necessary for printing the page number. Means for determining whether or not
If it is determined that there are no common margins for the number of pixels necessary for printing the page number in the first priority designated position range area, the pixels necessary for printing the page number in the other designated position range area in order of priority. Means for repeating the same determination as the above determination whether there is a common margin part for several minutes;
Means for displaying on the screen of the display device a message that the detection of the page number printing position is impossible when it is determined that there is no common margin part for the number of pixels necessary for printing the page number;
Means for obtaining the page number printing position re-designated by the user;
If it is determined that there is a common margin part for the number of pixels required for printing the page number, the common margin part is determined as the page number printing position, and the designated page number printing position or specified again by the user. Means for displaying the printed page number print position on the screen of the display device as a print layout;
Means for setting the determined or redesignated page number printing position to the corresponding location in each document storage area;
Means for printing the data of each document stored in the document storage area, printing the page number with a serial number at the set page number printing position of each document, and outputting the document;
And a means for repeating the document output for the number of copies designated by the user.
指定されたページ番号のフォント、フォントサイズ、ページ番号の形式、ページ番号印字位置、及び、読み込んだ原稿枚数に基づき、指定されたページ番号の形式に必要な幅と高さの画素数を算出する手段を備えたことを特徴とする請求項3記載のデータ処理装置。   Based on the font of the specified page number, font size, page number format, page number printing position, and the number of scanned documents, the number of pixels of the width and height required for the specified page number format is calculated. 4. A data processing apparatus according to claim 3, further comprising means.
JP2010189040A 2010-08-26 2010-08-26 Page number printing position automatic detection method, and data processing device with the function Pending JP2012048435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010189040A JP2012048435A (en) 2010-08-26 2010-08-26 Page number printing position automatic detection method, and data processing device with the function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010189040A JP2012048435A (en) 2010-08-26 2010-08-26 Page number printing position automatic detection method, and data processing device with the function

Publications (1)

Publication Number Publication Date
JP2012048435A true JP2012048435A (en) 2012-03-08

Family

ID=45903240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010189040A Pending JP2012048435A (en) 2010-08-26 2010-08-26 Page number printing position automatic detection method, and data processing device with the function

Country Status (1)

Country Link
JP (1) JP2012048435A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001339570A (en) * 2000-05-29 2001-12-07 Sony Corp Printer
JP2002192814A (en) * 2000-12-22 2002-07-10 Copyer Co Ltd Imaging apparatus with printing attribute-printing function and method for printing printing attribute
JP2002254770A (en) * 2001-03-01 2002-09-11 Ricoh Co Ltd Image forming device
JP2007166244A (en) * 2005-12-14 2007-06-28 Ricoh Co Ltd Document processing apparatus, document processing method, program, and information recording medium
JP2007221282A (en) * 2006-02-15 2007-08-30 Konica Minolta Business Technologies Inc Image processing apparatus
JP2008176385A (en) * 2007-01-16 2008-07-31 Kyocera Mita Corp Print program, and image formation system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001339570A (en) * 2000-05-29 2001-12-07 Sony Corp Printer
JP2002192814A (en) * 2000-12-22 2002-07-10 Copyer Co Ltd Imaging apparatus with printing attribute-printing function and method for printing printing attribute
JP2002254770A (en) * 2001-03-01 2002-09-11 Ricoh Co Ltd Image forming device
JP2007166244A (en) * 2005-12-14 2007-06-28 Ricoh Co Ltd Document processing apparatus, document processing method, program, and information recording medium
JP2007221282A (en) * 2006-02-15 2007-08-30 Konica Minolta Business Technologies Inc Image processing apparatus
JP2008176385A (en) * 2007-01-16 2008-07-31 Kyocera Mita Corp Print program, and image formation system

Similar Documents

Publication Publication Date Title
US7889405B2 (en) Image processing apparatus and computer program product for overlaying and displaying images in a stack
US20090327875A1 (en) Design editing apparatus, design editing method, and storage medium storing design editing program
EP1764739B1 (en) Image processing apparatus and computer program product
US9641705B2 (en) Image forming apparatus for reading indicia on a sheet and inserting images on a subsequent printed sheet at a location corresponding to the location of the read indicia
JP2007287089A (en) Display control apparatus, image processing apparatus, and display control method
US8175415B2 (en) Image processing device and computer-accessible recording medium containing program therefor
US7852529B2 (en) Image processing apparatus, image printer, and method of image processing performed by the image processing apparatus
JP4332858B2 (en) Image processing apparatus, printing apparatus, and image processing method
JP2012009000A (en) Business form processing system, ocr device, ocr processing program, business form creation device, business form creation program, and business form processing method
JP6424569B2 (en) Image display control device, print result pre-display method and print result pre-display program
US8947695B2 (en) Information processing device, information processing method and computer-readable record medium
US8107118B2 (en) Print control apparatus that controls printing device performing printing using print sheet having tab
US20080266606A1 (en) Optimized print layout
US20120229860A1 (en) Information processing apparatus, method for controlling same, and storage medium on which computer program has been recorded
JP5077105B2 (en) Image processing apparatus, image processing program, and image processing system
US8660357B2 (en) Image processing apparatus, method, and computer program
JP2009087270A (en) Image processing device and program
US8264734B2 (en) Print management apparatus, print management system, medium for storing print management program and print management method
JP2005217931A (en) Print image inspection apparatus
JP5612882B2 (en) Printing control apparatus, printing program, and image forming apparatus
JP5051756B2 (en) Form identification method, form identification program, and optical character reading system using the form identification method
JP4900371B2 (en) Image processing device
JP2012048435A (en) Page number printing position automatic detection method, and data processing device with the function
US11562190B2 (en) Image processing apparatus, control method, and non-transitory computer-readable storage medium with automatic setting of margin size
JP6708061B2 (en) Image processing device, image reading device, and image forming device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130125

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131203

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140701