JP2010006022A - Printer, printer control method, and operation control program - Google Patents

Printer, printer control method, and operation control program Download PDF

Info

Publication number
JP2010006022A
JP2010006022A JP2008171425A JP2008171425A JP2010006022A JP 2010006022 A JP2010006022 A JP 2010006022A JP 2008171425 A JP2008171425 A JP 2008171425A JP 2008171425 A JP2008171425 A JP 2008171425A JP 2010006022 A JP2010006022 A JP 2010006022A
Authority
JP
Japan
Prior art keywords
data
print
print data
printer
reduced
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
JP2008171425A
Other languages
Japanese (ja)
Inventor
Shuichi Ouchi
修一 大内
Kenji Sezai
健治 瀬在
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2008171425A priority Critical patent/JP2010006022A/en
Publication of JP2010006022A publication Critical patent/JP2010006022A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a printer can do printing in a highly-visible and good print appearance on a sheet of paper with a small width without changing a printer driver and an application program mounted on a host computer. <P>SOLUTION: The control method of the printer 1 executing printing based on print data 5 sent from the host computer 3 includes a step S101 of determining whether or not each line data q0 to q4 contained in the print data 5 settles in a preliminarily established reduced width, a step S104 of reducing a font size of a commodity name sa can be reduced in accordance with a data property of each construction data constructing the line data when it is determined (step S101:No) that respective line data do not settle in the reduced width, and then generating reduced line data qs1 and qs2 shortened so as to settle in the reduced width by reduced construction data sa1 after reduction and price data sc1 as other construction data, and a step S102 of executing the printing based on the reduced line data qs1 and qs2. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、ホストコンピュータから送信された印刷データに基づき印刷処理を実行するプリンタ、プリンタの制御方法及び動作制御プログラムに関する。   The present invention relates to a printer that executes print processing based on print data transmitted from a host computer, a printer control method, and an operation control program.

近年、各種の販売店では、レジ打ち作業を軽減するとともに、仕入・棚卸と販売実績を結びつけた在庫管理・発注管理の精度向上を計ることを目的として、POSシステムを導入している店舗が多くなっている。
このPOSシステムでは、例えば、販売店の会計場所に設置されているPOS用のレジスター(POS端末)に、顧客が購入する商品に付与されているバーコードを読み取らせると、その商品の販売情報(商品名、数量、販売金額、販売合計金額、販売時刻など)が記録される一方で、その商品の販売金額等を記載したレシートが発行されるようになっている。
In recent years, various stores have introduced POS systems for the purpose of reducing the checkout work and improving the accuracy of inventory management and ordering management that combines purchase and inventory with sales performance. It is increasing.
In this POS system, for example, when a bar code attached to a product purchased by a customer is read by a POS register (POS terminal) installed at an accounting place of a store, the sales information ( Product name, quantity, sales amount, total sales amount, sales time, etc.) are recorded, while a receipt describing the sales amount of the product is issued.

通常、POS端末が読み取った商品の販売情報は、POS端末からホストコンピュータに通知され、ホストコンピュータ側で分析されて、在庫管理・発注管理等に利用される。
また、POSシステムでは、POS端末から商品の販売情報を受けたホストコンピュータが、その販売情報を所定の印刷用紙幅に収まるように配置したレシート印刷データを生成し、生成したレシート印刷データをプリンタに出力することで、レシートの発行を行う。
ホストコンピュータには、POS端末から受けた商品の販売情報に基づいて販売情報に含まれる各種のデータの配置を指定したレシート印刷データを生成するレシート印刷用のアプリケーションプログラムと、このアプリケーションプログラムが生成したレシート印刷データをプリンタに出力するプリンタドライバとが、搭載されている。
Normally, the sales information of the product read by the POS terminal is notified from the POS terminal to the host computer, analyzed on the host computer side, and used for inventory management / order management.
In the POS system, a host computer that receives product sales information from a POS terminal generates receipt print data in which the sales information is arranged to fit within a predetermined print paper width, and the generated receipt print data is sent to a printer. A receipt is issued by outputting.
The host computer includes a receipt printing application program for generating receipt print data specifying the arrangement of various data included in the sales information based on the sales information of the product received from the POS terminal, and the application program generated by this application program. A printer driver that outputs receipt print data to a printer is installed.

また、レシート印刷データには、通常、販売店舗名、店舗の連絡先、販売日時、販売した商品名、販売数量、商品毎の販売金額、販売合計金額、店舗の広告用の文章などのデータが含まれる。レシート印刷データを生成するアプリケーションプログラムは、レシート印刷データを構成する各種データを、データ種毎に体裁を整えて配置設定をする。   The receipt print data usually includes data such as sales store name, store contact information, sales date and time, product name sold, sales volume, sales price for each product, total sales price, and store advertising text. included. An application program that generates receipt print data arranges and sets various data constituting the receipt print data in a format for each data type.

近年では、印刷用紙の節約を目的として、ホストコンピュータに搭載されるアプリケーションプログラムやプリンタドライバを改良して、例えば印刷する文字のフォントサイズを縮小することにより、印刷幅を短縮した縮小印刷データを生成して、より小さな用紙幅の印刷用紙への印刷を実現する技術が各種提案されている(特許文献1参照)。   In recent years, with the aim of saving printing paper, application programs and printer drivers installed in host computers have been improved to generate reduced print data with a reduced print width, for example, by reducing the font size of characters to be printed. Various techniques for realizing printing on printing paper having a smaller paper width have been proposed (see Patent Document 1).

また、従来のPOSシステムで使用されるプリンタは、収容する用紙幅が固定である場合が多い。このため、用紙の節約等のためにレシート用紙を用紙幅が小さなものに変更するには、プリンタ自体を、その用紙幅に対応するプリンタに置き換える必要がある。そして、プリンタを置き換えた場合には、変更された用紙幅に対応したレシート印刷データをホストコンピュータがプリンタに出力できるように、ホストコンピュータ側に搭載するアプリケーションプログラムやプリンタドライバの変更を行う必要がある。このため、ホストコンピュータへの新しいプログラムの導入等の保守作業に手間がかかる場合がある。   Also, printers used in conventional POS systems often have a fixed paper width. For this reason, in order to change the receipt paper to a paper having a small paper width in order to save paper, it is necessary to replace the printer itself with a printer corresponding to the paper width. When the printer is replaced, it is necessary to change the application program and printer driver installed on the host computer so that the host computer can output receipt print data corresponding to the changed paper width. . For this reason, it may take time for maintenance work such as introduction of a new program to the host computer.

これに対応すべく、上位装置(ホストコンピュータ)から送信される印字データの印字範囲を計算し、要求されている印字範囲に合致するように印字情報(移動、縮小、拡大等)を作成することにより、印字時にその印字情報をもとに印字範囲を変更して印字することにより、要求されている印字範囲の印字する印字装置(プリンタ)が提案されている(特許文献2参照)。このような構成によると、上位装置から送信されるデータが固定範囲の印字データであっても、自動的に印字範囲を合わせて印字することができる。   To cope with this, the print range of print data sent from the host device (host computer) is calculated, and print information (movement, reduction, enlargement, etc.) is created so as to match the requested print range. Thus, a printing apparatus (printer) that prints a requested printing range by changing the printing range based on the printing information at the time of printing has been proposed (see Patent Document 2). According to such a configuration, even if the data transmitted from the host device is print data in a fixed range, it is possible to automatically print by matching the print range.

特開平09−220829号公報JP 09-220829 A 特開平05−000552号公報JP 05-000552 A

