JP5687098B2 - Print control program - Google Patents

Print control program Download PDF

Info

Publication number
JP5687098B2
JP5687098B2 JP2011056989A JP2011056989A JP5687098B2 JP 5687098 B2 JP5687098 B2 JP 5687098B2 JP 2011056989 A JP2011056989 A JP 2011056989A JP 2011056989 A JP2011056989 A JP 2011056989A JP 5687098 B2 JP5687098 B2 JP 5687098B2
Authority
JP
Japan
Prior art keywords
barcode
image data
print
control area
printer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2011056989A
Other languages
Japanese (ja)
Other versions
JP2012194688A (en
Inventor
勉 宮澤
勉 宮澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Component Ltd
Original Assignee
Fujitsu Component 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 Fujitsu Component Ltd filed Critical Fujitsu Component Ltd
Priority to JP2011056989A priority Critical patent/JP5687098B2/en
Publication of JP2012194688A publication Critical patent/JP2012194688A/en
Application granted granted Critical
Publication of JP5687098B2 publication Critical patent/JP5687098B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、バーコード印刷のための印刷制御プログラムに関する。   The present invention relates to a print control program for barcode printing.

コンピュータにプリンタが接続された印刷システムが知られている。コンピュータには、アプリケーション及びプリンタドライバ(プリンタ制御プログラム)がインストールされている。アプリケーションは、プリンタドライバの設定情報に基づき、メモリ上にデバイスコンテキスト(描画領域)を作成した後、当該領域に文字、図形、その他のイメージ等を描画する。プリンタドライバは、アプリケーションにより描画された画像データを、プリンタにて印刷可能な形式に変換(ラスタライズ)して、プリンタに送信する。   A printing system in which a printer is connected to a computer is known. An application and a printer driver (printer control program) are installed on the computer. The application creates a device context (drawing area) on the memory based on the setting information of the printer driver, and then draws characters, figures, other images, and the like in the area. The printer driver converts (rasterizes) the image data drawn by the application into a format printable by the printer, and transmits it to the printer.

ここで、バーコードの印刷を行う場合には、第1の方法として、印刷アプリケーション上でバーコードのイメージデータを作成する方法が知られている。また、第2の方法として、バーコードを印刷するための専用のフォント(バーコードフォント)を予め用意し、アプリケーションが当該バーコードフォントを画像データ中に埋め込む方法が知られている。第2の方法では、プリンタドライバまたはプリンタがバーコードフォントを解析し、当該解析結果に基づいてバーコードを生成する(例えば、特許文献1を参照)。   Here, when printing a barcode, a method of creating barcode image data on a printing application is known as a first method. As a second method, a method is known in which a dedicated font (barcode font) for printing a barcode is prepared in advance, and an application embeds the barcode font in image data. In the second method, a printer driver or a printer analyzes a barcode font, and generates a barcode based on the analysis result (see, for example, Patent Document 1).

2002−211053号公報No. 2002-211053

上記第1の方法では、アプリケーションにて描画されたバーコードのイメージデータが、プリンタドライバにおいて変換(ラスタライズ)されるため、印刷結果がアプリケーション上の描画と一致しない場合がある。また、上記第2の方法では、プリンタドライバにおける変換途中に文字用の画像補正が行われた場合に、同様に印刷結果が意図したものとならない場合がある。すなわち、従来の方法では、データの変換過程においてバーコードの品質劣化が生じ、高品質なバーコードを印刷することが難しかった。   In the first method, since the barcode image data drawn by the application is converted (rasterized) by the printer driver, the print result may not match the drawing on the application. In the second method, when the image correction for characters is performed during conversion in the printer driver, the print result may not be the same as intended. That is, in the conventional method, the quality of the barcode is deteriorated in the data conversion process, and it is difficult to print a high-quality barcode.

本発明は、上記課題に鑑みなされたものであり、高品質なバーコードを印刷することのできる印刷制御プログラムを提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides a print control program capable of printing a high-quality barcode.

本発明は、コンピュータを、画像データの描画領域中に、バーコードに関する情報が記載されたバーコード制御領域が存在するか否かを判定する判定手段と、前記バーコード制御領域が存在する場合に、前記バーコード制御領域から、前記バーコードに関する情報を取得する取得手段と、前記バーコードに関する情報に基づいて、プリンタにバーコードの印刷を行わせるためのコマンドを生成する生成手段と、として機能させ、前記バーコードに関する情報の最初には、前記バーコード制御領域の大きさが記載されていることを特徴とするAccording to the present invention, there is provided a determination means for determining whether or not a barcode control area in which information relating to a barcode is present exists in the image data drawing area, and when the barcode control area is present. , An acquisition unit that acquires information about the barcode from the barcode control area, and a generation unit that generates a command for causing the printer to print a barcode based on the information about the barcode. The size of the barcode control area is described at the beginning of the information on the barcode .

上記構成において、前記バーコード制御領域は、前記画像データの最初に設けられている構成とすることができる。   The said structure WHEREIN: The said barcode control area | region can be set as the structure provided at the beginning of the said image data.

上記構成において、前記バーコードに関する情報は、バーコードの種類、バーコードの印刷位置、バーコードのサイズ、バーコードのバイト数、及びバーコードデータを含む構成とすることができる。   In the above configuration, the information on the barcode may include a barcode type, a barcode printing position, a barcode size, a barcode byte count, and barcode data.

上記構成において、前記取得手段は、前記バーコード制御領域の大きさが所定の値より小さい場合に、前記バーコードに関する情報の取得を行わない構成とすることができる。   In the above configuration, the acquisition unit may be configured not to acquire information on the barcode when the size of the barcode control area is smaller than a predetermined value.

上記構成において、前記バーコード制御領域の大きさは、バーコードの種類に基づいて変更可能である構成とすることができる。   The said structure WHEREIN: The magnitude | size of the said barcode control area can be set as the structure which can be changed based on the kind of barcode.

上記構成において、コンピュータを、前記画像データから、前記バーコード制御領域を除いた印刷領域中の画像データを、プリンタにて印刷可能なデータ形式に変換する変換手段と、前記変換手段により変換された画像データを、前記コマンド生成手段により生成されたバーコード印刷コマンドと共にプリンタに送信する送信手段と、としてさらに機能させる構成とすることができる。
In the above structure modification, a computer, from the image data, the image data in the print area excluding the barcode control region, and converting means for converting a data format printable by the printer, the front Symbol conversion means The transmitted image data can be further functioned as a transmission unit that transmits the image data to the printer together with the barcode print command generated by the command generation unit.

本発明によれば、高品質なバーコードを印刷することのできる印刷制御プログラムを提供することができる。   According to the present invention, it is possible to provide a print control program capable of printing a high-quality barcode.

図1は、印刷システムのハードウェア構成を示す図である。FIG. 1 is a diagram illustrating a hardware configuration of a printing system. 図2は、印刷システムの機能ブロック図である。FIG. 2 is a functional block diagram of the printing system. 図3は、デバイスコンテキストの構成を示す図である。FIG. 3 is a diagram illustrating a configuration of a device context. 図4は、デバイスコンテキストのパラメータ値を示す図である。FIG. 4 is a diagram illustrating parameter values of the device context. 図5は、バーコード制御領域が保持するデータを示す図である。FIG. 5 is a diagram showing data held in the barcode control area. 図6は、アプリケーションにより描画された画像のイメージを示す図である。FIG. 6 is a diagram showing an image of an image drawn by the application. 図7は、アプリケーションの動作を示すフローチャートである。FIG. 7 is a flowchart showing the operation of the application. 図8は、プリンタドライバの動作を示すフローチャートである。FIG. 8 is a flowchart showing the operation of the printer driver. 図9は、プリンタの動作を示すフローチャートである。FIG. 9 is a flowchart showing the operation of the printer. 図10は、プリンタにより生成される画像のイメージを示す図である。FIG. 10 is a diagram illustrating an image generated by a printer.

以下、本発明の実施例について図面を参照し説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、印刷システムのハードウェア構成を示す図である。実施例1に係る印刷システムは、互いに接続されたコンピュータ10及びプリンタ20を含む。コンピュータ10は、互いにデータバスにより接続されたCPU(Central Processing Unit)12、メモリ14、及び入出力インターフェース16を含む。メモリ14には、例えばRAM(Random Access Memory)及びROM(Read Only Memory)を用いることができる。   FIG. 1 is a diagram illustrating a hardware configuration of a printing system. The printing system according to the first embodiment includes a computer 10 and a printer 20 that are connected to each other. The computer 10 includes a central processing unit (CPU) 12, a memory 14, and an input / output interface 16 that are connected to each other via a data bus. As the memory 14, for example, a RAM (Random Access Memory) and a ROM (Read Only Memory) can be used.

プリンタ20は、互いにデータバスにより接続されたCPU22、メモリ24、入出力インターフェース26、及び印刷部28を含む。メモリ24には、例えばRAM及びROMを用いることができる。印刷部28には、周知の印刷機構を用いることができ、印刷方式としては、例えばインクジェット方式、レーザ方式等を採用することができる。コンピュータ10及びプリンタ20は、それぞれの入出力インターフェース(16、26)を介して互いに接続されている。   The printer 20 includes a CPU 22, a memory 24, an input / output interface 26, and a printing unit 28 that are connected to each other via a data bus. For the memory 24, for example, a RAM and a ROM can be used. A well-known printing mechanism can be used for the printing unit 28. As a printing method, for example, an inkjet method, a laser method, or the like can be adopted. The computer 10 and the printer 20 are connected to each other via respective input / output interfaces (16, 26).

図2は、印刷システムの機能ブロック図である。コンピュータ10及びプリンタ20は互いに接続され、コンピュータ10には、印刷用のアプリケーション30と、印刷制御プログラムの一例であるプリンタドライバ40がインストールされている。   FIG. 2 is a functional block diagram of the printing system. The computer 10 and the printer 20 are connected to each other, and a printing application 30 and a printer driver 40 that is an example of a printing control program are installed in the computer 10.

アプリケーション30は、デバイスコンテキスト生成手段32、印刷データ描画手段34、バーコード制御領域描画手段36、及び印刷実行手段38を含む。これらの手段は、例えば図1のCPU12に所定のプログラムを実行させることにより実現することができ、当該所定のプログラムは、例えばメモリ14に記憶させることができる。デバイスコンテキスト生成手段32は、プリンタドライバ40の設定に基づいて、画像データの描画領域であるデバイスコンテキストを生成する。   The application 30 includes a device context generation unit 32, a print data drawing unit 34, a barcode control area drawing unit 36, and a print execution unit 38. These means can be realized, for example, by causing the CPU 12 of FIG. 1 to execute a predetermined program, and the predetermined program can be stored in the memory 14, for example. The device context generation unit 32 generates a device context that is a drawing area of image data based on the setting of the printer driver 40.

図3は、デバイスコンテキストの構成を示す図である。図示するように、デバイスコンテキスト60の大きさは、用紙サイズのW×L[pixel]と同じW×L[pixel]である。デバイスコンテキスト60は、印刷画像が描画される印刷領域62(W×L[pixel])と、バーコードに関する情報が描画されるバーコード制御領域64(W×LBC[pixel])とに分かれている。本実施例では、バーコード制御領域64がデバイスコンテキストの先頭部分に位置する構成となっているが、これ以外の部分にバーコード制御領域64を設けてもよい。 FIG. 3 is a diagram illustrating a configuration of a device context. As illustrated, the size of the device context 60 is W D × L D [pixel] which is the same as the paper size W × L [pixel]. The device context 60 includes a print area 62 (W P × L P [pixel]) where a print image is drawn, a bar code control area 64 (W D × L BC [pixel]) where information related to a bar code is drawn, and It is divided into. In this embodiment, the barcode control area 64 is positioned at the head part of the device context. However, the barcode control area 64 may be provided in other parts.

図4は、デバイスコンテキストに関するパラメータの例を示す表である。本実施例では、用紙横サイズ(W)を640[pixel]、用紙縦サイズ(L)を2000+LBC[pixel]としている。また、バーコード制御領域64の長さ(LBC)をLBC=1〜k[pixel](kは2以上の整数)としている。すなわち、バーコード制御領域64の長さは、バーコードの種類等に基づいて1〜kの範囲で変更可能となっている。また、本実施例では、デバイスコンテキスト60(描画可能領域)の大きさは640×(2000+LBC)[pixel]、印刷領域62の大きさは640×2000[pixel]となっている。 FIG. 4 is a table showing an example of parameters related to the device context. In this embodiment, the paper horizontal size (W) is 640 [pixel], and the paper vertical size (L) is 2000 + L BC [pixel]. The length (L BC ) of the barcode control area 64 is L BC = 1 to k [pixel] (k is an integer of 2 or more). That is, the length of the barcode control area 64 can be changed in the range of 1 to k based on the type of barcode. In the present embodiment, the size of the device context 60 (drawable area) is 640 × (2000 + L BC ) [pixel], and the size of the print area 62 is 640 × 2000 [pixel].

再び図2に戻り、印刷データ描画手段34は、生成されたデバイスコンテキスト60上に印刷対象となるデータ(例えば、文字、図形、写真等)を描画する。バーコード制御領域描画手段36は、バーコード制御領域64上にバーコードに関する情報を描画する。ここで、バーコードに関する情報には、バーコードの種類、バーコードの印刷位置、バーコードのサイズ、バーコードのバイト数、及びバーコードデータが含まれる。また、上記バーコードに関する情報の最初には、後述するように、バーコード制御領域64の大きさが記載されている。   Returning to FIG. 2 again, the print data drawing unit 34 draws data (for example, characters, figures, photos, etc.) to be printed on the generated device context 60. The barcode control area drawing means 36 draws information related to the barcode on the barcode control area 64. Here, the bar code information includes the bar code type, bar code printing position, bar code size, bar code byte count, and bar code data. Further, at the beginning of the information on the barcode, the size of the barcode control area 64 is described as will be described later.

図5は、バーコード制御領域64に描画されたバーコードに関する情報の例を示す表である。ここで、「1pixel目」とは、バーコード制御領域64における最初の1行目のpixelに記載されたビットデータを示すものとする(2pixel目以降も同様)。図示するように、本実施例では、1pixel目にバーコード制御領域64の大きさを示す値(LBC)が記載されている。以下同様に、2pixel目にはバーコードの種類が、3pixel目にはバーコードの印刷位置及びバーコードのサイズが、4pixel目にはバーコードのデータ数及びバーコードデータが、それぞれ記載されている。本実施例では、バーコードデータをBinary値、その他のデータをWORD値で与える構成としたが、データの形式はこれに限られるものではない。 FIG. 5 is a table showing an example of information related to the barcode drawn in the barcode control area 64. Here, the “first pixel” indicates the bit data described in the first pixel of the first line in the barcode control area 64 (the same applies to the second pixel and thereafter). As shown in the figure, in this embodiment, a value (L BC ) indicating the size of the barcode control area 64 is described at the first pixel. Similarly, the barcode type is described in the second pixel, the barcode printing position and the barcode size in the third pixel, and the number of barcode data and barcode data in the fourth pixel. . In this embodiment, the barcode data is given as a binary value and the other data is given as a WORD value. However, the data format is not limited to this.

図6は、アプリケーション30により描画された画像データのイメージを示す図である。デバイスコンテキスト60は、縦横方向に等間隔のセルへと分割されている。バーコード制御領域64の長さが記載される1行目は、左から6番目のセルが黒く塗りつぶされており、その他のセルは白紙となっている。これは、1行目のデータの並びが、左から順に「0000 0100 0000 0000」となっていることを示す。この値を16進数のWORD値(リトルエンディアン)に変換すると、0x0004となり、情報をプリンタドライバ40へ通知することが可能となる。2行目以降においても、1行目と同様にビットを描画することにより、プリンタドライバ40に通知する様々なパラメータを任意に設定することができる。   FIG. 6 is a diagram illustrating an image of image data drawn by the application 30. The device context 60 is divided into equally spaced cells in the vertical and horizontal directions. In the first line describing the length of the barcode control area 64, the sixth cell from the left is painted black, and the other cells are blank. This indicates that the arrangement of data in the first row is “0000 0100 0000 0000” in order from the left. When this value is converted into a hexadecimal WORD value (little endian), 0x0004 is obtained, and information can be notified to the printer driver 40. Also in the second and subsequent lines, various parameters to be notified to the printer driver 40 can be arbitrarily set by drawing bits as in the first line.

再び図2に戻り、印刷実行手段38は、印刷実行時にプリンタドライバ40を呼び出す。また、印刷実行手段38は、印刷データ描画手段34及びバーコード制御領域描画手段36により生成された画像データ(例えば、ビットイメージデータ)を、プリンタドライバ40へと送信する。   Returning to FIG. 2 again, the print execution means 38 calls the printer driver 40 at the time of print execution. The print execution unit 38 transmits image data (for example, bit image data) generated by the print data drawing unit 34 and the barcode control area drawing unit 36 to the printer driver 40.

図7は、アプリケーション30の動作を示すフローチャートである。最初に、デバイスコンテキスト生成手段32がデバイスコンテキスト60の生成を行う(ステップS10)。次に、印刷データ描画手段34が、印刷領域62に印刷データの描画を行い(ステップS12)、バーコード制御領域描画手段36が、バーコード制御領域64にバーコードに関する情報の描画を行う(ステップS14)。これらのステップ(S12及びS14)は順番が逆であってもよい。最後に、印刷実行手段38が、プリンタドライバ40を呼び出し、デバイスコンテキスト60上に描画された画像データをプリンタドライバ40へと送信する。   FIG. 7 is a flowchart showing the operation of the application 30. First, the device context generation unit 32 generates a device context 60 (step S10). Next, the print data drawing means 34 draws the print data in the print area 62 (step S12), and the barcode control area drawing means 36 draws information about the barcode in the barcode control area 64 (step S12). S14). These steps (S12 and S14) may be reversed in order. Finally, the print execution unit 38 calls the printer driver 40 and transmits the image data drawn on the device context 60 to the printer driver 40.

