JP2010198167A - Method for generating bar code print data, printer and program - Google Patents

Method for generating bar code print data, printer and program Download PDF

Info

Publication number
JP2010198167A
JP2010198167A JP2009040526A JP2009040526A JP2010198167A JP 2010198167 A JP2010198167 A JP 2010198167A JP 2009040526 A JP2009040526 A JP 2009040526A JP 2009040526 A JP2009040526 A JP 2009040526A JP 2010198167 A JP2010198167 A JP 2010198167A
Authority
JP
Japan
Prior art keywords
barcode
print data
aspect ratio
calculating
digits
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.)
Withdrawn
Application number
JP2009040526A
Other languages
Japanese (ja)
Other versions
JP2010198167A5 (en
Inventor
Seiichi Honma
誠一 本間
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 JP2009040526A priority Critical patent/JP2010198167A/en
Publication of JP2010198167A publication Critical patent/JP2010198167A/en
Publication of JP2010198167A5 publication Critical patent/JP2010198167A5/ja
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Record Information Processing For Printing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To generate PDF 417 print data of the maximum size matched with the aspect ratio of an item region by making it necessary for a user only to designate a bar code character string as information included in a PDF 417 and layout information including an item frame where the PDF 417 is arranged without making it necessary for the user to explicitly designate the number of digits or the number of stages. <P>SOLUTION: A method for generating the print data of a two-dimensional bar code in a printer which includes a layout information storage part, a bar code information storage part, and a control part for generating print data includes: a step S101 for obtaining a bar code character string as information included in the two-dimensional bar code; a step S102 for calculating the number of necessary code wards based on the obtained character string; a step S103 for obtaining the layout information including an item frame where the bar codes are arranged, and for obtaining the aspect ratio of the item frame; and a step S104 for calculating the number of digits and the number of stages of the two-dimensional bar code approximating to the aspect ratio. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、2次元バーコードであるPDF417を任意のスペース領域に最も近い大きさに印刷できるように、桁数及び段数に算出する算出方法、算出した桁数及び段数で印刷する印刷データの生成方法、印刷装置及びプログラムに関する。   The present invention provides a calculation method for calculating the number of digits and the number of columns and generation of print data to be printed with the calculated number of columns and the number of columns so that the PDF 417 which is a two-dimensional barcode can be printed in a size closest to an arbitrary space area. The present invention relates to a method, a printing apparatus, and a program.

従来のラベルプリンタでは、縦書き横書きの指定は行えるものの、キャラクタの印刷位置を自由に設定できない不具合があった。また、従来のワードプロセッサでは、キャラクタの配置をあらかじめ想定して、相当する画面上の箇所にカーソルを位置させてキャラクタの入力操作を行わなければならず、さらに、キャラクタの向きや、キャラクタが複数ある場合のそれらの配列方向(例えばラベルの左から右に向けてとか、上から下に向けてといった方向)を設定するには、複雑な入力操作が必要となり、しかも、その複雑な操作を1つのキャラクタ毎に行わなければならない。このため、入力操作が煩雑になり、操作に熟達した者でないと所望のレイアウトでキャラクタをラベル上に印刷することができないという不具合があった。
この不具合を解決するキャラクタの割付方法として以下のラベル作成システムが知られている。(特許文献1参照)
In the conventional label printer, although vertical writing and horizontal writing can be specified, there is a problem that the character printing position cannot be freely set. In addition, in a conventional word processor, it is necessary to perform character input operations by placing the cursor at a corresponding position on the screen, assuming character placement in advance, and there are a plurality of character orientations and characters. In order to set the direction of their arrangement (for example, the direction from the left to the right of the label or the direction from the top to the bottom), a complicated input operation is required. Must be done for each character. For this reason, the input operation becomes complicated, and there is a problem that a character cannot be printed on a label with a desired layout unless the user is proficient in the operation.
The following label creation system is known as a character assignment method for solving this problem. (See Patent Document 1)

文字や数字等のキャラクタの配置を画面上で視認しながらラベルを作成するためのシステムであって、前記ラベルのサイズを設定するラベルサイズ設定手段と、前記キャラクタを入力するキャラクタ入力手段と、前記キャラクタのサイズを設定するキャラクタサイズ設定手段と、前記ラベルのサイズを基に前記ラベルの外形を示すラベル画像の表示用画像データを生成すると共に、前記キャラクタのサイズを基に前記キャラクタ入力手段に入力されたキャラクタの大きさを示す枠線の表示用画像データを生成する表示用画像データ生成手段と、前記各表示用画像データを基に、前記ラベル画像及び枠線を前記画面に表示させる表示制御手段と、前記枠線の表示位置を任意に変更し設定するレイアウト決定手段と、前記画面の表示に応じたレイアウトで前記キャラクタを形成した前記ラベルの印刷用画像の画像データを生成する印刷用画像データ生成手段と、を備えることを特徴とするラベル作成システム。(請求項1)   A system for creating a label while visually confirming the arrangement of characters such as letters and numbers on a screen, a label size setting means for setting the size of the label, a character input means for inputting the character, Character size setting means for setting the size of the character, and display image data for displaying a label image indicating the outer shape of the label based on the size of the label, and input to the character input means based on the size of the character Display image data generating means for generating display image data for a frame line indicating the size of the character, and display control for displaying the label image and the frame line on the screen based on each display image data Means, a layout determining means for arbitrarily changing and setting the display position of the frame line, and a layout corresponding to the display on the screen. Label producing system characterized in that it comprises a print image data generating means for generating image data of the printing image of the label forming the character in out. (Claim 1)

また、キャラクタ(アイテム)としてバーコードを配置する場合には、バーコードはバーコードサイズが大きい方がバーコードリーダによる読取精度が向上するので、バーコードを配置するアイテム領域の範囲で最大の大きさで配置して印刷することが望ましい。   Also, when a barcode is placed as a character (item), the barcode is larger in the range of the item area where the barcode is placed because the barcode accuracy is improved when the barcode size is larger. It is desirable to arrange and print.

また、バーコードの1種として、2次元バーコードとしての「PDF417」が知られている。(特許文献2参照)   As one type of barcode, “PDF417” as a two-dimensional barcode is known. (See Patent Document 2)

特開平7−88981号公報JP 7-88981 A 特開平9−153109号公報JP 9-153109 A

PDF417は、バーコードの設定情報である桁数、段数を指定することによって、バーコードの縦横比を任意に調整することができる。このため、バーコードの読取り精度を考えた場合には、アイテム領域(枠)の縦横比と、バーコードの縦横比を一致させることが望ましい。
従来はアイテム領域内に、PDF417(バーコード)を配置する場合には、利用者が桁数及び段数を明示的に指定する必要があり、アイテム領域の縦横比に一致するようにPDF417の桁数及び段数を指定することは難しかった。
The PDF 417 can arbitrarily adjust the aspect ratio of the barcode by designating the number of digits and the number of steps as the barcode setting information. For this reason, when considering the barcode reading accuracy, it is desirable to match the aspect ratio of the item area (frame) with the aspect ratio of the barcode.
Conventionally, when PDF417 (barcode) is placed in an item area, the user must explicitly specify the number of digits and the number of columns. And it was difficult to specify the number of steps.

本発明の課題(目的)は、印刷物のアイテム領域内に、PDF417(バーコード)を配置する場合に、利用者がPDF417に含まれる情報であるバーコード文字列と、PDF417が配置されるアイテム枠を含むレイアウト情報を指定するのみで、利用者が桁数及び段数を明示的に指定する必要なしに、アイテム領域の縦横比に近似する最大のサイズのPDF417印刷データを生成することが可能なバーコード印刷データの生成方法、印刷装置及びプログラムを実現することにある。   An object (object) of the present invention is that when a PDF 417 (bar code) is arranged in an item area of a printed matter, a barcode character string that is information included in the PDF 417 and an item frame in which the PDF 417 is arranged This is a bar that can generate PDF417 print data of the maximum size that approximates the aspect ratio of the item area without requiring the user to explicitly specify the number of digits and the number of columns, only by specifying layout information including The object is to realize a code print data generation method, a printing apparatus, and a program.

上記の課題を解決するため、本発明の2次元バーコードの印刷データの生成方法は、
レイアウト情報記憶部、バーコード情報記憶部、及び印刷物における2次元バーコードのアイテム領域の縦横比に対応する当該2次元バーコードの桁数及び段数を演算して印刷データを生成する制御部、を備えた印刷装置における2次元バーコードの印刷データの生成方法であって、
前記2次元バーコードに含まれる情報であるバーコード文字列を取得するステップと、
取得した文字列に基づいて、必要コードワード数を算出するステップと、前記バーコードが配置されるアイテム枠を含むレイアウト情報を取得し、前記アイテム枠のアスペクト比を取得するステップと、前記アスペクト比に近似する2次元バーコードの桁数及び段数を算出するステップと、を含むことを特徴とする。
In order to solve the above problems, a method for generating print data of a two-dimensional barcode according to the present invention includes:
A layout information storage unit, a barcode information storage unit, and a control unit that generates print data by calculating the number of digits and the number of steps of the two-dimensional barcode corresponding to the aspect ratio of the item area of the two-dimensional barcode in the printed matter; A method for generating print data of a two-dimensional barcode in a printing apparatus comprising:
Obtaining a barcode character string that is information included in the two-dimensional barcode;
Based on the acquired character string, calculating a necessary number of code words, acquiring layout information including an item frame in which the barcode is arranged, acquiring an aspect ratio of the item frame, and the aspect ratio And calculating the number of digits and the number of steps of the two-dimensional bar code approximating to.

また、前記2次元バーコードはPDF417であり、アイテム枠に対して最大のサイズとなることを特徴とする。   Further, the two-dimensional barcode is PDF417, which has a maximum size with respect to the item frame.

また、本発明の2次元バーコードの印刷装置は、レイアウト情報記憶部、バーコード情報記憶部、及び印刷物におけるPDF417のアイテム領域の縦横比に対応する当該PDF417の桁数及び段数を演算して印刷データを生成する制御部を備えた印刷装置であって、
前記PDF417に含まれる情報であるバーコード文字列を取得するバーコードデータ取得部と、取得した文字列に基づいて、PDF417の必要コードワード数を算出する必要コードワード数算出部と、前記PDF417が配置されるアイテム枠を含むレイアウト情報を取得し、前記アイテム枠のアスペクト比を取得するアスペクト比取得部と、前記アスペクト比に近似するPDF417の桁数及び段数を算出する桁数・段数算出部と、前記アイテム枠に対して最大のサイズとなるPDF417印刷データを生成する印刷データ生成部とを備えることを特徴とする。
The two-dimensional barcode printing apparatus according to the present invention calculates and prints the number of columns and the number of steps of the PDF 417 corresponding to the aspect ratio of the item area of the PDF 417 in the layout information storage unit, the barcode information storage unit, and the printed matter. A printing apparatus having a control unit for generating data,
A barcode data acquisition unit that acquires a barcode character string that is information included in the PDF 417, a required code word number calculation unit that calculates the number of required code words of the PDF 417 based on the acquired character string, and the PDF 417 An aspect ratio acquisition unit that acquires layout information including an item frame to be arranged and acquires an aspect ratio of the item frame; A print data generation unit that generates PDF417 print data having a maximum size with respect to the item frame.

また、本発明の2次元バーコードの印刷データを生成するプログラムは、レイアウト情報記憶部、バーコード情報記憶部、及び印刷物における2次元バーコードのアイテム領域の縦横比に対応する当該2次元バーコードの桁数及び段数を演算して印刷データを生成する制御部、を備えた印刷装置における2次元バーコードの印刷データを生成するプログラムであって、
前記印刷装置のコンピュータに、前記2次元バーコードに含まれる情報であるバーコード文字列を取得するステップと、取得した文字列に基づいて、必要コードワード数を算出する手順と、前記PDF417が配置されるアイテム枠を含むレイアウト情報を取得し、前記アイテム枠のアスペクト比を取得する手順と、前記アスペクト比に近似する2次元バーコードの桁数及び段数を算出する手順と、前記アイテム枠に対して最大のサイズとなるPDF417印刷データを生成する手順とを実行させることを特徴とする。
A program for generating print data of a two-dimensional barcode according to the present invention includes a layout information storage unit, a barcode information storage unit, and the two-dimensional barcode corresponding to the aspect ratio of the item area of the two-dimensional barcode in a printed matter. A program for generating print data of a two-dimensional barcode in a printing apparatus comprising a control unit that calculates the number of digits and the number of steps of the print unit to generate print data,
The step of acquiring a barcode character string that is information included in the two-dimensional barcode, a procedure for calculating the number of required code words based on the acquired character string, and the PDF417 are arranged in the computer of the printing apparatus. For obtaining the layout information including the item frame to be obtained, obtaining the aspect ratio of the item frame, calculating the number of digits and the number of steps of the two-dimensional barcode that approximates the aspect ratio, and for the item frame And generating a PDF417 print data having a maximum size.

本発明によれば、印刷物のアイテム領域内に、PDF417(バーコード)を配置する場合に、利用者がPDF417に含まれる情報であるバーコード文字列と、PDF417が配置されるアイテム枠を含むレイアウト情報を指定するのみで、利用者が桁数及び段数を明示的に指定する必要なしに、アイテム領域の縦横比に近似する最大のサイズのPDF417印刷データを生成することが可能なバーコード印刷データの生成方法、印刷装置及びプログラムを実現できる。   According to the present invention, when a PDF 417 (bar code) is arranged in an item area of a printed matter, a layout including a bar code character string that is information included in the PDF 417 and an item frame in which the PDF 417 is arranged. Bar code print data that can generate PDF 417 print data of the maximum size that approximates the aspect ratio of the item area without specifying the number of digits and the number of columns explicitly only by specifying information. Generation method, printing apparatus, and program can be realized.

本発明をアイテム編集装置に当てはめた時の制御ブロック図である。It is a control block diagram when this invention is applied to the item editing apparatus. アイテム編集装置におけるフローチャート図である。It is a flowchart figure in an item editing apparatus. 図2の桁数、段数を算出の、詳細フローチャート図である。FIG. 3 is a detailed flowchart for calculating the number of digits and the number of stages in FIG. 2. 実施例1の具体例で作成したバーコードである。3 is a barcode created in a specific example of the first embodiment. PDF417の桁数と最大コードワード数との関係を示す表である。It is a table | surface which shows the relationship between the number of digits of PDF417 and the maximum codeword number.

先ず、2次元バーコードの1種であるPDF417について説明する。
PDF417シンボルはバーコード化された情報の段の積み重ねによって構成されている。
シンボル内の各段は、スタートパターンと、ローインディケータと、いくつかのコードワードと、ストップパターンとによって構成されている。
コードワードは、ある数字、文字またはその他のシンボルを表わす値、またはこれらに関連づけられた値を符号化するための基本となる単位である。集合的に、各段のコードワードはデータ列を形成する。
First, PDF417, which is a type of two-dimensional barcode, will be described.
The PDF417 symbol is constructed by stacking stages of bar-coded information.
Each stage in the symbol includes a start pattern, a low indicator, several code words, and a stop pattern.
A codeword is a basic unit for encoding a value representing a number, character or other symbol, or a value associated with the codeword. Collectively, the code words of each stage form a data string.

PDF417シンボルの段の数(段数)と、データ列の数(桁数)は共に可変である。
シンボルは、少なくとも3段を有しなければならず、90段まで有することができる。 同様に、各段のコードワードまたはデータ列の数は、1から30まで変化することが可能である。PDF417の各コードワードは17個のモジュールにより構成されている。
各コードワードには4つのバーと4つのスペースがあり、黒いモジュールがバー、白いモジュールがスペースとなる。個々のバーまたはスペースの幅は、同色のモジュールを並べることにより変えることができ、最大で6モジュール分となるが、1つのコードワードあたりのモジュール数は常に17である。
Both the number of PDF417 symbol stages (number of stages) and the number of data strings (number of digits) are variable.
The symbol must have at least 3 levels and can have up to 90 levels. Similarly, the number of codewords or data strings in each stage can vary from 1 to 30. Each codeword of PDF417 is composed of 17 modules.
Each codeword has 4 bars and 4 spaces, with black modules as bars and white modules as spaces. The width of each bar or space can be changed by arranging modules of the same color, and the maximum is 6 modules, but the number of modules per codeword is always 17.

PDF417はユニークなスタートパターンとストップパターンとを使用する。スタートパターン、すなわち各段の左側は、ユニークなパターンを有する。スタートパターンは17モジュールからなる。ストップパターン、すなわち各段の右側は、ユニークなパターンを有する。ストップパターンは18モジュールからなる。スタートパターンとストップパターンは各段で同じなため、これらのパターンはシンボルのそれぞれ左側と右側に連続した「構造」を形成する。また、スタートパターンの左側、ストップパターンの右側にはPDF417の桁数、段数などの情報を格納したローインディケータを有する。ローインディケータはそれぞれ17モジュールからなる。シンボル全体は、黒いマークを含まないクリアなスペース、または「クワイエットゾーン」に囲まれている。   PDF417 uses a unique start pattern and stop pattern. The start pattern, that is, the left side of each stage has a unique pattern. The start pattern consists of 17 modules. The stop pattern, ie the right side of each stage, has a unique pattern. The stop pattern consists of 18 modules. Since the start pattern and the stop pattern are the same in each stage, these patterns form a “structure” that is continuous on the left and right sides of the symbol, respectively. Further, on the left side of the start pattern and the right side of the stop pattern, there are low indicators that store information such as the number of digits of the PDF 417 and the number of stages. Each low indicator consists of 17 modules. The entire symbol is surrounded by a clear space that does not include black marks, or a “quiet zone”.

図1を用いて本発明のバーコード印刷方法、印刷装置及びプログラムの説明をする。
図1は、2次元バーコードであるPDF417を含むアイテムの編集に本発明を利用した際の制御ブロック図である。
図1において、11はレイアウト情報記憶部、13はバーコード情報記憶部、12は前記レイアウト情報記憶部及びバーコード情報記憶部のデータを基に、レイアウト情報に含まれる2次元バーコードであるPDF417が印刷されるアイテム領域の縦横比に一致するように当該PDF417の桁数及び段数を演算し、印刷データを生成する制御部である。
制御部12には、バーコード生成モジュール20、桁数・段数算出部21及び印刷データ生成部22が含まれる。
The barcode printing method, printing apparatus and program of the present invention will be described with reference to FIG.
FIG. 1 is a control block diagram when the present invention is used to edit an item including a PDF 417 that is a two-dimensional barcode.
In FIG. 1, 11 is a layout information storage unit, 13 is a barcode information storage unit, and 12 is a PDF417 that is a two-dimensional barcode included in layout information based on data in the layout information storage unit and the barcode information storage unit. Is a control unit that calculates the number of digits and the number of steps of the PDF 417 so as to match the aspect ratio of the item area to be printed, and generates print data.
The control unit 12 includes a barcode generation module 20, a digit / stage number calculation unit 21, and a print data generation unit 22.

図2のフローチャートを用いて本発明のバーコード印刷方法の制御部における各手順の基本的な流れを説明する。
・制御部12は、バーコード情報記憶部13から2次元バーコードPDF417として表示する内容であるバーコード文字列(データ)を取得する。(ステップS101)
・バーコード生成モジュール20にて、前記ステップS101で取得したバーコード文字列に相当する必要コードワード数を算出する。(ステップS102)
・制御部12は、レイアウト情報記憶部11から2次元バーコードPDF417が表示されるアイテム枠(表示領域)のアスペクト比を取得する。(ステップS103)
・桁数・段数算出部21にて、ステップS103で取得したアイテム枠のアスペクト比、及びステップS102で算出した必要コードワード数に対応するPDF417の桁数・段数を算出する。(ステップS104)
・バーコード生成モジュール20にて、ステップS104で算出した桁数・段数からPDF417を生成する。(ステップS105)
・印刷データ生成部22にて、ステップS105で生成したPDF417をアイテム枠の縦横のいずれかに一致するように拡大したデータを生成し、印刷する。(ステップS106)
The basic flow of each procedure in the control unit of the barcode printing method of the present invention will be described using the flowchart of FIG.
The control unit 12 acquires a barcode character string (data) that is the content to be displayed as the two-dimensional barcode PDF 417 from the barcode information storage unit 13. (Step S101)
The barcode generation module 20 calculates the number of necessary code words corresponding to the barcode character string acquired in step S101. (Step S102)
The control unit 12 acquires the aspect ratio of the item frame (display area) in which the two-dimensional barcode PDF 417 is displayed from the layout information storage unit 11. (Step S103)
The number of digits / stage number calculation unit 21 calculates the number of digits / stages of the PDF 417 corresponding to the aspect ratio of the item frame acquired in step S103 and the required number of codewords calculated in step S102. (Step S104)
The barcode generation module 20 generates a PDF 417 from the number of digits and the number of steps calculated in step S104. (Step S105)
The print data generation unit 22 generates and prints data in which the PDF 417 generated in step S105 is enlarged so as to match either the vertical or horizontal direction of the item frame. (Step S106)

次に、図3のフローチャートを用いて、図2のステップS104の必要コードワード数に対応するPDF417の桁数・段数を算出する処理手順の1例について詳細な説明をする。
・下記の式1より段数(暫定値)(2値)を算出する。(ステップS201)
Next, an example of a processing procedure for calculating the number of digits and the number of stages of the PDF 417 corresponding to the required number of code words in step S104 in FIG. 2 will be described in detail using the flowchart in FIG.
-Calculate the number of steps (provisional value) (binary value) from Equation 1 below. (Step S201)

式1
M=(T×n+Qh)/(69+17×m+Qw)
M×(69+17×m+Qw) = T×n+Qh
69×M+17×M×m+Qw×M−T×n−Qh=0
m=K/nより
69×M+17×M×K/n+Qw×M−T×n−Qh=0
−T×n+(69×M+Qw×M−Qh×n+17×M×K=0
A=−T
B=69×M+Qw×M−Qh
C=17×M×K とすると、
n=(−B±√(B−4×A×C)) / (2×A)
Formula 1
M = (T × n + Qh) / (69 + 17 × m + Qw)
M × (69 + 17 × m + Qw) = T × n + Qh
69 * M + 17 * M * m + Qw * MT * n-Qh = 0
From m = K / n 69 × M + 17 × M × K / n + Qw × MT × n−Qh = 0
−T × n 2 + (69 × M + Qw × M−Qh × n + 17 × M × K = 0
A = -T
B = 69 × M + Qw × M-Qh
If C = 17 × M × K,
n = (− B ± √ (B 2 −4 × A × C)) / (2 × A)

式1において、以下のとおりである。
・アイテム枠のアスペクト比(縦/横):M
・PDF417のモジュール比(縦/横):T
・必要コードワード数:K
・左右クワイエットゾーン合計:Qw
・上下クワイエットゾーン合計:Qh
・桁数:m
・段数:n
In Formula 1, it is as follows.
Item frame aspect ratio (vertical / horizontal): M
-Module ratio of PDF417 (vertical / horizontal): T
-Number of required code words: K
・ Left and right quiet zone total: Qw
・ Total of upper and lower quiet zones: Qh
・ Number of digits: m
-Number of stages: n

上記の如くA, B, Cはすべて値が求められるため、nが決定できる。
・上記式1により得られた2つのnのうち、一方が虚数の場合は、実数値を段数として決定する。(ステップS202)
・上記式1により得られた2つのnのうち、両方が実数の場合は、3〜90の範囲内に近い方を段数として決定する。(ステップS203)
・ステップS202、S203により決定した段数に端数がある場合には、端数を切り上げ、また3〜90の範囲外の場合には、範囲内に丸め込む。(ステップS204)
As described above, since values are obtained for all of A, B, and C, n can be determined.
-If one of the two n values obtained by Equation 1 is an imaginary number, the real value is determined as the number of steps. (Step S202)
In the case where both of n obtained by Equation 1 are real numbers, the one closer to the range of 3 to 90 is determined as the number of stages. (Step S203)
If the number of stages determined in steps S202 and S203 has a fraction, round up the number, and if it is out of the range of 3 to 90, round it into the range. (Step S204)

・下記の式2より桁数を算出する。(ステップS205) ・ Calculate the number of digits using Equation 2 below. (Step S205)

式2
m=K/n
Formula 2
m = K / n

式2において、以下のとおりである。
・必要コードワード数:K
・桁数:m
・段数:n
In Formula 2, it is as follows.
-Number of required code words: K
・ Number of digits: m
-Number of stages: n

・上記式により得られたmのうち、1〜30の範囲内に丸め込む。(ステップS206)
・端数が出た場合には、図5の表1を使い、表1上の最大コードワード数が必要コードワード数(K)と同じもしくは大きく、かつ算出値のmが表1上の桁数にもっとも近いものを新たな桁数mとする。(ステップS207)
-Round off within the range of 1-30 among m obtained by the said formula. (Step S206)
・ If fractional numbers appear, use Table 1 in Fig. 5, and the maximum number of code words in Table 1 is the same as or larger than the required number of code words (K), and the calculated value m is the number of digits in Table 1. The one closest to is the new number of digits m. (Step S207)

・下記の式3より段数を算出し、端数がある場合には、端数を切り上げる(ステップS208) -The number of stages is calculated from the following formula 3, and when there is a fraction, the fraction is rounded up (step S208).

式3
n=K/m
Formula 3
n = K / m

式3において、以下のとおりである。
・必要コードワード数:K
・桁数:m
・段数:n
In Formula 3, it is as follows.
-Number of required code words: K
・ Number of digits: m
-Number of stages: n

(実施例)
大文字半角「A」が1832文字連続する場合、必要コードワード数は919となる。(文字数×0.5+1(必須なPDF417固有データ) +2(エラー訂正用))
このアプリの場合、T=3、Qh=4、Qw=4となる。
アイテム枠のアスペクト比は計算を単純にするために1(正方形)とする。
(Example)
When the capital letter “A” is 1832 consecutive characters, the required number of code words is 919. (Number of characters x 0.5 + 1 (essential data required for PDF417) + 2 (for error correction))
In the case of this application, T = 3, Qh = 4, and Qw = 4.
The aspect ratio of the item frame is 1 (square) to simplify the calculation.

M=(T×n+Qh/(69+17×m+Qw)
1=(3×n+4)/(69+17×m+4)
途中省略
A=−3
B=69×1+4×1−4=69
C=17×1×919=15623
n=(−B±√(B−4×A×C) /(2×A)=(−69±√(192237)/−6
n=(−69+√(192237))/−6=−61.57
n=(−69−√(192237))/−6=84.57
M = (T × n + Qh / (69 + 17 × m + Qw)
1 = (3 × n + 4) / (69 + 17 × m + 4)
Away omitted A = -3
B = 69 × 1 + 4 × 1-4 = 69
C = 17 × 1 × 919 = 15623
n = (− B ± √ (B 2 −4 × A × C) / (2 × A) = (− 69 ± √ (192237) / 6)
n = (− 69 + √ (192237)) / − 6 = −61.57
n = (− 69−√ (192237)) / − 6 = 84.57

よって、n=85
m=919/85=10.81→表1により11
n=919/11=83.5=84
よって、桁数11、段数84となる。
Therefore, n = 85
m = 919/85 = 10.81 → 11 according to Table 1
n = 919/11 = 83.5 = 84
Therefore, the number of digits is 11 and the number of steps is 84.

以上のとおり、本発明によれば、印刷物のアイテム領域内に、PDF417(バーコード)を配置する場合に、利用者がPDF417に含まれる情報であるバーコード文字列と、PDF417が配置されるアイテム枠を含むレイアウト情報を指定するのみで、利用者が桁数及び段数を明示的に指定する必要なしに、アイテム領域の縦横比に近似する最大のサイズのPDF417印刷データを生成することが可能になる。   As described above, according to the present invention, when the PDF 417 (bar code) is placed in the item area of the printed matter, the barcode character string that is information included in the PDF 417 and the item in which the PDF 417 is placed. It is possible to generate PDF417 print data of the maximum size that approximates the aspect ratio of the item area without having to explicitly specify the number of columns and the number of columns by simply specifying the layout information including the frame. Become.

11:レイアウト情報記憶部
12:制御部
13:バーコード情報記憶部
20:バーコード生成モジュール
21:桁数・段数算出部
21:印刷データ生成部
11: Layout information storage unit 12: Control unit 13: Bar code information storage unit 20: Bar code generation module 21: Digit number / column number calculation unit 21: Print data generation unit

Claims (4)

レイアウト情報記憶部、バーコード情報記憶部、及び印刷物における2次元バーコードのアイテム領域の縦横比に対応する当該2次元バーコードの桁数及び段数を演算して印刷データを生成する制御部、を備えた印刷装置における2次元バーコードの印刷データの生成方法であって、
前記2次元バーコードに含まれる情報であるバーコード文字列を取得するステップと、
取得した文字列に基づいて、必要コードワード数を算出するステップと、
前記バーコードが配置されるアイテム枠を含むレイアウト情報を取得し、前記アイテム枠のアスペクト比を取得するステップと、
前記アスペクト比に近似する2次元バーコードの桁数及び段数を算出するステップと、
を含むことを特徴とする印刷データの生成方法。
A layout information storage unit, a barcode information storage unit, and a control unit that generates print data by calculating the number of digits and the number of steps of the two-dimensional barcode corresponding to the aspect ratio of the item area of the two-dimensional barcode in the printed matter; A method for generating print data of a two-dimensional barcode in a printing apparatus comprising:
Obtaining a barcode character string that is information included in the two-dimensional barcode;
Calculating the required number of code words based on the acquired character string;
Obtaining layout information including an item frame in which the barcode is arranged, and obtaining an aspect ratio of the item frame;
Calculating the number of digits and the number of steps of the two-dimensional barcode approximating the aspect ratio;
A method for generating print data, comprising:
前記2次元バーコードはPDF417であり、アイテム枠に対して最大のサイズとなることを特徴とする請求項1に記載の印刷データの生成方法。   The method of generating print data according to claim 1, wherein the two-dimensional barcode is PDF417 and has a maximum size for an item frame. レイアウト情報記憶部、バーコード情報記憶部、及び印刷物におけるPDF417のアイテム領域の縦横比に対応する当該PDF417の桁数及び段数を演算して印刷データを生成する制御部を備えた印刷装置であって、
前記PDF417に含まれる情報であるバーコード文字列を取得するバーコードデータ取得部と、
取得した文字列に基づいて、PDF417の必要コードワード数を算出する必要コードワード数算出部と、
前記PDF417が配置されるアイテム枠を含むレイアウト情報を取得し、前記アイテム枠のアスペクト比を取得するアスペクト比取得部と、
前記アスペクト比に近似するPDF417の桁数及び段数を算出する桁数・段数算出部と、
前記アイテム枠に対して最大のサイズとなるPDF417印刷データを生成する印刷データ生成部と、
を備えることを特徴とする印刷装置。
A printing apparatus including a layout information storage unit, a barcode information storage unit, and a control unit that generates print data by calculating the number of digits and the number of steps of the PDF 417 corresponding to the aspect ratio of the item area of the PDF 417 in a printed matter. ,
A barcode data acquisition unit that acquires a barcode character string that is information included in the PDF417;
Based on the acquired character string, a necessary codeword number calculation unit for calculating the necessary number of codewords of PDF417,
An aspect ratio acquisition unit that acquires layout information including an item frame in which the PDF 417 is arranged, and acquires an aspect ratio of the item frame;
A digit number / stage number calculating unit for calculating the number of digits and the number of stages of PDF 417 approximating the aspect ratio;
A print data generation unit that generates PDF417 print data having a maximum size for the item frame;
A printing apparatus comprising:
レイアウト情報記憶部、バーコード情報記憶部、及び印刷物における2次元バーコードのアイテム領域の縦横比に対応する当該2次元バーコードの桁数及び段数を演算して印刷データを生成する制御部、を備えた印刷装置における2次元バーコードの印刷データを生成するプログラムであって、
前記印刷装置のコンピュータに、
前記2次元バーコードに含まれる情報であるバーコード文字列を取得するステップと、
取得した文字列に基づいて、必要コードワード数を算出する手順と、
前記PDF417が配置されるアイテム枠を含むレイアウト情報を取得し、前記アイテム枠のアスペクト比を取得する手順と、
前記アスペクト比に近似する2次元バーコードの桁数及び段数を算出する手順と、
前記アイテム枠に対して最大のサイズとなるPDF417印刷データを生成する手順と、
を実行させることを特徴とする印刷データを生成するプログラム。


A layout information storage unit, a barcode information storage unit, and a control unit that generates print data by calculating the number of digits and the number of steps of the two-dimensional barcode corresponding to the aspect ratio of the item area of the two-dimensional barcode in the printed matter; A program for generating print data of a two-dimensional barcode in a printing apparatus provided,
In the computer of the printing device,
Obtaining a barcode character string that is information included in the two-dimensional barcode;
Based on the acquired character string, a procedure for calculating the required number of codewords,
Obtaining layout information including an item frame in which the PDF 417 is arranged, and obtaining an aspect ratio of the item frame;
A procedure for calculating the number of digits and the number of steps of the two-dimensional barcode approximating the aspect ratio;
A procedure for generating PDF417 print data having a maximum size for the item frame;
A program for generating print data, characterized in that


JP2009040526A 2009-02-24 2009-02-24 Method for generating bar code print data, printer and program Withdrawn JP2010198167A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009040526A JP2010198167A (en) 2009-02-24 2009-02-24 Method for generating bar code print data, printer and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009040526A JP2010198167A (en) 2009-02-24 2009-02-24 Method for generating bar code print data, printer and program

Publications (2)

Publication Number Publication Date
JP2010198167A true JP2010198167A (en) 2010-09-09
JP2010198167A5 JP2010198167A5 (en) 2012-02-02

Family

ID=42822856

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009040526A Withdrawn JP2010198167A (en) 2009-02-24 2009-02-24 Method for generating bar code print data, printer and program

Country Status (1)

Country Link
JP (1) JP2010198167A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0757037A (en) * 1993-08-11 1995-03-03 Olympus Optical Co Ltd Bar code symbol reader
JPH0765104A (en) * 1993-08-24 1995-03-10 Olympus Optical Co Ltd Bar code reader
JPH0999590A (en) * 1995-10-03 1997-04-15 Fujitsu Ltd Forming method of bar pattern table in bar-code printing device and bar-code printed with the pattern table built-in
JP2000158720A (en) * 1998-12-01 2000-06-13 Hitachi Ltd Bar code printer
JP2002140182A (en) * 2000-10-31 2002-05-17 Canon Inc Printer and printer control unit, and control method thereof
JP2002264424A (en) * 2001-03-12 2002-09-18 Seiko Epson Corp Symbol printer, its printing method, driver for symbol printer and information storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0757037A (en) * 1993-08-11 1995-03-03 Olympus Optical Co Ltd Bar code symbol reader
JPH0765104A (en) * 1993-08-24 1995-03-10 Olympus Optical Co Ltd Bar code reader
JPH0999590A (en) * 1995-10-03 1997-04-15 Fujitsu Ltd Forming method of bar pattern table in bar-code printing device and bar-code printed with the pattern table built-in
JP2000158720A (en) * 1998-12-01 2000-06-13 Hitachi Ltd Bar code printer
JP2002140182A (en) * 2000-10-31 2002-05-17 Canon Inc Printer and printer control unit, and control method thereof
JP2002264424A (en) * 2001-03-12 2002-09-18 Seiko Epson Corp Symbol printer, its printing method, driver for symbol printer and information storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JPN6013011806; SureMark 4610 Printers DBCS ユーザーズ・ガイド(モデル TI5, TG5, TF7 および TM7 用) , 200803, 第153,157,159頁, 日本アイ・ビー・エム株式会社 *

Similar Documents

Publication Publication Date Title
JP2016076210A (en) Information code generation method, information code generation program, and information code generation device
JP6546317B2 (en) Data input / output method using dot code
JP4404913B2 (en) Bar code reader and reading method
CN105069388B (en) The data output-input method of point of use coding
SE516109C2 (en) Procedure, systems and computer programs for document management using position coding patterns
SE516310C2 (en) Product with two coding patterns, including raster points; and method, computer program and device for reading the coding patterns
JP2007529141A (en) On-demand printing of coding patterns
KR100871228B1 (en) Image display method and apparatus
JP5233707B2 (en) Label printer
JP5391765B2 (en) Label printer and information processing apparatus
JP2010198167A (en) Method for generating bar code print data, printer and program
CN110245341A (en) Identification code Mass production method and device
JP5391764B2 (en) Label printer and information processing apparatus
JP2008141496A (en) Document editing device and program
JP2008140158A (en) Document editing device and program
CN102810171B (en) Chinese-sensible code and construction method thereof
JP5592234B2 (en) Two-dimensional code generation device, two-dimensional code reading device, two-dimensional code, two-dimensional code generation method, two-dimensional code reading method, and program
JP5120152B2 (en) 2D code
JP6714303B1 (en) Two-dimensional code generation method, two-dimensional code evaluation method, two-dimensional code system, two-dimensional code generation device, and two-dimensional code evaluation device
KR20050077737A (en) System, method, and program for producing barcode data
TWI770123B (en) Information processing apparatus, program, information processing method and information processing system
JP2014030989A (en) Label printing device
JPS63233465A (en) Input display system for numerical format code
CN101571882A (en) System and method for generating minimum outline of characters
JP2000123131A (en) Bar code generating method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111208

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111208

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20120816

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121225

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130319

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20130425