特許文献2に記載の印字装置では、印字データを一律に移動、縮小、拡大等している。このため、例えばレシート印刷を行うプリンタに適用して印字データを一律に縮小すると、レシートに印刷される文字サイズが小さくなり過ぎて、レシートに記載される購入商品や購入数量や金額等の各種情報の視認性が低下する虞がある。
具体的には、図5に示すように(a)の印刷データを一律に縮小すると、(b)のように、購入商品や購入数量や金額等の各種情報が全体的に小さな文字で印刷されるため、視認性が低下する。
In the printing apparatus described in Patent Document 2, the print data is uniformly moved, reduced, enlarged, and the like. For this reason, for example, when applied to a printer that performs receipt printing and the print data is uniformly reduced, the character size printed on the receipt becomes too small, and various information such as the purchased product, purchase quantity, amount, etc. described on the receipt There is a possibility that the visibility of the lowering.
Specifically, as shown in FIG. 5, when the print data of (a) is uniformly reduced, various information such as purchased products, purchase quantities, and amounts are printed in small characters as a whole as shown in (b). Therefore, the visibility is lowered.

特に、金額データ102のような情報は、顧客にとって重要な情報であるため視認性を低下させることなく印刷したい。また、店名101のような情報は、縮小せずに1行に収まるデータであるため縮小処理を行う必要がない。このように、縮小処理を行うか否かは、データ属性に応じて異なる場合がある。   In particular, information such as the money amount data 102 is important information for the customer, so it is desired to print without reducing visibility. In addition, since information such as the store name 101 is data that fits in one line without being reduced, it is not necessary to perform reduction processing. As described above, whether or not to perform the reduction process may differ depending on the data attribute.

本発明の目的は、上記課題を解決するためになされたものであって、プリンタを小さな用紙幅の機種に変更した場合に、ホストコンピュータに搭載されるアプリケーションプログラムやプリンタドライバを変更せずとも、用紙幅が小さな用紙に、印字体裁を保った視認性の良い印刷を実施でき、小さな用紙幅の用紙の採用による用紙の節約を実現できるプリンタ、プリンタの制御方法及び動作制御プログラムを提供することを目的とする。   An object of the present invention is to solve the above-described problem. When the printer is changed to a model having a small paper width, the application program and printer driver installed in the host computer are not changed. To provide a printer, a printer control method, and an operation control program capable of performing printing with good visibility while maintaining a print appearance on a paper having a small paper width, and realizing paper saving by adopting a paper having a small paper width. Objective.

上記課題を解決することのできる本発明は、ホストコンピュータから送信された印刷データに基づき印刷するプリンタであって、
前記印刷データを印刷する場合、予め設定されている印刷範囲に収まるか否かを判定し、収まらない場合は、前記印刷データのデータ属性に応じて所定の前記印刷データのフォントサイズを縮小して、実印刷データを生成するデータ展開部と、
前記実印刷データを前記印刷範囲に印刷する印刷実行部と、を有することを特徴とする。
The present invention that can solve the above problems is a printer that prints based on print data transmitted from a host computer,
When printing the print data, it is determined whether or not it falls within a preset print range. If not, the predetermined font size of the print data is reduced according to the data attribute of the print data. A data expansion unit for generating actual print data;
And a print execution unit that prints the actual print data in the print range.

上記構成によれば、ホストコンピュータから送信された印刷データは、プリンタ側のデータ展開部によって、予め設定されている印刷範囲に、所定の前記印刷データのフォントサイズを縮小して実印刷データが生成される。したがって、例えばPOSシステム等において、プリンタを小さな用紙幅の機種に変更した場合に、ホストコンピュータに搭載されるアプリケーションプログラムやプリンタドライバを変更せずとも、プリンタ側だけで、用紙幅が小さな用紙に印刷することができる。この場合、実印刷データとは実際にプリンタのヘッドで印刷するドットに展開したデータである。
これにより、プリンタの導入時に、ホストコンピュータ側のアプリケーションプログラムやプリンタドライバを変更しなければならないという不便を回避でき、プリンタの導入時における取り扱い性を向上させることができる。さらに、プリンタの変更による小幅の用紙の採用によって、用紙の節約を実現することができる。
また、フォントサイズの縮小は、データ属性に応じて所定の印刷データだけを縮小するので、顧客にとって重要な情報や縮小する必要のない情報は縮小せずに印刷することができる。したがって、小幅の用紙に印字体裁を保った視認性の良い印刷を実施でき、視認性の低下を招くことがない良好な印字体裁の出力結果を提供することができる。
According to the above configuration, the print data transmitted from the host computer is generated by reducing the font size of the predetermined print data within the preset print range by the data development unit on the printer side. Is done. Therefore, for example, when the printer is changed to a model with a small paper width in a POS system or the like, printing is performed on a paper with a small paper width only on the printer side without changing the application program or printer driver installed in the host computer. can do. In this case, the actual print data is data developed into dots that are actually printed by the printer head.
As a result, it is possible to avoid the inconvenience of having to change the application program and the printer driver on the host computer side when the printer is introduced, and it is possible to improve the handleability when the printer is introduced. Further, paper saving can be realized by adopting a narrow paper by changing the printer.
Further, since the font size is reduced by reducing only predetermined print data in accordance with the data attribute, information important to the customer and information that does not need to be reduced can be printed without being reduced. Therefore, it is possible to perform printing with good visibility while maintaining the print appearance on a narrow paper, and it is possible to provide an output result of good print appearance that does not cause a decrease in visibility.

また、本発明のプリンタにおいて、前記データ展開部は、縮小する前記フォントサイズを、前記印刷範囲に収まる範囲で最大のものとすることを特徴とする。   In the printer according to the aspect of the invention, the data expansion unit may make the font size to be reduced the maximum within a range that fits in the print range.

上記構成によれば、印刷データが印刷範囲に収まる範囲まで、フォントサイズを縮小していくことができる。すなわち、プリンタが保持しているフォントサイズの範囲で徐々に縮小していき、実印刷データが印刷範囲に収まる最大のフォントサイズが自動的に指定される。したがって、印刷範囲に収まる範囲内で最大のフォントサイズを指定することができるので、文字サイズが小さくなり過ぎて、内容を確認し難いという不都合が発生しない。また、文字サイズが小さくなり過ぎて、行間等の印字体裁が崩れることも防止できる。   According to the above configuration, the font size can be reduced to a range where the print data is within the print range. That is, the font size is gradually reduced within the range of the font size held by the printer, and the maximum font size that can fit the actual print data in the print range is automatically designated. Therefore, since the maximum font size can be specified within the range that fits within the print range, there is no inconvenience that the character size becomes too small and it is difficult to confirm the contents. Further, it is possible to prevent the printing style such as line spacing from being lost due to the character size becoming too small.

また、本発明のプリンタにおいて、前記データ展開部は、所定の前記印刷データのフォントサイズを縮小しても前記印刷範囲に収まらない場合は、前記印刷データの属性に応じて前記印刷データの一部を省略することを特徴とする。   In the printer according to the aspect of the invention, if the data expansion unit does not fall within the print range even if the font size of the predetermined print data is reduced, a part of the print data is set according to the attribute of the print data. Is omitted.

上記構成によれば、フォントサイズを縮小する所定の前記印刷データをプリンタが保持している最小のフォントサイズに縮小しても、実印刷データが印刷範囲に収まらない場合は、印刷データの一部を省略する。一方、所定の印刷データ以外の他の印刷データは省略することがないため、顧客にとって重要な情報や縮小する必要のない情報からなる印刷データは省略せずに印刷することができるので、視認性の低下を招くことがない良好な印刷体裁の出力結果を提供することができる。   According to the above configuration, even if the predetermined print data for reducing the font size is reduced to the minimum font size held by the printer and the actual print data does not fit in the print range, a part of the print data Is omitted. On the other hand, since print data other than the predetermined print data is not omitted, print data consisting of information important to the customer or information that does not need to be reduced can be printed without omission. It is possible to provide an output result of a good printing style that does not cause a decrease in image quality.

