JP2009056631A - Printing apparatus - Google Patents

Printing apparatus Download PDF

Info

Publication number
JP2009056631A
JP2009056631A JP2007224220A JP2007224220A JP2009056631A JP 2009056631 A JP2009056631 A JP 2009056631A JP 2007224220 A JP2007224220 A JP 2007224220A JP 2007224220 A JP2007224220 A JP 2007224220A JP 2009056631 A JP2009056631 A JP 2009056631A
Authority
JP
Japan
Prior art keywords
barcode
command
unit
paper
printing
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
JP2007224220A
Other languages
Japanese (ja)
Inventor
Hiroyuki Tsuzuki
広行 都筑
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.)
Oki Electric Industry Co Ltd
Oki Data Systems Co Ltd
Original Assignee
Oki Data Corp
Oki Data Systems 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 Oki Data Corp, Oki Data Systems Co Ltd filed Critical Oki Data Corp
Priority to JP2007224220A priority Critical patent/JP2009056631A/en
Publication of JP2009056631A publication Critical patent/JP2009056631A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Printers Characterized By Their Purpose (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve the printing quality of barcodes even in the printing demand other than a specified drawing direction. <P>SOLUTION: A printing data receiving section 102 receives printing data including discriminating code drawing commands, a barcode setting command detecting section 105 detects that the printing data include the discriminating code drawing commands, a barcode drawing command detecting section 106 detects the drawing direction of the discriminating codes, and a sheet running direction selecting section 111 preferentially selects either of a first media storing section and a second media storing section based on the drawing direction of the discriminating codes. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、識別コードを媒体に印刷する印刷装置に関する。   The present invention relates to a printing apparatus that prints an identification code on a medium.

従来、バーコードを印刷する印刷装置では、バーコードの印刷方向によっては、バーコードの読み取り率が低下してしまうという解決すべき課題が残されていた。かかる課題を解決し、バーコードの印刷品位を安定化させるべく、特許文献1には、インクの印字方向とバーコードの高さ方向とを、実質的に同一方向にする印刷装置の内容が開示されている。
特開平06−44393号公報
Conventionally, in a printing apparatus that prints a barcode, there remains a problem to be solved that the barcode reading rate decreases depending on the printing direction of the barcode. In order to solve this problem and stabilize the print quality of the barcode, Patent Document 1 discloses the contents of a printing apparatus that makes the ink printing direction and the barcode height direction substantially the same direction. Has been.
Japanese Patent Laid-Open No. 06-44393

しかしながら、上記特許文献1に開示されている印刷装置であっても、定型用紙に対してバーコードの印刷を行なう場合には、インクの印字方向とバーコードの高さ方向とが、実質的に同一方向になる印刷要求以外、即ち、バーコード描画の方向が特定の場合以外の印刷要求では、所望する効果を得ることが出来ないという解決すべき課題が残されていた。   However, even in the printing apparatus disclosed in Patent Document 1, when barcode printing is performed on a standard paper, the ink printing direction and the barcode height direction are substantially different. There remains a problem to be solved that a desired effect cannot be obtained with a print request other than a print request in the same direction, that is, a print request other than when the barcode drawing direction is specific.

本発明による印刷装置は、識別コード描画コマンドを含む印刷データを受信するデータ受信部と、該印刷データ中に識別コード描画コマンドが含まれることを検出するコマンド検出部と、上記検出された識別コードの描画方向を検出する描画方向検出部と、第一の方向で媒体を収納する第一媒体収納部と、上記第一の方向と異なる第二の方向で媒体を収納する第二媒体収納部と、上記識別コードの描画方向に基づいて、上記第一媒体収納部と上記第二媒体収納部の何れかを選択する選択部とを有することを所要な特徴とする。   A printing apparatus according to the present invention includes a data receiving unit that receives print data including an identification code drawing command, a command detection unit that detects that the identification code drawing command is included in the print data, and the detected identification code. A drawing direction detection unit that detects the drawing direction of the first medium, a first medium storage unit that stores the medium in the first direction, and a second medium storage unit that stores the medium in a second direction different from the first direction. A required feature is that the apparatus includes a selection unit that selects one of the first medium storage unit and the second medium storage unit based on the drawing direction of the identification code.

本発明による印刷装置は、描画方向検出部が識別コードの描画方向を検出し、その描画方向に基づいて、選択部が、第一媒体収納部と第二媒体収納部の何れかを優先的に選択することが可能になるので、特定の描画方向以外の印刷要求であってもバーコードの印刷品位を向上させることが出来るという効果を得る。   In the printing apparatus according to the present invention, the drawing direction detection unit detects the drawing direction of the identification code, and the selection unit preferentially selects one of the first medium storage unit and the second medium storage unit based on the drawing direction. Since it becomes possible to select, it is possible to improve the print quality of the barcode even if the print request is other than the specific drawing direction.

以下、本発明の一実施形態を図を用いて詳細に説明する。   Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.

(構成)の説明
本実施例では、定型サイズの用紙の走行方向とバーコードのバーの方向を一致させるように、用紙走行方向を選択して印刷可能な印刷装置について説明する。具体的な例としては、印刷装置がLEDヘッドを搭載した装置では、同じ印刷方向でも用紙走行方向によってバーコードの印刷品位が異なるため、バーコードの印刷内容に応じて、例えばA4縦置き/A4横置きのうちで、印刷品位の良くなるどちらか一方を選択して印刷するというものである。かかる目的を達成するために本実施例の印刷装置は以下のように構成される。
Description of (Configuration) In this embodiment, a printing apparatus capable of printing by selecting a paper traveling direction so that the traveling direction of a standard-size paper and the bar code direction coincide with each other will be described. As a specific example, if the printing apparatus is equipped with an LED head, the print quality of the bar code varies depending on the paper running direction even in the same print direction, so depending on the print contents of the bar code, for example, A4 portrait / A4 One of the landscape orientations is to select and print one of the print quality. In order to achieve this object, the printing apparatus of the present embodiment is configured as follows.

図1は、実施例1の印刷装置の構成のブロック図である。
この図は、実施例1の印刷装置の構成を、プリンタ101がホストPC120から送信されたバーコードを含む印刷データを受信し、印刷を行なう機能を主にして表したものである。
FIG. 1 is a block diagram of the configuration of the printing apparatus according to the first embodiment.
This figure mainly shows the configuration of the printing apparatus according to the first embodiment, in which the printer 101 receives print data including a barcode transmitted from the host PC 120 and performs printing.

図に示すように、プリンタ101は、印刷データ受信部102と、印刷データ先読み部103と、バーコード設定コマンド検出部105と、バーコード描画コマンド検出部106と、用紙サイズ選択コマンド検出部108と、座標回転コマンド検出部109と、バーコード描画情報格納部110と、用紙走行方向選択部111と、搭載用紙走行方向検出部112と、トレイ1制御部113と、トレイ2制御部114と、印刷データ解析部115と、描画処理部116と、画像形成部117とを備える。   As shown in the figure, the printer 101 includes a print data receiving unit 102, a print data prefetching unit 103, a barcode setting command detection unit 105, a barcode drawing command detection unit 106, and a paper size selection command detection unit 108. , Coordinate rotation command detection unit 109, barcode drawing information storage unit 110, paper travel direction selection unit 111, loaded paper travel direction detection unit 112, tray 1 control unit 113, tray 2 control unit 114, printing A data analysis unit 115, a drawing processing unit 116, and an image forming unit 117 are provided.

印刷データ受信部102は、ホストPC120から送信された印刷データを、プリンタケーブル、USBケーブル、あるいはネットワークケーブルなどの任意のデータ送信経路を通じて受信する部分である。本実施例では、データ送信経路がいずれであっても構わないので具体的には特定しない。   The print data receiving unit 102 is a part that receives print data transmitted from the host PC 120 through an arbitrary data transmission path such as a printer cable, a USB cable, or a network cable. In the present embodiment, the data transmission path may be any, so that it is not specifically specified.

印刷データ先読み部103は、通常の処理経路である印刷データ解析部115で印刷データの解析が行なわれる前に、バーコード描画に関係する印刷コマンドを先読みして、そのコマンドの存在を検出する部分である。尚、印刷データ先読み部103は、内部に先読みバッファ104を有している。   The print data prefetching unit 103 prefetches a print command related to barcode drawing before the print data analysis unit 115 which is a normal processing path analyzes the print data, and detects the presence of the command. It is. The print data prefetch unit 103 has a prefetch buffer 104 therein.

先読みバッファ104は、データの内容を先読みするための印刷データを一時的にコピーし、格納し、参照するための揮発性メモリ領域である。バーコード設定コマンド検出部105は、バーコード設定コマンドに指定されているパラメータを解釈し、どのような設定が指定されているかを検出する部分である。   The prefetch buffer 104 is a volatile memory area for temporarily copying, storing, and referring to print data for prefetching data contents. The barcode setting command detection unit 105 is a part that interprets the parameters specified in the barcode setting command and detects what setting is specified.

バーコード描画コマンド検出部106は、バーコード描画コマンドに指定されているパラメータを解釈し、どのようなバーコードを描画するのかを検出する部分である。尚、バーコード描画コマンド検出部106は、その内部に最小バーサイズ検出部107を有している。最小バーサイズ検出部107は、バーコード設定コマンドのパラメータから、バーコードが描画されたときのバーの幅の最小値を検出する部分である。   The barcode drawing command detection unit 106 is a part that interprets parameters specified in the barcode drawing command and detects what kind of barcode is drawn. The bar code drawing command detection unit 106 includes a minimum bar size detection unit 107 therein. The minimum bar size detection unit 107 is a part that detects the minimum value of the bar width when the barcode is drawn, from the parameters of the barcode setting command.

用紙サイズ選択コマンド検出部108は、用紙サイズ選択コマンドに設定されているパラメータを解釈し、どのような用紙サイズが指定されたのかを検出する部分である。座標回転コマンド検出部109は、座標回転コマンドに設定されているパラメータを解釈し、どのような座標系の回転角が指定されているかを検出する部分である。   The paper size selection command detection unit 108 is a part that interprets the parameters set in the paper size selection command and detects what paper size is designated. The coordinate rotation command detection unit 109 is a part that interprets the parameters set in the coordinate rotation command and detects what coordinate system rotation angle is specified.

バーコード描画情報格納部110は、印刷データの先読み処理によって検出されたバーコード描画情報を格納する揮発性メモリである。格納されるバーコード描画情報は、バーコード描画が行なわれる用紙サイズ、各バーコードの描画時の回転方向および最小バーコードサイズ等である。   The barcode drawing information storage unit 110 is a volatile memory that stores barcode drawing information detected by print data prefetching processing. The stored barcode drawing information includes a paper size on which barcode drawing is performed, a rotation direction at the time of drawing each barcode, a minimum barcode size, and the like.

用紙走行方向選択部111は、バーコード描画情報格納部110に格納されているバーコード描画情報に基づいて、印刷する際に使用する用紙がセットされているトレイを選択する部分である。特に、印刷装置がLEDヘッドを搭載した印刷装置の場合には、用紙走行方向とバーコードの高さ方向とが一致するトレイを選択することになる。尚、本実施例では、トレイ1とトレイ2の二つの給紙トレイを備えたプリンタであるものとする。   The paper traveling direction selection unit 111 is a part that selects a tray on which paper used for printing is set based on the barcode drawing information stored in the barcode drawing information storage unit 110. In particular, when the printing apparatus is a printing apparatus equipped with an LED head, a tray in which the paper running direction matches the barcode height direction is selected. In this embodiment, it is assumed that the printer has two sheet feeding trays, tray 1 and tray 2.

搭載用紙走行方向検出部112は、トレイ1およびトレイ2にセットされている用紙サイズと用紙走行方向を検出する部分である。トレイ1制御部113は、トレイ1にセットされている用紙サイズと用紙走行方向とを検出し、印刷の為の給紙と用紙搬送の制御を行なう部分である。トレイ2制御部114は、トレイ2にセットされている用紙サイズと用紙走行方向を検出し、印刷の為の給紙と用紙搬送の制御を行なう部分である。   The loaded paper travel direction detection unit 112 is a part that detects the paper size and paper travel direction set in the tray 1 and the tray 2. The tray 1 control unit 113 is a part that detects the paper size set in the tray 1 and the paper traveling direction, and controls paper feeding and paper conveyance for printing. The tray 2 control unit 114 is a part that detects the paper size and paper traveling direction set in the tray 2 and controls paper feeding and paper conveyance for printing.

印刷データ解析部115は、ホストPC120から送信された印刷データに含まれている印刷コマンドを解釈し、描画処理を行なうための中間データ形式(ディスプレイリスト)に変換する部分である。この処理は、プリンタ内部処理における編集処理と呼ばれるものである。尚、ここでは、中間データ形式への変換を行なう際に、印刷コマンドに指定されている座標値が、用紙走行方向に対応した座標値になるように回転される。   The print data analysis unit 115 is a part that interprets a print command included in the print data transmitted from the host PC 120 and converts it into an intermediate data format (display list) for performing a drawing process. This process is called an editing process in the printer internal process. Here, when the conversion to the intermediate data format is performed, the coordinate value specified in the print command is rotated so that the coordinate value corresponds to the paper traveling direction.

描画処理部116は、上記中間描画データ形式(ディスプレイリスト)のデータを読み込んで、印刷するための用紙サイズと同じ大きさの画像データをメモリ上に生成する部分である。また、描画処理部116は、バーコード形状を所定の大きさに拡大/縮小したサイズで実際に描画する機能を有する部分でもある。   The drawing processing unit 116 reads data in the intermediate drawing data format (display list) and generates image data having the same size as the paper size for printing on the memory. In addition, the drawing processing unit 116 is also a part having a function of actually drawing a barcode shape with a size enlarged / reduced to a predetermined size.

画像形成部117は、上記画像データをプリンタ101の印刷ヘッドに送信するとともに、用紙を印刷ヘッドの下に走行させ、トナーを転写して用紙にトナーを定着させるプロセス制御を行なう部分である。以上説明した各機能部分は、プリンタ101に備える図示しないCPUが、図示しないROMに予め格納されている所定の制御プログラムを実行することによって起動・生成される。   The image forming unit 117 is a part that transmits the image data to the print head of the printer 101 and performs process control for causing the paper to run under the print head and transferring the toner to fix the toner on the paper. Each functional part described above is activated and generated when a CPU (not shown) provided in the printer 101 executes a predetermined control program stored in advance in a ROM (not shown).

一方、ホストPC120は、入力部120aと、バーコードアプリケーション121と、画面表示制御部124と、印刷データ送信部125とを備えるコンピュータである。入力部120aはホストPC120に対するユーザの入力操作を受け入れるデバイスであって、例えばキーボードやマウスといった入力装置である。   On the other hand, the host PC 120 is a computer that includes an input unit 120 a, a barcode application 121, a screen display control unit 124, and a print data transmission unit 125. The input unit 120a is a device that accepts a user input operation to the host PC 120, and is an input device such as a keyboard or a mouse.

バーコードアプリケーション121は、ホストPC120のユーザが、バーコード印刷を行なうために用いるアプリケーションソフトウェアである。このアプリケーションソフトウェアが実行されるとレイアウト制御部122とバーコード描画コマンド生成部123とが起動・生成される。   The barcode application 121 is application software used by the user of the host PC 120 to perform barcode printing. When this application software is executed, the layout control unit 122 and the barcode drawing command generation unit 123 are activated and generated.

レイアウト制御部122は、ユーザによる入力部120aの操作を受け入れて、バーコードの描画位置や大きさ、バーコードの種別、バーコードとして埋め込みたい情報、バーコードの周辺に配置する文字や図形やイメージのレイアウトを編集する部分である。   The layout control unit 122 accepts the operation of the input unit 120a by the user, and the barcode drawing position and size, the barcode type, the information to be embedded as the barcode, the characters, figures, and images to be arranged around the barcode. This is the part for editing the layout.

バーコード描画コマンド生成部123は、プリンタ101にバーコードを印刷させるための印刷コマンドを生成する部分である。印刷コマンドの生成は、プリンタドライバを使用する方式と、アプリケーションが能動的に生成する方式とが考えられるが、本実施例の動作を説明するためにはどのような方式であっても構わないので、その具体的な構成の説明については省略する。   The barcode drawing command generation unit 123 is a part that generates a print command for causing the printer 101 to print a barcode. There are two methods for generating a print command: a method using a printer driver and a method actively generated by an application. However, any method may be used to explain the operation of this embodiment. The description of the specific configuration is omitted.

画面表示制御部124は、レイアウト制御部122によってレイアウトされた内容を、ホストPCの図示しないモニタ装置に表示するための信号の生成を制御する部分である。印刷データ送信部125は、プリンタ101に印刷データを送信する部分である。   The screen display control unit 124 controls the generation of a signal for displaying the contents laid out by the layout control unit 122 on a monitor device (not shown) of the host PC. The print data transmission unit 125 is a part that transmits print data to the printer 101.

次に、本実施例における装置のトレイ構成および用紙の走行方向について説明する。
図2は、トレイの用紙向きと、走行経路の説明図である。
図に示すように、本実施例におけるプリンタ101は、プリンタ101の筐体130の内部に、トレイ1(131)とトレイ2(132)の二つの給紙トレイを備えている。トレイ(131)には、A4横置き用紙133が格納されている。トレイ2(132)には、A4縦置き用紙が格納されている。
Next, the tray configuration of the apparatus and the paper traveling direction in this embodiment will be described.
FIG. 2 is an explanatory diagram of the paper orientation of the tray and the travel route.
As shown in the figure, the printer 101 in this embodiment includes two paper feed trays, a tray 1 (131) and a tray 2 (132), inside a housing 130 of the printer 101. A4 landscape paper 133 is stored in the tray (131). The tray 2 (132) stores A4 portrait paper.

トレイ1(131)およびトレイ2(132)に搭載されている用紙は、共通の用紙走行経路135を通過して印刷ヘッドまで搬送され、印刷が行なわれるように構成されている(尚、図におけるトレイ1(131)およびトレイ2(132)にセットされた用紙の位置は、トレイをプリンタ101から引き出して、真上からトレイを見た時の用紙の位置を表したイメージ図である。)。 The sheets mounted on the tray 1 (131) and the tray 2 (132) pass through a common sheet traveling path 135 and are conveyed to the print head so that printing is performed (in FIG. (The positions of the sheets set in the tray 1 (131) and the tray 2 (132) are image diagrams showing the positions of the sheets when the tray is pulled out from the printer 101 and the tray is viewed from directly above.)

次に、プリンタ101でバーコード印刷を行なった時の印刷内容について説明する。
図3は、バーコード描画の1例の説明図である。
図3(a)は、給紙トレイの用紙サイズがA4横置きの場合の、バーコードの印刷結果を示したものである。図に示すように、A4横置き用紙142は、LEDヘッド141に向かって用紙走行方向Aの方向に搬送が行なわれ、印刷が行なわれる。このとき、バーコード描画されたドットを拡大して示した図が、ドットの拡大図144である。このときのトナーは、用紙走行方向と逆方向(図面の下方向)に向かって滲んだり、転写の誤差などにより、広がって定着してしまう問題がある。このため、バーコード143は、黒いバーが本来あるべき幅よりも下方向に広がった領域に描画されてしまう。一般にバーコードは、白い領域の幅にも情報を持っているから、白い領域の間隔が狭まってしまうことにより、バーコードの読み取り率を低下させてしまうという問題が発生することになる。
Next, the printing contents when barcode printing is performed by the printer 101 will be described.
FIG. 3 is an explanatory diagram of an example of barcode drawing.
FIG. 3A shows the barcode printing result when the paper size of the paper feed tray is A4 landscape. As shown in the figure, the A4 landscape paper 142 is transported in the paper traveling direction A toward the LED head 141, and printing is performed. At this time, an enlarged view of the dots drawn with the barcode is an enlarged view 144 of the dots. At this time, there is a problem that the toner spreads in the direction opposite to the paper traveling direction (downward in the drawing) or spreads and fixes due to a transfer error or the like. For this reason, the bar code 143 is drawn in an area where the black bar extends downward from the width that should be originally intended. In general, since a barcode has information on the width of the white area, the interval between the white areas is narrowed, which causes a problem of reducing the barcode reading rate.

図3(b)は、給紙トレイの用紙サイズがA4縦置きの場合の、バーコードの印刷結果を示したものである。図に示すように、A4縦置き用紙145は、LEDヘッド141に向かって用紙走行方向Aの方向に搬送が行なわれ、印刷が行なわれる。尚、A4縦置き用紙145に印刷される内容は、図3(a)におけるA4横置き用紙142と同じであり、両者を手にとって重ねてみれば、印刷された内容や印刷位置は同じものである。このとき、A4縦置き用紙145に描画されたドットを拡大して示した図が、ドットの拡大図147である。この時のトナーは、図3(a)と同様に、用紙走行方向と逆方向(図面の下方向)に向かって滲んだり、転写の誤差などにより、広がって定着してしまう。しかし、バーコード146のバーの方向である下方向と、トナーが広がって定着してしまう方向である下方向が、同一方向であり、バーコードとしての情報をもつLEDヘッドの方向B(図中左右方向)には、トナーの広がりは発生しないため、バーコード146の読み取り率は低下しない。また、読み取り率が低下しないもう一つの理由としては、方向Bに沿ってLED素子が一つ一つ解像度に応じた数だけ搭載されており、方向Bについてはトナーの広がりが抑えられていると言うことが上げられる。   FIG. 3B shows the barcode printing result when the paper size of the paper feed tray is A4 portrait. As shown in the figure, the A4 vertically placed paper 145 is conveyed in the paper running direction A toward the LED head 141, and printing is performed. Note that the content printed on the A4 portrait paper 145 is the same as that of the A4 landscape paper 142 in FIG. 3A, and the printed content and the print position are the same if they are stacked by hand. is there. At this time, an enlarged view of the dots drawn on the A4 portrait paper 145 is an enlarged view 147 of the dots. As in FIG. 3A, the toner at this time spreads in the direction opposite to the paper running direction (downward in the drawing) or spreads and fixes due to a transfer error or the like. However, the downward direction, which is the bar direction of the barcode 146, and the downward direction, which is the direction in which the toner spreads and fixes, are the same direction, and the direction B of the LED head having the information as the barcode (in the drawing) In the left-right direction), since the toner does not spread, the reading rate of the barcode 146 does not decrease. Another reason why the reading rate does not decrease is that the number of LED elements corresponding to the resolution is mounted along the direction B one by one, and the spread of toner in the direction B is suppressed. It can be raised.

本発明では、図3(a)に示すようにA4横置き用紙上にバーコードの高さ方向と用紙進行方向とが直角方向に配置されるバーコードの印刷要求を受け入れたとき、用紙走行方向選択部111が、バーコード及び印刷データの向きを90度回転させ、A4横置き用紙をA4縦置き用紙に変更することが可能か否かを判断し、可能と判断した場合には図3(b)の印刷出力を得ることになる。   In the present invention, as shown in FIG. 3 (a), when a barcode printing request in which the barcode height direction and the sheet traveling direction are arranged at right angles on the A4 landscape sheet is received, the sheet traveling direction is received. The selection unit 111 rotates the direction of the barcode and the print data by 90 degrees to determine whether or not the A4 landscape paper can be changed to the A4 portrait paper. The print output of b) is obtained.

