JPH06262826A - Document compression printing apparatus - Google Patents

Document compression printing apparatus

Info

Publication number
JPH06262826A
JPH06262826A JP5050784A JP5078493A JPH06262826A JP H06262826 A JPH06262826 A JP H06262826A JP 5050784 A JP5050784 A JP 5050784A JP 5078493 A JP5078493 A JP 5078493A JP H06262826 A JPH06262826 A JP H06262826A
Authority
JP
Japan
Prior art keywords
characters
character
maximum
line
document
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
JP5050784A
Other languages
Japanese (ja)
Inventor
Shigeaki Kato
栄昭 加藤
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 Ltd
Hitachi Keiyo Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Keiyo Engineering Co 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 Ltd, Hitachi Keiyo Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP5050784A priority Critical patent/JPH06262826A/en
Publication of JPH06262826A publication Critical patent/JPH06262826A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To uniformize the size of surface block by applying preferential order to the em character in a text when the max. number of characters is larger than the possible max. number of characters to convert the em character to a half em character and contracting rule data in matching relation of a compressed character row by a surface contraction means. CONSTITUTION:When the number of characters at every line of a document is inputted, one em character is set to 2 and one half em character and one rule character are set to 1 to calculate the number B of characters. The number of characters printable on one line of a printer is set to A to be compared with the number B of characters and, at a time of A>=B, it is judged that printing is possible to execute a surface contraction means. At a time of A<B, it is judged that characters protrude at a time of printing and, when there is the mark of em in an inputted document, the em is converted to a half em and the number of characters is again calculated at every line. At the time of A>=B, it is judged that printing is possible and surface contraction control is executed and, at the time of A>=B, the alphabet, numeral or katakana of the em in the inputted document is converted to a half em and the number of characters is again calculated. At the time of A>=B, it is judged that printing is possible and surface contraction control is executed and, at the time of A<B, a warning message is displayed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、テキスト文字列からな
る文書ををプリンタに印字する文書印字装置に係り、特
にけい線を含む表を圧縮印字する処理に好適な文字圧縮
印字装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a document printing apparatus for printing a document consisting of a text character string on a printer, and more particularly to a character compression printing apparatus suitable for compressing and printing a table including ruled lines.

【0002】[0002]

【従来の技術】従来のワードプロセッサーや表作成プロ
グラムでは、けい線にかこまれた矩型領域(以下、ブロ
ックと呼ぶ。)内にテキスト文字列を書き込む際、ブロ
ックの大きさに対し、その文字数が多い場合、その表示
方法として表を横方向や縦方向に拡大することによりブ
ロックを広げ、テキスト文字列をそのブロック内に配置
印字する処理を行っていた。
2. Description of the Related Art In a conventional word processor or table creation program, when a text character string is written in a rectangular area (hereinafter referred to as a block) surrounded by a ruled line, the number of characters is different from the size of the block. In many cases, as a display method, the block is expanded by enlarging the table in the horizontal direction or the vertical direction, and the text character string is arranged and printed in the block.

【0003】この種の技術の参考となるものには、特開
昭63−75964号公報を挙げることができる。
As a reference for this type of technique, there is JP-A-63-75964.

【0004】[0004]

【発明が解決しようとする課題】上述した従来技術は、
ブロックを広げることにより表が大きくなり、印字の際
に、表の行またがりや、頁またがりを起こす場合がある
という問題点があった。
The above-mentioned conventional technique is
There is a problem that the table becomes large by widening the blocks, which may cause a line span or a page span of the table during printing.

【0005】人間は、手書きで表ブロックに字を書くと
き、表ブロックに対しこの表ブロック内に書き込む文字
数が多い場合、その文字を小さく書くか、またはその文
字間隔を狭めることにより文字を表ブロックに入るよう
に書くのが一般的である。
When a person writes a character on a table block by handwriting, if the number of characters to be written in this table block is large with respect to the table block, the character is written small or the character interval is narrowed to make the table block. It is common to write to enter.

【0006】本発明の目的は、上記の経験的な事実に着
目し、テキスト文字列を表ブロックに合わせて縮小し、
表自体をこのテキスト文字列に合わせて縮小して印字す
る処理を行う文字圧縮印字装置を提供することにある。
An object of the present invention is to focus on the above empirical facts, reduce a text character string to fit a table block,
An object of the present invention is to provide a character compression printing device that performs processing of printing by reducing the table itself according to this text character string and printing.

【0007】[0007]

【課題を解決するための手段】上記の目的は、テキスト
文字列からなる文書、及びけい線データを含む表をプリ
ンタに印字する文書印字装置において、前記テキスト文
字列の各行ごとの文字数を算出する文字数算出手段と、
当該文字数算出手段によって算出された各行ごとの文字
数の最大値を算出する最大文字数算出手段と、一行の最
大印字可能文字数と前記最大文字数算出手段によって算
出した最大文字数とを比較し、当該最大文字数が最大印
字可能文字数を越えているときに、文書中に存在する全
角文字を、予め定めた優先順位に従って半角文字に変換
し新たに文書を生成する文字変換手段と、前記文字変換
手段によって圧縮した文字列に合わせてけい線データを
縮小する表縮小手段と、前記新たに生成した文書をプリ
ンターに印字する手段とを具備することによって達成さ
れる。
SUMMARY OF THE INVENTION The above object is to calculate the number of characters in each line of a text character string in a document printing apparatus for printing a document consisting of a text character string and a table containing the ruled line data on a printer. Character count calculation means,
The maximum character number calculation means for calculating the maximum value of the number of characters for each line calculated by the character number calculation means, and the maximum printable character number of one line and the maximum character number calculated by the maximum character number calculation means are compared, and the maximum character number is When the maximum number of printable characters is exceeded, full-width characters existing in the document are converted into half-width characters according to a predetermined priority and a new document is generated, and a character compressed by the character conversion means. This is achieved by providing a table reducing unit that reduces the line data according to the columns and a unit that prints the newly generated document on the printer.