また、本発明のプリンタにおいて、前記データ展開部は、前記印刷範囲を印刷幅とすることを特徴とする。このような構成によれば、プリンタを小さな用紙幅の機種に変更した場合に、ホストコンピュータに搭載されるアプリケーションプログラムやプリンタドライバを変更せずとも、プリンタ側だけで、用紙幅が小さな用紙に印刷することができる。
また、本発明のプリンタにおいて、前記フォントサイズを縮小する所定の前記印刷データは、少なくとも数字を示すデータ属性を有するものを除く印刷データであることを特徴とする。
In the printer according to the aspect of the invention, the data expansion unit may set the print range as a print width. According to such a configuration, when the printer is changed to a model with a small paper width, printing is performed on a paper with a small paper width only on the printer side without changing the application program or printer driver installed in the host computer. can do.
In the printer of the present invention, the predetermined print data for reducing the font size is print data excluding data having at least a data attribute indicating a number.

印刷データがレシート印刷データである場合、そのデータ中において、販売した商品名、販売数量、商品毎の販売金額等の商品情報は、顧客が購入した商品の内容確認を容易にできるように、なるべく、大きなフォントサイズを使って、視認性に優れた印字体裁にすることが望まれる。特に、顧客にとって販売金額は重要な情報である。上記構成によれば、少なくとも数字を示すデータ属性を有する金額データは縮小できる印刷データではないため、縮小したり省略する印刷データに含まれない。このため金額データが縮小されたり省略されることがない。したがって、顧客にとって購入商品の金額が視認しづらくなることがない。数字に限らず、商品名など所望の特性のデータ特性としてもよい。   If the print data is receipt print data, the product information such as the name of the product sold, the quantity sold, and the sales amount for each product in the data should be as easy as possible so that the customer can easily confirm the contents of the product purchased. Therefore, it is desired to use a large font size to make the print appearance excellent in visibility. In particular, the sales amount is important information for customers. According to the above configuration, money amount data having at least a data attribute indicating a number is not print data that can be reduced, and thus is not included in print data that is reduced or omitted. Therefore, the amount data is not reduced or omitted. Therefore, it is not difficult for the customer to visually recognize the amount of the purchased product. Not only numbers but also desired data characteristics such as product names may be used.

また、上記課題を解決することのできる本発明は、ホストコンピュータから送信された印刷データに基づき印刷処理を実行するプリンタの制御方法であって、
前記印刷データを印刷する場合、予め設定されている印刷範囲に収まるか否かを判定するステップと、収まらないと判定した場合に、前記印刷データのデータ属性に応じて所定の前記印刷データのフォントサイズを縮小して、実印刷データを生成するステップと、前記実印刷データを前記印刷範囲に印刷するステップと、を有することを特徴とする。
Further, the present invention that can solve the above-described problems is a printer control method for executing a printing process based on print data transmitted from a host computer,
When printing the print data, a step of determining whether or not the print data falls within a preset print range, and a predetermined font of the print data according to the data attribute of the print data when it is determined that the print data does not fit And reducing the size to generate actual print data; and printing the actual print data in the print range.

上記構成によれば、プリンタを小さな用紙幅の機種に変更した場合に、ホストコンピュータに搭載されるアプリケーションプログラムやプリンタドライバを変更せずとも、プリンタ側において、上記ステップを実行させるだけで、用紙幅が小さな用紙に印刷することが可能になる。したがって、プリンタの導入時に、ホストコンピュータ側のアプリケーションプログラムやプリンタドライバを変更しなければならないという不便を回避でき、プリンタの導入時における取り扱い性を向上させることができる。そして、プリンタの変更による小幅の用紙の採用によって、用紙の節約を実現することができる。   According to the above configuration, when the printer is changed to a model having a small paper width, the printer can execute the above steps on the printer side without changing the application program or printer driver installed in the host computer. Can be printed on small paper. Therefore, it is possible to avoid the inconvenience of having to change the application program and printer driver on the host computer side when installing the printer, and it is possible to improve handling at the time of installing the printer. Further, paper saving can be realized by adopting a narrow paper by changing the printer.

また、上記課題を解決することのできる本発明の動作制御プログラムは、送信された印刷データに基づき印刷するプリンタが接続されるコンピュータに、
前記印刷データを印刷する場合、予め設定されている印刷範囲に収まるか否かを判定するステップと、収まらないと判定した場合に、前記印刷データのデータ属性に応じて所定の前記印刷データのフォントサイズを縮小して、実印刷データを生成するステップと、前記実印刷データを前記印刷範囲に印刷するステップと、を実行させることを特徴とする。
In addition, an operation control program of the present invention that can solve the above-described problems is provided in a computer connected to a printer that performs printing based on transmitted print data.
When printing the print data, a step of determining whether or not the print data falls within a preset print range, and a predetermined font of the print data according to the data attribute of the print data when it is determined that the print data does not fit Reducing the size and generating actual print data; and printing the actual print data in the print range.

上記構成によれば、動作制御プログラムをファームウエアとしてプリンタに搭載することによって、ホストコンピュータに搭載されるアプリケーションプログラムやプリンタドライバを変更せずとも、プリンタ側において、上記ステップを実行させて、用紙幅が小さな用紙に印刷することが可能になる。
したがって、プリンタの導入時に、ホストコンピュータ側のアプリケーションプログラムやプリンタドライバを変更しなければならないという不便を回避でき、プリンタの導入時における取り扱い性を向上させることができる。そして、上記動作制御プログラムを搭載したプリンタを採用することによって、用紙の節約を実現することができる。
According to the above configuration, the operation control program is installed in the printer as firmware, so that the above steps are executed on the printer side without changing the application program or printer driver installed in the host computer, and the paper width Can be printed on small paper.
Therefore, it is possible to avoid the inconvenience of having to change the application program and printer driver on the host computer side when installing the printer, and it is possible to improve handling at the time of installing the printer. By employing a printer equipped with the operation control program, paper saving can be realized.

以下、本発明に係るプリンタ、およびそのプリンタの制御方法及び動作制御プログラムの実施形態について、図面を参照して詳細に説明する。
図1は本発明に係るプリンタの一実施の形態の構成を示すブロック図、図2(a)は図1に示したプリンタがホストコンピュータから送信されたレシート印刷データの構成図、図2(b)は図1に示したプリンタが生成したレシート印刷データの構成図、図2(c)は図1に示したプリンタが生成したレシート印刷データの他の構成図、図3は本実施形態のプリンタで実行する縮小行データの生成と印刷処理を説明するためのフローチャート、図4は図3の縮小処理の詳細を説明するためのフローチャートである。
Embodiments of a printer, a printer control method, and an operation control program according to the present invention will be described below in detail with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of an embodiment of a printer according to the present invention, FIG. 2A is a configuration diagram of receipt print data transmitted from the host computer by the printer shown in FIG. 1, and FIG. ) Is a configuration diagram of the receipt print data generated by the printer shown in FIG. 1, FIG. 2C is another configuration diagram of the receipt print data generated by the printer shown in FIG. 1, and FIG. 3 is the printer of this embodiment. FIG. 4 is a flowchart for explaining the details of the reduction processing of FIG. 3.