次に、バーコード描画に関係する印刷コマンドの、コマンド仕様の一例について説明する。一般にプリンタの印刷コマンドには様々なコマンド体系が存在しているが、印刷コマンドによって指示される情報は本質的に同じものである。本実施例では、印刷コマンド体系として、最初にコマンド名をアルファベット二文字で指定し、続いて描画情報として付加的なパラメータをカンマで区切って数値で指定し、最後にセミコロンで終わるような印刷コマンド体系であるものとする。   Next, an example of a command specification of a print command related to barcode drawing will be described. In general, there are various command systems for printer print commands, but the information indicated by the print commands is essentially the same. In this embodiment, as the print command system, the command name is first specified by two alphabetic characters, then additional parameters are specified as drawing information by separating them with commas, and finally a print command that ends with a semicolon. It shall be a system.

具体的なバーコード描画に関係する4つの印刷コマンドについて、図を用いて説明する。
図4は、用紙サイズ選択コマンドの仕様の1例の説明図である。
図に示すように、印刷に使用したい用紙サイズは、PSn;コマンドによって指定する。nは、用紙サイズを指定する数値パラメータであり、その意味は図に示すように、nの数値により用紙サイズが設定されている。
Four print commands related to specific barcode drawing will be described with reference to the drawings.
FIG. 4 is an explanatory diagram of an example of the specification of the paper size selection command.
As shown in the figure, the paper size to be used for printing is designated by the PSn; command. n is a numerical parameter for designating the paper size, and its meaning is set by the numerical value of n as shown in the figure.

図5は、座標回転コマンドの仕様の1例の説明図である。
図5(a)は、座標回転コマンドの仕様の1例を表したものである。印刷コマンドで指定される座標系原点の回転を、ROn;コマンドによって指定する。尚、本実施例では、座標系の位置は、用紙の四つの角のいずれかの位置に位置するものとし、座標の回転角nとしては0°、90°、180°、270°により指定するものとする。0°のときは、用紙左上が原点位置であり、以後、半時計周りに回転方向を考えるものとする。
図5(b)は、その内容を図で表している。
FIG. 5 is an explanatory diagram of an example of the specification of the coordinate rotation command.
FIG. 5A shows an example of the specification of the coordinate rotation command. The rotation of the origin of the coordinate system specified by the print command is specified by the ROn; command. In this embodiment, the position of the coordinate system is assumed to be located at any one of the four corners of the paper, and the coordinate rotation angle n is designated by 0 °, 90 °, 180 °, and 270 °. Shall. When the angle is 0 °, the upper left corner of the sheet is the origin position, and the rotation direction is considered counterclockwise thereafter.
FIG. 5B shows the contents in a diagram.

図6は、バーコード設定コマンドの仕様の1例の説明図である。
図6(a)は、バーコード設定コマンドのコマンド仕様例を表したものである。描画したいバーコードの設定情報を、BSk,h,w1,w2,w3,w4;コマンドによって指定する。図に示すように、パラメータkは、バーコード種別を指定するものである。パラメータhは、バーコードの高さを1/600inch単位で指定するものである。パラメータw1,w2,w3,w4は、バーコード幅情報である。バーコード幅情報がどのような意味を持つのかは、各バーコードによって変化する。ただし、本実施例における説明では、パラメータw1,w2,w3,w4は、図6(b)に示したようなバーコード幅を指定するパラメータであるものとする。尚、バーコード設定コマンドは、このコマンドの受信状態では、バーコードの描画は行なわれない。
FIG. 6 is an explanatory diagram of an example of the specification of the barcode setting command.
FIG. 6A shows a command specification example of the barcode setting command. The setting information of the barcode to be drawn is designated by BSk, h, w1, w2, w3, w4; command. As shown in the figure, the parameter k specifies the barcode type. The parameter h specifies the height of the barcode in 1/600 inch units. Parameters w1, w2, w3, and w4 are barcode width information. The meaning of the bar code width information varies depending on each bar code. However, in the description of the present embodiment, the parameters w1, w2, w3, and w4 are parameters that specify the barcode width as shown in FIG. 6B. Note that the barcode setting command does not draw the barcode when the command is received.

図7は、バーコード描画コマンドの仕様の1例の説明図である。
図に示すように、描画したいバーコードの情報を、BAx,y,n,d1,d2,d3,…,dn;コマンドによって指定する。パラメータx,yは、バーコードの描画の開始座標(x,y)である。パラメータnは、バーコードとして描画したいデータの個数である。パラメータd1,d2,d3,…,dnは、バーコードとして描画したいデータ列(数値の列)である。
FIG. 7 is an explanatory diagram of an example of the specification of the barcode drawing command.
As shown in the figure, the information of the barcode to be drawn is designated by the BAx, y, n, d1, d2, d3,. The parameters x and y are the start coordinates (x, y) for drawing the barcode. The parameter n is the number of data to be drawn as a barcode. Parameters d1, d2, d3,..., Dn are data strings (numerical strings) to be drawn as barcodes.

尚、BSコマンドを使用する前に描画位置の(x,y)座標を指定するためのコマンドとして、PUコマンド(Pen Upコマンド)もコマンド体系の中に存在しているものとする。ただし、本実施例の説明としては直接関係ないため、その存在を省略して以後の説明を行なうものとする。   Note that a PU command (Pen Up command) is also present in the command system as a command for designating the (x, y) coordinates of the drawing position before using the BS command. However, since the description of this embodiment is not directly related, the existence thereof will be omitted and the following description will be given.