【0008】[0008]

【作用】上記のようにすれば、文字数算出手段が、入力
されたテキストの各行ごとに算出した文字数の最大値を
算出し、文字変換手段が、最大文字数が最大印字可能文
字数よりも大きいときにテキスト中の全角文字に対して
優先順位を付けて半角文字に変換し、表縮小手段が、圧
縮した文字列に合わせてけい線データを縮小し、印字手
段が、その表を含む文字列を印字することにより文書の
圧縮印字を行う。
According to the above, the character number calculating means calculates the maximum value of the number of characters calculated for each line of the input text, and when the character converting means determines that the maximum number of characters is larger than the maximum printable character number. Double-byte characters in the text are given priority and converted to half-width characters, the table reduction means reduces the line data according to the compressed character string, and the printing means prints the character string including the table. By doing so, the document is compressed and printed.

【0009】したがって、文書がけい線を含む表データ
である場合も、文字の圧縮に合わせて、表も縮小し、表
ブロックの大きさを均一にすることができる。
Therefore, even when the document is tabular data including a ruled line, the table can be reduced in size in accordance with the compression of characters and the size of the table block can be made uniform.

【0010】[0010]

【実施例】以下、本発明の一実施例を図面を参照して説
明する。図2は、本発明の一実施例に係る文字圧縮印字
装置のハードウェア構成図である。この文字圧縮印字装
置は、システム全体を制御するCPU101と、内部記
憶装置としてのRAM102、およびROM103と、
表示装置105を制御する表示コントローラ104と、
プリンター107を制御するプリンターコントローラ1
06と、キーボード109を制御するキーボードコント
ローラ108と、外部記憶装置としてのハードディスク
111およびフロッピーディスク112と、これらの外
部記憶装置を制御するディスクコントローラ110と、
これらを相互に接続するバス113とからなる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 2 is a hardware configuration diagram of the character compression printing apparatus according to the embodiment of the present invention. This character compression printing device includes a CPU 101 for controlling the entire system, a RAM 102 as an internal storage device, and a ROM 103.
A display controller 104 for controlling the display device 105,
Printer controller 1 for controlling the printer 107
06, a keyboard controller 108 for controlling the keyboard 109, a hard disk 111 and a floppy disk 112 as external storage devices, and a disk controller 110 for controlling these external storage devices,
The bus 113 interconnects these.

【0011】図3は、内部記憶装置のメモリマップ構成
図である。このメモリマップは、オペレーティングシス
テム(OS)領域201と、文字圧縮印字制御部202
とを有する。
FIG. 3 is a memory map configuration diagram of the internal storage device. This memory map has an operating system (OS) area 201 and a character compression print control unit 202.
Have and.

【0012】図1は、図2に示す文字圧縮印字装置の機
能構成図である。この装置は、文字圧縮印字制御部30
1と、プリンター308と、表示装置309とにより、
その主要部が構成されている。文字圧縮印字制御部30
1は、更に、文字数算出部302、最大文字数算出部3
03、文字変換部304、表縮小部305、印字制御部
306、表示制御部307とから構成されている。
FIG. 1 is a functional block diagram of the character compression printing apparatus shown in FIG. This device is provided with a character compression printing control unit 30.
1, the printer 308, and the display device 309,
Its main part is composed. Character compression printing control unit 30
1 further includes a character number calculation unit 302 and a maximum character number calculation unit 3
03, a character conversion unit 304, a table reduction unit 305, a print control unit 306, and a display control unit 307.

【0013】図4は、図1に示した文字圧縮印字制御部
301の行う処理手順を示すフローチャートである。文
字圧縮印字制御部301における処理は、キーボード1
09、または外部記憶装置111、112から入力され
た圧縮対象の文字とけい線が混在している文書データに
対し、その行ごとに文字数を算出する行文字数算出ステ
ップ401と、キーボード109、または外部記憶装置
111、112から入力されたか、もしくは固定値とし
てあらかじめ保持している1行に印字可能な文字数と、
文書の最大文字数を比較する印字可否判定ステップ40
2と、全角記号文字を半角文字に変換する記号文字変換
ステップ403と、全角のアルファベット、数字、カナ
文字を半角文字に変換する英数カナ文字変換ステップ4
06と、文字圧縮処理を施しても、はみ出てしまうとき
の警告処理等を行うはみ出し制御ステップ409と、文
字の縮小度合いに合わせて、表を縮小する表縮小制御ス
テップ410と、圧縮処理を終了した文書の印字を行う
印字制御ステップ411とから構成されている。
FIG. 4 is a flow chart showing a processing procedure performed by the character compression printing control unit 301 shown in FIG. The processing in the character compression printing control unit 301 is performed by the keyboard 1
09, or the line character number calculation step 401 for calculating the number of characters for each line of the document data in which the characters to be compressed and the key lines mixed from the external storage devices 111 and 112 are mixed, the keyboard 109, or the external storage. The number of characters that can be printed in one line that is input from the devices 111 and 112 or that is stored in advance as a fixed value,
Printability determination step 40 for comparing the maximum number of characters in the document
2, a symbol / character conversion step 403 for converting full-width symbol characters to half-width characters, and an alphanumeric kana character conversion step 4 for converting full-width alphabets, numbers, and kana characters to half-width characters
06, a protrusion control step 409 that performs a warning process and the like when a character is compressed, but a table reduction control step 410 that reduces the table according to the degree of reduction of the character, and the compression processing ends. And a print control step 411 for printing the document.