図1に示したプリンタ1は、POSシステムにおいてレシートの発行を行うプリンタで、ホストコンピュータ3から送信された印刷データ5(図2(a)参照)に基づき印刷処理を実行する。なお、本実施形態のホストコンピュータ3は、POSシステムにおけるPOS端末の機能を含めた構成となっている。   The printer 1 shown in FIG. 1 is a printer that issues a receipt in the POS system, and executes print processing based on print data 5 (see FIG. 2A) transmitted from the host computer 3. Note that the host computer 3 according to the present embodiment includes a POS terminal function in the POS system.

印刷データ5は、ホストコンピュータ3にインストールされているレシート印刷用のアプリケーションプログラム7が、POS端末から送信された販売商品情報に基づいて作成したレシート印刷データである。レシート印刷データは、ホストコンピュータ3にインストールされているプリンタドライバ9を介してプリンタ1に送信される。   The print data 5 is receipt print data created based on sales merchandise information transmitted from the POS terminal by the receipt print application program 7 installed in the host computer 3. The receipt print data is transmitted to the printer 1 via the printer driver 9 installed in the host computer 3.

レシート印刷データである印刷データ5には、図2(a)に示すように、販売店情報欄D1、商品情報欄D2、集計欄D3が上方から順に配列されている。
販売店情報欄D1には、販売店舗名p1が設定されている。本実施形態では示していないが、販売店舗名p1の他に販売店舗の連絡先(電話番号)、売り場責任者名、販売日時などの情報がそれぞれ行をずらして設定されてもよい。また、本実施形態では販売店情報欄D1は販売店舗名p1を含んだ1行分の行データq0によって構成されている。
In the print data 5 that is receipt print data, as shown in FIG. 2A, a store information column D1, a product information column D2, and a tabulation column D3 are arranged in order from the top.
In the store information column D1, the store name p1 is set. Although not shown in the present embodiment, in addition to the sales store name p1, information such as the contact information (telephone number) of the sales store, the name of the person in charge of the sales floor, and the sales date / time may be set by shifting lines. In the present embodiment, the store information column D1 is composed of one line of row data q0 including the store name p1.

商品情報欄D2には、販売した各商品に設定される行データq1,q2,q3……が配置されている。各行データを構成するデータ種(データ属性)は、商品名sa(所定の印刷データ)、販売金額scなどであり、用紙幅方向に位置をずらして設定されている。また、集計欄D3との境界を示す特定の文字列(図2(a)の例では、‘−’(ハイフン)が連続した文字列Wが設定されている。   In the product information column D2, row data q1, q2, q3... Set for each sold product is arranged. Data types (data attributes) constituting each line data are a product name sa (predetermined print data), a sales amount sc, and the like, and are set by shifting the position in the paper width direction. In addition, a specific character string indicating a boundary with the totalization column D3 (in the example of FIG. 2A, a character string W in which “−” (hyphen) is continuous is set.

商品情報欄D2の各行データに記載される商品情報の内、商品名saは各行データ間で先頭文字が揃うように該当するデータ領域内での配置が指定される。販売金額scは、末尾桁が揃うようにそれぞれのデータ領域内での配置が指定される。   Among the product information described in each line data of the product information column D2, the product name sa is designated in the corresponding data area so that the first characters are aligned between the line data. The sales amount sc is designated in each data area so that the end digits are aligned.

また、集計欄D3には、販売合計金額r1が設定されている。本実施形態では示していないが、販売合計金額r1の他に税額、税別の販売合計金額、販売商品総数や、店舗の広告用の文章などのその他のデータが行をずらして設定されてもよい。また、本実施形態では集計欄D3は販売合計金額r1を含んだ1行分の行データq4によって構成されている。
なお、印刷データ5は、80mm幅の印刷用紙用に各行データのデータ領域を配置したものである。
Further, the total sales amount r1 is set in the aggregation column D3. Although not shown in the present embodiment, in addition to the total sales amount r1, other data such as a tax amount, a total sales amount by tax, a total number of sales products, and a sentence for a store advertisement may be set by shifting lines. . Further, in the present embodiment, the aggregation column D3 is configured by one line of row data q4 including the total sales amount r1.
Note that the print data 5 is a data area in which each line data is arranged for an 80 mm wide print sheet.

本実施形態のプリンタ1は、ホストコンピュータ3からプリンタドライバ9を介して送信された印刷データ5を、通信インタフェース11を介して受信して、受信バッファ13に格納する。
このプリンタ1には、受信バッファ13に格納された印刷データ5を予め設定した縮小幅に縮小した縮小印刷データ51(図2(b)(c)参照)に変換してプリントバッファ14に出力する主制御部15と、プリントバッファ14に出力された縮小印刷データ51(実印刷データ)に基づいて印字ヘッド17を作動させて印刷処理を実行する印刷実行部19とが備えられている。印刷実行部19は、プリンタ1による一連の処理の中で、後述するデータ展開部15aが生成する縮小行データqs0〜qs4を含む縮小印刷データ51に基づいて印刷処理を実行する。
The printer 1 of this embodiment receives print data 5 transmitted from the host computer 3 via the printer driver 9 via the communication interface 11 and stores it in the reception buffer 13.
The printer 1 converts the print data 5 stored in the reception buffer 13 into reduced print data 51 (see FIGS. 2B and 2C) reduced to a preset reduction width and outputs the reduced print data 51 to the print buffer 14. A main control unit 15 and a print execution unit 19 that operates the print head 17 based on the reduced print data 51 (actual print data) output to the print buffer 14 to execute print processing are provided. The print execution unit 19 executes print processing based on reduced print data 51 including reduced row data qs0 to qs4 generated by a data expansion unit 15a described later in a series of processes by the printer 1.

また、プリンタ1はフォント情報を保持するフォント情報保持部23を備えている。フォント情報保持部23には、予め複数サイズのフォントを保持しており、各構成データのフォントサイズを縮小する場合に読み出される。本実施形態では、フォント情報としてフォントA(1文字分のサイズが縦24dot×横12dot)、フォントB(1文字分のサイズが縦17dot×横9dot)、フォントC(1文字分のサイズが縦17dot×横7dot)を保持している。   The printer 1 also includes a font information holding unit 23 that holds font information. The font information holding unit 23 holds fonts of a plurality of sizes in advance, and is read when the font size of each component data is reduced. In this embodiment, the font information includes font A (size of one character is 24 dots long × 12 dots wide), font B (size of one character is vertical 17 dots × width 9 dots), and font C (size of one character is vertical). 17 dots x 7 dots wide).

本実施形態のプリンタ1は、80mm幅に設定された各行データq0〜q4が、予め設定されている縮小幅(58mm)に収まるか否かを判定する。縮小幅(印刷範囲)に収まらない行データq1,q2,q3は、各行データを構成する商品名sa、販売金額sc、文字列W等のデータ属性に応じて縮小できる構成データのフォントサイズを縮小する。ここでは、縮小できる構成データは、商品名sa、文字列Wである。そして、縮小後の縮小構成データsa1,sa2と、他の構成データ(販売金額sc1,sc2)と、によって58mmの縮小幅に収まるよう短縮された縮小行データqs1,qs2を生成する。また、縮小後の縮小構成データWsによって58mmの縮小幅に収まるよう短縮された縮小行データqs3を生成する。
一方、印字桁が縮小幅に収まる行データq0,q4は、構成データ(販売店舗名p1、販売合計金額r1)の縮小処理を行わず、58mmの縮小幅に収まるよう短縮された縮小行データqs0,qs4が生成される。
The printer 1 of the present embodiment determines whether or not each row data q0 to q4 set to 80 mm width fits in a preset reduction width (58 mm). The line data q1, q2, and q3 that do not fit in the reduction width (printing range) reduce the font size of the configuration data that can be reduced according to the data attributes such as the product name sa, the sales amount sc, and the character string W that constitute each line data. To do. Here, the configuration data that can be reduced is the product name sa and the character string W. Then, reduced row data qs1, qs2 shortened to be within a reduction width of 58 mm is generated by the reduced configuration data sa1, sa2 after reduction and the other configuration data (sales amount sc1, sc2). Further, the reduced row data qs3 shortened to fall within the reduction width of 58 mm is generated by the reduced configuration data Ws after reduction.
On the other hand, the line data q0, q4 in which the print digits fall within the reduced width is not subjected to reduction processing of the configuration data (sales store name p1, sales total amount r1), and the reduced line data qs0 shortened to fall within the reduced width of 58 mm. , qs4 is generated.

印刷データ5から縮小行データqs0,qs1,qs2,qs3,qs4を含む縮小印刷データ51を生成する処理は、主制御部15のデータ展開部15aが行う。
このデータ展開部15aは、プリンタ内のプログラム格納部21に格納されている動作制御プログラム22に基づいて、印刷データ5を処理する。具体的には、図3及び図4に示す手順で、プリンタ1の印刷動作を制御するものである。以下では、プリンタ1が実行する縮小印刷データの生成方法について詳細に説明する。
A process of generating reduced print data 51 including reduced line data qs0, qs1, qs2, qs3, and qs4 from the print data 5 is performed by the data expansion unit 15a of the main control unit 15.
The data expansion unit 15a processes the print data 5 based on the operation control program 22 stored in the program storage unit 21 in the printer. Specifically, the printing operation of the printer 1 is controlled according to the procedure shown in FIGS. Hereinafter, a method for generating reduced print data executed by the printer 1 will be described in detail.

ホストコンピュータ3から送信された印刷データ5が受信バッファ13に一時的に記憶されると、主制御部15は受信バッファ13から印刷データ5を構成しているデータを取り出し、改行契機の有無を判定することで1行分ずつのデータ配列を取得する。
まず、行データq0を取得すると、設定されている縮小幅58mmにおいて、行データq0の印字桁が1行に収まるか否かを判定する(ステップS101)。ここでは、行データq0の構成データである販売店舗名p1の印字桁は、縮小幅58mmにおいて1行に収まるため(ステップS101:Yes)、データ展開部15aは、58mmの縮小幅に収まるよう短縮された縮小行データqs0を生成し、プリントバッファ14に送る。プリントバッファ14に送られた縮小行データqs0は、印字契機に応じて印刷ヘッドに送られて印刷実行部19の制御のもと印刷処理が実行される(ステップS102)。
When the print data 5 transmitted from the host computer 3 is temporarily stored in the reception buffer 13, the main control unit 15 retrieves the data constituting the print data 5 from the reception buffer 13 and determines whether there is a line feed trigger. As a result, a data array for each row is obtained.
First, when the line data q0 is acquired, it is determined whether or not the print digit of the line data q0 fits in one line in the set reduction width of 58 mm (step S101). Here, since the print digits of the store name p1, which is the configuration data of the line data q0, fits in one line in the reduced width of 58 mm (step S101: Yes), the data development unit 15a is shortened to fit in the reduced width of 58 mm. The reduced reduced line data qs0 is generated and sent to the print buffer 14. The reduced row data qs0 sent to the print buffer 14 is sent to the print head according to the printing trigger, and printing processing is executed under the control of the printing execution unit 19 (step S102).

データ展開部15aは、次の行データq1を取得すると、設定されている縮小幅58mmにおいて、行データq1の印字桁が1行に収まるか否かを判定する(ステップS101)。ここでは、行データq1の印字桁は、縮小幅58mmにおいて1行に収まらないため(ステップS101:No)、構成データである商品名sa、販売金額scのフォントサイズを縮小できるか判定する(ステップS103)。例えば、商品名sa、販売金額scのフォントとしてフォントAが指示された場合は、他に縮小フォントとしてフォントBあるいはフォントCを保持しているため、フォントサイズの縮小が可能である(ステップS103:Yes)。ステップS104において、文字サイズの縮小処理を実行する。   When acquiring the next line data q1, the data expansion unit 15a determines whether or not the print digits of the line data q1 fit in one line in the set reduction width of 58 mm (step S101). Here, since the print digits of the line data q1 do not fit on one line in the reduction width of 58 mm (step S101: No), it is determined whether the font size of the product name sa and the sales amount sc that are the configuration data can be reduced (step S101). S103). For example, when the font A is designated as the font of the product name sa and the sales amount sc, the font size can be reduced because the font B or the font C is held as the reduced font (step S103: Yes). In step S104, a character size reduction process is executed.