(動作)の説明
以上説明した本実施例のプリンタ101は、ホストPC120から送信されたバーコード印刷データを受信し、以下のように動作してバーコード印刷を行なう。
最初にホストPC120がバーコード印刷データを送信するまでの動作の概要について図1を用いて説明し、続いて、プリンタ101の動作についてフローチャートを用いて詳細に説明する。
Description of (Operation) The printer 101 of the present embodiment described above receives the barcode print data transmitted from the host PC 120 and operates as follows to perform barcode printing.
First, an outline of an operation until the host PC 120 transmits barcode print data will be described with reference to FIG. 1, and then an operation of the printer 101 will be described in detail with reference to a flowchart.

まず、バーコード印刷を行ないたいユーザは、入力部120aを介してホストPC120のバーコードアプリケーション121を起動して、描画したいバーコードの種別や大きさ、描画位置、その他の文字や図形やイメージのレイアウトを作成する。レイアウト制御部122は、ユーザが操作した入力部120aから入力情報を検出し、操作指示に従ってバーコード印刷内容のレイアウト処理を行なう。その際、レイアウト画面は、画面表示制御部124を通じて、ホストPC120の図示しないモニタ装置の画面に表示される。   First, a user who wants to perform barcode printing activates the barcode application 121 of the host PC 120 via the input unit 120a, and displays the type and size of the barcode to be drawn, the drawing position, and other characters, figures and images. Create a layout. The layout control unit 122 detects input information from the input unit 120a operated by the user, and performs layout processing of barcode print contents according to the operation instruction. At that time, the layout screen is displayed on the screen of the monitor device (not shown) of the host PC 120 through the screen display control unit 124.

続いて、ユーザがバーコードアプリケーション121上で印刷開始指示のボタンを押下すると、レイアウト制御部122がそれを検知し、バーコード描画コマンド生成部123を呼び出す。バーコード描画コマンド生成部123は、プリンタ101が解釈可能な印刷コマンドを生成し、印刷データ送信部125を通じてプリンタ101に送信する。尚、印刷データ中には、バーコード印刷のレイアウトに対応した数々の印刷コマンドが含まれている。   Subsequently, when the user presses a print start instruction button on the barcode application 121, the layout control unit 122 detects this and calls the barcode drawing command generation unit 123. The barcode drawing command generation unit 123 generates a print command that can be interpreted by the printer 101 and transmits the print command to the printer 101 through the print data transmission unit 125. The print data includes a number of print commands corresponding to the barcode printing layout.

ここで、プリンタ101が受信する印刷データの内部に含まれる印刷コマンドの具体的な例として、特にバーコードの描画に関係するコマンドについて図を用いて説明する。
図8は、コマンド列の解析例の説明図である。
図8(a)は、プリンタ101が受信するコマンド列の1例を表している。
図8(b)は、コマンド列に含まれているコマンドの意味を表している。
図に示すコマンド列は、既に説明した図4〜図7の印刷コマンドの列によって、構成されている。
このコマンド列をプリンタ101が受信することにより、プリンタ101のバーコード印刷動作が開始される。
Here, as a specific example of the print command included in the print data received by the printer 101, a command related to barcode drawing will be described with reference to the drawings.
FIG. 8 is an explanatory diagram of an example of analyzing a command string.
FIG. 8A shows an example of a command sequence received by the printer 101.
FIG. 8B shows the meaning of the commands included in the command sequence.
The command sequence shown in the figure is configured by the print command sequence shown in FIGS.
When the printer 101 receives this command string, the barcode printing operation of the printer 101 is started.

図9は、実施例1のプリンタの全体動作の概要フローチャートである。
ステップS101からステップS107まで、図1を併用しながらステップ順にプリンタ101の全体動作の概要について説明する。
FIG. 9 is a flowchart illustrating the overall operation of the printer according to the first embodiment.
From step S101 to step S107, an outline of the overall operation of the printer 101 will be described in order of steps while using FIG.

ステップS101
印刷データ受信部102は、ホストPC120から印刷データを受信する。
Step S101
The print data receiving unit 102 receives print data from the host PC 120.

ステップS102
印刷データ受信部102は、受信した印刷データを、印刷データ先読み部103に受け渡しする。
Step S102
The print data receiving unit 102 passes the received print data to the print data prefetching unit 103.

ステップS103
印刷データ先読み部103は、上記印刷データを先読みし、バーコード描画コマンドが含まれているかどうかを検出する。尚、この動作フローの詳細については、後に再度説明する。
Step S103
The print data prefetch unit 103 prefetches the print data and detects whether a bar code drawing command is included. Details of this operation flow will be described later again.

ステップS104
用紙走行方向選択部111は、上記バーコードの検出結果に基づいて、印刷に使用したい用紙サイズが期待する走行方向にセットされている給紙トレイを選択する。尚、この動作フローの詳細については、後に再度説明する。
Step S104
The paper travel direction selection unit 111 selects a paper feed tray set in the travel direction where the paper size desired to be printed is expected based on the detection result of the barcode. Details of this operation flow will be described later again.

ステップS105
印刷データ解析部115は、上記印刷データ中の印刷コマンドを解析し、編集処理を行なう。
Step S105
The print data analysis unit 115 analyzes a print command in the print data and performs an editing process.

ステップS106
描画処理部116は、描画処理を行い、印刷する為の画像データを生成する。
Step S106
The drawing processing unit 116 performs drawing processing and generates image data for printing.

ステップS107
画像形成部117が、画像データに基づいてトナーを用紙に転写することで、用紙に印刷を行なう。
Step S107
The image forming unit 117 performs printing on the paper by transferring the toner to the paper based on the image data.

以上の動作フローにより、バーコード印刷が完了する。
尚、このときの描画処理部116は、印刷データ内に指定されているバーコードのサイズの指定コマンドに基づいて、バーコードを指定の大きさに縮小した描画を行なうことになる。
With the above operation flow, barcode printing is completed.
Note that the drawing processing unit 116 at this time performs drawing by reducing the barcode to a specified size based on the barcode size specification command specified in the print data.

次に、印刷データ先読み部103の動作(上記ステップS103が該当する)の詳細について説明する。
図10は、実施例1の印刷データ先読み部の動作フローチャート(その1)である。
図11は、実施例1の印刷データ先読み部の動作フローチャート(その2)である。
図10のステップS201からステップS213まで、図11のステップS214からステップS218まで、ステップ順に図1を併用しながら説明する。
Next, details of the operation of the print data prefetch unit 103 (corresponding to step S103) will be described.
FIG. 10 is an operation flowchart (part 1) of the print data prefetching unit according to the first embodiment.
FIG. 11 is an operation flowchart (part 2) of the print data prefetching unit according to the first embodiment.
Description will be made from step S201 to step S213 in FIG. 10 and from step S214 to step S218 in FIG.

ステップS201
印刷データ先読み部103は、バーコード描画情報格納部110の格納内容をクリアする。
Step S201
The print data prefetching unit 103 clears the stored contents of the barcode drawing information storage unit 110.

ステップS202
印刷データ先読み部103は、先読みバッファ104に、印刷データをコピーする。
Step S202
The print data prefetch unit 103 copies the print data to the prefetch buffer 104.

ステップS203
印刷データ先読み部103は、先読みバッファの最後まで読み出し済みであるかを判断する。このとき、読み出し完了であった場合は、印刷データ先読み部103としての動作が完了する。すなわち、図9におけるステップS103が完了して、次のステップS104に処理が移行する。一方、読み出し完了ではなかった場合は、ステップS204へ進む。
Step S203
The print data prefetching unit 103 determines whether the prefetch buffer has been read to the end. At this time, when the reading is completed, the operation as the print data prefetching unit 103 is completed. That is, step S103 in FIG. 9 is completed, and the process proceeds to the next step S104. On the other hand, if the reading is not completed, the process proceeds to step S204.

ステップS204
印刷データ先読み部103は、先読みバッファ104から印刷データを1バイトづつ取り出し、どのコマンドを受信したかを判断する。具体的には、1文字取り出しては、印刷コマンドの先頭1文字目、2文字目とが、それぞれ一致するかどうかを判定して行く。印刷コマンドの判別処理自体は一般的な技術として知られているから、本動作フローの説明では詳細な説明を省略する。
尚、本ステップS204の後の動作フローでは、印刷データ先読み部103が、先読みして検出した印刷コマンドに基づいて、バーコード設定コマンド検出部105、バーコード描画コマンド検出部106、用紙サイズ選択コマンド検出部108、座標回転コマンド検出部109の呼び出しを行なう。この動作について、以後のステップで説明する。
Step S204
The print data prefetch unit 103 extracts print data byte by byte from the prefetch buffer 104 and determines which command has been received. Specifically, when one character is extracted, it is determined whether the first character and the second character of the print command match each other. Since the print command determination process itself is known as a general technique, a detailed description thereof will be omitted in the description of this operation flow.
In the operation flow after step S204, the bar code setting command detecting unit 105, the bar code drawing command detecting unit 106, and the paper size selection command based on the print command detected by the print data pre-reading unit 103 are read in advance. The detection unit 108 and the coordinate rotation command detection unit 109 are called. This operation will be described in the subsequent steps.

ステップS205
上記ステップS204の判断結果で、用紙サイズ選択コマンドが検出された場合には、ステップS206へ進み、そうでなければ、ステップS208へ進む。
Step S205
If the paper size selection command is detected as a result of the determination in step S204, the process proceeds to step S206. Otherwise, the process proceeds to step S208.

ステップS206
印刷データ先読み部103は、用紙サイズ選択コマンド検出部108を呼び出しする。
Step S206
The print data prefetch unit 103 calls the paper size selection command detection unit 108.

ステップS207
用紙サイズ選択コマンド検出部108が、コマンドパラメータを検出し、バーコード描画情報格納部110に格納する。格納後に処理はステップS203に戻る。
尚ここで、コマンドパラメータの検出の具体例としては、まず用紙サイズ選択コマンド検出部108が、図8の受信データ列のPSコマンドに続くパラメータである「14;」を検出し、次に図4の仕様に基づいてA4サイズが指定されたことを解釈する。そして「用紙サイズ=A4」の情報は、バーコード描画情報格納部110に格納される。
Step S207
The paper size selection command detection unit 108 detects command parameters and stores them in the barcode drawing information storage unit 110. After storage, the process returns to step S203.
Here, as a specific example of the command parameter detection, first, the paper size selection command detection unit 108 detects “14;” which is a parameter following the PS command of the received data string in FIG. It is interpreted that the A4 size is designated based on the specifications. The information “paper size = A4” is stored in the barcode drawing information storage unit 110.

ここで、バーコード描画情報格納部110の内容について説明する。
図12は、実施例1のバーコード描画情報の格納例の説明図である。
図に示すように、バーコード描画情報を格納するバーコード描画情報ファイルには、用紙サイズ、各バーコードの描画時の回転方向及び最小バーコードサイズを格納する領域が設けられている。上記A4は、用紙サイズの格納領域に格納されることになる。再度図10へ戻る。
Here, the contents of the barcode drawing information storage unit 110 will be described.
FIG. 12 is an explanatory diagram of a storage example of barcode drawing information according to the first embodiment.
As shown in the figure, the barcode drawing information file for storing the barcode drawing information is provided with areas for storing the paper size, the rotation direction at the time of drawing each barcode, and the minimum barcode size. The A4 is stored in the storage area for the paper size. Returning again to FIG.

ステップS208
上記ステップS204の判断結果で、座標回転コマンドが検出された場合には、ステップS209へ進み、そうでなければ、ステップS211へ進む。
Step S208
If a coordinate rotation command is detected as a result of the determination in step S204, the process proceeds to step S209. Otherwise, the process proceeds to step S211.

ステップS209
印刷データ先読み部103は、座標回転コマンド検出部109を呼び出しする。
Step S209
The print data prefetch unit 103 calls the coordinate rotation command detection unit 109.

ステップS210
座標回転コマンド検出部109が、コマンドパラメータを検出し、設定を一旦内部に保持する。その後、処理はステップS203に戻る。
尚ここで、コマンドパラメータの検出の具体例としては、まず座標回転コマンド検出部109が、図8の受信データ列のROコマンドに続くパラメータである「0;」を検出し、次に図5(a)の仕様に基づいて回転角0°が指定されたことを解釈する。
Step S210
A coordinate rotation command detection unit 109 detects a command parameter and temporarily holds the setting therein. Thereafter, the process returns to step S203.
Here, as a specific example of the command parameter detection, first, the coordinate rotation command detection unit 109 detects “0;” that is a parameter following the RO command in the received data string in FIG. It is interpreted that the rotation angle 0 ° is designated based on the specification of a).

ステップS211
上記ステップS204の判断結果で、バーコード設定コマンドが検出された場合には、ステップS212へ進み、そうでなければ、ステップS214へ進む。
Step S211
If a bar code setting command is detected as a result of the determination in step S204, the process proceeds to step S212. Otherwise, the process proceeds to step S214.

ステップS212
印刷データ先読み部103が、バーコード設定コマンド検出部105を呼び出しする。
Step S212
The print data prefetch unit 103 calls the bar code setting command detection unit 105.

ステップS213
バーコード設定コマンド検出部105が、コマンドパラメータを検出し、設定を一旦内部に保持する。その後、処理はステップS203に戻る。
尚ここで、コマンドパラメータの検出の具体例としては、まずバーコード設定コマンド検出部105が、図8の受信データ列のBSコマンドに続くパラメータである「21,600,50,100,150,200;」を検出し、次に図6(a)の仕様に基づいて、バーコード種別がEAN/JAN−8であり、バーコード高さが600ドットであり、バーコード幅が50ドット、100ドット、150ドット、200ドットであるバーコードが指定されたことを解釈する。
Step S213
The barcode setting command detection unit 105 detects the command parameter and temporarily holds the setting therein. Thereafter, the process returns to step S203.
Here, as a specific example of the command parameter detection, first, the bar code setting command detection unit 105 performs parameters “21, 600, 50, 100, 150, 200” that are parameters following the BS command of the received data string in FIG. Next, based on the specification of FIG. 6A, the barcode type is EAN / JAN-8, the barcode height is 600 dots, the barcode width is 50 dots, 100 dots. , 150 dots and 200 dots are specified.