【0014】次に、このように構成された本実施例の文
字圧縮印字制御の動作について説明する。文字数算出部
302では、キーボード109、外部記憶装置111、
112から入力された文書の行ごとの文字数を入力する
(ステップ401)。文書の先頭、または、改行コード
(0DH、0AH)の次の文字から次の改行コードまで
を1行とする。また、文字数の算出に当たっては、全角
文字の1文字を2、半角文字1文字とけい線1文字を1
として算出する。プリンタの1行に印字できる文字数
は、プリンターによって決定されている。従って、この
文字数は不変なのでキーボード109から入力するか、
または外部記憶装置111、112から入力されたか、
もしくは、固定値として、文字圧縮印字制御部があらか
じめ保持しているものとする。ここではこの値をAとす
る。行文字数算出ステップ401で算出された各行ごと
に算出した文字の最大値をBとする。そして、このAと
Bを比較して、 A≧B のとき印字可能であると判定し(ステップ402)、表
縮小制御(ステップ410)を実行する。 A<B のとき印字時はみ出ると判定し、入力文書中に全角の記
号があれば、それを半角に変換する(ステップ40
3)。
Next, the operation of the character compression printing control of this embodiment having the above-mentioned configuration will be described. In the character number calculation unit 302, the keyboard 109, the external storage device 111,
The number of characters per line of the document input from 112 is input (step 401). One line from the beginning of the document or the character following the line feed code (0DH, 0AH) to the next line feed code. When calculating the number of characters, one full-width character is two, one half-width character is one and one line is one.
Calculate as The number of characters that can be printed on one line of the printer is determined by the printer. Therefore, since this number of characters does not change, either enter from the keyboard 109 or
Or is it input from the external storage device 111, 112?
Alternatively, the fixed value may be held in advance by the character compression printing control unit. Here, this value is A. Let B be the maximum value of the characters calculated for each line calculated in the line character number calculation step 401. Then, by comparing A and B, it is determined that printing is possible when A ≧ B (step 402), and the table reduction control (step 410) is executed. When A <B, it is determined that the character is projected during printing, and if there is a full-width symbol in the input document, it is converted into a half-width (step 40).
3).

【0015】ここで、全角の記号文字を、(漢字のスペ
ース),!,”,#,$,%,&,’,(,),*,
+,,,−,.,/,:,;,<,=,>,?,
@,[,¥,],^,_,、,{,|,},
 ̄,。,「,」,・とする。
Here, the full-width symbol characters are (Kanji space) ,! , ", #, $,%, &, ', (,), *,
+ ,,,-,. , /,:,;, <, =,> ,? ,
@, [, \,], ^, _ ,,, {, |,},
 ̄. , ",", And.

【0016】次に、全角記号文字を半角文字に変換した
後の文書に対して、再び行ごとに文字数を算出する。ス
テップ405は、ステップ402と同じ処理である。そ
して、AとBを比較して、 A≧B のとき印字可能であると判定し(ステップ405)、表
縮小制御(ステップ410)を実行する。 A<B のとき印字時はみ出ると判定し、入力文書中に全角のア
ルファベット、数字、カタカナがあれば、それを半角に
変換する(ステップ406)。
Next, the number of characters is calculated again for each line in the document after the full-width symbol characters are converted into half-width characters. Step 405 is the same process as step 402. Then, A is compared with B, it is determined that printing is possible when A ≧ B (step 405), and the table reduction control (step 410) is executed. When A <B, it is determined that printing will be overhanging, and if there are full-width alphabets, numbers, and katakana in the input document, they are converted to half-widths (step 406).

【0017】ここで、全角のアルファベットは、A,
B,C,D,E,F,G,H,I,J,K,L,M,
N,O,P,Q,R,S,T,U,V,W,X,Y,
Z,a,b,c,d,e,f,g,h,i,j,k,
l,m,n,o,p,q,r,s,t,u,v,w,
x,y,zとし、全角の数字は、0,1,2,3,4,
5,6,7,8,9とし、全角のカタカナは、ア,イ,
ウ,エ,オ,カ,キ,ク,ケ,コ,サ,シ,ス,セ,
ソ,タ,チ,ツ,テ,ト,ナ,ニ,ヌ,ネ,ノ,ハ,
ヒ,フ,ヘ,ホ,マ,ミ,ム,メ,モ,ヤ,ユ,ヨ,
ラ,リ,ル,レ,ロ,ワ,ン,ヲ,ァ,ィ,ゥ,ェ,
ォ,ャ,ュ,ョ,ッ,ーとする。全角カタカナは、この
他に濁音文字、半濁音文字がある。しかし、これらに対
応する半角文字は清音文字と濁点、または、清音文字と
半濁点の2文字で表すため半角文字1文字では表せな
い。従って、全角漢字の濁音文字、半濁音文字は変換の
対象にしない。
Here, the full-width alphabet is A,
B, C, D, E, F, G, H, I, J, K, L, M,
N, O, P, Q, R, S, T, U, V, W, X, Y,
Z, a, b, c, d, e, f, g, h, i, j, k,
l, m, n, o, p, q, r, s, t, u, v, w,
x, y, z, full-width numbers are 0, 1, 2, 3, 4,
5, 6, 7, 8, 9 and full-width katakana are
U, d, o, mosquito, ki, ku, ke, ko, sa, shi, su, se,
So, Ta, Chi, Tsu, Te, To, Na, Ni, Nu, Ne, No, Ha,
Hi, fu, he, ho, ma, mi, mu, me, mo, ya, yu, yo,
La, Li, Le, Le, Ro, Wa, N, Wo, A, I, U, E,
Let's say that In addition to this, full-width katakana includes dakuon characters and semi-dakuon characters. However, since the half-width characters corresponding to these are represented by the two characters of the syllabary character and the dakuten, or the syllabary character and the half-dakuten, one half-width character cannot be represented. Therefore, the double-byte kanji voiced characters and semi-voiced characters are not converted.