文字サイズの縮小処理については、図4を参照して説明する。
データ展開部15aは、行データq1を探索し(ステップS201)、構成データが金額データであるか否かを判定する(ステップS202)。構成データのうち商品名saは、金額データではないため(ステップS202:No)、商品名saの文字サイズを縮小する(ステップS203)。すなわち、指示されたフォントAをフォントBに切り替えてフォントサイズを縮小する。
The character size reduction process will be described with reference to FIG.
The data expansion unit 15a searches the line data q1 (step S201) and determines whether the configuration data is money amount data (step S202). Since the product name sa in the configuration data is not money amount data (step S202: No), the character size of the product name sa is reduced (step S203). That is, the designated font A is switched to the font B to reduce the font size.

行データq1の探索が終了していない場合は(ステップS204:No)、ステップS201に戻り、行データの探索を続ける。次の構成データ販売金額scは、金額データであるため(ステップS202:Yes)、文字サイズの縮小を行わず行データの探索を終了して(ステップS204:Yes)、文字サイズの縮小処理を終了する。   If the search for the line data q1 has not been completed (step S204: No), the process returns to step S201, and the search for the line data is continued. Since the next component data sales amount sc is amount data (step S202: Yes), the search for row data is terminated without reducing the character size (step S204: Yes), and the character size reduction process is terminated. To do.

なお、ステップS202において、構成データが金額データであるか否かを判定する方法としては、例えば次の(A)〜(C)の方法を採用することができる。
(A)行データの終端を金額データの終端と見なす方法。
(B)ASCIIコードの数字0x31〜0x39(数字の0〜9)で構成されている文字列を、数量や金額の文字列と見なす方法。
(C)ASCIIコードの数字0x31〜0x39(数字の0〜9)と、金額記号の0x24($)又は0x2F(¥)との組み合わせ、小数点記号の0x2E(.)との組み合わせで、金額データと見なす方法。
In step S202, the following methods (A) to (C) can be adopted as a method for determining whether or not the configuration data is money amount data, for example.
(A) A method in which the end of line data is regarded as the end of monetary data.
(B) A method in which a character string composed of ASCII code numbers 0x31 to 0x39 (numbers 0 to 9) is regarded as a character string of quantity or amount.
(C) A combination of the ASCII code numbers 0x31 to 0x39 (numbers 0 to 9) with the amount symbol 0x24 ($) or 0x2F (¥), and the decimal point symbol 0x2E (.) How to consider.