ステップS214
上記ステップS204の判断結果で、バーコード描画コマンドが検出された場合には、ステップS215へ進み、そうでなければ、処理はステップS203に戻る。
Step S214
If a barcode drawing command is detected as a result of the determination in step S204, the process proceeds to step S215. Otherwise, the process returns to step S203.

ステップS215
印刷データ先読み部103は、バーコード描画コマンド検出部106を呼び出しする。
Step S215
The print data prefetch unit 103 calls the barcode drawing command detection unit 106.

ステップS216
バーコード描画コマンド検出部106は、コマンドパラメータを検出する。
尚ここで、コマンドパラメータの検出の具体例としては、まずバーコード描画コマンド検出部106が、図8の受信データ列のBAコマンドに続くパラメータである「1800,2400,10,0,1,2,3,4,5,6,7,8,9;」を検出し、次に図7の仕様に基づいて、バーコードの描画開始位置が(1800,2400)であり、バーコードデータのデータ数が10であり、バーコードに置き換えたいデータが0,1,2,3,4,5,6,7,8,9の10個のデータあるバーコード描画を行なうことが指定されたことを解釈する。
Step S216
The bar code drawing command detection unit 106 detects command parameters.
Here, as a specific example of the command parameter detection, first, the bar code drawing command detecting unit 106 first sets parameters “1800, 2400, 10, 0, 1, 2” which are parameters following the BA command of the received data string in FIG. , 3, 4, 5, 6, 7, 8, 9; ”, and based on the specification of FIG. 7, the barcode drawing start position is (1800, 2400), and the barcode data The number is 10, and it is specified that the data to be replaced with the barcode is drawn with 10 data of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Interpret.

ステップS217
最小バーサイズ検出部107は、検出されたコマンドパラメータから、最小バーサイズを検出し、一旦内部に保持する。
尚ここで、最小バーサイズの検出の具体例としては、ステップS213でバーコード設定コマンド検出部105が内部に保持していたバーコード設定情報と、ステップS216で解釈したバーコードに置き換えたいデータとから、実際に描画されるときのバーコードのバーの幅方向のサイズを算出して、そのうち最も小さいものを選択することで実現する。
尚、バーのサイズはバーコード種別によっても変化するから、最小バーサイズ検出部107は、バーコード種別によって算出方法を切り替えるものである(その詳細については、本実施例の説明を行なううえで影響がない部分であるから、説明を省略する。)。
Step S217
The minimum bar size detection unit 107 detects the minimum bar size from the detected command parameter and temporarily holds it inside.
Here, as a specific example of detection of the minimum bar size, the bar code setting information held in the bar code setting command detection unit 105 in step S213 and the data to be replaced with the bar code interpreted in step S216 From this, it is realized by calculating the size of the bar code in the width direction when it is actually drawn, and selecting the smallest one of them.
Since the bar size also changes depending on the bar code type, the minimum bar size detecting unit 107 switches the calculation method depending on the bar code type (the details are affected in explaining the present embodiment). Since there is no part, explanation is omitted.)

ステップS218
バーコード描画コマンド検出部106は、座標回転コマンド検出部109の内部に保持されている回転設定の情報と、先に最小バーサイズ検出部107の内部に保持している最小バーコード幅の情報をセットにして、バーコード描画情報格納部110に格納する。具体的には、図12に示すように、「No.001 バーコード回転角=0° 最小バーコード幅=50ドット」のように一行分のデータを格納する。
Step S218
The barcode drawing command detection unit 106 receives the rotation setting information held in the coordinate rotation command detection unit 109 and the minimum barcode width information previously held in the minimum bar size detection unit 107. The set is stored in the barcode drawing information storage unit 110. Specifically, as shown in FIG. 12, one line of data is stored such as “No. 001 barcode rotation angle = 0 °, minimum barcode width = 50 dots”.

尚、受信データ中には複数のバーコード描画コマンドが含まれて良いため、バーコード描画コマンド検出部106がバーコード描画コマンドを検出する毎に、同様の情報をバーコード描画情報格納部110に格納する。
具体的には、図12に示すように、「No.002 バーコード回転角=0° 最小バーコード幅=60ドット」のように、次々に一行分のデータを追加で格納して行く。図12は、任意の回数を格納したとして、最後の行に「No.xxx バーコード回転角=0° 最小バーコード幅=100ドット」を格納したところまでの例である。
Since the received data may include a plurality of barcode drawing commands, the same information is stored in the barcode drawing information storage unit 110 every time the barcode drawing command detection unit 106 detects a barcode drawing command. Store.
Specifically, as shown in FIG. 12, one line of data is additionally stored one after another as in “No. 002 barcode rotation angle = 0 ° minimum barcode width = 60 dots”. FIG. 12 is an example up to the point where “No. xxx barcode rotation angle = 0 ° minimum barcode width = 100 dots” is stored in the last row, assuming that an arbitrary number of times is stored.

次に、用紙走行方向選択部111の動作について説明する。
図13は、用紙走行方向選択部の動作フローチャートである。
このフローチャートは、図9のステップS104の内部処理を、具体的に表したものである。ステップS301からステップS316まで図1を併用しながらステップ順に説明する。
Next, the operation of the paper travel direction selection unit 111 will be described.
FIG. 13 is an operation flowchart of the paper travel direction selection unit.
This flowchart specifically shows the internal processing in step S104 of FIG. Steps S301 to S316 will be described in order of steps while using FIG.

ステップS301
用紙走行方向選択部111は、バーコード描画情報格納部110から、バーコード描画情報を取得する。具体例としては、先に図12で説明したようなバーコード描画情報を取得する。
Step S301
The paper travel direction selection unit 111 acquires barcode drawing information from the barcode drawing information storage unit 110. As a specific example, barcode drawing information as described above with reference to FIG. 12 is acquired.

ステップS302
用紙走行方向選択部111は、バーコード描画情報の中身を確認し、これから印刷を行なおうとする印刷データの中に、一つでもバーコード描画コマンドが含まれているかどうかを判断する。そして、バーコード描画コマンド有りの場合はステップS303に進む。一方、バーコード描画コマンド無しの場合はステップS316へ進む。
尚、判断の具体的な例としては、図12に示したバーコード描画情報の中に、「No.001 バーコード回転角=0° 最小バーコード幅=50ドット」のような行が一つでも存在していれば、バーコード描画コマンドが有りと判断する。
Step S302
The paper traveling direction selection unit 111 confirms the contents of the barcode drawing information, and determines whether at least one barcode drawing command is included in the print data to be printed. If there is a barcode drawing command, the process proceeds to step S303. On the other hand, if there is no barcode drawing command, the process proceeds to step S316.
As a specific example of the determination, one line such as “No.001 Barcode rotation angle = 0 ° Minimum barcode width = 50 dots” is included in the barcode drawing information shown in FIG. However, if it exists, it is determined that there is a barcode drawing command.

ステップS303
用紙走行方向選択部111は、バーコード描画情報の中身を確認し、印刷データに含まれるバーコードの描画方向が全て同じ方向であるかを判断する。そして、バーコード回転角が全て同じである場合はステップS304に進む。一方、バーコード回転角が全て同じではない場合はステップS313へ進む。
尚、判断の具体的な例としては、図12に示したバーコード描画情報の中の、各行に含まれる「バーコード回転角=」に格納されているバーコード回転角を確認し、全てのバーコード回転角が同じ値であるかどうかで判断する。
Step S303
The paper travel direction selection unit 111 confirms the contents of the barcode drawing information and determines whether all the barcode drawing directions included in the print data are the same direction. If all the barcode rotation angles are the same, the process proceeds to step S304. On the other hand, if the barcode rotation angles are not all the same, the process proceeds to step S313.
As a specific example of the determination, the barcode rotation angle stored in “Barcode rotation angle =” included in each line in the barcode drawing information shown in FIG. Judgment is made based on whether the barcode rotation angle is the same value.

ステップS304
用紙走行方向選択部111は、バーコード描画情報の中身を確認し、印刷データに含まれるバーコード描画のバーの幅のうち、最小のバーコード幅を取得する。具体的な例としては、図12に示したバーコード描画情報の中の、各行に含まれる「最小バーコード幅=」に格納されている最小バーコード幅を確認し、そのうちの最小のバーコード幅を取得する。
Step S304
The paper traveling direction selection unit 111 confirms the contents of the barcode drawing information, and acquires the minimum barcode width of the barcode drawing bars included in the print data. As a specific example, the minimum barcode width stored in “minimum barcode width =” included in each line in the barcode drawing information shown in FIG. Get the width.

ステップS305
用紙走行方向選択部111は、ステップS304で取得した最小バーコード幅が、例えば1/600インチdpiで5ドット未満であるかを判断する。そして、5ドット未満である場合はステップS306に進む。一方、5ドット未満でなければステップS316へ進む。尚、1/600インチdpiで5ドットという判断基準は、横方向位置でバーコードを読み取った場合に誤検出となる限界値の一例であって、実際にはプリンタ101の印刷特性を考慮して決定すれば良い。
Step S305
The paper traveling direction selection unit 111 determines whether the minimum barcode width acquired in step S304 is less than 5 dots at 1/600 inch dpi, for example. If it is less than 5 dots, the process proceeds to step S306. On the other hand, if it is not less than 5 dots, the process proceeds to step S316. Note that the criterion of 1/600 inch dpi and 5 dots is an example of a limit value that is erroneously detected when a bar code is read in the horizontal position. In practice, the printing characteristics of the printer 101 are taken into consideration. Just decide.

ステップS306
用紙走行方向選択部111は、バーコード描画情報の中身を確認し、用紙サイズ情報を取得する。具体的な例としては、図12に示したバーコード描画情報の中の、「用紙サイズ=A4」の行に格納されている用紙サイズを確認し、A4用紙サイズへの印刷指定であることの情報を取得する。
Step S306
The paper travel direction selection unit 111 confirms the contents of the barcode drawing information and acquires paper size information. As a specific example, the paper size stored in the line “paper size = A4” in the barcode drawing information shown in FIG. 12 is confirmed, and the print designation to the A4 paper size is specified. Get information.

ステップS307
用紙走行方向選択部111は、搭載用紙走行方向検出部112から、用紙走行方向情報を取得する。このとき、搭載用紙走行方向検出部112は、トレイ1制御部113およびトレイ2制御部114に問い合わせて、各トレイにセットされている用紙サイズの情報を取得し、用紙走行方向情報を作成して用紙走行方向選択部111へ通知する。ここで用紙走行方向情報について説明する。
Step S307
The paper travel direction selection unit 111 acquires paper travel direction information from the loaded paper travel direction detection unit 112. At this time, the loaded paper travel direction detection unit 112 inquires of the tray 1 control unit 113 and the tray 2 control unit 114, acquires information on the paper size set in each tray, and creates paper travel direction information. The paper travel direction selection unit 111 is notified. Here, the paper traveling direction information will be described.

図14は、用紙走行方向情報の1例の説明図である。
図に示すように用紙走行方向情報には、個々のトレイに格納されている用紙サイズと用紙の載置方向が格納されている。再度図13へ戻る。
FIG. 14 is an explanatory diagram of an example of the paper traveling direction information.
As shown in the figure, the paper travel direction information stores the paper size stored in each tray and the paper placement direction. Returning again to FIG.

ステップS308
用紙走行方向選択部111は、ステップS303で判断したバーコード回転角が0°または180°で有るかを判断する。そして、0°または180°であった場合にはステップS309へ進み、そうでない場合にはステップS311へ進む。具体的な例としては、バーコード描画情報格納部110に格納されているバーコード格納情報が、図12の通りであった場合は、バーコード回転角は0°であるからステップS309へ進むことになる。尚、ここで、バーコード回転角が0°または180°であることは、用紙を縦に見たときにバーコードのバーの描画方向が縦方向(図5(b))であることを意味している。
Step S308
The paper travel direction selection unit 111 determines whether the barcode rotation angle determined in step S303 is 0 ° or 180 °. If the angle is 0 ° or 180 °, the process proceeds to step S309. If not, the process proceeds to step S311. As a specific example, if the barcode storage information stored in the barcode drawing information storage unit 110 is as shown in FIG. 12, the barcode rotation angle is 0 °, and the process proceeds to step S309. become. Here, the barcode rotation angle being 0 ° or 180 ° means that the drawing direction of the barcode bar is the vertical direction (FIG. 5B) when the paper is viewed vertically. is doing.

ステップS309
用紙走行方向選択部111は、ステップS307で取得した用紙走行方向情報を参照し、ステップS306で取得した用紙サイズに対して、縦置きの用紙走行方向が選択可能かを判断する。縦置きの用紙走行方向を選択可能かを判断する理由は、図3について説明したように、縦置き用紙への印刷の場合の方が横置き用紙の場合よりもバーコードの印刷品位が高いからである。そして、選択可能であればステップS310に進む。一方、選択可能でなければステップS313へ進む。具体的な動作の例としては、用紙走行方向選択部111が、ステップS307で取得した図14の用紙走行方向情報を参照することで、A4縦置きとA4横置きの両方がトレイ2、トレイ1にそれぞれセットされており選択可能であることを知り、ステップS306で取得したA4サイズのバーコード印刷は、縦置きの用紙走行方向を選択して印刷可能であると判断する。
Step S309
The paper travel direction selection unit 111 refers to the paper travel direction information acquired in step S307, and determines whether or not the vertical paper travel direction can be selected for the paper size acquired in step S306. The reason why it is possible to determine whether or not the vertical paper running direction can be selected is that, as described with reference to FIG. 3, the printing quality of the barcode is higher when printing on the vertical paper than when using the horizontal paper. It is. If selection is possible, the process proceeds to step S310. On the other hand, if it cannot be selected, the process proceeds to step S313. As a specific example of the operation, the sheet traveling direction selection unit 111 refers to the sheet traveling direction information of FIG. 14 acquired in step S307, so that both A4 portrait and A4 landscape are tray 2 and tray 1. The A4 size barcode printing acquired in step S306 is determined to be printable by selecting the vertical paper traveling direction.