再び図2に戻り、プリンタドライバ40は、判定手段41、取得手段42、生成手段44、送信手段46、及び変換手段48を含む。これらの手段は、例えば図1のCPU12に所定のプログラムを実行させることにより実現することができ、当該所定のプログラムは、例えばメモリ14に記憶させることができる。判定手段41は、アプリケーション30から受信した画像データ(デバイスコンテキスト60)の中に、バーコード制御領域64が存在するか否かを判定する。取得手段42は、バーコード制御領域64が存在する場合に、当該領域からバーコードに関する情報を取得する。生成手段44は、取得されたバーコードに関する情報に基づいて、プリンタ20にバーコードの印刷を行わせるためのバーコード印刷コマンドを生成する。   Returning to FIG. 2 again, the printer driver 40 includes a determination unit 41, an acquisition unit 42, a generation unit 44, a transmission unit 46, and a conversion unit 48. These means can be realized, for example, by causing the CPU 12 of FIG. 1 to execute a predetermined program, and the predetermined program can be stored in the memory 14, for example. The determination unit 41 determines whether or not the barcode control area 64 exists in the image data (device context 60) received from the application 30. When the barcode control area 64 exists, the acquisition unit 42 acquires information related to the barcode from the area. The generation unit 44 generates a barcode print command for causing the printer 20 to print a barcode based on the acquired information on the barcode.