図3に戻り、商品名saの文字サイズをフォントAからフォントBに切り替えた後の行データqs1の印字桁が、1行に収まるかを判定する(ステップS101)。つまり、フォントBに切り替えた商品名sa1に続いてフォントAの販売金額sc1からなる縮小行データqs1の印字桁が、縮小幅58mmにおいて1行に収まると判定した場合は(ステップS101:Yes)、縮小行データqs1をプリントバッファ14に送る。プリントバッファ14に送られた縮小行データqs1は、印字契機に応じて印刷ヘッドに送られて印刷実行部19の制御のもと印刷処理が実行される(ステップS102:図2(b)参照)。   Returning to FIG. 3, it is determined whether the print digits of the line data qs1 after the character size of the product name sa is switched from the font A to the font B can fit on one line (step S101). That is, when it is determined that the print digits of the reduced line data qs1 including the sales amount sc1 of the font A following the product name sa1 switched to the font B fits in one line with the reduced width of 58 mm (step S101: Yes), The reduced row data qs1 is sent to the print buffer 14. The reduced row data qs1 sent to the print buffer 14 is sent to the print head in response to a printing trigger, and printing processing is executed under the control of the printing execution unit 19 (step S102: see FIG. 2B). .

一方、フォントBに切り替えた商品名sa1に続いてフォントAの販売金額sc1からなる縮小行データqs1の印字桁が、縮小幅58mmにおいて1行に収まらない場合は(ステップS101:No)、さらにフォントサイズの縮小が可能か否かを判定する(ステップS103)。具体的には、商品名sa1のフォントがフォントBに切り替えられても、他に縮小フォントとしてフォントCを保持しているため、フォントサイズの更なる縮小が可能である(ステップS103:Yes)。したがって、ステップS104において、再び文字サイズの縮小処理を実行することができる。文字サイズの縮小処理については上記説明と重複するため省略する。   On the other hand, if the print digit of the reduced line data qs1 consisting of the sales amount sc1 of the font A following the product name sa1 switched to the font B does not fit on one line with the reduced width of 58 mm (step S101: No), the font is further reduced. It is determined whether or not the size can be reduced (step S103). Specifically, even if the font of the product name sa1 is switched to the font B, since the font C is held as another reduced font, the font size can be further reduced (step S103: Yes). Therefore, the character size reduction process can be executed again in step S104. The character size reduction processing is omitted because it overlaps with the above description.

商品名sa1の文字サイズをフォントBからフォントCに切り替えた場合も行データqs1の印字桁が、1行に収まるかを判定する(ステップS101)。つまり、フォントCに切り替えた商品名sa1に続いてフォントAの販売金額sc1からなる縮小行データqs1の印字桁が、縮小幅58mmにおいて1行に収まると判定した場合は(ステップS101:Yes)、縮小行データqs1をプリントバッファ14に送り印字契機に応じて印刷ヘッドに送られて印刷実行部19の制御のもと印刷処理が実行される(ステップS102)。一方、フォントCに切り替えた商品名sa1に続いてフォントAの販売金額sc1からなる縮小行データqs1の印字桁が、縮小幅58mmにおいて1行に収まらない場合は(ステップS101:No)さらにフォントサイズを縮小できるか判定する(ステップS103)。   Even when the character size of the product name sa1 is switched from the font B to the font C, it is determined whether the print digits of the line data qs1 can be fit on one line (step S101). That is, when it is determined that the print digits of the reduced line data qs1 including the sales amount sc1 of the font A following the product name sa1 switched to the font C fits in one line with the reduced width of 58 mm (step S101: Yes), The reduced row data qs1 is sent to the print buffer 14 and sent to the print head in response to the printing trigger, and printing processing is executed under the control of the printing execution unit 19 (step S102). On the other hand, if the print digit of the reduced line data qs1 composed of the sales amount sc1 of the font A following the product name sa1 switched to the font C does not fit on one line with the reduced width of 58 mm (step S101: No), the font size is further increased. It is determined whether or not can be reduced (step S103).

ところが、プリンタ1はフォントCより縮小可能なフォントを備えていないため、フォントサイズの更なる縮小は不可能であると判定し(ステップS103:No)、フォントCに切り替えた商品名sa1の一部を省略する(ステップS105、図2(3)参照)。つまり、フォントCに切り替えた商品名sa1の最後を表略表示「・・・」によって置き換え、続いてフォントAの販売金額sc1からなる縮小行データqs1をプリントバッファ14に送る。印字契機に応じて印刷ヘッドに送られて印刷実行部19の制御のもと印刷処理が実行される(ステップS102:図2(c)参照)。   However, since the printer 1 does not include a font that can be reduced from the font C, it is determined that the font size cannot be further reduced (step S103: No), and a part of the product name sa1 switched to the font C. Is omitted (see step S105, FIG. 2 (3)). In other words, the end of the product name sa1 switched to the font C is replaced by the abbreviation display “...”, And then the reduced line data qs1 including the sales amount sc1 of the font A is sent to the print buffer 14. In response to a print trigger, the print head is sent to the print head, and print processing is executed under the control of the print execution unit 19 (step S102: see FIG. 2C).

データ展開部15aは、上記処理を行データq2についても同様に行う。
次に、データ展開部15aは行データq3を取得すると、設定されている縮小幅58mmにおいて、行データq3の印字桁が1行に収まるか否かを判定する(ステップS101)。ここでは、行データq3の構成データである文字列W(ハイフン「−」)の印字桁は、縮小幅58mmにおいて1行に収まらないため(ステップS101:No)、文字列Wのフォントサイズを縮小できるか判定する(ステップS103)。文字列Wの縮小フォントがある場合は、ステップS104で縮小処理を実行する。縮小した文字列Wsから構成される縮小行データqs3の印字桁が1行に収まるまで縮小し、縮小行データqs3をプリントバッファ14に送り、印字契機に応じて印刷ヘッドに送られて印刷実行部19の制御のもと印刷処理が実行される(ステップS102:図2(b),(c)参照)。
The data expansion unit 15a performs the above process on the row data q2 in the same manner.
Next, when acquiring the line data q3, the data expansion unit 15a determines whether or not the print digits of the line data q3 can be contained in one line in the set reduction width of 58 mm (step S101). Here, the print digit of the character string W (hyphen “−”), which is the configuration data of the line data q3, does not fit on one line with a reduction width of 58 mm (step S101: No), so the font size of the character string W is reduced. It is determined whether it can be performed (step S103). If there is a reduced font of the character string W, the reduction process is executed in step S104. The reduced line data qs3 composed of the reduced character string Ws is reduced until the print digits fit in one line, and the reduced line data qs3 is sent to the print buffer 14 and sent to the print head according to the printing trigger to be sent to the print execution unit. The printing process is executed under the control of 19 (step S102: see FIGS. 2B and 2C).

次に、データ展開部15aは行データq4を取得すると、設定されている縮小幅58mmにおいて、行データq4の印字桁が1行に収まるか否かを判定する(ステップS101)。ここでは、行データq4の構成データである販売合計金額r1の印字桁は、縮小幅58mmにおいて1行に収まるため(ステップS101:Yes)、データ展開部15aは、58mmの縮小幅に収まるよう短縮された縮小行データqs4を生成し、プリントバッファ14に送る。プリントバッファ14に送られた縮小行データqs4は、印字契機に応じて印刷ヘッドに送られて印刷実行部19の制御のもと印刷処理が実行される(ステップS102)。   Next, when acquiring the line data q4, the data expansion unit 15a determines whether or not the print digits of the line data q4 can be contained in one line in the set reduction width of 58 mm (step S101). Here, since the print digits of the sales total amount r1, which is the configuration data of the line data q4, can be accommodated in one line in the reduced width of 58 mm (step S101: Yes), the data developing unit 15a is shortened to be within the reduced width of 58 mm. The reduced reduced line data qs4 is generated and sent to the print buffer 14. The reduced row data qs4 sent to the print buffer 14 is sent to the print head according to the printing trigger, and printing processing is executed under the control of the print execution unit 19 (step S102).