ここで印刷品質向上のための対応方法について図を用いて説明する。
図15は、印刷品位向上処理の説明図である。
図中用紙進行方向をAとし、(a)は、縦置き用紙に縦方向バーコードを印刷した場合を、(b)は、縦置き用紙横方向バーコードを印刷した場合を、(c)は、横置き用紙に横方向バーコードを印刷した場合を、(d)は、横置き用紙に縦方向バーコードを印刷した場合を、それぞれあらわしている。
Here, a corresponding method for improving print quality will be described with reference to the drawings.
FIG. 15 is an explanatory diagram of print quality improvement processing.
In the figure, the paper traveling direction is A, (a) shows a case where a vertical barcode is printed on a vertical paper, (b) shows a case where a vertical paper horizontal barcode is printed, and (c) shows a case where (D) shows the case where the horizontal barcode is printed on the horizontally placed paper, and (d) shows the case where the vertical barcode is printed on the horizontally placed paper.

(a)の場合には、縦置き用紙のまま印刷すれば良い。(b)の場合には90°回転させ横置きの用紙を選択すれば良い。(c)の場合は、270°回転させ縦置き用紙を選択すれば良く、(d)の場合は、横置き用紙のままそのまま印刷すれば良いことになる。   In the case of (a), printing may be performed with the vertically placed paper. In the case of (b), it is sufficient to rotate the sheet 90 ° and select a horizontally placed sheet. In the case of (c), it is only necessary to rotate the sheet by 270 ° and select the vertically placed paper.

従ってバーコード回転角が0°または180°のとき、用紙縦置きの方がバーコードの印刷品位が良いことの理由は、(a)のように用紙走行方向とバーコードのバーの方向を一致させて印刷できるからである。もし、用紙横置きを選択して印刷すると(c)のように印刷されてしまうため、バーコード幅が小さければ、図3で説明したように印刷の滲みの問題により、バーコードの読み取り品質が低下してしまうことになる。   Therefore, when the barcode rotation angle is 0 ° or 180 °, the reason why the vertical print quality of the barcode is better is the same as the paper travel direction and the barcode bar direction as shown in (a). This is because it can be printed. If the paper is placed horizontally and printed, it will be printed as shown in (c). If the barcode width is small, the barcode reading quality will be reduced due to the problem of blurring of printing as described in FIG. It will fall.

このため、(c)のような印刷は行なわずに(c)の印刷内容を回転させ、(a)のように縦置き用紙を選択して印刷することの方が印刷品位が良くなると判断できる。尚、(a)と(c)は、バーコード回転角が0°であった場合の例である。図13へ戻る。   For this reason, it can be determined that the printing quality is improved by rotating the printing contents of (c) without performing printing as in (c) and selecting and printing the vertically placed paper as in (a). . Incidentally, (a) and (c) are examples when the barcode rotation angle is 0 °. Returning to FIG.

ステップ310
用紙走行方向選択部111は、バーコート描画情報格納部110に格納されている情報に基づいて、該当する用紙サイズの縦置きを印刷に使用する媒体として選択する。具体的には、用紙走行方向選択部111が、トレイ2制御部114に対して、トレイ2に搭載されている用紙を選択して印刷を行なうことの指示を出す。尚、複数のトレイ選択から一つを選択して印刷することの制御方法については一般的な概念であり、本実施例の動作の説明には直接影響を受ける部分ではないので、詳細な説明を省略する。最後に、本ステップの動作が完了すると、図13における用紙走行方向選択部111としての動作が終了する。これは図9のステップS104の内部処理が完了したことを意味するから、装置全体の制御は、図9のステップS105へと移行する。
Step 310
Based on the information stored in the bar coat drawing information storage unit 110, the paper travel direction selection unit 111 selects the vertical placement of the corresponding paper size as a medium to be used for printing. Specifically, the paper travel direction selection unit 111 instructs the tray 2 control unit 114 to select the paper loaded in the tray 2 and perform printing. Note that the control method for selecting one of a plurality of tray selections and printing is a general concept, and is not directly affected by the description of the operation of this embodiment. Omitted. Finally, when the operation of this step is completed, the operation as the paper travel direction selection unit 111 in FIG. This means that the internal processing in step S104 in FIG. 9 has been completed, and control of the entire apparatus shifts to step S105 in FIG.

ステップS311
用紙走行方向選択部111が、ステップS307で取得した用紙走行方向情報を参照し、ステップS306で取得した用紙サイズに対して、(バーコードの印刷品位が良くなると期待できる)横置きの用紙走行方向が選択可能か否かを判断する。そして、選択可能であればステップS312へ進み、そうでない場合にはステップS313へ進む。
Step S311
The paper travel direction selection unit 111 refers to the paper travel direction information acquired in step S307, and the horizontal paper travel direction (which can be expected to improve the print quality of the barcode) with respect to the paper size acquired in step S306. It is determined whether or not can be selected. If selection is possible, the process proceeds to step S312; otherwise, the process proceeds to step S313.

尚、具体的な動作の例としては、用紙走行方向選択部111がステップS307で取得した図14の用紙走行方向情報を参照することで、A4縦置きとA4横置きの両方が選択可能であることを知り、ステップS306で取得したA4サイズのバーコード印刷は、(バーコードの印刷品位が良くなると期待できる)横置き用紙走行方向を選択して印刷可能であると判断する。ここでバーコード回転角が0°または180°のとき、用紙横置きの方がバーコードの印刷品位が良くなる理由は、図15の(d)のように用紙走行方向とバーコードのバーの方向を一致させて印刷できるからである。もし、用紙縦置きを選択して印刷すると図15の(b)のように印刷されてしまうため、バーコード幅が小さければ、図3で説明した印刷の滲みの問題により、バーコードの読み取り品質が低下してしまうことになる。このため図15の(b)のような印刷は行なわずに、その内容を回転させ、図15の(d)のような用紙横置きを選択して印刷することの方が印刷品位が良いと判断する。尚、図15の(b)と(d)は、バーコード回転角が90°であった場合の例である。   As a specific example of the operation, both the A4 portrait orientation and the A4 landscape orientation can be selected by referring to the paper travel direction information of FIG. 14 acquired by the paper travel direction selection unit 111 in step S307. Knowing this, it is determined that the A4 size barcode printing acquired in step S306 can be printed by selecting the horizontal paper traveling direction (which can be expected to improve the printing quality of the barcode). Here, when the barcode rotation angle is 0 ° or 180 °, the reason why the printing quality of the barcode is better when the paper is placed horizontally is as shown in FIG. This is because the printing can be performed with the directions matched. If printing is performed with the vertical paper orientation selected, printing is performed as shown in FIG. 15B. Therefore, if the barcode width is small, the barcode reading quality is caused by the problem of blurring of printing described in FIG. Will fall. For this reason, the printing quality is better when the contents are rotated without selecting the printing as shown in FIG. 15B, and the printing is performed by selecting the paper horizontal placement as shown in FIG. 15D. to decide. FIGS. 15B and 15D are examples in which the barcode rotation angle is 90 °.

ステップS312
用紙走行方向選択部111が、該当する用紙サイズの横置きを、印刷に使用する媒体として選択する。具体的には、用紙走行方向選択部111が、トレイ1制御部113に対して、トレイ1に搭載されている用紙を選択して印刷を行なうことの指示を出す。尚、複数のトレイから1つを選択して印刷することの制御方法については一般的な概念であり、本実施例の動作の説明には直接影響を受ける部分ではないので、詳細な説明は省略する。最後に、本ステップの動作が完了すると、図9のステップS104の内部処理が完了したことを意味するから、装置全体の制御は、図9のステップS105へ移行することになる。
Step S312
The paper traveling direction selection unit 111 selects the horizontal orientation of the corresponding paper size as a medium used for printing. Specifically, the paper travel direction selection unit 111 instructs the tray 1 control unit 113 to select the paper loaded in the tray 1 and perform printing. The control method for selecting and printing one of a plurality of trays is a general concept, and is not directly affected by the description of the operation of the present embodiment, so detailed description thereof is omitted. To do. Finally, when the operation in this step is completed, it means that the internal processing in step S104 in FIG. 9 has been completed. Therefore, the control of the entire apparatus shifts to step S105 in FIG.

ステップS313
用紙走行方向選択部111は、バーコード印刷を行なうか否かを問うメッセージを表示させる。また、それとともにプリンタ利用者からの応答(許可またはキャンセル)を受付る。具体的には、プリンタ101の操作パネル上の情報表示部に対して「一定の精度を持ったバーコードが印刷できないかも知れません。バーコード印刷を行ないますか?」のメッセージを表示させて、利用者がプリンタ101の操作パネル上のオンラインボタンまたは印刷キャンセルボタンのいずれかを押下するのを検出することが実装例として考えられる。
Step S313
The paper travel direction selection unit 111 displays a message asking whether or not to perform barcode printing. At the same time, a response (permission or cancellation) from the printer user is accepted. Specifically, the message “A barcode with a certain accuracy may not be printed. Do you want to print the barcode?” Is displayed on the information display section on the operation panel of the printer 101. As an implementation example, it is possible to detect that the user presses either the online button or the print cancel button on the operation panel of the printer 101.

ステップS314
用紙走行方向選択部111は、ステップS313における利用者からの応答結果を判別し、応答が印刷キャンセルであった場合はステップS315へ進む。一方、応答が印刷キャンセルではなかった場合にはステップS316へ進む。
Step S314
The paper travel direction selection unit 111 determines the response result from the user in step S313, and if the response is print cancellation, the process proceeds to step S315. On the other hand, if the response is not print cancellation, the process proceeds to step S316.

ステップS315
用紙走行方向選択部111は、現在処理中の印刷ジョブに対して印刷キャンセルを実行する。尚、印刷キャンセル動作の実装方法については、本実施例の動作の説明には直接影響を受ける部分ではないので、詳細な説明を省略する。
Step S315
The paper travel direction selection unit 111 executes print cancel for the print job currently being processed. Note that the mounting method of the print cancel operation is not directly affected by the description of the operation of the present embodiment, and thus detailed description thereof is omitted.

ステップS316
用紙走行方向選択部111は、印刷に使用する用紙が搭載されているトレイとして、デフォルトのトレイを選択する。尚、デフォルトのトレイとは、プリンタ101の内部に予め所定の方法で登録された1つのトレイを意味するものである。デフォルトトレイの実装方法については、本実施例の動作の説明には直接影響を受ける部分ではないので、詳細な説明を省略する。最後に、本ステップの動作が完了すると、図9ステップS104の内部処理が完了したことを意味するから、装置全体の制御は、図9のステップS105へ移行することになる。
Step S316
The paper travel direction selection unit 111 selects a default tray as a tray on which paper used for printing is mounted. The default tray means one tray registered in advance in the printer 101 by a predetermined method. The default tray mounting method is not directly affected by the description of the operation of the present embodiment, and thus detailed description thereof is omitted. Finally, when the operation in this step is completed, it means that the internal processing in step S104 in FIG. 9 has been completed, and thus the control of the entire apparatus shifts to step S105 in FIG.

尚、上記ステップS309、及びステップS311にてNoと判断された場合に、上記構成ではいずれもステップS313へ進み、キャンセルかデフォルトトレイを選択する構成とした。しかし、この構成に替えて、それぞれ該当する用紙トレイに用紙を補充するように促するように表示するメッセージを表示し、所定時間経過した後に再度ステップS308へ戻る構成にしても良い。   In addition, when it is determined No in step S309 and step S311, in the above configuration, the process proceeds to step S313 to select cancel or the default tray. However, instead of this configuration, a message may be displayed that prompts the user to replenish paper in the corresponding paper tray, and after a predetermined time has elapsed, the process may return to step S308 again.

(効果)の説明
以上説明したように、プリンタ101は、バーコードの印刷を行なう場合に、用紙走行方向とバーコードのバーの方向とが一致するような印刷が行なえるように用紙縦置き、または用紙横置きを選択することが出来るので、バーコードの印刷品位が良い印刷を行なうことが出来るという効果を得る。
Description of (Effect) As described above, the printer 101, when performing barcode printing, places the paper vertically so that printing can be performed so that the paper running direction and the barcode bar direction match. Alternatively, it is possible to select horizontal paper placement, so that it is possible to perform printing with good bar code printing quality.

(構成)の説明
上記実施例1では、線分や長方形などの図形描画によってバーコード描画を実現するようなバーコード描画コマンドに適用した場合について説明した。しかし、バーコード描画の方式は、バーコードフォントを利用して実現する方式の方が一般的である。そこで本実施例では、本発明をバーコードフォントを利用したバーコード描画方式に適用する。
Description of (Configuration) In the first embodiment, the case where the present invention is applied to a barcode drawing command that realizes barcode drawing by drawing a graphic such as a line segment or a rectangle has been described. However, the barcode drawing method is generally realized by using a barcode font. Therefore, in the present embodiment, the present invention is applied to a barcode drawing method using a barcode font.

以下、実施例2の構成について説明する。
図16は、実施例2の印刷装置の構成のブロック図である。
この図は、実施例2の印刷装置としてのプリンタ201が、ホストPC220から送信されたバーコード印刷データを受信し、バーコード印刷を行なう際の構成を表したものである。
Hereinafter, the configuration of the second embodiment will be described.
FIG. 16 is a block diagram of the configuration of the printing apparatus according to the second embodiment.
This figure shows a configuration when the printer 201 as the printing apparatus of the second embodiment receives barcode print data transmitted from the host PC 220 and performs barcode printing.

図に示すようにプリンタ201は、印刷データ受信部102、印刷データ先読み部203、フォント選択コマンド検出部205、フォントサイズ指定コマンド検出部206、キャラクタ描画コマンド検出部207、用紙サイズ選択コマンド検出部108、座標回転コマンド検出部109、バーコード描画情報格納部110、用紙走行方向選択部111、搭載用紙走行方向検出部112、トレイ1制御部113、トレイ2制御部114、印刷データ解析部115、描画処理部116、画像形成部117、バーコードフォントデータ解析部208、最小バーサイズ検出部209、バーコードフォントデータ格納部210とを備える。以下に実施例1と異なる部分のみについて詳細に説明する。実施例1と同様の部分については、実施例1と同一の符号を付して説明を省略する。   As shown in the figure, the printer 201 includes a print data receiving unit 102, a print data prefetching unit 203, a font selection command detection unit 205, a font size designation command detection unit 206, a character drawing command detection unit 207, and a paper size selection command detection unit 108. , Coordinate rotation command detection unit 109, barcode drawing information storage unit 110, paper travel direction selection unit 111, loaded paper travel direction detection unit 112, tray 1 control unit 113, tray 2 control unit 114, print data analysis unit 115, drawing A processing unit 116, an image forming unit 117, a barcode font data analysis unit 208, a minimum bar size detection unit 209, and a barcode font data storage unit 210 are provided. Only portions different from the first embodiment will be described in detail below. The same parts as those in the first embodiment are denoted by the same reference numerals as those in the first embodiment and the description thereof is omitted.