【0018】次に全角のアルファベット、数字、カタカ
ナを半角文字に変換した後の文書に対して再び行ごとに
文字数を算出する。ステップ408は、ステップ402
と同じ処理である。AとBを比較して、 A≧B のとき印字可能であると判定し(ステップ408)、表
縮小制御(ステップ410)を実行する。
Next, the number of characters is calculated for each line again for the document after the full-width alphabets, numbers and katakana have been converted into half-width characters. Step 408, step 402
Is the same process as. A is compared with B, and when A ≧ B, it is determined that printing is possible (step 408), and table reduction control (step 410) is executed.

【0019】A<B のとき印字時はみ出ると判定し、はみ出し制御ステップ
409を実行する。ステップ409では、文書を変換に
よって圧縮処理しても、印字時はみ出ることを知らせる
警告メッセージを表示し、それでも印字を要求する使用
者に対しては印字を実行する。印字を要求しない使用者
に対しては、本処理を終了する。
When A <B, it is determined that the toner will protrude during printing, and the protrusion control step 409 is executed. In step 409, even if the document is compressed by the conversion, a warning message is displayed to inform that the document will be protruded at the time of printing, and the printing is executed for the user who requests the printing. This process ends for users who do not request printing.

【0020】表縮小制御ステップ410の詳細を図5に
示す。まず、現在処理中の行数を示す行ポインタを初期
化する(ステップ501)。次に、処理行に縦けい線が
あるかを探索する(ステップ502)。縦けい線がない
場合、行ポインタを1増加することにより行ポインタを
更新する(ステップ506)。縦けい線を見付けた場
合、縦けい線のあるカラム数を行単位に保持しておく
(ステップ503)。縦けい線の直前にスペース文字が
あればそれをすべて削除し、ステップ503で保持した
縦けい線のあるカラム数より削除したスペース文字数を
減じることにより縦けい線位置を更新する(ステップ5
04)。次の行がまだ存在する場合は(ステップ50
5)、行ポインタを1増加することにより行ポインタを
更新し(ステップ506)、ステップ502に戻る。次
の行が存在しない場合は行ポインタを初期化する(ステ
ップ507)。ステップ503で保持している縦けい線
カラム数の中で最大のものを取得する(ステップ50
8)。それをMとする。縦けい線位置が、このMになる
まで縦けい線の直前にスペースを挿入する(ステップ5
09)。次の行がまだ存在する場合は(ステップ51
0)、行ポインタを1増加することにより行ポインタを
更新し(ステップ511)、ステップ509に戻る。次
の行が存在しない場合は、横けい線を含むすべての行の
横けい線を行文字数がMになるまで削除する(ステップ
512)。以上で表縮小制御を完了し、続いて印字制御
ステップ411を実行する。
Details of the table reduction control step 410 are shown in FIG. First, a row pointer indicating the number of rows currently being processed is initialized (step 501). Next, it is searched whether or not the processing line has a vertical stroke (step 502). If there is no vertical bar, the row pointer is updated by incrementing the row pointer by 1 (step 506). When the vertical ruled line is found, the number of columns having the vertical ruled line is held for each row (step 503). If there are space characters immediately before the vertical stroke, all of them are deleted, and the number of deleted space characters is subtracted from the number of columns with vertical stroke held in step 503 to update the vertical stroke position (step 5).
04). If the next line still exists (step 50
5) The row pointer is updated by incrementing the row pointer by 1 (step 506) and the procedure returns to step 502. If the next line does not exist, the line pointer is initialized (step 507). The maximum number of columns of vertical grid lines held in step 503 is acquired (step 50).
8). Let it be M. Insert a space just before the vertical ruler until the vertical ruler position is this M (step 5).
09). If the next line still exists (step 51
0), the row pointer is updated by incrementing the row pointer by 1 (step 511), and the process returns to step 509. If the next line does not exist, the horizontal stroke lines of all the lines including the horizontal stroke line are deleted until the number of line characters reaches M (step 512). As described above, the table reduction control is completed, and then the print control step 411 is executed.

【0021】ステップ411では、コンピュータ側で用
意されているI/O制御プログラムであるBIOSを用
いて印字を実行する。また、プリンター出力用のポート
に直接印字データである文書を出力しても実現可能であ
る。
In step 411, printing is executed using the BIOS, which is an I / O control program prepared on the computer side. It can also be realized by directly outputting a document which is print data to a printer output port.