変換手段48は、画像データのうち印刷領域62中の画像データを、プリンタ20にて印刷可能なデータ形式に変換する。送信手段46は、生成手段44により生成されたバーコード印刷コマンドと、変換手段48により変換された印刷領域62の画像データとを、プリンタ20へと送信する。   The conversion means 48 converts the image data in the print area 62 out of the image data into a data format that can be printed by the printer 20. The transmission unit 46 transmits the barcode print command generated by the generation unit 44 and the image data of the print area 62 converted by the conversion unit 48 to the printer 20.

図8は、プリンタドライバ40の動作を示すフローチャートである。最初に、プリンタドライバ40がアプリケーション30から画像データを受信する(ステップS20)。受信された画像データは、判定手段41及び変換手段48へと入力される。続いて、判定手段41は、バーコード制御領域長LBCを取得し(ステップS22)、その値に基づいてバーコード制御領域が存在するか否かの判定を行う(ステップS24)。上記判定は、バーコード制御領域長LBCを所定の閾値(本実施例では4とする)と比較することにより行われる。判定手段41は、LBCが4以上であれば、バーコード制御領域64が存在すると判定し、LBCが4未満であれば、バーコード制御領域64が存在しないと判定する。 FIG. 8 is a flowchart showing the operation of the printer driver 40. First, the printer driver 40 receives image data from the application 30 (step S20). The received image data is input to the determination unit 41 and the conversion unit 48. Subsequently, the determination unit 41 acquires the barcode control area length L BC (step S22), and determines whether or not the barcode control area exists based on the value (step S24). The above determination is performed by comparing the barcode control area length L BC with a predetermined threshold (4 in this embodiment). The determination unit 41 determines that the barcode control area 64 exists if L BC is 4 or more, and determines that the barcode control area 64 does not exist if L BC is less than 4.