印刷データ先読み部203は、実施例1の印刷データ先読み部103と構成は同じであるが、バーコードフォントを利用したバーコード描画を行なう際に使用される、フォント選択コマンド、フォントサイズ指定コマンド、キャラクタ描画コマンド等を検出する機能が、追加されている。   The print data prefetch unit 203 has the same configuration as that of the print data prefetch unit 103 of the first embodiment, but uses a font selection command, a font size designation command, and the like used when performing barcode drawing using a barcode font. A function for detecting a character drawing command or the like has been added.

フォント選択コマンド検出部205は、フォント選択コマンドに指定されているパラメータを解釈し、どのような設定が指定されたのかを検出する部分である。   The font selection command detection unit 205 is a part that interprets parameters specified in the font selection command and detects what settings are specified.

フォントサイズ指定コマンド検出部206は、フォントサイズ指定コマンドに指定されているパラメータを解釈し、どのようなフォントサイズでバーコードキャラクタを描画するのかを検出する部分である。   The font size designation command detection unit 206 is a part that interprets parameters designated in the font size designation command and detects at what font size the bar code character is drawn.

キャラクタ描画コマンド検出部207は、キャラクタ描画コマンドに指定されているパラメータを解釈し、どのようなキャラクタデータに基づいてバーコード描画を行なうのかを検出する部分である。   The character drawing command detection unit 207 is a part that interprets parameters specified in the character drawing command and detects what kind of character data is used to perform bar code drawing.

バーコードフォントデータ解析部208は、その内部に最小バーサイズ検出部209を有し、バーコードフォントデータを解析する部分である。最小バーサイズ検出部209は、バーコードフォントデータの内部に格納されているバーコードキャラクタデータを解析し、描画するときのフォントのサイズ情報に基づいて、バーコードの最小バーサイズを算出する部分である。   The barcode font data analysis unit 208 includes a minimum bar size detection unit 209 therein, and is a part that analyzes barcode font data. The minimum bar size detection unit 209 is a part that analyzes the bar code character data stored in the bar code font data and calculates the bar code minimum bar size based on the font size information at the time of drawing. is there.

バーコードフォントデータ格納部210は、バーコードフォントデータが格納されている不揮発性メモリ領域のことである。   The barcode font data storage unit 210 is a nonvolatile memory area in which barcode font data is stored.

一方、ホストPC220は、入力部120a、バーコードアプリケーション221、画面表示制御部124、及び印刷データ送信部125を備えているコンピュータである。また、バーコードアプリケーション221は、レイアウト制御部122、バーコード描画コマンド生成部223とを有している。以下に実施例1と異なる部分のみについて詳細に説明する。実施例1と同様の部分については、実施例1と同一の符号を付して説明を省略する。   On the other hand, the host PC 220 is a computer that includes an input unit 120 a, a barcode application 221, a screen display control unit 124, and a print data transmission unit 125. In addition, the barcode application 221 includes a layout control unit 122 and a barcode drawing command generation unit 223. Only portions different from the first embodiment will be described in detail below. The same parts as those in the first embodiment are denoted by the same reference numerals as those in the first embodiment and the description thereof is omitted.

バーコード描画コマンド生成部223は、実施例1のバーコード描画コマンド生成部123と構成は同じであり、バーコードを印刷させるための印刷コマンドを生成する部分である。但し、プリンタ201にバーコードフォントを利用したバーコード描画を行なわせるために、フォント選択コマンド、フォントサイズ指定コマンド、キャラクタ描画コマンドを出力する機能が追加されている。   The barcode drawing command generation unit 223 has the same configuration as the barcode drawing command generation unit 123 of the first embodiment, and is a part that generates a print command for printing a barcode. However, a function for outputting a font selection command, a font size designation command, and a character drawing command is added to cause the printer 201 to perform barcode drawing using a barcode font.

次に、プリンタ201でバーコード印刷を行った時の印刷内容についても、実施例1で説明したように、図3と同じ状況である。よって、詳細な説明は省略する。   Next, the printing contents when barcode printing is performed by the printer 201 are in the same situation as in FIG. Therefore, detailed description is omitted.

次に、本実施例における、バーコード描画に関係する印刷コマンドの、コマンド仕様の一例について説明する。本実施例では、実施例1で採用したのと同じ印刷コマンド体系を使用するものとする。つまり、最初にコマンド名をアルファベット二文字で指定し、続いて描画情報として付加的なパラメータをカンマで区切って数値で指定し、最後にセミコロンで終わるような印刷コマンド体系であるものとする。   Next, an example of a command specification of a print command related to barcode drawing in the present embodiment will be described. In this embodiment, it is assumed that the same print command system as used in the first embodiment is used. That is, it is assumed that the print command system is such that a command name is first designated by two alphabetic characters, then additional parameters as drawing information are designated by numerical values separated by commas, and finally terminated by a semicolon.

本実施例におけるバーコード描画は、バーコードフォントを利用した実現方式であることを最初に説明した。このとき、具体的なバーコード描画に関係する印刷コマンドとしては、5個のコマンドを使用する。そのうち用紙サイズ選択コマンド(PSn)と座標回転コマンド(ROn)については、実施例1で使用したものと全く同じ仕様のコマンドを使用する(図4、図5が該当する)ので説明を省略する。   It was first described that the barcode drawing in the present embodiment is an implementation method using a barcode font. At this time, five commands are used as print commands related to specific barcode drawing. Among them, for the paper size selection command (PSn) and the coordinate rotation command (ROn), commands having exactly the same specifications as those used in the first embodiment are used (FIGS. 4 and 5 correspond), and thus description thereof is omitted.

以下に、残りの3個のコマンドについては、それぞれ説明する。
図17は、フォント選択コマンドの仕様の1例の説明図である。
図に示すように、バーコード描画に使用するフォントのフォント名の文字列を、FO“fontname”;コマンドによって指定する。“fontname”が、フォント名の文字列となる。
Hereinafter, the remaining three commands will be described.
FIG. 17 is an explanatory diagram of an example of the specification of the font selection command.
As shown in the figure, the character string of the font name of the font used for barcode drawing is designated by the FO “fontname”; command. “Fontname” is a character string of the font name.

図18は、フォントサイズ指定コマンドの仕様の1例の説明図である。
図に示すように、バーコード描画に使用するフォントのフォントサイズを、FS pt;コマンドによって指定する。尚、パラメータptは、ポイント単位の値である(72ポイント=1inch=25.4cm)。
FIG. 18 is an explanatory diagram of an example of the specification of the font size designation command.
As shown in the figure, the font size of the font used for barcode drawing is specified by the FS pt; command. The parameter pt is a value in points (72 points = 1 inch = 25.4 cm).

図19は、キャラクタ描画コマンドの仕様の1例の説明図である。
図に示すように、キャラクタとは1文字1文字のことである。本コマンドでは、複数のキャラクタをまとめて描画出来るようなコマンド仕様とする。すなわち、描画したい文字列を、CH“xxxxx”;コマンドによって指定する。尚、パラメータ“xxxxx”が、描画したい文字列である。
FIG. 19 is an explanatory diagram of an example of the specification of the character drawing command.
As shown in the figure, a character is one character per character. This command has a command specification that allows a plurality of characters to be drawn together. That is, a character string to be drawn is designated by a CH “xxxx”; command. The parameter “xxxx” is a character string to be drawn.

尚、ここでバーコードフォントについて改めて説明するが、バーコードフォントとは、通常のフォントと全く同じデータ構造である。ただ、1文字1文字の形状が、バーコードの形状になるようにキャラクタの形状データが設計されているだけである。このため、バーコードを行なうための特別な処理があるのではなく、フォントを使用して文字を描画するように指示を出すだけである。わかり易い例としては、文字列“12345568”をバーコードフォントで文字描画すると、数字1に対応するバーコード形状のキャラクタが描画され、以後同様に1文字ずつ処理されることにより、結果として数値データ「12345678」に対応するバーコードが描画できるというものである。   The barcode font will be described again here. The barcode font has the same data structure as that of a normal font. However, the character shape data is only designed so that the shape of each character is the shape of a barcode. For this reason, there is no special processing for performing barcodes, but only an instruction is given to draw characters using fonts. As an easy-to-understand example, when a character string “12345568” is drawn with a barcode font, a barcode-shaped character corresponding to the number 1 is drawn, and thereafter, the character data is processed one character at a time. The barcode corresponding to “12345678” can be drawn.

最後に、バーコードフォントデータ格納部210に格納されているバーコードフォントデータのデータフォーマットについて説明する。
図20は、フォントデータの構造の1例の説明図である。
この図は、一つのフォントに対するフォントデータ空間全体を表している。
Finally, the data format of the barcode font data stored in the barcode font data storage unit 210 will be described.
FIG. 20 is an explanatory diagram of an example of the structure of font data.
This figure represents the entire font data space for one font.

図に示すように、フォントデータ空間全体は、フォントデスクリプタ、キャラクタデスクリプタ、キャラクタデータと呼ばれる3つのデータ領域によって構成されている。フォントデスクリプタは、フォントの属性情報が格納される領域である。この情報は、一つ一つの文字によらず共通の情報であり、一つのフォントとしての属性情報を示すものである。   As shown in the figure, the entire font data space is composed of three data areas called a font descriptor, a character descriptor, and character data. The font descriptor is an area for storing font attribute information. This information is common information regardless of each character, and indicates attribute information as one font.

キャラクタデスクリプタは、キャラクタ個別の属性情報が格納される領域である。尚、属性情報の中には、対応するキャラクタデータ領域へのオフセット値(相対アドレス値)が含まれている。キャラクタデスクリプタは、各キャラクタコードに対応した数分だけ存在する(図20の例では、キャラクタコードとして16進数の00HからFFHまでが存在するものとしている。)。   The character descriptor is an area for storing character-specific attribute information. The attribute information includes an offset value (relative address value) to the corresponding character data area. There are as many character descriptors as the number corresponding to each character code (in the example of FIG. 20, it is assumed that the character codes include hexadecimal numbers 00H to FFH).

キャラクタデータは、各キャラクタの形状データが格納される領域である。キャラクタの形状を表すためのデータとしては、幾つかの方法が考えられるが、輪郭線の情報が格納されるスケーラブルフォントというフォントデータ形式が一般的である(スケーラブルフォントの実際例としては、True Type Fontというフォントデータフォーマットが存在している。)。以下の説明では、図20のキャラクタデータは輪郭線形状データであるものとして説明を行なう。   The character data is an area where shape data of each character is stored. Several methods are conceivable as data for representing the shape of the character, but a font data format called a scalable font in which contour information is stored is typical (as an actual example of a scalable font, True Type). There is a font data format called Font.) In the following description, it is assumed that the character data in FIG. 20 is contour shape data.

次に、輪郭線形状データについて説明する。
図21は、キャラクタデータの1例説明図である。
このときの輪郭線形状データは、図21(a)に示されるように、スタート地点と輪郭線のベクトルデータによって構成されるデータであるものとする。
図21(b)は輪郭線情報に基づいて、文字形状のビットマップキャラクタデータ(ビットマップイメージ)を形成したときの例である。
Next, outline shape data will be described.
FIG. 21 is an explanatory diagram of an example of character data.
The contour line shape data at this time is assumed to be data constituted by vector data of the start point and the contour line, as shown in FIG.
FIG. 21B is an example when character-shaped bitmap character data (bitmap image) is formed based on the contour line information.

このような、輪郭線形状データからビットマップキャラクタデータへの画像形成機能は、一般の描画経路である画像処理部116(図16)が持っているものとする。
尚ここで、輪郭線のベクトルデータは絶対量ではなく、相対的な値が格納されているものとする。つまり、描画に必要な実際の寸法のビットマップキャラクタデータを形成する前に、輪郭線のベクトルデータ(相対値)に対して、別途外部から指定されるフォントサイズを値を掛け合わせて、輪郭線のベクトルデータの絶対値を計算し、その値に基づいてビットマップキャラクタデータを形成する手順となる。
It is assumed that such an image forming function from contour line shape data to bitmap character data is possessed by the image processing unit 116 (FIG. 16) which is a general drawing path.
Here, it is assumed that the vector data of the contour line stores a relative value, not an absolute amount. In other words, before forming bitmap character data with the actual dimensions necessary for drawing, the contour line vector data (relative value) is multiplied by the font size specified separately from the outside. The absolute value of the vector data is calculated, and bitmap character data is formed based on the calculated value.

(動作)の説明
以上説明した本実施例のプリンタ201は、ホストPC220から送信されたバーコード印刷データを受信し、以下のように動作してバーコード印刷を行なう。本実施例の動作は、特にバーコードフォントを利用した場合であっても、実施例1で説明した用紙走行方向選択部111の動作が同じように実施出来ることを説明するものである。尚、装置のトレイ構成としては、実施例1と同じように図2に示したトレイ1およびトレイ2を備えたプリンタ装置であるものとする。
Description of (Operation) The printer 201 of the present embodiment described above receives the barcode print data transmitted from the host PC 220 and operates as follows to perform barcode printing. The operation of the present embodiment is to explain that the operation of the paper traveling direction selection unit 111 described in the first embodiment can be performed in the same manner even when a barcode font is used. It is assumed that the tray configuration of the apparatus is a printer apparatus including the tray 1 and the tray 2 shown in FIG.

最初に、図16を用いてホストPC220の動作について説明する。ホストPC220の動作で、実施例1と異なる部分は、バーコード描画コマンド生成部223の動作だけである。バーコード描画コマンド生成部223は、バーコードアプリケーション221から印刷開始の指示があった際、バーコード描画を行なうための印刷コマンドとして、図4、図5、図17、図18、図19に示したコマンドをプリンタ201へ送信する。以後の説明では、バーコード描画に関係する部分のコマンドとして、具体的には次の図を用いて説明を進めてゆくこととする。   First, the operation of the host PC 220 will be described with reference to FIG. The operation of the host PC 220 is different from the first embodiment only in the operation of the barcode drawing command generation unit 223. The barcode drawing command generation unit 223 is shown in FIGS. 4, 5, 17, 18, and 19 as a print command for performing barcode drawing when an instruction to start printing is given from the barcode application 221. The command is transmitted to the printer 201. In the following description, as the commands related to bar code drawing, the description will be made with reference to the following drawings.