【0022】上述の実施例によると、次のように文字圧
縮印字を行うことになる。図6は、その印字する一例を
示したものである。図7(a)、(b)、(c)は、図
6の表中の文字が変換されて行く様子を示した図であ
り、(a)、(b)、(c)に移るに従って文字は順次
縮小される。
According to the above-mentioned embodiment, the character compression printing is performed as follows. FIG. 6 shows an example of the printing. 7 (a), (b), and (c) are diagrams showing how the characters in the table of FIG. 6 are converted, and the characters are moved as they move to (a), (b), and (c). Are successively reduced.

【0023】まず、図6のような表が入力されたとす
る。全角文字が13文字入力されたので、文字数は、 (全角文字数)*2+(縦けい線数)=13*2+2=
28 である(ステップ401)。ここで、プリンターが1行
に印字可能な文字数が28以上であるとすると(ステッ
プ402)、表縮小制御(ステップ410)を実行す
る。28未満であれば、全角の記号文字を半角文字に変
換する(ステップ403)。入力された文字の中で全角
記号文字は、”,、,?なのでこれらを半角文字に変換
する。文字に着目すると、図7(a)が(b)のように
変換される。結局、入力された文字は全角文字9文字、
半角文字4文字に変換され、文字数は (全角文字数)*2+(半角文字数)+(縦けい線数)
=9*2+4+2=24 となる(ステップ404)。また、ここで、プリンター
が1行に印字可能な文字数が24文字以下であるとすれ
ば(ステップ405)、表縮小制御(ステップ410)
を実行する。24文字未満であれば、入力された文字の
全角文字の中で全角のアルファベット、数学、カタカナ
を半角文字に変換する(ステップ406)。つまり、入
力された文字の中の全角のM,O,J,I,4,カ,ナ
をぞれぞれ半角文字のM,O,J,I,4,カ,ナに変
換する(図7(c))。入力された文字は全角文字2文
字、半角文字11文字に変換され、文字数は、 (全角文字数)*2+(半角文字数)+(縦けい線数)
=2*2+11+2=17 となる(ステップ407)。プリンターが1行に印字可
能な文字数が17文字以上であれば(ステップ40
8)、表縮小制御(ステップ410)を実行する。17
文字未満であれば、はみ出し制御(ステップ409)を
実行する。ステップ409では、文書を変換によって圧
縮処理しても、印字時はみ出ることを知らせる警告メッ
セージを表示し、それでも印字を要求する使用者に対し
ては印字を実行する。また、(変換後の文字数)−Mを
算出し、はみ出す文字数を表示する。使用者がこのはみ
出す文字数を参考にして、現在プリンターにセットして
いる用紙より大きな用紙にすればよいという判断を下す
ことが容易になる。印字を要求しない使用者に対して
は、本処理を終了する。
First, assume that a table as shown in FIG. 6 is input. Since 13 double-byte characters have been entered, the number of characters is (number of double-byte characters) * 2 + (number of vertical strokes) = 13 * 2 + 2 =
28 (step 401). If the printer can print 28 or more characters per line (step 402), the table reduction control (step 410) is executed. If it is less than 28, full-width symbol characters are converted to half-width characters (step 403). Among the characters that have been input, the full-width symbol characters are ",,,? Since they are converted to half-width characters. Focusing on the characters, they are converted as shown in Fig. 7 (a). The characters are 9 double-byte characters,
Converted to 4 single-byte characters, the number of characters is (number of double-byte characters) * 2 + (number of single-byte characters) + (number of vertical strokes)
= 9 * 2 + 4 + 2 = 24 (step 404). If the number of characters that the printer can print in one line is 24 or less (step 405), the table reduction control (step 410).
To execute. If it is less than 24 characters, full-width alphabets, mathematics, and katakana are converted into half-width characters among the full-width characters of the input character (step 406). That is, full-width M, O, J, I, 4, K, and N in the input characters are converted into half-width M, O, J, I, 4, K, and N, respectively (Fig. 7 (c)). The entered characters are converted into 2 full-width characters and 11 half-width characters, and the number of characters is (number of full-width characters) * 2 + (number of half-width characters) + (number of vertical strokes)
= 2 * 2 + 11 + 2 = 17 (step 407). If the printer can print 17 or more characters per line (step 40)
8) The table reduction control (step 410) is executed. 17
If it is less than the character, the protrusion control (step 409) is executed. In step 409, even if the document is compressed by the conversion, a warning message is displayed to inform that the document will be protruded at the time of printing, and the printing is executed for the user who requests the printing. Also, (the number of characters after conversion) -M is calculated, and the number of characters protruding is displayed. It becomes easy for the user to refer to the number of characters protruding and make a decision that the paper size larger than that currently set in the printer should be used. This process ends for users who do not request printing.