ステップS24においてバーコード制御領域長LBCが4以上である場合、取得手段42は、バーコード制御領域64の中から、バーコードに関する残りの情報(位置、サイズ、データ等)を取得する(ステップS26)。ここで取得された情報は、コンピュータ10内の記憶装置(例えば、RAM:Random Access Memory)に一時的に記憶される。ステップS24においてバーコード制御領域長LBCが4未満の場合、取得手段42はバーコードに関する情報の取得を行わない。 If the barcode control area length L BC is 4 or more in step S24, the acquisition means 42 acquires the remaining information (position, size, data, etc.) relating to the barcode from the barcode control area 64 (step). S26). The information acquired here is temporarily stored in a storage device (for example, RAM: Random Access Memory) in the computer 10. If the barcode control area length L BC is less than 4 in step S24, the acquisition unit 42 does not acquire information regarding the barcode.

続いて、変換手段48は、デバイスコンテキスト60のうちバーコード制御領域64を削除する(ステップS28)。続いて、変換手段48は、画像データのうち残りの印刷領域62にあるデータを、プリンタ30にて印刷可能なデータ形式に変換(ラスタライズ)する(ステップS30)。   Subsequently, the conversion unit 48 deletes the barcode control area 64 from the device context 60 (step S28). Subsequently, the conversion unit 48 converts (rasterizes) the data in the remaining print area 62 of the image data into a data format that can be printed by the printer 30 (step S30).