図22は、コマンド列の解析例の説明図である。
図22(a)は、プリンタ201が受信するコマンド列の1例を表している。
図22(b)は、コマンド列に含まれているコマンドの意味を表している。
図に示すコマンド列は、既に説明した図4、図5、図17、図18、図19の印刷コマンドの列によって、構成されている。
このコマンド列をプリンタ201が受信することにより、プリンタ201のバーコード印刷動作が開始される。
FIG. 22 is an explanatory diagram of a command string analysis example.
FIG. 22A shows an example of a command string received by the printer 201.
FIG. 22B shows the meaning of the commands included in the command sequence.
The command sequence shown in the figure is composed of the print command sequences shown in FIGS. 4, 5, 17, 18, and 19.
When the printer 201 receives this command string, the barcode printing operation of the printer 201 is started.

図23は、実施例2のプリンタの全体動作の概要フローチャートである。
ステップS401からステップS407まで、図16を併用しながらステップ順にプリンタ201の全体動作の概要について説明する。
FIG. 23 is a schematic flowchart of the overall operation of the printer according to the second embodiment.
From step S401 to step S407, an overview of the overall operation of the printer 201 will be described in order of steps while using FIG.

ステップS401
印刷データ受信部102は、ホストPC220から印刷データを受信する。
Step S401
The print data receiving unit 102 receives print data from the host PC 220.

ステップS402
印刷データ受信部102は、受信した印刷データを、印刷データ先読み部203に受け渡しする。
Step S402
The print data receiving unit 102 passes the received print data to the print data prefetching unit 203.

ステップS403
印刷データ先読み部203が、上記印刷データを先読みし、バーコードフォントを用いた描画コマンドが含まれているかどうかを検出する。尚、この動作フローの詳細については、後に再度説明する。
Step S403
A print data prefetch unit 203 prefetches the print data and detects whether or not a drawing command using a barcode font is included. Details of this operation flow will be described later again.

ステップS404
用紙走行方向選択部111は、上記バーコードの検出結果に基づいて、印刷に使用したい用紙サイズが期待する走行方向にセットされている給紙トレイを選択する。尚、この動作フローは、実施例1のステップS104と同様なので詳細説明を省略する。
Step S404
The paper travel direction selection unit 111 selects a paper feed tray set in the travel direction where the paper size desired to be printed is expected based on the detection result of the barcode. Since this operation flow is the same as step S104 of the first embodiment, detailed description thereof is omitted.

ステップS405
印刷データ解析部115は、上記印刷データ中の印刷コマンドを解析し、編集処理を行なう。
Step S405
The print data analysis unit 115 analyzes a print command in the print data and performs an editing process.

ステップS406
描画処理部116は、描画処理を行い、印刷する為の画像データを生成する。
Step S406
The drawing processing unit 116 performs drawing processing and generates image data for printing.

ステップS407
画像形成部117が、画像データに基づいてトナーを用紙に転写することで、用紙に印刷を行なう。
Step S407
The image forming unit 117 performs printing on the paper by transferring the toner to the paper based on the image data.

以上の動作フローにより、バーコード印刷が完了する。
尚、このときの描画処理部116は、印刷データ内に指定されているバーコードのサイズの指定コマンドに基づいて、バーコードを指定の大きさに縮小した描画を行なうことになる。以上説明したステップで実施例1と異なるステップはステップS403のみなので、以下に、印刷データ先読み部203の動作(上記ステップS403が該当する)の詳細について説明する。
With the above operation flow, barcode printing is completed.
Note that the drawing processing unit 116 at this time performs drawing by reducing the barcode to a specified size based on the barcode size specification command specified in the print data. Since the step described above is the only step different from the first embodiment in step S403, the details of the operation of the print data prefetch unit 203 (corresponding to step S403 above) will be described below.

図24は、実施例2の印刷データ先読み部の動作フローチャート(その1)である。
図25は、実施例2の印刷データ先読み部の動作フローチャート(その2)である。
図24のステップS501からステップS513まで、図25のステップS514からステップS524まで、ステップ順に図16を併用しながら説明する。但し、ステップS501からステップS510までは、図10のステップS201からS210までに対して、印刷データ先読み部103の箇所を印刷データ先読み部203に置き換えれば、全く同じ内容である。よって、その説明は省略し、ステップS511以降について説明する。
FIG. 24 is an operation flowchart (part 1) of the print data prefetching unit according to the second embodiment.
FIG. 25 is an operation flowchart (part 2) of the print data prefetching unit according to the second embodiment.
Description will be made from step S501 to step S513 in FIG. 24 and from step S514 to step S524 in FIG. However, Steps S501 to S510 have exactly the same contents as Steps S201 to S210 in FIG. 10 if the print data prefetch unit 103 is replaced with the print data prefetch unit 203. Therefore, the description thereof is omitted, and step S511 and subsequent steps will be described.

ステップS511
上記ステップS504(実施例1のステップS204に該当)の判断結果で、フォント選択コマンドが検出された場合には、ステップS512へ進む。そうでなければ、ステップS514へ進む。
Step S511
If a font selection command is detected as a result of the determination in step S504 (corresponding to step S204 in the first embodiment), the process proceeds to step S512. Otherwise, the process proceeds to step S514.

ステップS512
印刷データ先読み部203は、フォント選択コマンド検出部205を呼び出しする。
Step S512
The print data prefetch unit 203 calls the font selection command detection unit 205.

ステップS513
フォント選択コマンド検出部205は、コマンドパラメータを検出し、設定を一旦内部に保持する。その後、処理はステップS503に戻る。
尚ここで、コマンドパラメータの検出の具体例としては、フォント選択コマンド検出部205が、図22の受信データ列のFOコマンドに続くパラメータである「“OCR−B”;」を検出し、文字描画に使用するフォント名として、“OCR−B”が選択されたことを検出する。
Step S513
The font selection command detection unit 205 detects command parameters and temporarily holds the settings therein. Thereafter, the process returns to step S503.
As a specific example of the command parameter detection, the font selection command detection unit 205 detects ““ OCR-B ”;” which is a parameter following the FO command in the received data string in FIG. It is detected that “OCR-B” has been selected as the font name used for.

ステップS514
上記ステップS504(実施例1のステップS204に該当)の判断結果で、フォントサイズ指定コマンドが検出された場合には、ステップS515へ進み、そうでなければ、ステップS517へ進む。
Step S514
If it is determined in step S504 (corresponding to step S204 in the first embodiment) that a font size designation command is detected, the process proceeds to step S515. Otherwise, the process proceeds to step S517.

ステップS515
印刷データ先読み部203は、フォントサイズ指定コマンド検出部206を呼び出しする。
Step S515
The print data prefetch unit 203 calls the font size designation command detection unit 206.

ステップS516
フォントサイズ指定コマンド検出部206は、コマンドパラメータを検出し、設定を一旦内部に保持する。その後、処理はステップS503へ戻る。
尚ここで、コマンドパラメータの検出の具体例としては、フォントサイズ指定コマンド検出部206が、図22の受信データ列のFSコマンドに続くパラメータである「12;」を検出し、文字描画に使用するフォントのフォントサイズとして12ptが指定されたことを検出する。
Step S516
The font size designation command detection unit 206 detects command parameters and temporarily holds the settings therein. Thereafter, the process returns to step S503.
Here, as a specific example of the command parameter detection, the font size designation command detection unit 206 detects “12;” which is a parameter following the FS command in the received data string in FIG. 22 and uses it for character drawing. It is detected that 12 pt is designated as the font size of the font.

ステップS517
上記ステップS504(実施例1のステップS204に該当)の判断結果で、キャラクタ描画コマンドが検出された場合には、ステップS518へ進み、そうでなければ、ステップS503へと処理が移行する。
Step S517
If a character drawing command is detected as a result of the determination in step S504 (corresponding to step S204 in the first embodiment), the process proceeds to step S518. Otherwise, the process proceeds to step S503.

ステップS518
印刷データ先読み部203は、キャラクタ描画コマンド検出部207を呼出しする。
Step S518
The print data prefetch unit 203 calls the character drawing command detection unit 207.

ステップS519
キャラクタ描画コマンド検出部207は、コマンドパラメータを検出する。
尚ここで、コマンドパラメータの検出の具体例としては、キャラクタ描画コマンド検出部207が、図22の受信データ列のCHコマンドに続くパラメータである「“123456789”;」を検出し、キャラクタ描画したい文字列として“123456789”の数字文字列が指定されたことを検出する。
Step S519
The character drawing command detection unit 207 detects command parameters.
Here, as a specific example of the command parameter detection, the character drawing command detection unit 207 detects ““ 123456789 ”;” which is a parameter following the CH command in the received data string in FIG. It is detected that a numeric character string “123456789” is designated as the column.

ステップS520
キャラクタ描画コマンド検出部207は、バーコード描画に使用されるフォント名、フォントサイズ、描画しようとする文字列情報を、バーコードフォントデータ解析部208に通知する。
具体例としては、フォント名として“OCR−B”、フォントサイズとして12pt、文字列情報として“123456789”が通知される。
Step S520
The character drawing command detection unit 207 notifies the barcode font data analysis unit 208 of the font name used for barcode drawing, the font size, and character string information to be drawn.
As a specific example, “OCR-B” as the font name, 12 pt as the font size, and “123456789” as the character string information are notified.

ステップS521
バーコードフォントデータ解析部208は、上記通知されたフォント名に対応するバーコードフォントデータを、バーコードフォントデータ格納部210から取得する。
具体例としては、フォント名“OCR−B”に対応するフォントデータの所在を確認し、図20に示したデータ空間構造のフォントデータにアクセス出来るように、該フォントデータの不揮発性メモリ上の先頭アドレスを取得する。
Step S521
The barcode font data analysis unit 208 acquires barcode font data corresponding to the notified font name from the barcode font data storage unit 210.
As a specific example, the location of the font data corresponding to the font name “OCR-B” is confirmed, and the font data head in the nonvolatile memory is accessed so that the font data having the data space structure shown in FIG. 20 can be accessed. Get the address.

ステップS522
バーコードフォントデータ解析部208は、上記取得したバーコードフォントデータから、描画しようとする文字列に対応するキャラクタデスクリプタ情報および、キャラクタデータ情報を取得する。
Step S522
The barcode font data analysis unit 208 acquires character descriptor information and character data information corresponding to the character string to be drawn from the acquired barcode font data.

具体例としては、フォント名“OCR−B”に対応するフォントデータから、図19に示したキャラクタデスクリプタおよびキャラクタデータのうち、図22に示した描画にしようとする文字列である“123456789”の文字列の一つ一つの文字に対応するキャラクタデスクリプタおよびキャラクタデータを取得する。例えば、文字1のキャラクタコードはアスキーコードで0x31であるから、0x31に対応するキャラクタデスクリプタおよびキャラクタデータを取得する。残りの文字も同様である。   As a specific example, from the font data corresponding to the font name “OCR-B”, among the character descriptor and character data shown in FIG. 19, “123456789” which is the character string to be rendered shown in FIG. A character descriptor and character data corresponding to each character of the character string are acquired. For example, since the character code of character 1 is ASCII code 0x31, a character descriptor and character data corresponding to 0x31 are acquired. The same applies to the remaining characters.

ステップS523
最小バーサイズ検出部209は、上記取得したキャラクタデスクリプタ情報および、キャラクタデータ情報を解析して、最小バーサイズを検出し、一旦内部に保持する。
具体的には、ステップS523の具体例の中で取得したキャラクタデータのベクトルデータと、ステップS520の具体例にあるようにキャラクタ描画コマンド検出部207から通知されたフォントサイズである12ptとを掛け合わせて、実寸の輪郭線のベクトルデータに変換する。更にこの情報から、最小バーサイズ検出部209は、図21(b)で説明したような実寸のビットマップキャラクタを生成するのと同等の処理を行い、フォント形状がバーコードのバーであるバーのサイズを算出する。一般に、バーコードはひとつの数字データに対応して複数のバーが描画されるから、上記バーサイズの算出の結果のうちで、最小のものを記憶しておく。この処理を、バーコードを描画するための文字列情報である“123456789”の一つ一つの文字に対して行い、一つのバーコードの中での最小バーコードを算出することができる。例えば、ひとつのバーコードの中で最小バーコード幅が40ドットであった場合は、40ドットという情報を一旦最小バーサイズ検出部209の内部に保持する。
Step S523
The minimum bar size detecting unit 209 analyzes the acquired character descriptor information and character data information, detects the minimum bar size, and temporarily holds it inside.
Specifically, the vector data of the character data acquired in the specific example of step S523 is multiplied by 12 pt which is the font size notified from the character drawing command detection unit 207 as in the specific example of step S520. To vector data of the actual outline. Further, from this information, the minimum bar size detection unit 209 performs the same processing as that for generating an actual size bitmap character as described in FIG. Calculate the size. In general, since a plurality of bars are drawn corresponding to one numeric data, the bar code stores the smallest one among the bar size calculation results. This process is performed on each character of “123456789” which is character string information for drawing a barcode, and the minimum barcode in one barcode can be calculated. For example, when the minimum barcode width is 40 dots in one barcode, information of 40 dots is temporarily held in the minimum bar size detection unit 209.

ステップS524
バーコードフォントデータ解析部208は、座標回転コマンド検出部109の内部に保持されている回転設定と、先に最小バーサイズ検出部209の内部に保持している最小バーコード幅をセットにして、バーコード描画情報格納部110に格納する。
Step S524
The barcode font data analysis unit 208 sets the rotation setting held in the coordinate rotation command detection unit 109 and the minimum barcode width previously held in the minimum bar size detection unit 209 as a set. It is stored in the barcode drawing information storage unit 110.