【0024】表縮小制御(ステップ410)では、ま
ず、行ポインタに1を設定する(ステップ501)。図
6で第1行は縦けい線がないので(ステップ502)、
行ポインタを1加算する(ステップ502)。次に第2
行目の先頭以外の縦けい線は18カラム目にある(ステ
ップ503)。この18カラム目の縦けい線の直前には
半角スペースが1つあり、これを削除する(ステップ5
04)。これによってこの行の文字数は、 (変換された文字数)+(縦けい線数)−(削除したス
ペース文字数)=16+2−1=17文字 となる。これを行ごとに記憶しておく。次の行がなくな
るまでこれを繰り返す(ステップ505)。次に、行ポ
インタを1に設定する(ステップ507)。先に記憶さ
れている行の文字数(縦けい線カラムの位置)の最大値
を算出する(ステップ508)。この最大値を20とす
る。次は、文字のある行に対して、縦けい線位置が20
カラム目になるように縦けい線の直前にスペース文字を
挿入する(ステップ509)。次の行がなくなるまでこ
れを繰り返す(ステップ510)。横けい線がある行の
文字数が20になるまで横けい線を削除する(ステップ
512)。そして、文字圧縮印字制御にリターンし、印
字制御(ステップ411)を実行しプリンターに印字出
力する。
In the table reduction control (step 410), first, the row pointer is set to 1 (step 501). Since the first line in FIG. 6 has no vertical ruled line (step 502),
The row pointer is incremented by 1 (step 502). Second
The vertical stroke except the beginning of the line is in the 18th column (step 503). There is one single-byte space immediately before the vertical bar in the 18th column, and this is deleted (step 5
04). As a result, the number of characters in this line is (the number of converted characters) + (the number of vertical strokes) − (the number of deleted space characters) = 16 + 2-1 = 17 characters. This is stored for each row. This is repeated until there is no next row (step 505). Next, the row pointer is set to 1 (step 507). The maximum value of the number of characters in the previously stored line (position of vertical stroke line column) is calculated (step 508). This maximum value is 20. Next, the vertical stroke position is 20 for the line with characters.
A space character is inserted immediately before the vertical stroke so that it becomes the column eye (step 509). This is repeated until there is no next row (step 510). The horizontal stripes are deleted until the number of characters in the row having the horizontal stripes becomes 20 (step 512). Then, the process returns to the character compression printing control, the printing control (step 411) is executed, and the printing is output to the printer.

【0025】このようにして、全角文字を変換していく
過程を、全角文字の種類により変換の優先順位を付け、
けい線を変換された文字列の長さに合わせて縮小するこ
とによって容易に文字圧縮印字ができる。
In this way, in the process of converting full-width characters, the conversion priority is set according to the type of full-width characters,
Character compression printing can be easily performed by reducing the scale line according to the length of the converted character string.

【0026】用紙の大きさによって、1行に印字可能な
文字数が決定する。この用紙の大きさごとの文字数をあ
らかじめ保持しておくことにより、これらの値と、変換
後の文字数を順次比較して、 (用紙サイズの印字可能な文字数)>(変換後の文字
数) となる用紙サイズを決める。この用紙サイズを表示する
ことにより、どの大きさの用紙を使用すればはみ出ずに
印字できるかを使用者が容易に判断することができる。
The size of paper determines the number of characters that can be printed in one line. By holding the number of characters for each size of this paper in advance, these values and the number of characters after conversion are sequentially compared, and (the number of printable characters of the paper size)> (the number of characters after conversion) is obtained. Determine the paper size. By displaying this paper size, the user can easily determine which size of paper should be used to print without overflowing.

【0027】前記実施例は、1つのブロック(けい線で
囲まれた部分)が縦に1列に並んだものに対しての処理
である。次に、複数ブロックの実施例について述べる。
The above-described embodiment is a process for one block (portion surrounded by a dashed line) vertically arranged in one line. Next, an example of a plurality of blocks will be described.

【0028】図8は、複数列ブロックの表を表す図であ
る。図中のa(i,j)(1≦i≦m,1≦j≦n,
i,j,m,nは正の整数)は、全角文字と半角文字を
含む文字列である。このような表の場合、前記実施例で
述べた処理を用いて、まず、第1列を圧縮し、次に第2
列を圧縮し、第n列まで順次圧縮することにより実現で
きる。
FIG. 8 is a diagram showing a table of plural column blocks. A (i, j) (1 ≦ i ≦ m, 1 ≦ j ≦ n,
i, j, m, and n are positive integers) are character strings including full-width characters and half-width characters. In the case of such a table, the first column is first compressed and then the second column using the process described in the previous embodiment.
This can be realized by compressing columns and sequentially compressing up to the nth column.

【0029】前記実施例では、文字数に着目して圧縮処
理を実現した。1行の長さをドット数に着目することに
よって更に圧縮することができる。
In the above-mentioned embodiment, the compression processing is realized by paying attention to the number of characters. The length of one line can be further compressed by focusing on the number of dots.