以上に説明した処理により、図2(b)あるいは図2(c)に示した縮小印刷データ51の各行データが作成され印刷される。   Through the processing described above, each line data of the reduced print data 51 shown in FIG. 2B or 2C is created and printed.

このように、本実施形態のプリンタ1及びその制御方法によれば、ホストコンピュータ3から送信された印刷データ5に含まれる各行データq0〜q4は、印刷データ5を受け取るプリンタ1側のデータ展開部15aによって、予め設定されている縮小幅に短縮され縮小行データqs0〜qs4が生成される。したがって、POSシステムにおいて、プリンタ1を小さな用紙幅の機種に変更した場合に、ホストコンピュータ3に搭載されるアプリケーションプログラムやプリンタドライバを変更せずとも、プリンタ1側だけで、用紙幅が小さな用紙に印刷することができる。
また、フォントサイズの縮小は、各構成データのデータ属性に応じて、縮小できる構成データ(商品名sa)だけを縮小するので、少なくとも数字を示すデータ属性を有する販売金額sc等のように顧客にとって重要な情報や、販売店舗名p1等のように縮小する必要のない情報は縮小せずに印刷することができる。このため、小幅の用紙に印字体裁を保った視認性の良い印刷を実施でき、視認性の低下を招くことがない良好な印字体裁の出力結果を提供することができる。
As described above, according to the printer 1 and the control method thereof according to the present embodiment, the line data q0 to q4 included in the print data 5 transmitted from the host computer 3 is the data expansion unit on the printer 1 side that receives the print data 5. By 15a, the reduced row data qs0 to qs4 is generated by being shortened to a preset reduction width. Therefore, in the POS system, when the printer 1 is changed to a model having a small paper width, the paper width can be reduced only on the printer 1 side without changing the application program or printer driver installed in the host computer 3. Can be printed.
In addition, since the font size is reduced according to the data attribute of each configuration data, only the configuration data (product name sa) that can be reduced is reduced. Important information and information that does not need to be reduced such as the store name p1 can be printed without being reduced. For this reason, it is possible to perform printing with good visibility while maintaining the print appearance on a narrow paper, and it is possible to provide an output result of good print appearance that does not cause a decrease in visibility.

また、本実施の形態のプリンタ1及びその制御方法によれば、縮小行データqs0〜qs4が縮小幅に収まるまで、フォントサイズをさらに縮小していくことができる。すなわち、プリンタ1が保持しているフォントサイズ(フォントA,フォントB,フォントC)の範囲で構成データを徐々に縮小していき、縮小行データqs0〜qs4が縮小幅に収まるときのフォントサイズが自動的に指定される。したがって、縮小幅に収まる範囲内で最大のフォントサイズを指定することができるので、文字サイズが小さくなり過ぎて、内容を確認し難いという不都合が発生しづらい。また、文字サイズが小さくなり過ぎて、行間等の印字体裁が崩れることも防止できる。   Further, according to the printer 1 and the control method thereof according to the present embodiment, the font size can be further reduced until the reduced line data qs0 to qs4 are within the reduction width. That is, the configuration data is gradually reduced within the range of the font size (font A, font B, font C) held by the printer 1, and the font size when the reduced line data qs0 to qs4 fit within the reduced width is the same. Automatically specified. Therefore, since the maximum font size can be specified within a range that can be accommodated in the reduced width, the character size becomes too small and it is difficult to check the contents. Further, it is possible to prevent the printing style such as line spacing from being lost due to the character size becoming too small.

また、本実施の形態のプリンタ1及びその制御方法によれば、商品名saをプリンタ1に保持している最小のフォントサイズであるフォントCに縮小しても、縮小行データqs1,qs2が縮小幅に収まらない場合は、商品名sa1,商品名sa2の一部を省略する。一方、商品名sa1,商品名sa2以外の他の構成データである販売金額sc1,sc2は省略することがないため、顧客にとって重要な情報や縮小する必要のない情報からなる構成データは省略せずに印刷することができるので、視認性の低下を招くことがない良好な印字体裁の出力結果を提供することができる。   Further, according to the printer 1 and the control method thereof according to the present embodiment, even if the product name sa is reduced to the font C which is the minimum font size held in the printer 1, the reduced line data qs1 and qs2 are reduced. If it does not fit within the width, part of the product name sa1 and product name sa2 is omitted. On the other hand, since the sales amounts sc1 and sc2 which are other configuration data other than the product name sa1 and the product name sa2 are not omitted, the configuration data including information important to the customer and information that does not need to be reduced is not omitted. Therefore, it is possible to provide an output result of a good print appearance that does not cause a decrease in visibility.

なお、上記実施形態では、行データq1及び行データq2を構成する構成データは、商品名saと商品金額scとによって構成されたが、これに限定するものではない。例えば、商品名saと商品金額scのほかに商品数量を含めた行データに基づき縮小処理を行うこともできる。この場合は、商品名saだけを縮小あるいは省略表示してもよいし、商品名sa及び商品数量を縮小あるいは省略するよう構成してもよい。   In the above embodiment, the configuration data constituting the row data q1 and the row data q2 is configured by the product name sa and the product price sc, but is not limited thereto. For example, the reduction process can be performed based on the row data including the product quantity in addition to the product name sa and the product price sc. In this case, only the product name sa may be reduced or omitted, or the product name sa and the product quantity may be reduced or omitted.

なお、上記実施形態では、一例として、80mmの印刷用紙を想定した印刷データ5を、58mmの印刷用紙に縮小印刷する場合を示した。しかし、本発明に係るプリンタ及びその制御方法において、縮小幅は上記実施の形態の例に限定しない。本発明に係るプリンタ及びその制御方法は、更に小幅な用紙に印刷する場合にも応用可能である。   In the above embodiment, as an example, the case where the print data 5 assuming 80 mm printing paper is reduced-printed on 58 mm printing paper is shown. However, in the printer and the control method thereof according to the present invention, the reduction width is not limited to the example of the above embodiment. The printer and its control method according to the present invention can also be applied to printing on a narrower sheet.

また、本発明に係るプリンタの用途は、POSシステム用に限定するものではない。使用する印刷用紙幅が制限されている各種のプリンタに応用可能である。   The application of the printer according to the present invention is not limited to the POS system. The present invention can be applied to various printers in which the width of printing paper to be used is limited.

本発明に係るプリンタの一実施の形態の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an embodiment of a printer according to the present invention. (a)は図1に示したプリンタがホストコンピュータから送信されたレシート印刷データの構成図、(b)は図1に示したプリンタが生成したレシート印刷データの構成図、(c)は図1に示したプリンタが生成したレシート印刷データの他の構成図である。1A is a configuration diagram of receipt print data transmitted from the host computer to the printer shown in FIG. 1, FIG. 1B is a configuration diagram of receipt print data generated by the printer shown in FIG. 1, and FIG. FIG. 10 is another configuration diagram of receipt print data generated by the printer shown in FIG. 本実施形態のプリンタで実行する縮小行データの生成と印刷処理を説明するためのフローチャートである。6 is a flowchart for explaining generation of reduced row data and print processing executed by the printer of the embodiment. 図3の縮小処理の詳細を説明するためのフローチャートである。FIG. 4 is a flowchart for explaining details of a reduction process of FIG. 3. FIG. (a)は従来の縮小処理前の印刷データの構成図、(b)は従来の縮小処理によって縮小された縮小印刷データの構成図である。(A) is a block diagram of the print data before the conventional reduction process, and (b) is a block diagram of the reduced print data reduced by the conventional reduction process.