ここで、バーコード描画情報格納部110の内容について説明する。
図26は、実施例2のバーコード描画情報の格納例の説明図である。
図に示すように、バーコード描画情報を格納するバーコード描画情報ファイルには、用紙サイズ、各バーコードの描画時の回転方向及び最小バーコードサイズを格納する領域が設けられている。上記A4は、用紙サイズの格納領域に格納されることになる。
具体的には、図26が示すように、「No.001 バーコード回転角=0° 最小バーコード幅=40ドット」のように一行分のデータが格納される。
尚、受信データ中にはバーコードフォントを選択してバーコードを描画するキャラクタ描画コマンドが複数含まれて良いため、キャラクタ描画コマンド検出部207がキャラクタ描画コマンドを検出する毎に、同様の情報をバーコード描画情報格納部110に格納する。
Here, the contents of the barcode drawing information storage unit 110 will be described.
FIG. 26 is an explanatory diagram of an example of storing barcode drawing information according to the second embodiment.
As shown in the figure, the barcode drawing information file for storing the barcode drawing information is provided with areas for storing the paper size, the rotation direction at the time of drawing each barcode, and the minimum barcode size. The A4 is stored in the storage area for the paper size.
Specifically, as shown in FIG. 26, data for one row is stored as “No. 001 barcode rotation angle = 0 °, minimum barcode width = 40 dots”.
Since the received data may include a plurality of character drawing commands for selecting a barcode font and drawing a barcode, the same information is obtained each time the character drawing command detection unit 207 detects a character drawing command. It is stored in the barcode drawing information storage unit 110.

具体的には、図26が示すように、「No.002 バーコード回転角=0° 最小バーコード幅=70ドット」のように、次々に一行分のデータを追加で格納して行く。図26は、任意の回数を格納したとして、最後の行に「No.xxx バーコード回転角=0° 最小バーコード幅=110ドット」を格納したところまでの例である。
以上の動作フローによって処理を行い、最終的に動作フローが完了すると、図23のステップS403が完了したことになる。この後の動作は、ステップS404以降の処理になるが、先に説明したように用紙走行方向選択部111の動作は、実施例1と同じである。これは、図26に説明したバーコード描画情報格納部110に格納される情報のデータ形式が、実施例1で説明した図12のバーコード描画情報と同じであることに基づいている。
Specifically, as shown in FIG. 26, one line of data is additionally stored one after another as in “No. 002 barcode rotation angle = 0 ° minimum barcode width = 70 dots”. FIG. 26 shows an example up to the point where “No. xxx barcode rotation angle = 0 ° minimum barcode width = 110 dots” is stored in the last row, assuming that an arbitrary number of times is stored.
When processing is performed according to the above operation flow and the operation flow is finally completed, step S403 in FIG. 23 is completed. The subsequent operation is the processing after step S404, but as described above, the operation of the paper traveling direction selection unit 111 is the same as that in the first embodiment. This is based on the fact that the data format of the information stored in the barcode drawing information storage unit 110 described in FIG. 26 is the same as the barcode drawing information in FIG. 12 described in the first embodiment.

(効果)の説明
以上説明したように、本実施例によれば、バーコードフォントを利用したキャラクタ描画によって、バーコードの印刷を実現する場合であっても、実施例1と同じように、用紙の印刷方向をバーコードの方向によって選択できるようになり、バーコードの読取り率を向上させることができるという効果を得る。
Description of (Effect) As described above, according to the present embodiment, even when barcode printing is realized by character drawing using a barcode font, as in the first embodiment, the paper The printing direction can be selected according to the barcode direction, and the barcode reading rate can be improved.

本実施例と同じように一つの用紙サイズに対して縦置きも横置きもサポートしている装置構成であれば、印刷方式がLEDヘッドを用いた方式ではなくその他の印字方式であった場合でも、本実施例と同様の効果を得ることが出来る。
また、バーコードの印刷品位の良い用紙走行方向が、本実施例で説明した方向と逆であった場合でも、用紙走行方向選択部の動作フロー内の、トレイ選択の際のバーコードの方向の判断条件を逆にして処理すれば、本実施例と同様の効果を得ることが出来る
As with the present embodiment, if the apparatus configuration supports both vertical and horizontal placement for one paper size, even if the printing method is not a method using an LED head but another printing method. The same effects as in this embodiment can be obtained.
Even when the paper travel direction with good barcode print quality is opposite to the direction described in this embodiment, the direction of the barcode at the time of tray selection in the operation flow of the paper travel direction selection unit is If processing is performed with the judgment conditions reversed, the same effect as in the present embodiment can be obtained.

実施例1の印刷装置の構成のブロック図である。1 is a block diagram of a configuration of a printing apparatus according to a first embodiment. トレイの用紙向きと、走行経路の説明図である。It is explanatory drawing of the paper direction of a tray, and a driving path. バーコード描画の1例の説明図である。It is explanatory drawing of one example of barcode drawing. 用紙サイズ選択コマンドの仕様の1例の説明図である。It is explanatory drawing of an example of the specification of a paper size selection command. 座標回転コマンドの仕様の1例の説明図である。It is explanatory drawing of an example of the specification of a coordinate rotation command. バーコード設定コマンドの仕様の1例の説明図である。It is explanatory drawing of an example of the specification of a barcode setting command. バーコード描画コマンドの仕様の1例の説明図である。It is explanatory drawing of an example of the specification of a barcode drawing command. コマンド列の解析例の説明図である。It is explanatory drawing of the example of analysis of a command sequence. 実施例1のプリンタの全体動作の概要フローチャートである。3 is a schematic flowchart of an overall operation of the printer according to the first exemplary embodiment. 実施例1の印刷データ先読み部の動作フローチャート(その1)である。6 is an operation flowchart (No. 1) of a print data prefetch unit according to the first exemplary embodiment. 実施例1の印刷データ先読み部の動作フローチャート(その2)である。6 is an operation flowchart (part 2) of the print data prefetch unit according to the first exemplary embodiment. 実施例1のバーコード描画情報の格納例の説明図である。6 is an explanatory diagram of a storage example of barcode drawing information according to Embodiment 1. FIG. 用紙走行方向選択部の動作フローチャートである。It is an operation | movement flowchart of a paper travel direction selection part. 用紙走行方向情報の1例の説明図である。FIG. 6 is an explanatory diagram of an example of paper traveling direction information. 印刷品位向上処理の説明図である。It is explanatory drawing of a printing quality improvement process. 実施例2の印刷装置の構成のブロック図である。FIG. 6 is a block diagram of a configuration of a printing apparatus according to a second embodiment. フォント選択コマンドの仕様の1例の説明図である。It is explanatory drawing of an example of the specification of a font selection command. フォントサイズ指定コマンドの仕様の1例の説明図である。It is explanatory drawing of an example of the specification of a font size designation | designated command. キャラクタ描画コマンドの仕様の1例の説明図である。It is explanatory drawing of an example of the specification of a character drawing command. フォントデータの構造の1例の説明図である。It is explanatory drawing of an example of the structure of font data. キャラクタデータの1例説明図である。It is an example explanatory drawing of character data. コマンド列の解析例の説明図である。It is explanatory drawing of the example of analysis of a command sequence. 実施例2のプリンタの全体動作の概要フローチャートである。7 is a schematic flowchart of an overall operation of a printer according to a second embodiment. 実施例2の印刷データ先読み部の動作フローチャート(その1)である。12 is an operation flowchart (part 1) of a print data prefetch unit according to the second exemplary embodiment. 実施例2の印刷データ先読み部の動作フローチャート(その2)である。12 is an operation flowchart (part 2) of the print data prefetching unit according to the second exemplary embodiment. 実施例2のバーコード描画情報の格納例の説明図である。FIG. 10 is an explanatory diagram of a storage example of barcode drawing information according to the second embodiment.

符号の説明Explanation of symbols

101 プリンタ
102 印刷データ受信部
103 印刷データ先読み部
104 先読みバッファ
105 バーコード設定コマンド検出部
106 バーコード描画コマンド検出部
107 最小バーサイズ検出部
108 用紙サイズ選択コマンド検出部
109 座標回転コマンド検出部
110 バーコード描画情報格納部
111 用紙走行方向選択部
112 搭載用紙走行方向検出部
113 トレイ1制御部
114 トレイ2制御部
115 印刷データ解析部
116 描画処理部
117 画像形成部
120 ホストPC
120a 入力部
121 バーコードアプリケーション
122 レイアウト制御部
123 バーコード描画コマンド生成部
124 画面表示制御部
125 印刷データ送信部
DESCRIPTION OF SYMBOLS 101 Printer 102 Print data receiving part 103 Print data prefetching part 104 Prefetching buffer 105 Barcode setting command detection part 106 Barcode drawing command detection part 107 Minimum bar size detection part 108 Paper size selection command detection part 109 Coordinate rotation command detection part 110 Bar Code drawing information storage unit 111 Paper running direction selection unit 112 Mounted paper running direction detection unit 113 Tray 1 control unit 114 Tray 2 control unit 115 Print data analysis unit 116 Drawing processing unit 117 Image forming unit 120 Host PC
120a input unit 121 barcode application 122 layout control unit 123 barcode drawing command generation unit 124 screen display control unit 125 print data transmission unit

Claims (6)

識別コード描画コマンドを含む印刷データを受信するデータ受信部と、
該印刷データ中に識別コード描画コマンドが含まれることを検出するコマンド検出部と、
前記検出された識別コードの描画方向を検出する描画方向検出部と、
第一の方向で媒体を収納する第一媒体収納部と、
前記第一の方向と異なる第二の方向で媒体を収納する第二媒体収納部と、
前記識別コードの描画方向に基づいて、前記第一媒体収納部と前記第二媒体収納部の何れかを選択する選択部とを有することを特徴とする印刷装置。
A data receiving unit for receiving print data including an identification code drawing command;
A command detection unit for detecting that an identification code drawing command is included in the print data;
A drawing direction detector for detecting a drawing direction of the detected identification code;
A first medium storage unit for storing a medium in a first direction;
A second medium storage unit for storing a medium in a second direction different from the first direction;
A printing apparatus comprising: a selection unit that selects one of the first medium storage unit and the second medium storage unit based on a drawing direction of the identification code.
前記識別コードとはバーコードであることを特徴とする、請求項1に記載の印刷装置。   The printing apparatus according to claim 1, wherein the identification code is a bar code. 前記印刷データおよび前記識別コードを縮小する縮小処理部を更に備えることを特徴とする、請求項1または請求項2に記載の印刷装置。   The printing apparatus according to claim 1, further comprising a reduction processing unit that reduces the print data and the identification code. 前記方向とは縦方向と横方向であることを特徴とする、請求項1または請求項2に記載の印刷装置。   The printing apparatus according to claim 1, wherein the directions are a vertical direction and a horizontal direction. 識別コード描画コマンドとは、図形描画コマンドであることを特徴とする、請求項1に記載の印刷装置。   The printing apparatus according to claim 1, wherein the identification code drawing command is a graphic drawing command. 識別コード描画コマンドとは、バーコードフォントを用いたキャラクタ描画コマンドであることを特徴とする、請求項1に記載の印刷装置。   The printing apparatus according to claim 1, wherein the identification code drawing command is a character drawing command using a barcode font.
JP2007224220A 2007-08-30 2007-08-30 Printing apparatus Pending JP2009056631A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007224220A JP2009056631A (en) 2007-08-30 2007-08-30 Printing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007224220A JP2009056631A (en) 2007-08-30 2007-08-30 Printing apparatus

Publications (1)

Publication Number Publication Date
JP2009056631A true JP2009056631A (en) 2009-03-19

Family

ID=40552830

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007224220A Pending JP2009056631A (en) 2007-08-30 2007-08-30 Printing apparatus

Country Status (1)

Country Link
JP (1) JP2009056631A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103009824A (en) * 2012-12-27 2013-04-03 北京爱创科技股份有限公司 Code printing system and code printing method
CN104044353A (en) * 2013-03-14 2014-09-17 富士施乐株式会社 Image Processing Apparatus, Image Forming Apparatus And Image Processing Method
JP2019188741A (en) * 2018-04-27 2019-10-31 ブラザー工業株式会社 Image processor, and computer program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103009824A (en) * 2012-12-27 2013-04-03 北京爱创科技股份有限公司 Code printing system and code printing method
CN103009824B (en) * 2012-12-27 2015-04-22 北京爱创科技股份有限公司 Code printing method
CN104044353A (en) * 2013-03-14 2014-09-17 富士施乐株式会社 Image Processing Apparatus, Image Forming Apparatus And Image Processing Method
JP2014178834A (en) * 2013-03-14 2014-09-25 Fuji Xerox Co Ltd Image processing apparatus, image forming apparatus, and program
US8851593B1 (en) 2013-03-14 2014-10-07 Fuji Xerox Co., Ltd Image processing apparatus, image forming apparatus, non-transitory computer readable medium, and image processing method
JP2019188741A (en) * 2018-04-27 2019-10-31 ブラザー工業株式会社 Image processor, and computer program
JP7161141B2 (en) 2018-04-27 2022-10-26 ブラザー工業株式会社 Image processing device and computer program

Similar Documents

Publication Publication Date Title
US8149432B2 (en) Information processing apparatus, method, and recording medium storing program for modifying print instructions
EP2942737B1 (en) Image processing device and program
JP4436851B2 (en) Printer driver program and image forming apparatus
US8225200B2 (en) Extracting a character string from a document and partitioning the character string into words by inserting space characters where appropriate
US7409169B2 (en) Image forming apparatus and image forming system
US8189228B2 (en) Image forming apparatus, print control method and control program
US7852529B2 (en) Image processing apparatus, image printer, and method of image processing performed by the image processing apparatus
JP2010120231A (en) Print device and print control program
JP2007148486A (en) Method for supporting document browsing, system for the same, document processor, and program
JP2009056631A (en) Printing apparatus
US8804170B2 (en) Printing system, print data generating device, multi-function device, and non-transitory recording medium
JP5017073B2 (en) Information processing apparatus, information processing system, information processing method, information processing program, and recording medium
JP2009053796A (en) Printing control device, and program of printer driver
US8976412B2 (en) Method and system for recognizing tab sheets and displaying one or more sets of tabs sheets on a graphical user interface
US20050134890A1 (en) Image forming device and a method of selecting emulation automatically thereof
US8804141B2 (en) Character output device, character output method and computer readable medium
JP7238482B2 (en) program
JP4595610B2 (en) Variable printing apparatus and variable printing system
JP2007122641A (en) Image formation system
JP2006281597A (en) Image forming apparatus and its program
JP7312357B2 (en) image forming device
JP2010079599A (en) Image processing apparatus
JP6686957B2 (en) Image forming device
JP4581899B2 (en) Printer driver and control device
JP2006018441A (en) Information processing device, print setting method, storage medium storing computer-readable program, and program