続いて、生成手段44は、ステップS26で取得されたバーコード情報が正常であるか否かを判定する(ステップS32)。ここでは、バーコードの種類、バーコードの位置、バーコードのサイズ、及びバーコードデータのそれぞれについて、正常であるか否かの判定が行われる。これらのパラメータが全て正常である場合、生成手段44は、バーコード印刷コマンドを生成し、プリンタ20への送信データに追加する(ステップS34)。ここで、バーコード印刷コマンドには、バーコードの位置、サイズ、データ内容等をそれぞれ指定するコマンドが含まれる。ステップS32においてパラメータが正常でないと判断された場合、バーコード印刷コマンドを追加する処理(S34)は行われない。   Subsequently, the generating unit 44 determines whether or not the barcode information acquired in step S26 is normal (step S32). Here, it is determined whether each of the barcode type, barcode position, barcode size, and barcode data is normal. If all of these parameters are normal, the generation unit 44 generates a bar code print command and adds it to the transmission data to the printer 20 (step S34). Here, the barcode print command includes commands for designating the barcode position, size, data contents, and the like. If it is determined in step S32 that the parameters are not normal, the process of adding a barcode print command (S34) is not performed.

続いて、生成手段44は、印刷開始コマンド及びプリンタ制御コマンドを生成し、プリンタ20への送信データに追加する(ステップS38、S40)。ここで、印刷開始コマンドとは、プリンタ20に印刷を開始させるためのコマンドであり、プリンタ制御コマンドとは、プリンタ20の印刷動作を制御するためのコマンドである。最後に、送信手段46は、変換手段48により変換された画像データを、生成手段44により生成されたコマンド(バーコード印刷コマンド、印刷開始コマンド、及びプリンタ制御コマンド)と共に、プリンタ20へと送信する(ステップS42)。   Subsequently, the generation unit 44 generates a print start command and a printer control command, and adds them to the transmission data to the printer 20 (steps S38 and S40). Here, the print start command is a command for causing the printer 20 to start printing, and the printer control command is a command for controlling the printing operation of the printer 20. Finally, the transmission unit 46 transmits the image data converted by the conversion unit 48 to the printer 20 together with the commands (barcode print command, print start command, and printer control command) generated by the generation unit 44. (Step S42).

再び図2に戻り、プリンタ20は、バーコードデータ処理手段52、画像データ処理手段54、コマンド処理手段56、合成手段58、及び印刷手段59を含む。これらの手段のうち、バーコードデータ処理手段52、画像データ処理手段54、コマンド処理手段56、及び合成手段58は、例えば図1のCPU22に所定のプログラムを実行させることにより実現することができ、当該所定のプログラムは、例えばメモリ24に記憶させることができる。また、印刷手段59は、例えば図1の印刷部28により実現することができる。   Returning to FIG. 2 again, the printer 20 includes a barcode data processing unit 52, an image data processing unit 54, a command processing unit 56, a combining unit 58, and a printing unit 59. Of these means, the barcode data processing means 52, the image data processing means 54, the command processing means 56, and the synthesizing means 58 can be realized, for example, by causing the CPU 22 of FIG. The predetermined program can be stored in the memory 24, for example. The printing unit 59 can be realized by the printing unit 28 in FIG.

バーコードデータ処理手段52は、プリンタドライバ40から送信されたデータの中から、バーコード印刷コマンドを取得し、当該コマンドに基づいて、印刷されるバーコードのイメージデータを生成する。画像データ処理手段54は、プリンタドライバ40から送信されたデータの中から、印刷領域62の画像データを取得し、印刷される画像のイメージデータを形成する。   The barcode data processing unit 52 acquires a barcode print command from the data transmitted from the printer driver 40, and generates barcode image data to be printed based on the command. The image data processing means 54 acquires the image data of the print area 62 from the data transmitted from the printer driver 40, and forms the image data of the image to be printed.