【0030】図9は1行のドット数に着目したフローチ
ャートである。半角1文字のドット数をd1、文字間の
ドット数をd2とする。行のドット数D1は、 D1=(文字長)*d1 となる。ここで、文字長とは、文字間ドット数を除外し
た文字のみのドット数である。従って、 (文字長)=(半角文字数+全角文字数*2)*d1 となる。また、文字間ドット数Dは、 D=(文字数−2)*d2 となる。行のドット数の合計は、D+D1となる(ステ
ップ901)。1行に印字可能な最大ドット数をMとす
ると、 M≧D+D1 の場合、印字時はみ出ないと判定し(ステップ90
2)、表縮小制御(ステップ913)を実行する。 M<D+D1 の場合、印字時はみ出ると判定し、全角記号を半角にす
る(ステップ903)。ステップ903は、ステップ4
03と同じ処理を行う。再び行のドット数D+D1を算
出する(ステップ904)。 M≧D+D1 の場合、印字時はみ出ないと判定し(ステップ90
5)、表縮小制御(ステップ913)を実行する。 M<D+D1 の場合、印字時はみ出ると判定し、全角のアルファベッ
ト、数字、カナを半角にする(ステップ906)。ステ
ップ906は、ステップ406と同じ処理を行う。再び
行のドット数D+D1を算出する(ステップ907)。 M≧D+D1 の場合、印字時はみ出ないと判定し(ステップ90
8)、表縮小制御(ステップ913)を実行する。 M<D+D1 の場合、印字時はみ出ると判定し、文字間圧縮制御を実
行する(ステップ909)。ステップ909では、文字
間を除いたドット数D1を求め文字間ドット数をいくつ
にしたらよいかを算出する。すなわち、 文字間ドット数d2=(M−D1)/(文字数) を求める。d2の整数部分が求める文字間ドット数であ
る。
FIG. 9 is a flowchart focusing on the number of dots in one line. The number of dots in one half-width character is d1, and the number of dots between characters is d2. The number of dots D1 in a line is D1 = (character length) * d1. Here, the character length is the number of dots of only characters excluding the number of dots between characters. Therefore, (character length) = (number of half-width characters + number of full-width characters * 2) * d1. Further, the inter-character dot number D is D = (character number−2) * d2. The total number of dots in the row is D + D1 (step 901). Assuming that the maximum number of dots that can be printed in one line is M, if M ≧ D + D1, then it is determined that printing does not occur (step 90).
2) The table reduction control (step 913) is executed. If M <D + D1, it is determined that the protrusion occurs during printing, and the full-width symbol is changed to a half-width character (step 903). Step 903 is Step 4
The same process as 03 is performed. The number of dots D + D1 in the row is calculated again (step 904). If M ≧ D + D1, it is determined that no protrusion occurs during printing (step 90).
5) The table reduction control (step 913) is executed. In the case of M <D + D1, it is determined that the protrusion occurs during printing, and full-width alphabets, numbers, and kana are changed to half-width (step 906). Step 906 performs the same process as step 406. The number of dots D + D1 in the row is calculated again (step 907). If M ≧ D + D1, it is determined that no protrusion occurs during printing (step 90).
8) The table reduction control (step 913) is executed. In the case of M <D + D1, it is determined that the toner will protrude during printing, and the inter-character compression control is executed (step 909). In step 909, the number of dots D1 excluding the spaces between the characters is obtained and the number of dots between the characters is calculated. That is, the inter-character dot number d2 = (M−D1) / (number of characters) is calculated. The integer part of d2 is the number of inter-character dots to be obtained.

【0031】次に、d2<0のとき、文字間を圧縮して
も印字時はみ出るがd2=0とする。文字間ドット数d
2が決定したので、1行のドット数の合計D+D1が定
まる。
Next, when d2 <0, it is set as d2 = 0 though it is projected at the time of printing even if the character space is compressed. Number of dots between characters d
Since 2 is determined, the total number of dots in one row, D + D1, is determined.

【0032】M≧D+D1 の場合、印字時はみ出ないと判定し(ステップ91
1)、表縮小制御(ステップ913)を実行する。
If M ≧ D + D1, it is determined that no protrusion occurs during printing (step 91).
1) The table reduction control (step 913) is executed.

【0033】M<D+D1 の場合、印字時はみ出ると判定し、はみ出し制御(ステ
ップ912)を実行する。ステップ913は、ステップ
409と同じ処理である。また、ステップ913は、ス
テップ410と同じ処理である。印字制御では、プリン
ターに対して、文字間ドット数をステップ909で求め
たd2の値に設定して出力する。
If M <D + D1, it is determined that the toner will protrude during printing, and the protrusion control (step 912) is executed. Step 913 is the same process as step 409. Further, step 913 is the same process as step 410. In print control, the number of inter-character dots is set to the value of d2 obtained in step 909 and output to the printer.

【0034】[0034]

【発明の効果】以上の説明から明らかなように、本発明
によれば、全角文字を半角文字に変換していく過程にお
いて、全角記号文字から先に変換するといったように変
換する際に文字に予め優先順位を付けることにより、文
字の大きさの釣り合いを取りながら文書の圧縮ができる
という効果がある。
As is apparent from the above description, according to the present invention, in the process of converting a full-width character into a half-width character, the full-width symbol character is converted into a character when converting first. By prioritizing priorities, it is possible to compress the document while balancing the character sizes.

【0035】また、文書がけい線を含む表データである
場合も、文字の圧縮に合わせて、表も縮小し、表ブロッ
クの大きさが均一にできるという効果がある。
Further, even when the document is tabular data including a ruled line, there is an effect that the table can be reduced and the size of the table block can be made uniform in accordance with the compression of characters.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例に係る文字圧縮印字装置の構
成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a character compression printing apparatus according to an embodiment of the present invention.

【図2】本発明の一実施例を示すハードウェア構成図で
ある。
FIG. 2 is a hardware configuration diagram showing an embodiment of the present invention.

【図3】本発明に用いる内部記憶装置のメモリ構成図で
ある。
FIG. 3 is a memory configuration diagram of an internal storage device used in the present invention.

【図4】本発明の一実施例を示す文字圧縮印字制御部の
処理フローチャートである。
FIG. 4 is a processing flowchart of a character compression printing control unit showing an embodiment of the present invention.

【図5】本発明の一実施例を示す表縮小制御部の処理フ
ローチャートである。
FIG. 5 is a processing flowchart of a table reduction control unit showing an embodiment of the present invention.

【図6】文字縮小前の表の印字例を示す図である。FIG. 6 is a diagram showing a print example of a table before character reduction.

【図7】文字が縮小変換されて行く状態を示す遷移図で
ある。
FIG. 7 is a transition diagram showing a state in which characters are reduced and converted.

【図8】本発明の他の実施例を示す動作の説明図であ
る。
FIG. 8 is an explanatory diagram of an operation showing another embodiment of the present invention.