符号の説明Explanation of symbols

1:プリンタ、3:ホストコンピュータ、5:印刷データ、7:アプリケーションプログラム、9:プリンタドライバ、13:受信バッファ、14:プリントバッファ、15:主制御部、15a:データ展開部、17:印字ヘッド、19:印刷実行部、21:プログラム格納部、22:動作制御プログラム、23:フォント情報保持部、51:縮小印刷データ、D1:販売店情報欄、D2:商品情報欄、D3:集計欄、q0〜q4:行データ、qs0〜qs4:縮小行データ、sa:商品名、sc:販売金額 1: Printer, 3: Host computer, 5: Print data, 7: Application program, 9: Printer driver, 13: Receive buffer, 14: Print buffer, 15: Main control unit, 15a: Data development unit, 17: Print head 19: Print execution unit, 21: Program storage unit, 22: Operation control program, 23: Font information holding unit, 51: Reduced print data, D1: Dealer information column, D2: Product information column, D3: Total column, q0 to q4: Row data, qs0 to qs4: Reduced row data, sa: Product name, sc: Sales amount

Claims (7)

ホストコンピュータから送信された印刷データに基づき印刷するプリンタであって、
前記印刷データを印刷する場合、予め設定されている印刷範囲に収まるか否かを判定し、収まらない場合は、前記印刷データのデータ属性に応じて所定の前記印刷データのフォントサイズを縮小して、実印刷データを生成するデータ展開部と、
前記実印刷データを前記印刷範囲に印刷する印刷実行部と、を有することを特徴とするプリンタ。
A printer that prints based on print data sent from a host computer,
When printing the print data, it is determined whether or not it falls within a preset print range. If not, the predetermined font size of the print data is reduced according to the data attribute of the print data. A data expansion unit for generating actual print data;
And a print execution unit that prints the actual print data in the print range.
前記データ展開部は、縮小する前記フォントサイズを、前記印刷範囲に収まる範囲で最大のものとすることを特徴とする請求項1に記載のプリンタ。   The printer according to claim 1, wherein the data expansion unit sets the font size to be reduced to a maximum within a range that fits in the print range. 前記データ展開部は、所定の前記印刷データのフォントサイズを縮小しても前記印刷範囲に収まらない場合は、前記印刷データの属性に応じて前記印刷データの一部を省略することを特徴とする請求項1に記載のプリンタ。   The data expansion unit omits a part of the print data according to the attribute of the print data when the font size of the predetermined print data is not within the print range even if the font size of the print data is reduced. The printer according to claim 1. 前記データ展開部は、前記印刷範囲を印刷幅とすることを特徴とする請求項1から3の何れかに記載のプリンタ。   The printer according to claim 1, wherein the data expansion unit sets the print range as a print width. 前記フォントサイズを縮小する所定の前記印刷データは、少なくとも数字を示すデータ属性を有するものを除く印刷データであることを特徴とする請求項1から4の何れかに記載のプリンタ。   5. The printer according to claim 1, wherein the predetermined print data for reducing the font size is print data excluding data having a data attribute indicating at least a number. ホストコンピュータから送信された印刷データに基づき印刷処理を実行するプリンタの制御方法であって、
前記印刷データを印刷する場合、予め設定されている印刷範囲に収まるか否かを判定するステップと、
収まらないと判定した場合に、前記印刷データのデータ属性に応じて所定の前記印刷データのフォントサイズを縮小して、実印刷データを生成するステップと、
前記実印刷データを前記印刷範囲に印刷するステップと、を有することを特徴とするプリンタの制御方法。
A printer control method for executing print processing based on print data transmitted from a host computer,
When printing the print data, determining whether or not the print data is within a preset print range; and
A step of reducing the font size of the predetermined print data according to the data attribute of the print data and generating actual print data when it is determined that the print data does not fit;
And a step of printing the actual print data in the print range.
送信された印刷データに基づき印刷するプリンタが接続されるコンピュータに、
前記印刷データを印刷する場合、予め設定されている印刷範囲に収まるか否かを判定するステップと、
収まらないと判定した場合に、前記印刷データのデータ属性に応じて所定の前記印刷データのフォントサイズを縮小して、実印刷データを生成するステップと、
前記実印刷データを前記印刷範囲に印刷するステップと、を実行させることを特徴とするプリンタの動作制御プログラム。
To a computer connected to a printer that prints based on the sent print data,
When printing the print data, determining whether or not the print data is within a preset print range; and
A step of reducing the font size of the predetermined print data according to the data attribute of the print data and generating actual print data when it is determined that the print data does not fit;
And a step of printing the actual print data in the print range.
JP2008171425A 2008-06-30 2008-06-30 Printer, printer control method, and operation control program Pending JP2010006022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008171425A JP2010006022A (en) 2008-06-30 2008-06-30 Printer, printer control method, and operation control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008171425A JP2010006022A (en) 2008-06-30 2008-06-30 Printer, printer control method, and operation control program

Publications (1)

Publication Number Publication Date
JP2010006022A true JP2010006022A (en) 2010-01-14

Family

ID=41587040

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008171425A Pending JP2010006022A (en) 2008-06-30 2008-06-30 Printer, printer control method, and operation control program

Country Status (1)

Country Link
JP (1) JP2010006022A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012086485A (en) * 2010-10-21 2012-05-10 Seiko Epson Corp Recorder, control method of recorder, and program
US10046577B2 (en) 2016-06-01 2018-08-14 Seiko Epson Corporation Printing device, printing system, and control method of a printing device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012086485A (en) * 2010-10-21 2012-05-10 Seiko Epson Corp Recorder, control method of recorder, and program
US10046577B2 (en) 2016-06-01 2018-08-14 Seiko Epson Corporation Printing device, printing system, and control method of a printing device

Similar Documents

Publication Publication Date Title
JP5195099B2 (en) Printer, printer control method and driver
JP5374932B2 (en) Printer, printer control method and operation control program
US8861016B2 (en) Method of adding value to print data, a value-adding device, and a recording medium
EP2677418B1 (en) Image processing device, image processing system, and printing method
JP2009226690A (en) Printer and information management system
JP2009226689A (en) Printer
US9898691B2 (en) Control device, control system, and control method of a control device
JP6155808B2 (en) CONTROL DEVICE, CONTROL SYSTEM, AND CONTROL DEVICE CONTROL METHOD
JP2010006022A (en) Printer, printer control method, and operation control program
JP5842335B2 (en) Image recording apparatus, image recording apparatus control method, and program
US10664210B2 (en) Receipt printer and information processing method
US10762488B2 (en) Transaction data processing apparatus
CN102722940A (en) Printer, printing method, and program for superposing received print data and stored print data
JP5708012B2 (en) Printer changing program, printer changing method, and host device
WO2013146845A1 (en) Image data generation method, image data generation device, and image data generation program
JP5471657B2 (en) Image processing method, image processing apparatus, image processing program, and program storage medium
JP2008293452A (en) Bin tag management system
JP2013061835A (en) Recording control device, control method for recording device, and program
JP2012111216A (en) Printer and graphics data registration method
CN104924793A (en) Information printing method for all kinds of cash collecting equipment receipts compatible with POS terminal
JP2010067121A (en) Printing information generating device, printing device, printing system, and method for controlling the printing information generating device
EP3667657B1 (en) Display control device and display control method
JP6186846B2 (en) CONTROL DEVICE, CONTROL SYSTEM, AND CONTROL DEVICE CONTROL METHOD
JP6984703B2 (en) Document manipulation mechanism
JP2017204806A (en) Information processing apparatus, information processing method, and program