合成手段58は、バーコードデータ処理手段52により生成されたバーコードのイメージデータと、画像データ処理手段54により生成された画像データのイメージデータとの合成を行う。コマンド処理手段56は、プリンタドライバ40から送信されたデータのうち、バーコードに関するコマンド以外のコマンド(例えば、印刷開始コマンド、プリンタ制御コマンド等)を処理する。印刷手段59は、合成手段58により合成された最終的な印刷データに基づき、印刷を実行する。   The combining unit 58 combines the barcode image data generated by the barcode data processing unit 52 and the image data of the image data generated by the image data processing unit 54. The command processing unit 56 processes commands (for example, a print start command, a printer control command, etc.) other than the command related to the barcode among the data transmitted from the printer driver 40. The printing unit 59 executes printing based on the final print data combined by the combining unit 58.

図9は、プリンタの動作を示すフローチャートである。最初に、プリンタ20は、プリンタドライバ40から画像データ及び各種コマンドを受信する(ステップS60)。ここで受信される画像データは、デバイスコンテキスト60からバーコード制御領域64を除いた印刷領域62の画像データであり、バーコード制御領域に記載された情報は、バーコード印刷コマンドとして、当該画像データとは別に受信される。受信されたデータのうち、バーコード印刷コマンドはバーコードデータ処理手段52へ、画像データ(ビットイメージデータ)は画像データ処理手段54へ、その他のコマンドはコマンド処理手段56へとそれぞれ入力される。   FIG. 9 is a flowchart showing the operation of the printer. First, the printer 20 receives image data and various commands from the printer driver 40 (step S60). The image data received here is the image data of the print area 62 excluding the barcode control area 64 from the device context 60, and the information described in the barcode control area is the image data as a barcode print command. Received separately. Of the received data, the barcode printing command is input to the barcode data processing unit 52, the image data (bit image data) is input to the image data processing unit 54, and the other commands are input to the command processing unit 56.

続いて、画像データ処理手段54は、プリンタドライバ40により変換された画像データであるビットイメージデータの処理を行い(ステップS62)、当該イメージデータを図1のメモリ24へと展開する(ステップS64)。続いて、バーコードデータ処理手段52は、バーコード印刷コマンドの処理を行い(ステップS66)、当該コマンドに基づいてバーコードのイメージデータ(バーコードイメージ)を作成し(ステップS68)、生成されたバーコードイメージをメモリ24へと展開する(ステップS70)。以上の処理により、画像及びバーコードのそれぞれのイメージデータがメモリ24上へと展開され、メモリ24上(合成手段58)にて画像のイメージデータ及びバーコードイメージの合成が行われる。合成されたイメージデータは、印刷手段59へと送信される。   Subsequently, the image data processing means 54 processes the bit image data which is the image data converted by the printer driver 40 (step S62), and develops the image data into the memory 24 of FIG. 1 (step S64). . Subsequently, the barcode data processing means 52 processes the barcode print command (step S66), creates barcode image data (barcode image) based on the command (step S68), and generates the barcode data. The barcode image is expanded into the memory 24 (step S70). Through the above processing, the image data and the image data of the barcode are developed on the memory 24, and the image data and the barcode image are combined on the memory 24 (combining means 58). The combined image data is transmitted to the printing unit 59.

続いて、コマンド処理手段56が、印刷開始コマンドを受信したか否かを判定する(ステップS72)。印刷開始コマンドが受信された場合、コマンド処理手段56は、印刷手段59に印刷命令を与え、印刷を実行させることにより印刷を開始する(ステップS74)。   Subsequently, the command processing means 56 determines whether or not a print start command has been received (step S72). When the print start command is received, the command processing unit 56 gives a print command to the printing unit 59 and starts printing by executing printing (step S74).

図10は、プリンタ20により生成される画像のイメージを示す図である。符号の70は、画像データ処理手段54により生成されたイメージデータを示し、符号の80は、バーコードデータ処理手段52により生成されたバーコードイメージを示す。符号の90は、上記2つのイメージデータが合成された状態(最終的な印刷画像)を示す。   FIG. 10 is a diagram illustrating an image generated by the printer 20. Reference numeral 70 indicates image data generated by the image data processing means 54, and reference numeral 80 indicates a barcode image generated by the barcode data processing means 52. Reference numeral 90 indicates a state (final print image) in which the two image data are combined.

本実施例では、印刷画像の例として領収書を用いている。領収書70には、物品名、金額、顧客へのメッセージ等が記載されている。領収書70のうち領域72は空白となっており、当該領域にバーコードイメージ80が貼り付けられることにより、バーコード付きの領収書90のイメージデータが完成する。当該イメージデータに基づいて印刷を実行することにより、バーコード付きの領収書を印刷することができる。   In this embodiment, a receipt is used as an example of a print image. The receipt 70 includes the article name, the amount of money, a message to the customer, and the like. The area 72 of the receipt 70 is blank, and the barcode data 80 is pasted on the area 72, whereby the image data of the receipt 90 with the barcode is completed. By executing printing based on the image data, a receipt with a barcode can be printed.