【図9】本発明の更に他の実施例を示す処理フローチャ
ートである。
FIG. 9 is a processing flowchart showing still another embodiment of the present invention.

【符号の説明】[Explanation of symbols]

301…文字圧縮印字制御部、302…文字数算出部、
303…最大文字数算出部、304…文字変換部、30
5…表縮小部
301 ... Character compression printing control unit, 302 ... Character number calculation unit,
303 ... Maximum character number calculation unit, 304 ... Character conversion unit, 30
5 ... Table reduction unit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.5 識別記号 庁内整理番号 FI 技術表示箇所 G06F 3/12 H ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 5 Identification code Internal reference number FI technical display location G06F 3/12 H

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 テキスト文字列からなる文書、及びけい
線データを含む表をプリンタに印字する文書印字装置に
おいて、前記テキスト文字列の各行ごとの文字数を算出
する文字数算出手段と、当該文字数算出手段によって算
出された各行ごとの文字数の最大値を算出する最大文字
数算出手段と、一行の最大印字可能文字数と前記最大文
字数算出手段によって算出した最大文字数とを比較し、
当該最大文字数が最大印字可能文字数を越えているとき
に、文書中に存在する全角文字を、予め定めた優先順位
に従って半角文字に変換し新たに文書を生成する文字変
換手段と、前記文字変換手段によって圧縮した文字列に
合わせてけい線データを縮小する表縮小手段と、前記新
たに生成した文書をプリンターに印字する手段とを有す
ることを特徴とする文字圧縮印字方式および装置。
1. A document printing device for printing a document including a text character string and a table containing ruled line data on a printer, the character number calculating means for calculating the number of characters of each line of the text character string, and the character number calculating means. By comparing the maximum number of characters calculation means for calculating the maximum value of the number of characters for each line calculated by, the maximum printable character number of one line and the maximum number of characters calculated by the maximum character number calculation means,
When the maximum number of characters exceeds the maximum printable character number, full-width characters existing in the document are converted into half-width characters according to a predetermined priority order, and a new document is generated, and the character conversion means. A character compression printing method and apparatus comprising: a table reduction unit that reduces the line data according to the character string compressed by the above; and a unit that prints the newly generated document on a printer.
【請求項2】 請求項1において、前記キーボード、ま
たは、前記外部記憶装置から入力された文書の各行ごと
のドット数を算出するドット数算出手段と、前記ドット
数算出手段によって算出された行ごとのドット数の最大
値を算出する最大ドット数算出手段と、一行の最大印字
可能ドット数と前記最大ドット数算出手段によって算出
した最大ドット数とを比較して、最大ドット数が最大印
字可能ドット数を越えているときに、文書中に存在する
全角文字を、一定の優先順位を設け、それに従って半角
文字に変換し新たに文書を生成する文字変換手段と、文
字間隔を調整する文字間隔調節手段と、前記文字変換手
段によって圧縮した文字列に合わせてけい線データ
(表)を縮小する表縮小手段と、前記新たに生成した文
書をプリンターに印字する手段とを有することを特徴と
する文字圧縮印字装置。
2. The dot number calculating means for calculating the number of dots for each line of a document input from the keyboard or the external storage device according to claim 1, and each line calculated by the dot number calculating means. Maximum dot number calculation means for calculating the maximum value of the maximum dot number, and the maximum printable dot number for one line and the maximum dot number calculated by the maximum dot number calculation means are compared, and the maximum dot number is the maximum printable dot. When the number of characters exceeds the limit, double-byte characters existing in the document are given a certain priority and are converted to single-byte characters accordingly to generate a new document. Means, table reducing means for reducing the grid line data (table) according to the character string compressed by the character converting means, and the newly generated document printed on the printer. And a character compression printing device.
JP5050784A 1993-03-11 1993-03-11 Document compression printing apparatus Pending JPH06262826A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5050784A JPH06262826A (en) 1993-03-11 1993-03-11 Document compression printing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5050784A JPH06262826A (en) 1993-03-11 1993-03-11 Document compression printing apparatus

Publications (1)

Publication Number Publication Date
JPH06262826A true JPH06262826A (en) 1994-09-20

Family

ID=12868451

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5050784A Pending JPH06262826A (en) 1993-03-11 1993-03-11 Document compression printing apparatus

Country Status (1)

Country Link
JP (1) JPH06262826A (en)

Similar Documents

Publication Publication Date Title
US7783969B1 (en) Rule-based text layout
JP3083314B2 (en) Document processing method and apparatus
JP2909273B2 (en) Outline font line width adjusting method and apparatus
JPH06262826A (en) Document compression printing apparatus
JP2562458B2 (en) Character generation method for computer system
JP3470378B2 (en) Character information output device and method
JP3437293B2 (en) Character output method and character processing device
JP2837497B2 (en) Output control device and output control method
JPH0666066B2 (en) Document processor with furigana addition function
JPH05298317A (en) Doucment forming device
JPH0216068A (en) Image forming device
JPH09166974A (en) Document processing device and cache functioning method
JPH03184182A (en) Character output layout determination system
JPS63113597A (en) Document generator
JP2995630B2 (en) Document data processing device
JPH0687249A (en) Apparatus for printing address
JP3082173B2 (en) Contour data processing device
JP4670278B2 (en) Document display device and document display program
JPH05303577A (en) Document preparing device
JPH0264696A (en) Character processor
JPH07271770A (en) Document preparation device
JPH07306669A (en) Character output device
JPH06149208A (en) Character generating device
JPH0553558A (en) Information processor
JPH04321166A (en) Information processor