実施例1に係るプリンタシステムによれば、アプリケーション30が生成するデバイスコンテキスト60が、印刷画像が描画される印刷領域62とは別に、バーコード制御領域64を含む。そして、プリンタ制御プログラム(プリンタドライバ40)が、バーコード制御領域64からバーコードに関する情報を取得し、バーコードの印刷コマンドを生成する。バーコードのイメージデータは、当該バーコードの印刷コマンドに基づき、プリンタ20にて生成される。従って、アプリケーション30にてバーコードイメージを生成する場合に比べ、プリンタドライバ40による変換処理の影響を受けず、且つプリンタ20の仕様に適合したバーコードイメージを生成することができる。その結果、高品質なバーコードを印刷することができる。また、デバイスコンテキスト60を従来に比べて拡張し、当該拡張した領域(バーコード制御領域64)にバーコードに関する情報を描画することで、例えば特殊フォントを用いる場合等に比べ、バーコードに関する情報を簡易かつ正確に、プリンタドライバ40に伝達することができる。   According to the printer system according to the first embodiment, the device context 60 generated by the application 30 includes the barcode control area 64 in addition to the print area 62 where the print image is drawn. Then, the printer control program (printer driver 40) acquires information relating to the barcode from the barcode control area 64, and generates a barcode print command. The barcode image data is generated by the printer 20 based on the barcode print command. Therefore, compared to a case where a barcode image is generated by the application 30, it is possible to generate a barcode image that is not affected by the conversion process by the printer driver 40 and conforms to the specifications of the printer 20. As a result, a high quality barcode can be printed. Also, by expanding the device context 60 as compared with the conventional case and drawing information related to the barcode in the expanded area (barcode control area 64), for example, information related to the barcode can be obtained compared to the case where a special font is used. Simple and accurate transmission to the printer driver 40 is possible.

本実施例では、バーコード制御領域64をデバイスコンテキスト60の最初に設けているが、バーコード制御領域64はその他の領域と識別できる形態であれば、他の領域に設けられていてもよい。ただし、バーコード制御領域64をデータの先頭に設けることで、プリンタドライバ40がバーコード印刷を行うか否かの判定を、より早い段階で行うことができる。なお、バーコード制御領域64に記載されるデータ量は、印刷されるバーコードの種類ごとに異なる場合があるため、バーコード制御領域64の大きさは、バーコードの種類に応じて変更可能とすることが好ましい。   In this embodiment, the barcode control area 64 is provided at the beginning of the device context 60. However, the barcode control area 64 may be provided in another area as long as it can be distinguished from other areas. However, by providing the barcode control area 64 at the head of the data, it is possible to determine whether or not the printer driver 40 performs barcode printing at an earlier stage. Note that the amount of data described in the barcode control area 64 may vary depending on the type of barcode to be printed, so the size of the barcode control area 64 can be changed according to the type of barcode. It is preferable to do.

また、本実施例では、バーコード制御領域64に記載されたバーコードに関する情報の最初に、バーコード制御領域64の大きさ(LBC)を記載する構成としたが、LBCをこれ以外の領域に記載してもよい。ただし、LBCをバーコード制御領域64の最初に記載することで、プリンタドライバ40の判定手段41が、バーコード制御領域64が存在するか否かの判定をより早い段階で行うことができる。なお、本実施例では、バーコード制御領域64の大きさ(LBC)が所定の閾値より小さい場合に、バーコード制御領域64が存在しないと判定したが、バーコード制御領域64が存在するか否かの判定は、これ以外の方法で行ってもよい。 Further, in the present embodiment, first information about the barcode printed on the barcode control region 64, a configuration described size of the bar code control region 64 (L BC), the other the L BC It may be described in the area. However, by describing the L BC to the first bar code control region 64, the determination unit 41 of the printer driver 40, it is possible to determine whether or not the bar code control region 64 is present at an earlier stage. In the present embodiment, it is determined that the barcode control area 64 does not exist when the size (L BC ) of the barcode control area 64 is smaller than a predetermined threshold. However, is the barcode control area 64 present? The determination of whether or not may be performed by other methods.

また、本実施例では、1次元のバーコードを例に説明を行ったが、本発明はこれ以外の形態のバーコード(例えば、2次元バーコード(QRコード))に対しても適用することができる。   In this embodiment, a one-dimensional barcode has been described as an example. However, the present invention can be applied to barcodes of other forms (for example, a two-dimensional barcode (QR code)). Can do.

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

10 コンピュータ
20 プリンタ
30 アプリケーション
32 デバイスコンテキスト生成手段
34 印刷データ描画手段
36 バーコード制御領域描画手段
38 印刷実行手段
40 プリンタドライバ
41 判定手段
42 取得手段
44 生成手段
46 変換手段
48 送信手段
52 バーコードデータ処理手段
54 イメージデータ処理手段
56 コマンド処理手段
58 合成手段
59 印刷手段
60 デバイスコンテキスト
DESCRIPTION OF SYMBOLS 10 Computer 20 Printer 30 Application 32 Device context production | generation means 34 Print data drawing means 36 Barcode control area drawing means 38 Print execution means 40 Printer driver 41 Determination means 42 Acquisition means 44 Generation means 46 Conversion means 48 Transmission means 52 Barcode data processing Means 54 Image data processing means 56 Command processing means 58 Composition means 59 Printing means 60 Device context

Claims (6)

コンピュータを、
画像データの描画領域中に、バーコードに関する情報が記載されたバーコード制御領域が存在するか否かを判定する判定手段と、
前記バーコード制御領域が存在する場合に、前記バーコード制御領域から、前記バーコードに関する情報を取得する取得手段と、
前記バーコードに関する情報に基づいて、プリンタにバーコードの印刷を行わせるためのコマンドを生成する生成手段と、
として機能させ
前記バーコードに関する情報の最初には、前記バーコード制御領域の大きさが記載されていることを特徴とする印刷制御プログラム。
Computer
Determining means for determining whether or not there is a barcode control area in which information relating to the barcode is present in the drawing area of the image data;
An acquisition means for acquiring information on the barcode from the barcode control area when the barcode control area exists;
Generating means for generating a command for causing the printer to print a barcode based on the information relating to the barcode;
To function as,
The printing control program characterized in that the size of the barcode control area is described at the beginning of the information on the barcode .
前記バーコード制御領域は、前記画像データの最初に設けられていることを特徴とする請求項1に記載の印刷制御プログラム。   The print control program according to claim 1, wherein the barcode control area is provided at the beginning of the image data. 前記バーコードに関する情報は、バーコードの種類、バーコードの印刷位置、バーコードのサイズ、バーコードのバイト数、及びバーコードデータを含むことを特徴とする請求項1または2に記載の印刷制御プログラム。   The print control according to claim 1, wherein the information about the barcode includes a barcode type, a barcode printing position, a barcode size, the number of barcode bytes, and barcode data. program. 前記取得手段は、前記バーコード制御領域の大きさが所定の値より小さい場合に、前記バーコードに関する情報の取得を行わないことを特徴とする請求項に記載の印刷制御プログラム。 The printing control program according to claim 1 , wherein the acquisition unit does not acquire information regarding the barcode when the size of the barcode control area is smaller than a predetermined value. 前記バーコード制御領域の大きさは、バーコードの種類に基づいて変更可能であることを特徴とする請求項1〜のいずれか1項に記載の印刷制御プログラム。 The size of the bar code control region, the print control program according to any one of claims 1 to 4, characterized in that is changeable based on the type of bar code. コンピュータを、
前記画像データから、前記バーコード制御領域を除いた印刷領域中の画像データを、プリンタにて印刷可能なデータ形式に変換する変換手段と、
記変換手段により変換された画像データを、前記コマンド生成手段により生成されたバーコード印刷コマンドと共にプリンタに送信する送信手段と、
としてさらに機能させるための請求項1〜のいずれか1項に記載の印刷制御プログラム。
Computer
Conversion means for converting image data in a print area excluding the barcode control area from the image data into a data format printable by a printer;
Transmission means for transmitting the image data converted by the pre-Symbol conversion means, to the printer along with the command generating unit bar code printing command generated by,
The print control program according to any one of claims 1 to 5 , further functioning as:
JP2011056989A 2011-03-15 2011-03-15 Print control program Expired - Fee Related JP5687098B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011056989A JP5687098B2 (en) 2011-03-15 2011-03-15 Print control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011056989A JP5687098B2 (en) 2011-03-15 2011-03-15 Print control program

Publications (2)

Publication Number Publication Date
JP2012194688A JP2012194688A (en) 2012-10-11
JP5687098B2 true JP5687098B2 (en) 2015-03-18

Family

ID=47086531

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011056989A Expired - Fee Related JP5687098B2 (en) 2011-03-15 2011-03-15 Print control program

Country Status (1)

Country Link
JP (1) JP5687098B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6208477B2 (en) * 2013-06-21 2017-10-04 富士通コンポーネント株式会社 Printer, print control program, and printing system
JP7298241B2 (en) 2019-03-28 2023-06-27 ブラザー工業株式会社 Support program, information processing device, and printing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11221946A (en) * 1998-02-06 1999-08-17 Casio Electronics Co Ltd Print system and method
JP2006031427A (en) * 2004-07-16 2006-02-02 Ricoh Co Ltd Printer driver, storage medium and symbol code printing method
JP4890178B2 (en) * 2006-09-27 2012-03-07 株式会社沖データ Image forming system and image forming method

Also Published As

Publication number Publication date
JP2012194688A (en) 2012-10-11

Similar Documents

Publication Publication Date Title
JP2010091724A (en) Image processing system
EP2677418A2 (en) Image processing device, image processing system, and printing method
JP6061744B2 (en) Printing system and printing control program
JP5687098B2 (en) Print control program
JP6978205B2 (en) Print control device, raster data generation method, and raster data generation program
JP6447564B2 (en) Image forming apparatus, program, and information processing system
JP4942414B2 (en) Printing device
JP2935510B2 (en) Output device and output method
CN104461406B (en) A kind of print-out method and device
JP2014002697A (en) Image processing device, image processing system, and printing method
JP2007025845A (en) Printer control method and program
JP6208477B2 (en) Printer, print control program, and printing system
CN103955349B (en) A kind of embedded italic algorithm and mobile terminal based on GSM/GPRS
JP2650324B2 (en) Multi-value character font generation system
JP4785601B2 (en) Image forming apparatus
US9704071B2 (en) Printing device, control method of a printing device, and storage medium for managing font printouts
JP4775673B2 (en) Drawing processing device, image output device, program
JP2009101662A (en) Printing processor
JP2690567B2 (en) Printing control device
JP2006093771A (en) Image processor, image output device, image processing method, image outputting method, image processing program, and image outputting program
CN114035755A (en) Picture processing method and printing method
JP2023133973A (en) Program, information processing apparatus, and image creation method
JPH03112671A (en) Printer
JP2010094853A (en) Printing apparatus, control method of printing apparatus and control program
JPH1040322A (en) Printing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140203

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141015

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141028

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141226

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150120

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150121

R150 Certificate of patent or registration of utility model

Ref document number: 5687098

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees