JP2020014115A - Program and information processing apparatus - Google Patents

Program and information processing apparatus Download PDF

Info

Publication number
JP2020014115A
JP2020014115A JP2018134952A JP2018134952A JP2020014115A JP 2020014115 A JP2020014115 A JP 2020014115A JP 2018134952 A JP2018134952 A JP 2018134952A JP 2018134952 A JP2018134952 A JP 2018134952A JP 2020014115 A JP2020014115 A JP 2020014115A
Authority
JP
Japan
Prior art keywords
length
image data
image
printer
recording medium
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.)
Granted
Application number
JP2018134952A
Other languages
Japanese (ja)
Other versions
JP7077838B2 (en
Inventor
諒一 佐藤
Ryoichi Sato
諒一 佐藤
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.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2018134952A priority Critical patent/JP7077838B2/en
Publication of JP2020014115A publication Critical patent/JP2020014115A/en
Application granted granted Critical
Publication of JP7077838B2 publication Critical patent/JP7077838B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

To provide a program and an information processing apparatus, capable of causing a printer to appropriately convey a long recording medium with an image printed thereon.SOLUTION: An SDK module of a label creation program stored in a memory of a PC constituting a printer system is configured to: determine whether an effective pixel exists in each line of image data in a main scanning direction; specify an image length LEnd based on the number of lines where the effective pixels exist S53; convert a range of the image length LEnd in the image data into raster data S61 when the image length LEnd is equal to or longer than a minimum medium length LPrn that can be conveyed by a printer S59:YES; and output the converted raster data to the printer S65.SELECTED DRAWING: Figure 6

Description

本発明は、印刷対象の画像データにおける余白を除去するプログラム及び情報処理装置に関する。   The present invention relates to a program for removing a blank in image data to be printed and an information processing apparatus.

下記特許文献には、印刷対象の画像データにおける余白部分を除去する画像形成装置が開示されている。この画像形成装置は、原稿台にセットした原稿から読み取った画像データのうち、先頭部分と後端部分との余白の一部を除去し、余白の長さを予め設定された長さにする。   The following patent document discloses an image forming apparatus for removing a blank portion in image data to be printed. The image forming apparatus removes a part of a margin between a leading portion and a trailing end portion of image data read from a document set on a document table, and sets the length of the margin to a preset length.

特開2005−94413号公報JP 2005-94413 A

ところで、プリンタの中には、ロール紙のような長尺の記録媒体を排出口まで適切に搬送するために、記録媒体の搬送方向における最小の長さが決められているものがある。このようなプリンタにおいて、余白を削除した画像データをそのまま印刷してしまうと、画像データを印刷した長さが記録媒体の最小の長さよりも短い場合に、画像が印刷された記録媒体を排出口まで適切に搬送できない恐れがある。そこで、画像が印刷された長尺の記録媒体をプリンタによって適切に搬送させることができるプログラム及び情報処理装置を提供することを課題とする。   In some printers, a minimum length in the transport direction of the recording medium is determined in order to appropriately transport a long recording medium such as roll paper to an outlet. In such a printer, if the image data whose margins have been removed is printed as it is, if the length of the printed image data is shorter than the minimum length of the recording medium, the recording medium on which the image is printed is ejected. May not be properly transported. It is therefore an object of the present invention to provide a program and an information processing apparatus capable of appropriately transporting a long recording medium on which an image is printed by a printer.

上記課題を解決するために、本願に係るプログラムは、情報処理装置のコンピュータが読み取り可能なプログラムであり、長尺の記録媒体に印刷を行うプリンタに印刷対象の画像データを出力するプログラムであって、前記コンピュータに、前記プリンタが前記記録媒体を搬送する搬送方向に直交する方向に応じた主走査方向について、前記主走査方向おける前記画像データの1ラインずつに有効画素が存在するか否かを判断し、有効画素が存在するライン数に基づく長さであり且つ前記搬送方向に応じた前記画像データの副走査方向の長さである画像長さを特定する特定ステップと、前記画像長さが、前記搬送方向における前記記録媒体の長さであり且つ前記プリンタによって前記記録媒体を搬送可能な最小の長さである最小媒体長さ以上であるか否かを判断する判断ステップと、前記画像長さが前記最小媒体長さ以上である場合に、前記画像データにおける前記画像長さの範囲をラスタデータに変換する変換ステップと、変換した前記ラスタデータを前記プリンタに出力する出力ステップと、を実行させる。   In order to solve the above-described problems, a program according to the present application is a computer-readable program of an information processing apparatus, and is a program that outputs image data to be printed to a printer that performs printing on a long recording medium. In the computer, for a main scanning direction corresponding to a direction orthogonal to a conveyance direction in which the printer conveys the recording medium, it is determined whether or not an effective pixel exists for each line of the image data in the main scanning direction. Determining an image length, which is a length based on the number of lines in which effective pixels are present, and which is a length in the sub-scanning direction of the image data according to the transport direction; and , The minimum length of the recording medium in the transport direction and the minimum length that is the minimum length capable of transporting the recording medium by the printer. A judging step of judging whether or not there is, and, when the image length is equal to or longer than the minimum medium length, a conversion step of converting the range of the image length in the image data into raster data; and Outputting the raster data to the printer.

また、本願に係る情報処理装置は、制御部を備え、長尺の記録媒体に印刷を行うプリンタに印刷対象の画像データを出力する情報処理装置であって、前記制御部は、前記プリンタが前記記録媒体を搬送する搬送方向に直交する方向に応じた主走査方向について、前記主走査方向における前記画像データの1ラインずつに有効画素が存在するか否かを判断し、有効画素が存在するライン数に基づく長さであり且つ前記画像データの副走査方向の長さである画像長さを特定する特定処理と、前記画像長さが、前記搬送方向における前記記録媒体の長さであり且つ前記プリンタによって前記記録媒体を搬送可能な最小の長さである最小媒体長さ以上であるか否かを判断する判断処理と、前記画像長さが前記最小媒体長さ以上である場合に、前記画像データにおける前記画像長さの範囲をラスタデータに変換する変換処理と、変換した前記ラスタデータを前記プリンタに出力する出力処理と、を実行する。   The information processing apparatus according to the present application is an information processing apparatus that includes a control unit and outputs image data to be printed to a printer that prints on a long recording medium. For the main scanning direction corresponding to the direction orthogonal to the conveyance direction for conveying the recording medium, it is determined whether or not there is an effective pixel for each line of the image data in the main scanning direction, and the line where the effective pixel exists is determined. A specifying process of specifying an image length that is a length based on a number and a length of the image data in a sub-scanning direction; and the image length is a length of the recording medium in the transport direction, and A determination process of determining whether or not the length is equal to or longer than a minimum medium length that is a minimum length capable of conveying the recording medium by a printer, and when the image length is equal to or longer than the minimum medium length, Performing a conversion process for converting a range of the image length in over data into raster data, and an output process of outputting the converted the raster data to the printer, the.

本願に係るプログラム、情報処理装置によれば、画像データの有効画素が存在するライン数に基づく副走査方向の画像長さと、プリンタの搬送可能な最小媒体長さを比較する。画像長さが最小媒体長さ以上である場合には、画像長さの範囲をラスタデータに変換し、プリンタに印刷を実行させる。これにより、プリンタで印刷する範囲を小さくして記録媒体の消費量を抑制できる。また、搬送方向において、プリンタが画像を印刷する長さとして最小媒体長さを確保でき、画像が印刷された記録媒体をプリンタによって適切に搬送させることができる。   According to the program and the information processing apparatus according to the present application, the image length in the sub-scanning direction based on the number of lines in which effective pixels of image data exist is compared with the minimum medium length that can be carried by the printer. If the image length is equal to or greater than the minimum medium length, the range of the image length is converted into raster data, and the printer is caused to execute printing. As a result, the printing range of the printer can be reduced and the consumption of the recording medium can be suppressed. Further, in the transport direction, a minimum medium length can be secured as a length for the printer to print the image, and the recording medium on which the image is printed can be appropriately transported by the printer.

プリンタシステムのブロック図である。FIG. 2 is a block diagram of a printer system. プリンタの構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of a printer. 各プログラムやデバイスの関係を概念的に示すブロック図である。FIG. 3 is a block diagram conceptually showing a relationship between programs and devices. 編集画面制御モジュールによる印刷処理の内容を示すフローチャートである。9 is a flowchart illustrating the contents of a printing process by an edit screen control module. SDKモジュールによるSDK処理の内容を示すフローチャートである。5 is a flowchart showing the contents of an SDK process by an SDK module. SDKモジュールによるSDK処理の内容を示すフローチャートである。5 is a flowchart showing the contents of an SDK process by an SDK module. 最大長さを求める処理の内容を示すフローチャートである。It is a flowchart which shows the content of the process which calculates | requires a maximum length. 印刷対象の画像データの状態を示す図である。FIG. 3 is a diagram illustrating a state of image data to be printed. 先端側に余白が設定された場合の画像データの状態を示す図である。FIG. 8 is a diagram illustrating a state of image data when a margin is set on the leading end side. 画像長さが最小媒体長さより短い場合の図である。FIG. 7 is a diagram when the image length is shorter than the minimum medium length. 最小媒体長さが最も長い場合の図である。FIG. 4 is a diagram when the minimum medium length is the longest. 設定長さが最も長い場合の図である。It is a figure in case the setting length is the longest. 末尾余白除去設定が設定されスプリット印刷を実行する場合の図である。FIG. 9 is a diagram illustrating a case where a tail print is set and a trailing margin removal setting is performed to execute split printing. 揃え設定が設定されスプリット印刷を実行する場合の図である。FIG. 11 is a diagram illustrating a case where the alignment setting is set and the split printing is executed.

<プリンタシステムの構成>
以下、適宜図面を参照して本発明の実施形態について説明する。なお、以下に説明する実施形態は、本発明の一例にすぎず、本発明の要旨を変更しない範囲で、本発明の実施形態を適宜変更できることは言うまでもない。例えば、後述する各処理の実行順序は、本発明の要旨を変更しない範囲で、適宜変更できる。
<Configuration of printer system>
Hereinafter, embodiments of the present invention will be described with reference to the drawings as appropriate. Note that the embodiments described below are merely examples of the present invention, and it goes without saying that the embodiments of the present invention can be appropriately changed without changing the gist of the present invention. For example, the execution order of each process described below can be appropriately changed without changing the gist of the present invention.

図1は、本実施形態に係るプリンタシステム1のブロック図である。図1に示すプリンタシステム1は、PC10、プリンタ50を備える。PC10は、CPU(コンピュータの一例)12、メモリ14、ディスプレイI/F(インタフェースの略)15、LCD16、入力I/F18、通信I/F20を主に備えている。これらの構成要素は、バス22を介して互いに通信可能とされている。   FIG. 1 is a block diagram of a printer system 1 according to the present embodiment. The printer system 1 illustrated in FIG. 1 includes a PC 10 and a printer 50. The PC 10 mainly includes a CPU (an example of a computer) 12, a memory 14, a display I / F (abbreviation of interface) 15, an LCD 16, an input I / F 18, and a communication I / F 20. These components can communicate with each other via a bus 22.

PC10及びプリンタ50は、通信I/F20及び通信回線56を通じて有線により通信可能となっている。通信回線56は、有線としては、例えば、LANケーブルを採用することができる。なお、有線は、LANケーブルに限らず、USBケーブル等でもよい。また、通信回線56は、例えば、LAN(有線LAN、無線LANを含む)、あるいはWAN(インターネットを含む)でも良い。また、本願のプリンタは、有線で接続可能なプリンタに限らず、無線による接続が可能なプリンタでも良い。無線通信の方式としては、例えば、Wi−Fi(登録商標)やBluetooth(登録商標)の規格を採用できる。   The PC 10 and the printer 50 can communicate by wire through the communication I / F 20 and the communication line 56. The communication line 56 can employ, for example, a LAN cable as a wire. Note that the cable is not limited to the LAN cable, but may be a USB cable or the like. The communication line 56 may be, for example, a LAN (including a wired LAN and a wireless LAN) or a WAN (including the Internet). Further, the printer of the present application is not limited to a printer that can be connected by wire, but may be a printer that can be connected wirelessly. As a method of wireless communication, for example, Wi-Fi (registered trademark) or Bluetooth (registered trademark) standards can be adopted.

プリンタ50は、例えば、ラベルプリンタであり、PC10との間で各種の情報や指示信号を送受信し、PC10による制御に基づいて、所望のテキストや画像等を印字したラベルを作成する。図2は、プリンタ50のブロック図を示している。図2に示すように、プリンタ50は、制御回路61と、搬送ローラ63と、印字ヘッド64と、カッター65と、を有する。プリンタ50は、例えば、ラミネートフィルム等の長尺状のテープ67にテキスト等を印刷してラベルを作成する。プリンタ50には、テープ67を巻回したテープロール68が装着される。制御回路61は、図示しないCPU及びROMを備え、ROMに予め記憶された各種プログラムを実行し、プリンタ50の制御を行う。搬送ローラ63は、印字ヘッド64に対向して設けられており、テープロール68から繰り出されるテープ67を印字ヘッド64との間で挟持する。搬送ローラ63は、回転することによってテープ67をテープロール68から繰り出しながら搬送方向69へ搬送する。   The printer 50 is, for example, a label printer, transmits and receives various information and instruction signals to and from the PC 10, and creates a label on which a desired text or image is printed based on control by the PC 10. FIG. 2 shows a block diagram of the printer 50. As shown in FIG. 2, the printer 50 includes a control circuit 61, a transport roller 63, a print head 64, and a cutter 65. The printer 50 prints a text or the like on a long tape 67 such as a laminated film to create a label. A tape roll 68 around which a tape 67 is wound is attached to the printer 50. The control circuit 61 includes a CPU and a ROM (not shown), executes various programs stored in the ROM in advance, and controls the printer 50. The transport roller 63 is provided so as to face the print head 64, and sandwiches the tape 67 fed from the tape roll 68 with the print head 64. The transport roller 63 transports the tape 67 in the transport direction 69 while being fed out of the tape roll 68 by rotating.

印字ヘッド64は、搬送ローラ63によって搬送されるテープ67に対し、テキスト等を印刷する。カッター65は、制御回路61の制御に基づいて作動し、印刷後のテープ67を切断する。なお、カッター65は、ユーザによる手動操作に応じて作動する構成でも良い。   The print head 64 prints text and the like on the tape 67 transported by the transport rollers 63. The cutter 65 operates under the control of the control circuit 61 and cuts the tape 67 after printing. Note that the cutter 65 may be configured to operate in response to a manual operation by a user.

プリンタ50は、印刷後のテープ67を排出口71から排出する。このような構成では、例えば、カッター65の切断する位置から排出口71までの長さ未満でテープ67を切断した場合、切断されたテープ67、即ち、印刷後のテープ67が、排出口71から排出されず、プリンタ50内に落下等する虞がある。また、例えば、カッター65によって切断されたテープ67をユーザが排出口71から引き出す場合、手で持つ部分としてテープ67を一定量だけ排出口71から突出させておく必要がある。このため、このような構成のプリンタ50では、例えば、図2に示すように、プリンタ50によって記録媒体であるテープ67を適切に搬送可能な最小の長さである最小媒体長さLPrnを規定でき、この最小媒体長さLPrn以上の長さでテープ67を切断することが好ましくなる。なお、図2に示す最小媒体長さLPrnは、一例であり、排出口71とカッター65との距離、テープ67を搬送する搬送ローラ63の位置や数、排出口71の形状などに応じて適宜変更される値である。   The printer 50 discharges the printed tape 67 from the discharge port 71. In such a configuration, for example, when the tape 67 is cut with a length less than the length from the cutting position of the cutter 65 to the discharge port 71, the cut tape 67, that is, the tape 67 after printing is removed from the discharge port 71. There is a possibility that it will not be discharged and fall into the printer 50. In addition, for example, when the user pulls out the tape 67 cut by the cutter 65 from the outlet 71, it is necessary to make the tape 67 protrude from the outlet 71 by a certain amount as a part held by the hand. For this reason, in the printer 50 having such a configuration, for example, as shown in FIG. 2, a minimum medium length LPrn, which is a minimum length that allows the printer 50 to appropriately convey the tape 67 as a recording medium, can be defined. It is preferable to cut the tape 67 at a length equal to or longer than the minimum medium length LPrn. The minimum medium length LPrn shown in FIG. 2 is an example, and may be appropriately determined according to the distance between the discharge port 71 and the cutter 65, the position and number of the conveying rollers 63 that convey the tape 67, the shape of the discharge port 71, and the like. The value to be changed.

また、図1に戻り、CPU12は、メモリ14内のラベル作成プログラム26やOS32に従って処理を実行する。ラベル作成プログラム26は、画像を編集し、編集した画像を用いてプリンタ50によってラベルを作成するためのプログラムである。ラベル作成プログラム26は、処理モジュールとして、編集画面制御モジュール27、画像データ作成モジュール28、SDK(Software Development Kitの略)モジュール29を備えている。尚、ラベル作成プログラム26を、上記したように複数のプログラムの集合体で構成せず、単一のプログラムで構成しても良い。また、ラベル作成プログラム26は、編集した画像を、ラベルに印刷させるプログラムに限定されない。例えば、ラベル作成プログラム26は、編集した画像を、ロール紙等の他の長尺の記録媒体に印刷するように指示するプログラムでも良い。   Returning to FIG. 1, the CPU 12 executes processing according to the label creation program 26 and the OS 32 in the memory 14. The label creation program 26 is a program for editing an image and creating a label by the printer 50 using the edited image. The label creation program 26 includes an edit screen control module 27, an image data creation module 28, and an SDK (short for Software Development Kit) module 29 as processing modules. It should be noted that the label creation program 26 may be constituted by a single program instead of an aggregate of a plurality of programs as described above. Further, the label creation program 26 is not limited to a program for printing an edited image on a label. For example, the label creation program 26 may be a program that instructs the edited image to be printed on another long recording medium such as roll paper.

OS32は、ラベル作成プログラム26に利用される基本的な機能を提供するプログラムである。OS32は、例えば、Windows(登録商標)、MacOS(登録商標)、Linux(登録商標)、Android(登録商標)、iOS(登録商標)等のオペレーティングシステムである。なお、以下の説明では、ラベル作成プログラム26等を実行するCPU12のことを、単にプログラム名でも記載する場合がある。例えば、「ラベル作成プログラム26が」という記載は、「ラベル作成プログラム26を実行するCPU12が」ということを意味する場合がある。   The OS 32 is a program that provides basic functions used by the label creation program 26. The OS 32 is, for example, an operating system such as Windows (registered trademark), MacOS (registered trademark), Linux (registered trademark), Android (registered trademark), and iOS (registered trademark). In the following description, the CPU 12 that executes the label creation program 26 and the like may be described simply by the program name. For example, the description "the label creation program 26 is" may mean "the CPU 12 executing the label creation program 26".

図3は、各プログラムやデバイスの関係を概念的に示している。編集画面制御モジュール27は、例えば、ラベルの作成やラベルの編集を行うための編集画面をLCD16に表示するプログラムである。編集画面制御モジュール27は、例えば、OS32が提供するAPIによりOS32へ表示指示を実行し、OS32の表示プログラムを利用して表示処理を実行する。OS32は、編集画面制御モジュール27からの指示に応じてディスプレイI/F15を制御し、LCD16への表示を行う。編集画面制御モジュール27は、編集対象のラベルを示すオブジェクトを編集画面に表示するための画像データの作成を画像データ作成モジュール28に指示し、画像データ作成モジュール28から受け取った画像データに基づく画像をLCD16へ表示させる。ここでいうオブジェクトとは、ラベルを構成するテキスト、図形(直線や四角形など)、画像などである。   FIG. 3 conceptually shows the relationship between each program and each device. The edit screen control module 27 is, for example, a program that displays an edit screen for creating a label or editing a label on the LCD 16. The edit screen control module 27 executes a display instruction to the OS 32 by using, for example, an API provided by the OS 32, and executes a display process using a display program of the OS 32. The OS 32 controls the display I / F 15 in accordance with an instruction from the editing screen control module 27, and performs display on the LCD 16. The edit screen control module 27 instructs the image data creation module 28 to create image data for displaying an object indicating the label to be edited on the edit screen, and generates an image based on the image data received from the image data creation module 28. It is displayed on the LCD 16. The object referred to here is a text, a figure (such as a straight line or a rectangle), an image, or the like that forms a label.

編集画面制御モジュール27は、オブジェクトを編集する入力操作を入力I/F18で受け付け、LCD16への表示処理を行う。また、編集画面制御モジュール27は、編集画面で編集されたラベルをプリンタ50から印刷するための画像データの作成を画像データ作成モジュール28に指示する。編集画面制御モジュール27は、画像データ作成モジュール28が作成した画像データを画像データ作成モジュール28から受け取り、受け取った画像データと印刷指示とをSDKモジュール29に受け渡すことで、プリンタ50からラベルを印刷させる。   The edit screen control module 27 receives an input operation for editing an object at the input I / F 18 and performs display processing on the LCD 16. Further, the edit screen control module 27 instructs the image data creation module 28 to create image data for printing the label edited on the edit screen from the printer 50. The edit screen control module 27 receives the image data created by the image data creation module 28 from the image data creation module 28, and prints the label from the printer 50 by passing the received image data and the print instruction to the SDK module 29. Let it.

画像データ作成モジュール28は、ラベルを作成するための画像データの作成や編集を行うためのライブラリを備えており、画像データの作成、編集等を実行するプログラムである。画像データ作成モジュール28は、編集画面制御モジュール27からの指示に応じて、LCD16にラベルを表示するための画像データや、ラベルをプリンタ50で印刷するための画像データを作成する。   The image data creation module 28 includes a library for creating and editing image data for creating a label, and is a program that executes creation and editing of image data. The image data creation module 28 creates image data for displaying a label on the LCD 16 and image data for printing the label with the printer 50 according to an instruction from the edit screen control module 27.

SDKモジュール29は、通信I/F20を介してプリンタ50に印刷を実行させるためのプログラムである。SDKモジュール29は、例えば、ラベルをプリンタ50から印刷するための画像データと印刷指示とを編集画面制御モジュール27から受け取る。この印刷指示には、後述するユーザによって設定された末尾の余白を除去する指示情報(図5のS25)、最小記録媒体長さ(ユーザによる設定長さ)の指示情報(図5のS27)、スプリット印刷などにおける印刷の長さを揃える指示情報(図5のS33)などが含まれる。SDKモジュール29は、例えば、受け取った印刷指示に従って、印刷する画像データの生成や印刷範囲の設定を行う。SDKモジュール29は、生成した画像データについて設定した印刷範囲でラスタライズを実行し、印刷に用いられるラスタデータである印刷データを生成する。SDKモジュール29は、生成した印刷データを、プリンタ50に送信することで、プリンタ50に印刷を実行させる。SDKモジュール29は、例えば、OS32に指示することで、通信I/F20を介して印刷データを送信する。   The SDK module 29 is a program for causing the printer 50 to execute printing via the communication I / F 20. The SDK module 29 receives, for example, image data for printing a label from the printer 50 and a print instruction from the edit screen control module 27. The print instruction includes instruction information for removing the trailing margin set by the user (S25 in FIG. 5), instruction information on the minimum recording medium length (set length by the user) (S27 in FIG. 5), Instruction information (S33 in FIG. 5) for adjusting the print length in split printing or the like is included. The SDK module 29 generates, for example, image data to be printed and sets a print range according to the received print instruction. The SDK module 29 performs rasterization in the print range set for the generated image data, and generates print data that is raster data used for printing. The SDK module 29 causes the printer 50 to execute printing by transmitting the generated print data to the printer 50. The SDK module 29 transmits print data via the communication I / F 20, for example, by instructing the OS 32.

また、図1に示すメモリ14は、データ記憶領域34を備える。データ記憶領域34は、ラベル作成プログラム26等の実行に必要なデータなどを記憶する領域である。なお、メモリ14は、RAM、ROM、フラッシュメモリ、HDD、PC10に着脱されるUSBメモリ等の可搬記憶媒体、CPU12が備えるバッファなどが組み合わされて構成されている。また、メモリ14は、デバイスコンテキスト35を備える。デバイスコンテキスト35は、OS32がメモリ14に確保する領域であり、描画のための記憶領域である。デバイスコンテキスト35は、画像データ作成モジュール28によるオブジェクトの描画に用いられる描画領域を備える。   The memory 14 illustrated in FIG. 1 includes a data storage area 34. The data storage area 34 is an area for storing data necessary for executing the label creation program 26 and the like. The memory 14 is configured by combining a RAM, a ROM, a flash memory, an HDD, a portable storage medium such as a USB memory detachable from the PC 10, a buffer included in the CPU 12, and the like. Further, the memory 14 includes a device context 35. The device context 35 is an area secured in the memory 14 by the OS 32, and is a storage area for drawing. The device context 35 includes a drawing area used for drawing an object by the image data creation module 28.

また、メモリ14は、コンピュータが読み取り可能なストレージ媒体であってもよい。コンピュータが読み取り可能なストレージ媒体とは、non−transitoryな媒体である。non−transitoryな媒体には、上記の例の他に、CD−ROM、DVD−ROM等の記録媒体も含まれる。また、non−transitoryな媒体は、tangibleな媒体でもある。一方、インターネット上のサーバなどからダウンロードされるプログラムを搬送する電気信号は、コンピュータが読み取り可能な媒体の一種であるコンピュータが読み取り可能な信号媒体であるが、non−transitoryなコンピュータが読み取り可能なストレージ媒体には含まれない。   The memory 14 may be a computer-readable storage medium. The computer-readable storage medium is a non-transitory medium. Non-transitory media include recording media such as CD-ROMs and DVD-ROMs in addition to the above examples. Further, a non-transitory medium is also a tangible medium. On the other hand, an electric signal that carries a program downloaded from a server or the like on the Internet is a computer-readable signal medium that is a kind of computer-readable medium, but is a non-transitory computer-readable storage medium. Not included in the medium.

LCD16は、PC10の各種情報を表示する。LCD16は、ディスプレイI/F15を介してバス22に接続されている。LCD16は、ディスプレイI/F15を介して表示データを取得する。尚、本願のディスプレイは、液晶ディスプレイに限らず、有機ELディスプレイ等の他の表示方式のディスプレイでも良い。   The LCD 16 displays various information of the PC 10. The LCD 16 is connected to the bus 22 via the display I / F 15. The LCD 16 acquires display data via the display I / F 15. The display of the present application is not limited to a liquid crystal display, but may be a display of another display method such as an organic EL display.

入力I/F18は、キーボード、マウス等を含み、ユーザ操作を入力するためのインタフェースである。尚、入力I/F18は、キーボード等に限らず、LCD16の表示画面に重畳された膜状のタッチセンサでも良い。   The input I / F 18 is an interface for inputting a user operation, including a keyboard, a mouse, and the like. The input I / F 18 is not limited to a keyboard or the like, and may be a film-shaped touch sensor superimposed on a display screen of the LCD 16.

<印刷処理について>
次に、ラベル作成プログラム26が実行する印刷処理について説明する。図4は、編集画面制御モジュール27による印刷処理の手順を示している。編集画面制御モジュール27は、例えば、画像データを作成する編集画面上で印刷設定を行うための操作が行われると、印刷設定のポップアップ画面をLCD16に表示するとともに、図4に示す処理を開始する。編集画面制御モジュール27は、印刷設定を入力する入力欄や印刷の開始を指示する印刷ボタン等をポップアップ画面に表示する。
<About print processing>
Next, the printing process executed by the label creation program 26 will be described. FIG. 4 shows a procedure of a printing process by the edit screen control module 27. For example, when an operation for making print settings is performed on an edit screen for creating image data, the edit screen control module 27 displays a pop-up screen for print settings on the LCD 16 and starts the processing shown in FIG. . The edit screen control module 27 displays an input field for inputting print settings, a print button for instructing start of printing, and the like on a pop-up screen.

編集画面制御モジュール27は、図4の処理を開始すると、印刷ボタンが押されたか否かを判断する(S11)。編集画面制御モジュール27は、印刷ボタンが押されるまでS11の判断処理を繰り返し実行する(S11:NO)。編集画面制御モジュール27は、印刷ボタンが押されると(S11:YES)、プリンタ情報を初期化し(S13)、印刷ジョブ設定を初期化する(S15)。プリンタ情報とは、例えば、プリンタを識別するプリンタIDの情報である。印刷ジョブ設定とは、例えば、印刷する枚数の設定、印刷したテープ67(図2参照)をカッター65で切断するか否かの設定、複数の部数を印刷する際の印刷するページの順番を指示する丁合の設定などである。   When the processing of FIG. 4 is started, the edit screen control module 27 determines whether or not the print button has been pressed (S11). The edit screen control module 27 repeatedly executes the determination processing of S11 until the print button is pressed (S11: NO). When the print button is pressed (S11: YES), the edit screen control module 27 initializes the printer information (S13), and initializes the print job settings (S15). The printer information is, for example, printer ID information for identifying the printer. The print job setting includes, for example, setting of the number of prints, setting of whether or not the printed tape 67 (see FIG. 2) is cut by the cutter 65, and instructing the order of pages to be printed when printing a plurality of copies. This is the setting of collation to be performed.

次に、編集画面制御モジュール27は、ポップアップ画面で受け付けた印刷設定に基づいて、印刷を実行させるプリンタ50のプリンタ情報や印刷ジョブ設定を設定し、設定値に応じた印刷指示を生成する(S17)。この印刷指示は、上記したようにSDKモジュール29に対して印刷処理の内容を指示する情報であり、余白除去の指示情報などが含まれる。編集画面制御モジュール27は、印刷対象の画像データと、生成した印刷指示とをSDKモジュール29に受け渡し、SDKモジュール29による印刷処理(図4中のSDK処理)をSDKモジュール29に開始させる(S19)。   Next, the edit screen control module 27 sets the printer information and the print job settings of the printer 50 to execute printing based on the print settings received on the pop-up screen, and generates a print instruction according to the set values (S17). ). The print instruction is information for instructing the SDK module 29 on the content of the print processing as described above, and includes information for instructing margin removal. The edit screen control module 27 transfers the image data to be printed and the generated print instruction to the SDK module 29, and causes the SDK module 29 to start a print process (SDK process in FIG. 4) by the SDK module 29 (S19). .

<SDK処理>
図5及び図6は、SDK処理の内容を示している。SDKモジュール29は、図4のS19において、印刷対象の画像データと、印刷指示とを編集画面制御モジュール27から受け取ると、図5及び図6のSDK処理を開始する。
<SDK processing>
5 and 6 show the contents of the SDK process. Upon receiving the image data to be printed and the print instruction from the edit screen control module 27 in S19 in FIG. 4, the SDK module 29 starts the SDK processing in FIGS.

ここで、本実施形態のSDKモジュール29は、編集画面制御モジュール27から受け取った画像データについて有効な画素の位置に基づいて画像データの長さを特定し、特定した長さに基づいて画像データの後端側の余白を除去可能となっている。編集画面制御モジュール27は、この後端側の余白を除去するか否かの設定(以下、末尾余白除去設定という場合がある)を、例えば、印刷設定のポップアップ画面において受け付け印刷指示としてSDKモジュール29へ受け渡す。SDKモジュール29は、編集画面制御モジュール27から受け取った印刷指示に基づいて、末尾余白除去設定が設定されているか否かを判断できる。   Here, the SDK module 29 of the present embodiment specifies the length of the image data based on the positions of the valid pixels for the image data received from the edit screen control module 27, and based on the specified length, The margin on the rear end side can be removed. The edit screen control module 27 accepts a setting as to whether or not to remove the margin on the rear end side (hereinafter, may be referred to as a tail margin removal setting) on, for example, a pop-up screen of a print setting as an SDK module 29 as a print instruction. Hand over to The SDK module 29 can determine whether or not the tail margin removal setting is set based on the print instruction received from the edit screen control module 27.

また、本実施形態のラベル作成プログラム26は、末尾余白除去設定と同様に、印刷設定において印刷する画像データの長さをユーザが設定可能となっている。SDKモジュール29は、ユーザによって設定された長さ(以下、設定長さLUsrという場合がある)を、他の長さ等と比較して画像データにおける印刷範囲を変更する。また、本実施形態のラベル作成プログラム26は、末尾余白除去設定と同様に、スプリット印刷の実行の有無や実行時に長さを揃えるか否かの設定を印刷設定において設定可能となっている。以下の説明では、一例として、末尾余白除去設定が設定され、設定長さLUsr及び長さを揃える設定(以下、揃え設定という場合がある)が設定されていない場合(以下、ケース1という)について説明する。   Further, the label creation program 26 of the present embodiment allows the user to set the length of the image data to be printed in the print settings, similarly to the tail margin removal setting. The SDK module 29 compares the length set by the user (hereinafter, sometimes referred to as a set length LUsr) with another length or the like to change the print range in the image data. In addition, the label creation program 26 of the present embodiment can set whether or not to execute split printing and whether or not to make the lengths equal at the time of execution of split printing in the print setting, similarly to the tail margin removal setting. In the following description, as an example, a case where a tail margin removal setting is set and a setting length LUsr and a setting for aligning the length (hereinafter, also referred to as an alignment setting) are not set (hereinafter, referred to as case 1). explain.

まず、SDKモジュール29は、SDK印刷処理を開始すると、印刷に用いる記録媒体が、長さが決められた記録媒体であるか否かを判断する(S21)。例えば、シール状の記録媒体を剥離可能なダイカットテープは、剥離される記録媒体の長さが予め規定されている。このため、このような搬送方向69(図2参照)における印刷する範囲の長さが決められた記録媒体では、後述する画像データの余白を除去し、印刷する画像の長さを変更したとしても印刷後の記録媒体の物理的な長さが変わらない。このため、本実施形態のSDKモジュール29では、印刷に用いる記録媒体がダイカットテープ等の印刷する長さが決められた記録媒体である場合、編集画面制御モジュール27から受け取った画像データをそのままラスタデータに変換して印刷する。   First, when the SDK printing process is started, the SDK module 29 determines whether or not a recording medium used for printing is a recording medium having a determined length (S21). For example, in a die-cut tape from which a sealing recording medium can be peeled, the length of the recording medium to be peeled is defined in advance. Therefore, in such a recording medium in which the length of the printing range in the transport direction 69 (see FIG. 2) is determined, even if the blank of the image data described later is removed and the length of the image to be printed is changed. The physical length of the recording medium after printing does not change. For this reason, in the SDK module 29 of the present embodiment, when the recording medium used for printing is a recording medium having a predetermined printing length such as a die-cut tape, the image data received from the edit screen control module 27 is directly converted to raster data. Convert to and print.

印刷範囲の長さが決められた記録媒体であるか否かの判断方法は、特に限定されない。例えば、編集画面制御モジュール27は、印刷設定のポップアップ画面においてプリンタ50で使用する記録媒体の情報を受け付けると、受け付けた記録媒体の情報を印刷指示に含めてSDKモジュール29に受け渡す。これにより、SDKモジュール29は、記録媒体の種類、即ち、S21の判断を印刷指示の内容に基づいて判断できる。あるいは、SDKモジュール29は、プリンタ50へ問い合わせを実行して、プリンタ50に装着されたテープロール68やテープ67(図2参照)の情報を取得し、取得した情報に基づいてS21の判断を実行しても良い。また、SDKモジュール29は、編集画面制御モジュール27の印刷指示と、プリンタ50から取得した情報との一致を判断し、一致した場合にS21を肯定判定(S21:YES)しても良い。この場合、SDKモジュール29は、情報が一致しないことに応じてエラーを報知しても良い。   The method of determining whether or not the print medium is a recording medium having a determined length is not particularly limited. For example, when the edit screen control module 27 receives the information of the recording medium used by the printer 50 on the print setting pop-up screen, the edit screen control module 27 includes the received information of the recording medium in the print instruction and passes it to the SDK module 29. Accordingly, the SDK module 29 can determine the type of the recording medium, that is, the determination in S21 based on the content of the print instruction. Alternatively, the SDK module 29 executes an inquiry to the printer 50 to obtain information on the tape roll 68 and the tape 67 (see FIG. 2) attached to the printer 50, and executes the determination in S21 based on the obtained information. You may. In addition, the SDK module 29 may determine whether the print instruction of the edit screen control module 27 matches the information acquired from the printer 50, and if they match, may make an affirmative determination in S21 (S21: YES). In this case, the SDK module 29 may report an error when the information does not match.

S21において、SDKモジュール29は、印刷に用いる記録媒体が、長さが決められた記録媒体であると判断すると(S21:YES)、編集画面制御モジュール27から受け取った画像データをそのままラスタデータに変換し、変換したラスタデータを印刷データとしてプリンタ50へ送信する(S23)。これにより、印刷範囲の長さが決められた記録媒体については、印刷対象の画像データをそのまま印刷することができる。SDKモジュール29は、図5及び図6に示すSDK処理を終了し、編集画面制御モジュール27は図4に示す印刷処理を終了する。   In S21, if the SDK module 29 determines that the recording medium used for printing is a recording medium having a determined length (S21: YES), the SDK module 29 converts the image data received from the edit screen control module 27 into raster data as it is. Then, the converted raster data is transmitted to the printer 50 as print data (S23). As a result, the image data to be printed can be printed as it is on the recording medium in which the length of the print range is determined. The SDK module 29 ends the SDK processing shown in FIGS. 5 and 6, and the edit screen control module 27 ends the printing processing shown in FIG.

なお、後述するように、本実施形態のSDKモジュール29は、搬送方向69に沿って画像データを分割して印刷するスプリット印刷が可能となっている(図13、図14参照)。このため、スプリット印刷を実行する設定がされた場合、分割した画像分だけラスタライズを実行し、各ラスタデータをプリンタ50へ送信する(S23)。また、本実施形態のプリンタ50は、テープ67に画像を印刷するラベルプリンタである。しかしながら、上記した長さが決められた記録媒体に応じた処理は、ロール紙やA4紙等の記録媒体に印刷を実行するインクジェットプリンタ等においても同様に実行できる。例えば、A4紙等の搬送方向69の長さが決められた記録媒体に印刷を実行する場合は、S23のようにそのままラスタライズする処理を実行し、長尺のロール紙に対して印刷を実行する場合は、後述するS25以降の処理を実行する。これにより、A4紙等の長さが決められた記録媒体についても、適切な印刷処理を実行できる。   As will be described later, the SDK module 29 of the present embodiment can perform split printing in which image data is divided and printed along the transport direction 69 (see FIGS. 13 and 14). For this reason, when the setting to execute the split printing is made, the rasterizing is executed only for the divided image, and each raster data is transmitted to the printer 50 (S23). Further, the printer 50 of the present embodiment is a label printer that prints an image on the tape 67. However, the above-described processing according to the recording medium having the determined length can be similarly executed in an inkjet printer or the like that executes printing on a recording medium such as roll paper or A4 paper. For example, when printing is performed on a recording medium such as A4 paper whose length in the transport direction 69 is determined, the rasterizing process is performed as it is, as in S23, and printing is performed on long roll paper. In such a case, the process from S25 onward described later is executed. As a result, an appropriate printing process can be performed even on a recording medium having a determined length such as A4 paper.

また、S21において、SDKモジュール29は、印刷に用いる記録媒体が、長さが決められた記録媒体でないと判断すると(S21:NO)、印刷指示に基づいて末尾余白除去設定が有効であるか否かを判断する(S25)。SDKモジュール29は、末尾余白除去設定が設定されている(有効である)と判断すると(S25:YES)、S27を実行し、有効でないと判断すると(S25:NO)、S41を実行する。今回は、末尾余白除去設定が設定されているため(S25:YES)、SDKモジュール29は、S27を実行する。   In S21, if the SDK module 29 determines that the recording medium used for printing is not a recording medium having a determined length (S21: NO), the SDK module 29 determines whether the trailing margin removal setting is valid based on the print instruction. Is determined (S25). If the SDK module 29 determines that the trailing margin removal setting is set (valid) (S25: YES), the SDK module 29 executes S27. If it determines that it is not valid (S25: NO), it executes S41. This time, since the trailing margin removal setting is set (S25: YES), the SDK module 29 executes S27.

S27において、SDKモジュール29は、ユーザによる設定長さが設定されたか否かを判断する。SDKモジュール29は、印刷指示に基づいて設定長さLUsrが設定されていると判断すると(S27:YES)、S29を実行し、設定されていないと判断すると(S27:NO)、S31を実行する。今回は、設定長さLUsrが設定されていないため、SDKモジュール29は、S31を実行する。   In S27, the SDK module 29 determines whether or not the length set by the user has been set. If the SDK module 29 determines that the set length LUsr has been set based on the print instruction (S27: YES), it executes S29. If it determines that it has not been set (S27: NO), it executes S31. . This time, since the set length LUsr has not been set, the SDK module 29 executes S31.

S31において、SDKモジュール29は、基準最小長さLThrとして最小媒体長さLPrn(図2参照)を設定し、設定した後、S33を実行する。基準最小長さLThrは、後述する図6のS55で印刷範囲を判断するのに用いられる値である。SDKモジュール29は、S33において、揃え設定が設定されている(有効である)か否かを判断する。SDKモジュール29は、印刷指示に基づいて揃え設定が設定されていると判断すると(S33:YES)、S35を実行し、設定されていないと判断すると(S33:NO)、S41以降を実行する。今回は、揃え設定が設定されていないため、SDKモジュール29は、S41を実行する。なお、SDKモジュール29は、スプリット印刷が設定された場合や複数の画像の印刷をまとめて受け付けた場合、S41〜図6のS67までの処理を、印刷する画像分(スプリット印刷の場合は分割した画像分)だけ繰り返し実行する。スプリット印刷や複数の画像の印刷の処理については、後述する。   In S31, the SDK module 29 sets the minimum medium length LPrn (see FIG. 2) as the reference minimum length LThr, and after that, executes S33. The reference minimum length LThr is a value used to determine a print range in S55 of FIG. 6 described below. In step S33, the SDK module 29 determines whether the alignment setting is set (valid). If the SDK module 29 determines that the alignment setting is set based on the print instruction (S33: YES), it executes S35, and if it determines that it is not set (S33: NO), it executes S41 and subsequent steps. In this case, since the alignment setting has not been set, the SDK module 29 executes S41. When split printing is set or when printing of a plurality of images is received collectively, the SDK module 29 performs the processing from S41 to S67 in FIG. 6 for the image to be printed (in the case of split printing, Repeat for the number of images). Processing for split printing and printing of a plurality of images will be described later.

SDKモジュール29は、S41において、印刷対象の画像データを読み込む処理を行う。例えば、編集画面制御モジュール27は、SDK処理を開始する際に、印刷対象の画像データをメモリ14に一時的に記憶させる。SDKモジュール29は、S41においてメモリ14から画像データを読み込むことで、画像データの受け渡しを実行する。SDKモジュール29は、画像データを読み込んだ後、読み込みに成功したか否かを判断する(図6のS43)。   In S41, the SDK module 29 performs a process of reading image data to be printed. For example, the editing screen control module 27 temporarily stores the image data to be printed in the memory 14 when starting the SDK processing. The SDK module 29 executes the transfer of the image data by reading the image data from the memory 14 in S41. After reading the image data, the SDK module 29 determines whether the reading was successful (S43 in FIG. 6).

図6に示すように、SDKモジュール29は、画像データの読み込みに成功すると(S43:YES)、S45を実行し、読み込みに失敗するとS47を実行する。S47において、SDKモジュール29は、読み込みに失敗したことをLCD16等に報知する印刷エラー処理を実行し、図5及び図6に示すSDK処理を終了する。なお、SDKモジュール29は、例えば、スプリット印刷の場合など、複数の印刷対象の画像データがある場合、読み込みに失敗した画像データの印刷のみを中止し、S41から処理を再開し他の画像データについての印刷を試みても良い。即ち、一つの画像データの読み込みの失敗に合わせて他の画像データの印刷を中止しなくとも良い。   As shown in FIG. 6, when the reading of the image data is successful (S43: YES), the SDK module 29 executes S45, and when the reading fails, executes S47. In S47, the SDK module 29 executes a print error process for notifying the LCD 16 or the like that the reading has failed, and ends the SDK process shown in FIGS. If there are a plurality of image data to be printed, for example, in the case of split printing, the SDK module 29 stops printing only the image data that failed to be read, resumes the processing from S41, and executes processing for other image data. May be attempted. That is, the printing of other image data does not have to be stopped in accordance with the failure in reading one image data.

また、S45において、SDKモジュール29は、印刷指示に含まれる印刷設定に応じた処理等を実行する。例えば、SDKモジュール29は、印刷設定された倍率に応じて画像データを拡大又は縮小する。あるいは、プリンタ50が白黒印刷のみに対応している場合、SDKモジュール29は、カラーの画像データを白黒の画像データに変換する二値化処理を実行しても良い。   In step S45, the SDK module 29 executes a process according to the print setting included in the print instruction. For example, the SDK module 29 enlarges or reduces the image data according to the magnification set for printing. Alternatively, when the printer 50 supports only monochrome printing, the SDK module 29 may execute a binarization process for converting color image data into monochrome image data.

次に、SDKモジュール29は、印刷画像の長さLOrgを記憶する(S49)。図8は、印刷対象の画像データの状態を示している。図8の一番上の表示画像73は、編集画面制御モジュール27によってLCD16に表示された状態を示している。図8の真ん中の画像データ75は、編集画面制御モジュール27からSDKモジュール29へ受け渡された際の画像データ、即ち、SDK処理を開始した際の画像データを示している。また、表示画像73及び画像データ75の副走査方向は、例えば、テープ67の搬送方向69(図2参照)に沿った方向である。主走査方向は、搬送方向69に直交する方向である。なお、副走査方向は、搬送方向69と所定の角度をなす方向でも良い。   Next, the SDK module 29 stores the length Lorg of the print image (S49). FIG. 8 shows a state of image data to be printed. A display image 73 at the top of FIG. 8 shows a state displayed on the LCD 16 by the edit screen control module 27. The image data 75 in the middle of FIG. 8 indicates the image data at the time of being transferred from the edit screen control module 27 to the SDK module 29, that is, the image data at the time of starting the SDK processing. The sub-scanning direction of the display image 73 and the image data 75 is, for example, a direction along the transport direction 69 of the tape 67 (see FIG. 2). The main scanning direction is a direction orthogonal to the transport direction 69. The sub-scanning direction may be a direction that forms a predetermined angle with the transport direction 69.

表示画像73は、例えば、プリンタ50の構造上の制限で発生する物理的なマージン77が付加されている。マージン77は、副走査方向における表示画像73の両側に、所定の幅で付加されている。ユーザは、このように表示された表示画像73を見ながら、例えば、「TEXT」の文字を入力し印刷指示を行う。画像データ75に示すように、SDKモジュール29は、マージン77を取り除いた状態、即ち、ユーザが入力した文字等から開始されるデータを受け取る。SDKモジュール29は、この画像データ75に対しS45において画像処理(拡縮処理等)を実行した後、副走査方向における長さを、長さLOrgとして取得する。なお、図8は、図面が煩雑となるのを避けるため、マージン77を除いた表示画像73と画像データ75を同一長さで図示しているが、拡縮処理の内容によっては、マージン77を除いた表示画像73と画像データ75とは同一長さとはならない。   The display image 73 is provided with a physical margin 77 generated due to, for example, a structural limitation of the printer 50. The margin 77 is added at a predetermined width to both sides of the display image 73 in the sub-scanning direction. The user inputs, for example, the letters “TEXT” and gives a print instruction while viewing the display image 73 displayed in this manner. As shown in the image data 75, the SDK module 29 receives data in a state where the margin 77 has been removed, that is, data starting from characters or the like input by the user. After executing the image processing (enlargement / reduction processing or the like) on the image data 75 in S45, the SDK module 29 acquires the length in the sub-scanning direction as the length LOrg. Although FIG. 8 shows the display image 73 and the image data 75 with the same length except for the margin 77 in order to avoid complicating the drawing, the margin 77 may be omitted depending on the content of the scaling processing. The displayed image 73 and the image data 75 do not have the same length.

SDKモジュール29は、例えば、S45を実行した後の画像データ75の副走査方向における画素数に基づいて印刷画像の長さLOrgを取得する。SDKモジュール29は、取得した長さLOrgをメモリ14に記憶し(S49)、S51を実行する。S51において、SDKモジュール29は、再度、末尾余白除去設定が有効であるか否かを判断し、有効であれば(S51:YES)、S53を実行し、有効でないと判断すると(S51:NO)、S57を実行する。   The SDK module 29 acquires the length LOrg of the print image based on the number of pixels in the sub-scanning direction of the image data 75 after executing S45, for example. The SDK module 29 stores the acquired length LOrg in the memory 14 (S49), and executes S51. In S51, the SDK module 29 determines again whether the trailing margin removal setting is valid (S51: YES), executes S53 if it is valid, and determines that it is not valid (S51: NO). , S57.

今回は末尾余白除去設定が有効であるため、SDKモジュール29は、S53において、画像データ75の先端79(図8参照)から最も遠い有効画素までの画像長さLEndを求める。SDKモジュール29は、図8の下方に向けた矢印で示すライン81のように、主走査方向に沿ってライン81ごとにラスタスキャンを実行し、有効な画素が存在するラインを特定する。SDKモジュール29は、例えば、画像データ75に含まれる複数の画素について、有色であれば有効画素と判断し、無色(白色)であれば有効な画素でないと判断する。SDKモジュール29は、例えば、副走査方向における画像データ75の後端80に最も近い有効画素が含まれるライン81Aを、先端79から最も遠い有効画素の位置として特定し、先端79からライン81Aまでの距離を画像長さLEndとして特定する。なお、画像長さLEndの特定方法は、上記した方法に限らず、例えば、後端80からラスタスキャンして最初に有効画素を検出したライン81を、ライン81Aとして特定しても良い。   Since the trailing margin removal setting is effective this time, the SDK module 29 obtains the image length LEnd from the leading end 79 (see FIG. 8) of the image data 75 to the farthest effective pixel in S53. The SDK module 29 performs a raster scan for each line 81 in the main scanning direction, as indicated by a line 81 indicated by an arrow pointing downward in FIG. 8, and specifies a line where valid pixels exist. For example, the SDK module 29 determines that a plurality of pixels included in the image data 75 are valid pixels if they are colored, and determines that they are not valid pixels if they are colorless (white). The SDK module 29 specifies, for example, a line 81A including an effective pixel closest to the rear end 80 of the image data 75 in the sub-scanning direction as a position of an effective pixel farthest from the front end 79, and specifies a line from the front end 79 to the line 81A. The distance is specified as the image length LEnd. The method for specifying the image length LEnd is not limited to the above-described method. For example, the line 81 on which the effective pixel is first detected by raster scanning from the rear end 80 may be specified as the line 81A.

次に、SDKモジュール29は、S55において、画像長さLEndと、S31で設定した基準最小長さLThrとを比較し、より長い値を印刷画像長さLENPrtとして設定する。なお、図5〜図7中のmax(A,B)の記載は、AとBのうち、長い方の値を選択することを示している。今回は、設定長さLUsrが設定されていないため(図5のS27:NO)、基準最小長さLThrとして最小媒体長さLPrnが設定されている。また、図8に示す例では、「TEXT」の4つの文字の画像長さLEndが、最小媒体長さLPrnよりも長くなっている。このため、S55において、SDKモジュール29は、印刷画像長さLENPrtとして画像長さLEndを設定する。   Next, in S55, the SDK module 29 compares the image length LEnd with the reference minimum length LThr set in S31, and sets a longer value as the print image length LENPrt. Note that the description of max (A, B) in FIGS. 5 to 7 indicates that the longer one of A and B is selected. In this case, since the set length LUsr is not set (S27: NO in FIG. 5), the minimum medium length LPrn is set as the reference minimum length LThr. In the example shown in FIG. 8, the image length LEnd of the four characters “TEXT” is longer than the minimum medium length LPrn. Therefore, in S55, the SDK module 29 sets the image length LEnd as the print image length LENPrt.

次に、SDKモジュール29は、印刷画像長さLENPrtが最小媒体長さLPrn以上であるか否かを判断する(S59)。SDKモジュール29は、印刷画像長さLENPrtが最小媒体長さLPrn以上であると判断すると(S59:YES)、S61を実行し、長くないと判断するとS63を実行する。上記したように、印刷画像長さLENPrtに画像長さLEndを設定し、図8に示す例では最小媒体長さLPrnに比べて画像長さLEndが長いため(S59:YES)、SDKモジュール29は、S61を実行する。   Next, the SDK module 29 determines whether or not the print image length LENPrt is equal to or longer than the minimum medium length LPrn (S59). If the SDK module 29 determines that the print image length LENPrt is greater than or equal to the minimum medium length LPrn (S59: YES), the SDK module 29 executes S61, and if not, executes S63. As described above, the image length LEnd is set to the print image length LENPrt. In the example shown in FIG. 8, since the image length LEnd is longer than the minimum medium length LPrn (S59: YES), the SDK module 29 , S61.

S61において、SDKモジュール29は、画像データ75の先端79から印刷画像長さLENPrt、即ち、画像長さLEndまでをラスタデータに変換する。SDKモジュール29は、変換したラスタデータを印刷データとしてプリンタ50へ送信し、プリンタ50にラスタデータの印刷を実行させる(S65)。次に、S67において、SDKモジュール29は、全ての印刷画像について処理を完了したか否かを判断する。SDKモジュール29は、全ての印刷画像について処理を完了したと判断した場合(S67:YES)は、SDK処理を終了し、全ての印刷画像について処理を完了していない場合(S67:NO)は、次の未処理の印刷画像について、図5のS41からの処理を再度実行する。今回は、スプリット印刷が設定されていないため、SDKモジュール29は、図5のS41からの処理を再度実行せず、SDK処理を終了する。   In S61, the SDK module 29 converts the portion from the leading end 79 of the image data 75 to the print image length LENPrt, that is, the image length LEnd, into raster data. The SDK module 29 transmits the converted raster data to the printer 50 as print data, and causes the printer 50 to print the raster data (S65). Next, in S67, the SDK module 29 determines whether or not processing has been completed for all print images. If the SDK module 29 determines that the processing has been completed for all print images (S67: YES), the SDK module 29 ends the SDK processing, and if the processing has not been completed for all print images (S67: NO), The processing from S41 in FIG. 5 is executed again for the next unprocessed print image. In this case, since split printing is not set, the SDK module 29 does not execute the processing from S41 in FIG. 5 again, and ends the SDK processing.

ここで、図8の一番下の図に示すように、SDKモジュール29は、画像データ75の先端79、即ち、印刷の開始位置から画像長さLEndまで画像データ75Aをラスタデータに変換する。例えば、図8に示すように、画像データ75には、「TEXT」の文字の後に(後端80側に)、余白領域83が設定されている。この余白領域83は、空白文字や、ユーザによって設定された余白などの有効画素でない画素が設定された領域である。この余白領域83を、そのまま印刷すると、テープ67が不必要に消費されることとなる。これに対し、本実施形態のSDKモジュール29は、末尾余白除去設定が有効な場合、上記したS53、S55、S61、S65を実行することで、印刷する範囲を有効画素の範囲に絞り、余白領域83を除去して印刷する。これにより、テープ67の過剰な消費を抑制できる。また、SDKモジュール29は、S59の判断処理を実行することで最小媒体長さLPrnを最低限確保して印刷する。これにより、プリンタ50によって印刷後のテープ67を適切に搬送させることができる。   Here, as shown in the lowermost part of FIG. 8, the SDK module 29 converts the image data 75A into raster data from the leading end 79 of the image data 75, that is, from the print start position to the image length LEnd. For example, as shown in FIG. 8, a blank area 83 is set in the image data 75 after the character “TEXT” (toward the rear end 80). The margin area 83 is an area in which pixels that are not effective pixels, such as blank characters and a margin set by the user, are set. If the margin area 83 is printed as it is, the tape 67 is unnecessarily consumed. On the other hand, when the trailing margin removal setting is valid, the SDK module 29 of the present embodiment executes the above-described steps S53, S55, S61, and S65 to narrow the printing range to the range of the effective pixels, Remove 83 and print. Thereby, excessive consumption of the tape 67 can be suppressed. Further, the SDK module 29 executes the determination processing of S59 to secure the minimum medium length LPrn to a minimum and print. This allows the printer 50 to appropriately convey the tape 67 after printing.

また、本実施形態のSDKモジュール29は、S53において、画像データ75の先端79側の余白幅と、後端80側の余白幅とを同一にする処理を実行する。図9は、先端79側に余白85が入力された場合の画像データ75を示している。図9に示すように、画像データ75には、「TEXT」の文字の前に余白85が入力されている。副走査方向における画像データ75の先端79から有効画素が存在する先端のライン81Bの位置までの余白幅87は、余白85の幅、即ち、空白文字の数や設定された余白サイズに応じた大きさとなる。   In step S53, the SDK module 29 of the present embodiment executes a process of making the margin width on the leading end 79 side of the image data 75 equal to the margin width on the trailing end 80 side. FIG. 9 shows image data 75 when a margin 85 is input to the tip 79 side. As shown in FIG. 9, in the image data 75, a margin 85 is input before the character “TEXT”. The margin width 87 from the leading end 79 of the image data 75 in the sub-scanning direction to the position of the leading end line 81B where the effective pixel exists is the width of the margin 85, that is, a size corresponding to the number of blank characters and the set margin size. It will be.

この場合、SDKモジュール29は、S53において、後端80側の有効画素が存在するライン81Aの位置について、先端79側の余白幅87を付加する位置の調整を行う。SDKモジュール29は、ライン81Aの位置を余白幅87分だけ後端80側へずらす処理を実行する。そして、SDKモジュール29は、後端80側の余白85Aを含む画像長さLEndを、画像長さとして特定する。これにより、SDKモジュール29は、先端79に余白幅87が設定され、後端に余白85Aが設定された画像データ75Aをラスタデータに変換することとなる。   In this case, in step S53, the SDK module 29 adjusts the position of the margin 81 on the leading end 79 side with respect to the position of the line 81A where the effective pixels on the rear end 80 side exist. The SDK module 29 executes processing for shifting the position of the line 81A toward the rear end 80 by the margin width 87. Then, the SDK module 29 specifies the image length LEnd including the margin 85A on the rear end 80 side as the image length. Thus, the SDK module 29 converts the image data 75A in which the margin 79 is set at the leading end 79 and the margin 85A is set at the trailing end into raster data.

仮に調整を行わず、後端80側の余白を、調整前のライン81Aの位置、即ち、最後の文字「T」の有効画素のライン81Aの位置に基づいて除去すると、SDKモジュール29は、画像長さLEnd2を画像長さとして特定する。この場合、先端79側にのみ余白85が存在し、印刷画像が後端80側に寄った印刷結果となる。これに対し、SDKモジュール29は、後端80側に余白85Aを付加することで、印刷結果のバランスを良くすることができる。   If the adjustment is not performed and the margin on the rear end 80 side is removed based on the position of the line 81A before the adjustment, that is, the position of the line 81A of the effective pixel of the last character “T”, the SDK module 29 The length LEnd2 is specified as the image length. In this case, the margin 85 exists only on the front end 79 side, and the print image is a print result shifted to the rear end 80 side. On the other hand, the SDK module 29 can improve the balance of the printing result by adding a margin 85A to the rear end 80 side.

<末尾余白除去設定を設定しない場合>
次に、末尾余白除去設定を設定しない場合(以下、ケース2という)について説明する。なお、以下の説明では、上記したケース1の説明と同様の内容についてはその説明を適宜省略する。ケース2の場合、SDKモジュール29は、図5のS25で否定判定し(S25:NO)、図6のS51においても否定判定する(S51:NO)。SDKモジュール29は、印刷する範囲である印刷画像長さLENPrtとして、画像データ75の画像の長さLOrgを設定する(S57)。
<When the trailing margin removal setting is not set>
Next, a case where the tail margin removal setting is not set (hereinafter, referred to as case 2) will be described. In the following description, the description of the same contents as in the case 1 described above will be appropriately omitted. In case 2, the SDK module 29 makes a negative determination in S25 of FIG. 5 (S25: NO), and also makes a negative determination in S51 of FIG. 6 (S51: NO). The SDK module 29 sets the image length LOrg of the image data 75 as the print image length LENPrt which is the range to be printed (S57).

次に、S59において、SDKモジュール29は、印刷画像長さLENPrt(この場合、長さLOrg)が最小媒体長さLPrn以上であると判断すると(S59:YES)、長さLOrgに基づいて印刷する、即ち、ユーザによって作成、印刷設定されたままの画像データ75を印刷する(S61、S65)。一方、SDKモジュール29は、印刷画像長さLENPrtが最小媒体長さLPrnよりも短いと判断すると(S59:NO)、印刷エラーを報知する(S63)。従って、SDKモジュール29は、ユーザによって作成、印刷設定された印刷画像の長さLOrgが最小媒体長さLPrnよりも短い場合に、エラーをLCD16等に報知する。SDKモジュール29は、図5及び図6に示すSDK処理を終了する。これにより、最小媒体長さLPrnよりも短い長さの画像が印刷されることを抑制し、切断されたテープ67のプリンタ50内への落下や、切断されたテープ67の詰まり等を抑制できる。   Next, in S59, when the SDK module 29 determines that the print image length LENPrt (in this case, the length LOrg) is equal to or more than the minimum medium length LPrn (S59: YES), printing is performed based on the length LOrg. That is, the image data 75 created and printed by the user is printed (S61, S65). On the other hand, when the SDK module 29 determines that the print image length LENPrt is shorter than the minimum medium length LPrn (S59: NO), it notifies a print error (S63). Therefore, the SDK module 29 reports an error to the LCD 16 or the like when the length Lorg of the print image created and set by the user is shorter than the minimum medium length LPrn. The SDK module 29 ends the SDK processing shown in FIGS. Accordingly, it is possible to suppress printing of an image having a length shorter than the minimum medium length LPrn, and to prevent the cut tape 67 from dropping into the printer 50 or to prevent the cut tape 67 from being jammed.

なお、SDKモジュール29は、S63において印刷画像長さLENPrtに最小媒体長さLPrnを設定して印刷を実行しても良い。即ち、SDKモジュール29は、印刷画像長さLENPrtが最小媒体長さLPrnより短い場合に、画像データ75における最小媒体長さLPrnの範囲をラスタデータに変換して印刷を実行しても良い(S63)。これにより、印刷画像長さLENPrtが最小媒体長さLPrnより短い場合にも、最小媒体長さLPrnでプリンタ50に適切に印刷を実行させることができる。また、S63において、SDKモジュール29は、スプリット印刷などの複数の印刷対象の画像データがある場合、印刷画像長さLENPrtが最小媒体長さLPrnより短い画像データ75の印刷のみを中止し、S41から処理を再開しても良い。   Note that the SDK module 29 may set the minimum image length LPrn to the print image length LENPrt in S63 and execute printing. That is, when the print image length LENPrt is shorter than the minimum medium length LPrn, the SDK module 29 may convert the range of the minimum medium length LPrn in the image data 75 into raster data and execute printing (S63). ). Thus, even when the print image length LENPrt is shorter than the minimum medium length LPrn, it is possible to cause the printer 50 to appropriately execute printing with the minimum medium length LPrn. In step S63, if there is a plurality of image data to be printed such as split printing, the SDK module 29 stops printing only the image data 75 whose print image length LENPrt is shorter than the minimum medium length LPrn. The processing may be restarted.

<画像長さLEndが最小媒体長さLPrnより短い場合>
次に、末尾余白除去設定が設定され、設定長さLUsr及び揃え設定が設定されておらず、且つ、画像長さLEndが最小媒体長さLPrnより短い場合(以下、ケース3という)について説明する。ケース3の場合、SDKモジュール29は、上記したケース1と同様に、S21〜S51までを実行し、S53を実行する。
<When the image length LEnd is shorter than the minimum medium length LPrn>
Next, a case where the tail margin removal setting is set, the set length LUsr and the alignment setting are not set, and the image length LEnd is shorter than the minimum medium length LPrn (hereinafter, referred to as Case 3) will be described. . In case 3, the SDK module 29 executes steps S21 to S51 and executes step S53, as in case 1 described above.

図10は、画像長さLEndが最小媒体長さLPrnより短い場合を図示している。図10に示すように、例えば、「A」の一文字だけが入力された画像データ75では、S53のラスタスキャンによって特定された画像長さLEndが最小媒体長さLPrnに比べて短くなる可能性がある。この場合、次のS55において、SDKモジュール29は、画像長さLEndと、基準最小長さLThr(図5のS31で設定した最小媒体長さLPrn)とを比較し、より長い基準最小長さLThrを印刷画像長さLENPrtとして設定する。そして、SDKモジュール29は、S59で肯定判定をし(S59:YES)、S61以降の印刷処理を実行する。図10に示すように、SDKモジュール29は、先端79から最小媒体長さLPrnまでの画像データ75Aをラスタデータに変換することで、最小媒体長さLPrnを確保して印刷を実行することができる。これにより、文字等の入力が少なく、特定した画像長さLEndが最小媒体長さLPrnより短い場合でもプリンタ50に適切に印刷を実行させることができる。   FIG. 10 illustrates a case where the image length LEnd is shorter than the minimum medium length LPrn. As shown in FIG. 10, for example, in the image data 75 in which only one character of “A” is input, there is a possibility that the image length LEnd specified by the raster scan in S53 is shorter than the minimum medium length LPrn. is there. In this case, in the next S55, the SDK module 29 compares the image length LEnd with the reference minimum length LThr (the minimum medium length LPrn set in S31 of FIG. 5), and determines a longer reference minimum length LThr. Is set as the print image length LENPrt. Then, the SDK module 29 makes an affirmative determination in S59 (S59: YES), and executes the print processing in S61 and thereafter. As shown in FIG. 10, the SDK module 29 converts the image data 75A from the leading end 79 to the minimum medium length LPrn into raster data, thereby securing the minimum medium length LPrn and performing printing. . Accordingly, even when the input of characters or the like is small and the specified image length LEnd is shorter than the minimum medium length LPrn, the printer 50 can appropriately execute printing.

<設定長さLUsrが設定された場合>
次に、末尾余白除去設定及び設定長さLUsrが設定され、揃え設定が設定されていない場合(以下、ケース4という)について説明する。ケース4の場合、SDKモジュール29は、図5のS25、S27で肯定判定をし(S25:YES、S27:YES)、S29を実行する。S29において、SDKモジュール29は、印刷設定で受け付けた設定長さLUsrと、最小媒体長さLPrnのうち、長い方の値を基準最小長さLThrに設定する。SDKモジュール29は、ケース1と同様に、S33で否定判定した後(S33:NO)、S41からS53までを実行する。S55において、画像長さLEndが、基準最小長さLThrよりも長い場合、即ち、画像長さLEnd、設定長さLUsr、最小媒体長さLPrnのうち、画像長さLEndが最も長い場合、ケース1(図8参照)と同様に、画像長さLEndの印刷が実行される。
<When the set length LUsr is set>
Next, a case where the tail margin removal setting and the set length LUsr are set and the alignment setting is not set (hereinafter, referred to as case 4) will be described. In case 4, the SDK module 29 makes an affirmative determination in S25 and S27 of FIG. 5 (S25: YES, S27: YES), and executes S29. In S29, the SDK module 29 sets the longer one of the set length LUsr received in the print setting and the minimum medium length LPrn as the reference minimum length LThr. The SDK module 29 executes S41 to S53 after making a negative determination in S33 as in Case 1 (S33: NO). In S55, when the image length LEnd is longer than the reference minimum length LThr, that is, when the image length LEnd is the longest among the image length LEnd, the set length LUsr, and the minimum medium length LPrn, case 1 As in (see FIG. 8), printing of the image length LEnd is executed.

また、図11は、画像長さLEnd、設定長さLUsr、最小媒体長さLPrnのうち、最小媒体長さLPrnが最も長い場合を示している。この場合、S55において、SDKモジュール29は、印刷画像長さLENPrtとして最小媒体長さLPrn(基準最小長さLThr)を設定する。そして、図11に示すように、SDKモジュール29は、先端79から最小媒体長さLPrnまでの画像データ75Aをラスタデータに変換することで、最小媒体長さLPrn及び印刷設定で受け付けた設定長さLUsrを確保して印刷を実行できる。   FIG. 11 shows a case where the minimum medium length LPrn is the longest among the image length LEnd, the set length LUsr, and the minimum medium length LPrn. In this case, in S55, the SDK module 29 sets the minimum medium length LPrn (reference minimum length LThr) as the print image length LENPrt. Then, as shown in FIG. 11, the SDK module 29 converts the image data 75A from the leading end 79 to the minimum medium length LPrn into raster data, thereby obtaining the minimum medium length LPrn and the set length received in the print setting. Printing can be executed while securing LUsr.

また、図12は、画像長さLEnd、設定長さLUsr、最小媒体長さLPrnのうち、設定長さLUsrが最も長い場合を示している。この場合、S55において、SDKモジュール29は、印刷画像長さLENPrtとして設定長さLUsr(基準最小長さLThr)を設定する。そして、図12に示すように、SDKモジュール29は、先端79から設定長さLUsrまでの画像データ75Aをラスタデータに変換することで、最小媒体長さLPrn及び設定長さLUsrを確保して印刷を実行できる。換言すれば、ユーザ等は、余白を除去する以外に、最低限の設定長さLUsrを確保することを指示できる。   FIG. 12 shows a case where the set length LUsr is the longest of the image length LEnd, the set length LUsr, and the minimum medium length LPrn. In this case, in S55, the SDK module 29 sets the set length LUsr (reference minimum length LThr) as the print image length LENPrt. Then, as shown in FIG. 12, the SDK module 29 converts the image data 75A from the leading end 79 to the set length LUsr into raster data, thereby securing the minimum medium length LPrn and the set length LUsr for printing. Can be executed. In other words, the user or the like can instruct to secure the minimum set length LUsr in addition to removing the blank space.

<スプリット印刷や複数の画像を印刷する場合>
次に、スプリット印刷や複数の画像をまとめて印刷する印刷設定を受け付けた場合について説明する。以下の説明では、一例として、スプリット印刷、末尾余白除去設定が設定され、設定長さLUsr及び揃え設定が設定されていない場合(以下、ケース5という)について説明する。ケース5の場合、SDKモジュール29は、ケース1と同様に、S21からS41まで実行する。
<When split printing or printing multiple images>
Next, a case will be described where split printing or print settings for printing a plurality of images collectively are received. In the following description, as an example, a case will be described in which split printing and trailing margin removal settings are set, and the set length LUsr and alignment settings are not set (hereinafter, referred to as case 5). In case 5, the SDK module 29 executes steps S21 to S41 as in case 1.

図13は、末尾余白除去設定が設定されスプリット印刷を実行する場合の画像データ75を示している。図13に示すように、スプリット印刷では、印刷する画像データ75を、副走査方向に沿って、印刷設定に設定された数だけ分割する。例えば、SDKモジュール29は、印刷する画像データ75を、副走査方向に沿って2つに分割した分割画像データ91,92を生成する。そして、SDKモジュール29は、分割画像データ91,92のそれぞれについて印刷を行う。これにより、例えば、印刷された複数のテープ67を主走査方向に並べて貼り付けることで、1つのテープ67では表すことができない大きな文字等を表すことができる。以下の説明では、一例として2つに分割する場合を説明する。   FIG. 13 shows the image data 75 in a case where the tail margin removal setting is set and the split printing is executed. As shown in FIG. 13, in the split printing, the image data 75 to be printed is divided along the sub-scanning direction by the number set in the print setting. For example, the SDK module 29 generates divided image data 91 and 92 obtained by dividing the image data 75 to be printed into two along the sub-scanning direction. Then, the SDK module 29 prints each of the divided image data 91 and 92. Accordingly, for example, by arranging a plurality of printed tapes 67 in the main scanning direction and pasting them, it is possible to represent a large character or the like that cannot be represented by one tape 67. In the following description, the case of dividing into two is described as an example.

S41において、SDKモジュール29は、メモリ14に記憶された画像データ75から副走査方向に沿って分割した分割画像データ91を生成して読み込む。SDKモジュール29は、分割画像データ91を用いて図6のS43〜S67の処理を実行する。SDKモジュール29は、S65において、分割画像データ91を変換したラスタデータを印刷データとしてプリンタ50に送信すると、S67において残りの分割画像データ92の処理が終わっていないため(S67:NO)、図5のS41からの処理を再度実行する。2回目のS41において、SDKモジュール29は、メモリ14に記憶された画像データ75から分割画像データ92を生成して読み込み、S43以降の処理を実行する。SDKモジュール29は、2回目のS65において、分割画像データ92を変換したラスタデータをプリンタ50に送信し、S67において他の印刷画像の処理がないため(S67:YES)、SDK処理を終了する。従って、SDKモジュール29は、複数の分割画像データ91,92の各々について、画像長さLEndを特定する処理(S53)、画像長さLEndを判定する処理(S59)、印刷画像長さLENPrtに基づくラスタライズ処理(S61)等を実行する。なお、SDKモジュール29は、1回目のS41を実行する際に、分割画像データ91以外の他の分割画像データ92を全て作成しメモリ14に保存しても良い。   In S41, the SDK module 29 generates and reads divided image data 91 divided along the sub-scanning direction from the image data 75 stored in the memory 14. The SDK module 29 executes the processing of S43 to S67 in FIG. 6 using the divided image data 91. When the SDK module 29 transmits the raster data obtained by converting the divided image data 91 to the printer 50 as print data in S65, the processing of the remaining divided image data 92 is not completed in S67 (S67: NO). Is executed again from S41. In the second time S41, the SDK module 29 generates and reads the divided image data 92 from the image data 75 stored in the memory 14, and executes the processing after S43. In the second S65, the SDK module 29 transmits the raster data obtained by converting the divided image data 92 to the printer 50. Since there is no other print image processing in S67 (S67: YES), the SDK processing ends. Therefore, the SDK module 29 determines the image length LEnd (S53), determines the image length LEnd (S59), and determines the print image length LENPrt for each of the plurality of divided image data 91 and 92. A rasterizing process (S61) and the like are executed. The SDK module 29 may create all the divided image data 92 other than the divided image data 91 and store it in the memory 14 when executing the first S41.

図13に示す例では、「T’’’’’’’’’’」の画像データ75を、2つの分割画像データ91,92に分割している。図13における上側の分割画像データ91には「’’’’’’’’’’」が含まれているため、分割画像データ91の画像長さLEndは、分割画像データ92の画像長さLEndに比べて長くなっている。また、分割画像データ91の画像長さLEndは、最小媒体長さLPrnに比べて長くなっている。このため、SDKモジュール29は、分割画像データ91の先端79から画像長さLEndまでの画像データ91Aをラスタデータに変換する。一方で、分割画像データ92の画像長さLEndは、最小媒体長さLPrnに比べて短くなっている。このため、SDKモジュール29は、分割画像データ92の先端79から最小媒体長さLPrnまでの画像データ92Aをラスタデータに変換する。このようにして、SDKモジュール29は、スプリット印刷が設定された場合には、分割画像データ91,92の各々について余白を除去する処理等を個別に適用する。なお、複数の画像の印刷をまとめて受け付けた場合にも、上記したスプリット印刷と同様の処理を実行することで、複数の画像データ75の各々について余白を除去する処理等を個別に適用できる。   In the example illustrated in FIG. 13, the image data 75 of “T ″ ″ ″ ″ ″ ″ is divided into two divided image data 91 and 92. Since the upper divided image data 91 in FIG. 13 includes “″ ″ ″ ″ ″”, the image length LEnd of the divided image data 91 is the image length LEEnd of the divided image data 92. It is longer than. The image length LEnd of the divided image data 91 is longer than the minimum medium length LPrn. Therefore, the SDK module 29 converts the image data 91A from the leading end 79 of the divided image data 91 to the image length LEnd into raster data. On the other hand, the image length LEnd of the divided image data 92 is shorter than the minimum medium length LPrn. Therefore, the SDK module 29 converts the image data 92A from the leading end 79 of the divided image data 92 to the minimum medium length LPrn into raster data. As described above, when split printing is set, the SDK module 29 individually applies a process of removing a blank space for each of the divided image data items 91 and 92. Note that, even when printing of a plurality of images is received collectively, by executing the same processing as the above-described split printing, it is possible to individually apply processing for removing a blank space for each of the plurality of image data 75.

<揃え設定の場合>
次に、スプリット印刷や複数の画像をまとめて印刷する指示を受け付け、且つ揃え設定を受け付けた場合について説明する。図14は、揃え設定がされた場合の画像データ75を示している。図14に示すように、揃え設定とは、印刷後のテープ67の長さを揃える設定である。図14のドットは、テープ67の色が有色であることを示している。以下の説明では、一例として、スプリット印刷、末尾余白除去設定及び揃え設定が設定され、設定長さLUsrが設定されていない場合(以下、ケース6という)について説明する。
<In the case of alignment setting>
Next, a case where split printing or an instruction to print a plurality of images at once and an alignment setting are received will be described. FIG. 14 shows the image data 75 when the alignment setting has been made. As shown in FIG. 14, the alignment setting is a setting for aligning the length of the tape 67 after printing. The dots in FIG. 14 indicate that the color of the tape 67 is colored. In the following description, as an example, a case will be described in which split printing, trailing margin removal setting, and alignment setting are set, and the set length LUsr is not set (hereinafter, referred to as case 6).

詳述すると、ケース6の場合、SDKモジュール29は、ケース1と同様に、S21からS31まで実行した後、S33を実行する。S33において、SDKモジュール29は、編集画面制御モジュール27から受け取った印刷指示に基づいて揃え設定が設定されていると判断すると(S33:YES)、S35を実行する。   More specifically, in case 6, as in case 1, the SDK module 29 executes steps S21 to S31 and then executes step S33. In S33, if the SDK module 29 determines that the alignment setting is set based on the print instruction received from the edit screen control module 27 (S33: YES), it executes S35.

なお、SDKモジュール29は、印刷後のテープ67の長さを揃える処理を実行するか否かを印刷設定以外の方法で判断しても良い。ここで、上記したケース5(図13)のように、分割画像データ91,92の各々について印刷画像長さLENPrtを調整する処理を実行すると、分割画像データ91を印刷したテープ67の長さ(画像長さLEnd)が、分割画像データ92を印刷したテープ67の長さ(最小媒体長さLPrn)に比べて長くなる。その結果、印刷後の2つのテープ67を、主走査方向に並べて貼り合わせると、副走査方向の長さが異なる状態となる。同様の処理を有色のテープ67に対して実行すると、背景色が付加されていることで長さの違いがより明確となり、貼り合わせたテープ67のバランスが悪くなる虞がある。このため、有色のテープ67の場合には、印刷後のテープ67の長さを揃えることが好ましい場合がある。   It should be noted that the SDK module 29 may determine whether or not to execute the process of adjusting the length of the tape 67 after printing by a method other than the print setting. Here, as in case 5 (FIG. 13) described above, when the process of adjusting the print image length LENPrt is performed for each of the divided image data 91 and 92, the length of the tape 67 on which the divided image data 91 is printed ( The image length LEnd) is longer than the length of the tape 67 on which the divided image data 92 is printed (minimum medium length LPrn). As a result, when the two tapes 67 after printing are arranged and bonded in the main scanning direction, the lengths in the sub scanning direction are different. When the same processing is performed on the colored tape 67, the difference in length becomes clearer due to the addition of the background color, and there is a possibility that the balance of the bonded tape 67 may be deteriorated. For this reason, in the case of the colored tape 67, it may be preferable to make the lengths of the tapes 67 after printing uniform.

そこで、SDKモジュール29は、記録媒体であるテープ67の色が有色である場合に長さを揃える処理を実行しても良い。例えば、編集画面制御モジュール27は、印刷設定において有色のテープ67が選択された場合に、長さを揃える処理を実行する印刷指示をSDKモジュール29に与えても良い。あるいは、SDKモジュール29は、スプリット印刷が設定された場合に、プリンタ50へ問い合わせを自動で実行し、プリンタ50に装着されたテープ67の色情報を取得し、取得した色情報に基づいてテープ67が有色であれば長さを揃える処理を実行しても良い。また、SDKモジュール29は、編集画面制御モジュール27の印刷指示と、プリンタ50から取得した情報との一致を判断し、情報が一致し且つテープ67が有色である場合に長さを揃える処理を実行しても良い。   Therefore, the SDK module 29 may execute a process of adjusting the lengths when the color of the tape 67 as the recording medium is colored. For example, when the colored tape 67 is selected in the print settings, the edit screen control module 27 may provide the SDK module 29 with a print instruction for executing a process of adjusting the length. Alternatively, when the split printing is set, the SDK module 29 automatically executes an inquiry to the printer 50, acquires the color information of the tape 67 attached to the printer 50, and executes the tape 67 based on the acquired color information. If is colored, a process for adjusting the length may be executed. Further, the SDK module 29 determines whether the print instruction of the edit screen control module 27 matches the information acquired from the printer 50, and executes a process of aligning the lengths when the information matches and the tape 67 is colored. You may.

図5に戻り、SDKモジュール29は、S35において、長さを揃えるための最大長さLAliを求める処理を実行する。図7は、最大長さLAliを求める処理の内容を示している。SDKモジュール29は、図7の処理を開始すると、まず、最大長さLAliの初期値としてゼロを設定する(S71)。   Returning to FIG. 5, in step S35, the SDK module 29 executes a process of obtaining a maximum length LAli for aligning the lengths. FIG. 7 shows the contents of the processing for obtaining the maximum length LAli. When the SDK module 29 starts the processing of FIG. 7, first, it sets zero as an initial value of the maximum length LAli (S71).

次に、SDKモジュール29は、S75以降の処理を、分割した画像データの数分(複数の画像の印刷を受け付けた場合は印刷する画像の数分)だけ繰り返し実行する。S75において、SDKモジュール29は、ケース5のS41と同様に、メモリ14に記憶された画像データ75から分割した分割画像データ91を生成して読み込む。SDKモジュール29は、読み込みに成功したと判断すると(S77:YES)、S79を実行し、読み込みに失敗したと判断すると(S77:NO)、S81を実行する。   Next, the SDK module 29 repeatedly executes the processing of S75 and subsequent steps by the number of divided image data (or the number of images to be printed when printing of a plurality of images is received). In S75, the SDK module 29 generates and reads the divided image data 91 divided from the image data 75 stored in the memory 14, as in S41 of Case 5. If the SDK module 29 determines that the reading has succeeded (S77: YES), it executes S79. If it determines that the reading has failed (S77: NO), it executes S81.

S79において、SDKモジュール29は、図6のS45と同様に、印刷設定に応じた画像処理等を分割画像データ91に対して実行した後、S83を実行する。また、S81において、SDKモジュール29は、図6のS47と同様に、読み込みに失敗したことをLCD16等に報知し、図5〜図7に示すSDK処理を終了する。   In S79, similarly to S45 in FIG. 6, the SDK module 29 executes image processing or the like on the divided image data 91 in accordance with the print settings, and then executes S83. In step S81, the SDK module 29 notifies the LCD 16 or the like that the reading has failed, similarly to step S47 in FIG. 6, and ends the SDK processing shown in FIGS.

S83において、SDKモジュール29は、図6のS53と同様に、分割画像データ91の先端79(図14参照)から最も遠い有効画素までの画像長さLEndを求めた後、S85を実行する。S85において、SDKモジュール29は、S83で求めた画像長さLEndが最大長さLAliよりも大きい場合、最大長さLAliとしてS83で求めた画像長さLEndを設定する。1回目の分割画像データ91に対する処理では、最大長さLAliにゼロが設定されている(S71)。このため、SDKモジュール29は、S85において、分割画像データ91の画像長さLEndを最大長さLAliに設定する。   In S83, the SDK module 29 calculates the image length LEnd from the leading end 79 (see FIG. 14) of the divided image data 91 to the farthest effective pixel, as in S53 of FIG. 6, and then executes S85. In S85, if the image length LEnd calculated in S83 is larger than the maximum length LAli, the SDK module 29 sets the image length LEnd calculated in S83 as the maximum length LAli. In the process for the first divided image data 91, zero is set to the maximum length LAli (S71). Therefore, in S85, the SDK module 29 sets the image length LEnd of the divided image data 91 to the maximum length LAli.

次に、S87において、SDKモジュール29は、図6のS67と同様に、全ての印刷画像について処理を完了したか否かを判断する。SDKモジュール29は、全ての印刷画像について処理を完了したと判断した場合(S87:YES)は、図7に示す最大長さLAliを求める処理を終了し、全ての印刷画像について処理を完了していない場合(S87:NO)は、次の未処理の印刷画像について、S75からの処理を再度実行する。今回のケース6の場合、SDKモジュール29は、1回目のS87で否定判定し(S87:NO)、2回目のS75以降において、次の分割画像データ92に対しても同様の処理を実行する。SDKモジュール29は、2回目のS85において、分割画像データ91の画像長さLEndに比べて分割画像データ92の画像長さLEndが長ければ、分割画像データ92の画像長さLEndを最大長さLAliに設定する。   Next, in S87, the SDK module 29 determines whether the processing has been completed for all print images, as in S67 of FIG. If the SDK module 29 determines that the processing has been completed for all print images (S87: YES), the SDK module 29 ends the processing for obtaining the maximum length LAli shown in FIG. 7 and completes the processing for all print images. If not (S87: NO), the processes from S75 are executed again for the next unprocessed print image. In case 6 this time, the SDK module 29 makes a negative determination in the first S87 (S87: NO), and executes the same processing on the next divided image data 92 in the second and subsequent S75. In the second S85, if the image length LEnd of the divided image data 92 is longer than the image length LEnd of the divided image data 91, the SDK module 29 sets the image length LEnd of the divided image data 92 to the maximum length Lali. Set to.

従って、SDKモジュール29は、最大長さLAliに初期値としてゼロを設定した後(S71)、S75以降の処理を繰り返し実行することで、複数の分割画像データ91,92の画像長さLEndのうち、最も長い画像長さLEndを最大長さLAliに設定する。SDKモジュール29は、全ての分割画像データ91,92についてS75からS87までの処理を実行した後、図7の処理を終了し、図5のS37を実行する。   Therefore, the SDK module 29 sets the maximum length LAli to zero as an initial value (S71), and repeatedly executes the processing of S75 and subsequent steps, so that the image length LEnd of the plurality of divided image data 91 and 92 is set. , The longest image length LEnd is set to the maximum length LAli. After executing the processing from S75 to S87 for all the divided image data 91 and 92, the SDK module 29 ends the processing in FIG. 7 and executes S37 in FIG.

S37において、SDKモジュール29は、図7の処理で求めた最大長さLAliと、基準最小長さLThrのうち、長い方の値を印刷画像長さLENPrtとして設定する。このため、SDKモジュール29は、最大長さLAli、最小媒体長さLPrn、設定長さLUsrのうち、最も長い値を印刷画像長さLENPrtに設定する。   In S37, the SDK module 29 sets the longer value of the maximum length LAli and the reference minimum length LThr obtained in the processing of FIG. 7 as the print image length LENPrt. Therefore, the SDK module 29 sets the longest value among the maximum length LAli, the minimum medium length LPrn, and the set length LUsr as the print image length LENPrt.

SDKモジュール29は、S37を実行した後、S38を実行する。SDKモジュール29は、S37で設定した印刷画像長さLENPrtでラスタライズを実行し、変換したラスタデータを印刷データとしてプリンタ50に送信する。SDKモジュール29は、同一の印刷画像長さLENPrtを用いたラスタライズを他の分割画像データ(分割画像データ92等)にも実行し印刷を行う(S38)。上記したように、S37において、印刷画像長さLENPrtには、最大長さLAli、最小媒体長さLPrn、設定長さLUsrのうち、最も長い長さが設定される。このため、分割画像データ91,92の各々は、最も長い長さでラスタライズされ印刷される。   After executing S37, the SDK module 29 executes S38. The SDK module 29 performs rasterization with the print image length LENPrt set in S37, and transmits the converted raster data to the printer 50 as print data. The SDK module 29 performs rasterization using the same print image length LENPrt on other divided image data (the divided image data 92 and the like) and performs printing (S38). As described above, in S37, the longest length of the maximum length LAli, the minimum medium length LPrn, and the set length LUsr is set as the print image length LENPrt. Therefore, each of the divided image data 91 and 92 is rasterized and printed with the longest length.

図14に示す例では、最大長さLAli、最小媒体長さLPrn、設定長さLUsr(図示略)のうち、分割画像データ91の画像長さLEnd(最大長さLAli)が、最も長くなっている。このため、SDKモジュール29は、分割画像データ91の先端79から分割画像データ91の画像長さLEndまでの画像データ91Aをラスタデータに変換する。また、SDKモジュール29は、分割画像データ92の先端79から分割画像データ91の画像長さLEndまで、即ち、画像データ91Aと同様の長さの画像データ92Aをラスタデータに変換する。これにより、分割画像データ91,92の各々を同一の長さで印刷することが可能となる。   In the example shown in FIG. 14, among the maximum length LAli, the minimum medium length LPrn, and the set length LUsr (not shown), the image length LEnd (maximum length LAli) of the divided image data 91 is the longest. I have. Therefore, the SDK module 29 converts the image data 91A from the leading end 79 of the divided image data 91 to the image length LEnd of the divided image data 91 into raster data. Further, the SDK module 29 converts the image data 92A having the same length as the image data 91A from the leading end 79 of the divided image data 92 to the image length LEnd of the divided image data 91, into raster data. This makes it possible to print each of the divided image data 91 and 92 with the same length.

因みに、PC10は、情報処理装置の一例である。CPU12は、コンピュータ、制御部の一例である。テープ67は、記録媒体の一例である。分割画像データ91,92は、分割した画像データの一例である。   Incidentally, the PC 10 is an example of an information processing device. The CPU 12 is an example of a computer and a control unit. The tape 67 is an example of a recording medium. The divided image data 91 and 92 are examples of the divided image data.

<実施例の効果>
上記した実施形態によれば、以下の効果を奏する。
(1)本実施形態のSDKモジュール29は、プリンタ50がテープ67を搬送する搬送方向69に直交する方向に応じた主走査方向について、主走査方向おける画像データ75の1ラインずつに有効画素が存在するか否かを判断し、有効画素が存在するライン数に基づく長さであり且つ画像データ75の副走査方向の長さである画像長さLEndを特定する特定ステップ(S53)と、画像長さLEndが、搬送方向69におけるテープ67の長さであり且つプリンタ50によってテープ67を搬送可能な最小の長さである最小媒体長さLPrn以上であるか否かを判断する判断ステップ(S59)と、画像長さLEndが最小媒体長さLPrn以上である場合に(S59:YES)、画像データ75における画像長さLEndの範囲をラスタデータに変換する変換ステップ(S61)と、変換したラスタデータをプリンタ50に出力する出力ステップ(S65)と、を実行する。
<Effects of the embodiment>
According to the above-described embodiment, the following effects can be obtained.
(1) In the SDK module 29 of the present embodiment, in the main scanning direction corresponding to the direction orthogonal to the conveyance direction 69 in which the printer 50 conveys the tape 67, the effective pixels are set for each line of the image data 75 in the main scanning direction. A specifying step (S53) of determining whether or not the image data exists, and specifying an image length LEnd which is a length based on the number of lines in which the effective pixels exist and which is a length in the sub-scanning direction of the image data 75; A determination step of determining whether or not the length LEnd is equal to or longer than the minimum medium length LPrn that is the length of the tape 67 in the transport direction 69 and the minimum length that allows the printer 50 to transport the tape 67 (S59). ) And when the image length LEnd is equal to or longer than the minimum medium length LPrn (S59: YES), the range of the image length A conversion step of converting the metadata (S61), and an output step (S65) for outputting the converted raster data to the printer 50, to run.

これによれば、画像データ75の有効画素が存在するライン数に基づく副走査方向の画像長さLEndと、プリンタ50の搬送可能な最小媒体長さLPrnを比較する。画像長さLEndが最小媒体長さLPrn以上である場合には、画像長さLEndの範囲をラスタデータに変換し、プリンタ50に印刷を実行させる。これにより、プリンタ50で印刷する範囲を小さくしてテープ67の消費量を抑制できる。また、搬送方向69において、プリンタ50が画像を印刷する長さとして最小媒体長さLPrnを確保でき、画像が印刷されたテープ67をプリンタ50の搬送ローラ63等によって適切に搬送させることができる。   According to this, the image length LEnd in the sub-scanning direction based on the number of lines where the effective pixels of the image data 75 exist is compared with the minimum medium length LPrn that can be transported by the printer 50. If the image length LEnd is equal to or longer than the minimum medium length LPrn, the range of the image length LEnd is converted into raster data, and the printer 50 executes printing. This makes it possible to reduce the printing range of the printer 50 and reduce the consumption of the tape 67. Further, in the transport direction 69, the minimum medium length LPrn can be secured as a length for the printer 50 to print an image, and the tape 67 on which the image is printed can be appropriately transported by the transport rollers 63 of the printer 50.

(2)また、SDKモジュール29は、S59において画像長さLEndが最小媒体長さLPrnより短い場合に(S59:NO)、S63(変換ステップの一例)において画像データ75における最小媒体長さLPrnの範囲をラスタデータに変換しても良い。これによれば、画像長さLEndが最小媒体長さLPrnよりも短い場合には、最小媒体長さLPrnの範囲をラスタデータに変換し、プリンタ50に印刷を実行させることができる。 (2) If the image length LEnd is shorter than the minimum medium length LPrn in S59 (S59: NO), the SDK module 29 determines the minimum medium length LPrn in the image data 75 in S63 (an example of the conversion step). The range may be converted to raster data. According to this, when the image length LEnd is shorter than the minimum medium length LPrn, the range of the minimum medium length LPrn can be converted into raster data, and the printer 50 can execute printing.

(3)また、SDKモジュール29は、S53において、有効画素が存在するライン81の位置のうち、副走査方向における後端80側のライン81Aの位置について、副走査方向における画像データ75の先端79から有効画素が存在する先端のライン81Bの位置までの余白幅87を付加する位置の調整を行い、画像データ75の先端79から調整したライン81の位置を、画像長さLEndとして特定する(図9参照)。 (3) In step S53, the SDK module 29 determines the leading end 79 of the image data 75 in the sub-scanning direction with respect to the position of the line 81A on the rear end 80 side in the sub-scanning direction among the positions of the line 81 where the effective pixels exist. Is adjusted to add a margin width 87 to the position of the leading line 81B where the effective pixel exists, and the position of the line 81 adjusted from the leading end 79 of the image data 75 is specified as the image length LEnd (FIG. 9).

副走査方向における後端80側の余白を、有効画素のライン81Aの位置に基づいて除去すると、S53で特定される後端80のライン81Aの位置は、最も後端80側に存在する有効画素のライン位置となる。この場合、副走査方向における先端79側に余白85が存在すると、印刷画像が後端80側に寄った印刷結果となる。そこで、S53で後端80のライン81Aの位置を、先端79側の余白幅87だけ後端80側にずらした位置に調整することで、先端79と後端80の余白幅87を同一にして印刷結果のバランスを良くすることができる。   If the margin on the rear end 80 side in the sub-scanning direction is removed based on the position of the effective pixel line 81A, the position of the line 81A on the rear end 80 specified in S53 becomes the effective pixel existing on the rearmost end 80 side. Line position. In this case, if a margin 85 exists on the leading end 79 side in the sub-scanning direction, a print result of the print image shifted to the rear end 80 side is obtained. In step S53, the position of the line 81A of the rear end 80 is adjusted to a position shifted toward the rear end 80 by the margin width 87 on the front end 79 side, so that the margin width 87 on the front end 79 and the rear end 80 is made the same. The balance of the printing result can be improved.

(4)また、プリンタ50は、ダイカットテープ等の搬送方向69における長さが決められた記録媒体への印刷が可能である。SDKモジュール29は、長さが決められた記録媒体へ印刷を実行する場合(S21:YES)、S53及びS59を実行せずに、画像データ75をそのままラスタデータに変換させた後、プリンタ50に出力する(S23)。 (4) The printer 50 is capable of printing on a recording medium having a predetermined length in the transport direction 69 such as a die cut tape. When printing is performed on a recording medium having a determined length (S21: YES), the SDK module 29 converts the image data 75 into raster data without performing S53 and S59, Output (S23).

例えば、A4紙等のシート状の記録媒体は、予め所定の長さに切断されている。また、例えば、ダイカットテープは、剥離される記録媒体の長さが予め規定されている。このため、この種の搬送方向69における長さが決められた記録媒体では、仮に、印刷する画像データ75の長さを変更したとしても印刷後の記録媒体の物理的な長さが変わらない。即ち、用紙サイズや剥離されるテープ幅が決まっているため、余白を除去する処理を実行しても、印刷後の1つ1つの記録媒体の長が変わらない。そこで、搬送方向69における長さが決められた記録媒体については、S53やS59を実行せず、ラスタライズを実行することで、不要な処理を省略して処理速度を高速化できる。   For example, a sheet-shaped recording medium such as A4 paper is cut into a predetermined length in advance. Further, for example, in the die cut tape, the length of the recording medium to be peeled is defined in advance. For this reason, in such a recording medium whose length in the transport direction 69 is determined, even if the length of the image data 75 to be printed is changed, the physical length of the printed recording medium does not change. That is, since the paper size and the width of the tape to be peeled are fixed, the length of each recording medium after printing does not change even if the processing for removing the margin is executed. Therefore, for a recording medium whose length in the transport direction 69 is determined, unnecessary processing is omitted and the processing speed can be increased by performing rasterization without performing S53 or S59.

(5)また、SDKモジュール29は、副走査方向に沿って画像データ75を複数に分割し、分割した分割画像データ91,92をそれぞれ印刷するスプリット印刷を実行する場合、S53、S59、S61、及びS65を、分割した分割画像データ91,92ごとに実行する(図13、ケース5)。これによれば、スプリット印刷において、分割した分割画像データ91,92ごとに余白を除去し印刷する処理を適用する。これにより、分割画像データ91,92の各々について、テープ67の消費量を抑制しつつ、プリンタ50によって印刷後のテープ67を適切に搬送させることができる。 (5) The SDK module 29 divides the image data 75 into a plurality of pieces along the sub-scanning direction, and executes split printing in which the divided image data 91 and 92 are printed, respectively, in S53, S59, S61, and S53. And S65 are executed for each of the divided image data 91 and 92 (FIG. 13, case 5). According to this, in the split printing, a process of printing by removing a blank space for each of the divided image data 91 and 92 is applied. This makes it possible to appropriately convey the tape 67 after printing by the printer 50 while suppressing the consumption of the tape 67 for each of the divided image data 91 and 92.

(6)また、SDKモジュール29は、スプリット印刷を実行する場合、分割した分割画像データ91,92の各々の画像長さLEndのうち、最も長い最大長さLAliを特定させ(S35、図7の処理)、S37(判断ステップの一例)の結果に応じたS38(変換ステップ、出力ステップの一例)を、分割画像データ91,92の各々について実行する。 (6) Also, when performing the split printing, the SDK module 29 specifies the longest maximum length LAli among the image lengths LEnd of the divided image data 91 and 92 (S35, FIG. 7). Processing) and S38 (an example of a conversion step and an output step) according to the results of S37 (an example of a determination step) are executed for each of the divided image data 91 and 92.

これによれば、最も長い最大長さLAliと最小媒体長さLPrnとを比較し、比較した結果に応じてラスタライズする範囲を設定する。そして、設定した範囲のラスタライズやラスタデータの出力を、分割画像データ91,92の各々に一律に実行する。このため、分割画像データ91,92の各々は、最も長い最大長さLAliや最小媒体長さLPrnで印刷される。これにより、分割画像データ91,92を、搬送方向69における長さを揃えて印刷することができる。   According to this, the longest maximum length LAli is compared with the minimum medium length LPrn, and a range to be rasterized is set according to the comparison result. Then, rasterization of the set range and output of the raster data are uniformly performed on each of the divided image data 91 and 92. Therefore, each of the divided image data 91 and 92 is printed with the longest maximum length LAli and the minimum medium length LPrn. Thereby, the divided image data 91 and 92 can be printed with the lengths in the transport direction 69 being uniform.

(7)また、SDKモジュール29は、長尺のテープ67が有色であるか否かを判断する有色判断ステップ(S33)を実行し、テープ67が有色である場合に(S33:YES)、最も長い最大長さLAliを特定し(S35)、S37の結果に応じたS61及びS65を、分割画像データ91,92の各々について実行する。分割画像データ91,92を有色のテープ67などにそれぞれ印刷した後、印刷した複数のテープ67を組み合わせる際に、搬送方向69における長さが揃っていなければ、白色や透明のテープ67に比べて目立つ可能性が高い。このため、有色の記録媒体の場合に、搬送方向69における長さを揃えて印刷することは、極めて有効である。 (7) Further, the SDK module 29 executes a color determination step (S33) for determining whether or not the long tape 67 is colored. If the tape 67 is colored (S33: YES), The long maximum length LAli is specified (S35), and S61 and S65 according to the result of S37 are executed for each of the divided image data 91 and 92. After each of the divided image data 91 and 92 is printed on the colored tape 67 or the like, when combining the plurality of printed tapes 67, if the lengths in the transport direction 69 are not uniform, compared with the white or transparent tape 67, It is likely to be noticeable. For this reason, in the case of a color recording medium, it is extremely effective to perform printing with the lengths in the transport direction 69 being uniform.

(8)また、SDKモジュール29は、ラスタデータに変換する画像データ75の範囲を設定する設定長さLUsrを受け付けた場合に(S27:YES)、S61において、画像長さLEnd、最小媒体長さLPrn、設定長さLUsrのうち、最も長い長さの範囲で画像データ75をラスタデータに変換する(図11、図12、ケース4)。これによれば、ユーザ等によって設定された設定長さLUsr及び最小媒体長さLPrnを確保しつつ、余白を削除することができる。 (8) When the SDK module 29 receives the set length LUsr for setting the range of the image data 75 to be converted to raster data (S27: YES), in S61, the image length LEnd and the minimum medium length The image data 75 is converted into raster data in the range of the longest length of the LPrn and the set length LUsr (FIG. 11, FIG. 12, case 4). According to this, the margin can be deleted while securing the set length LUsr and the minimum medium length LPrn set by the user or the like.

また、本発明は、上記実施形態に限定されるものではなく、当業者の知識に基づいて種々の変更、改良を施した種々の態様で実施することが可能である。
例えば、SDKモジュール29は、画像データ75の後端80側(末尾)に対して余白を除去する処理を実行したが、先端79側の余白に対しても同様の処理を実行しても良い。また、SDKモジュール29は、先端79側の余白のみを除去しても良い。
また、SDKモジュール29は、画像長さLEndが最小媒体長さLPrnより短い場合に(S59:NO)、印刷エラーのみを報知しても良い。
In addition, the present invention is not limited to the above-described embodiment, and can be implemented in various modes with various changes and improvements based on the knowledge of those skilled in the art.
For example, the SDK module 29 executes the process of removing the margin on the rear end 80 side (end) of the image data 75, but the same process may be executed on the margin on the front end 79 side. In addition, the SDK module 29 may remove only the margin on the tip 79 side.
When the image length LEnd is shorter than the minimum medium length LPrn (S59: NO), the SDK module 29 may notify only a printing error.

また、SDKモジュール29は、S53における先端79と後端80の余白を調整する処理を実行しなくとも良い。また、SDKモジュール29は、後端80の余白に合わせて先端79の余白を調整しても良い。
また、SDKモジュール29は、長さが決められた記録媒体の印刷においても、余白の除去等を実行しても良い。
また、SDKモジュール29は、スプリット印刷が実行できない構成でも良い。
また、SDKモジュール29は、印刷後のテープ67の長さを揃える処理を実行できない構成でも良い。
また、SDKモジュール29は、有色のテープ67の場合に、長さを揃えずに印刷を実行しても良い。
また、SDKモジュール29は、設定長さLUsrを受け付けない構成でも良い。
Further, the SDK module 29 does not have to execute the process of adjusting the margins of the front end 79 and the rear end 80 in S53. Further, the SDK module 29 may adjust the margin at the front end 79 according to the margin at the rear end 80.
In addition, the SDK module 29 may execute margin removal or the like even when printing on a recording medium having a determined length.
Further, the SDK module 29 may have a configuration in which split printing cannot be executed.
Further, the SDK module 29 may be configured to be unable to execute the process of adjusting the length of the tape 67 after printing.
In the case of the colored tape 67, the SDK module 29 may execute the printing without adjusting the lengths.
Further, the SDK module 29 may be configured not to receive the set length LUsr.

また、本願における記録媒体は、テープ67に限らず、ロール紙等の他の長尺の記録媒体でも良い。
また、上記実施形態では、SDKモジュール29は、画像データ作成モジュール28から受け取った画像データ75の印刷を実行したが、他のアプリケーションから受け取った画像データを印刷する処理を実行してもよい。
Further, the recording medium in the present application is not limited to the tape 67, but may be another long recording medium such as roll paper.
In the above-described embodiment, the SDK module 29 prints the image data 75 received from the image data creation module 28, but may execute a process of printing image data received from another application.

また、上記実施形態では、画像データ作成モジュール28を含むラベル作成プログラム26の処理がCPU12によって実行される例を説明したが、これに限らない。PC10は、ラベル作成プログラム26による処理を、CPU12に限らず、ASICや他の論理集積回路により実行しても良いし、CPU等やASIC、他の論理集積回路を協働させて実行しても良い。   Further, in the above embodiment, the example in which the processing of the label creation program 26 including the image data creation module 28 is executed by the CPU 12 has been described, but the present invention is not limited to this. The PC 10 may execute the processing by the label creation program 26 not only by the CPU 12 but also by an ASIC or another logic integrated circuit, or may execute the processing in cooperation with a CPU or the like, the ASIC, or another logic integrated circuit. good.

10 PC(情報処理装置)、12 CPU(制御部)、50 プリンタ、67 テープ(記録媒体)、69 搬送方向、75 画像データ、79 先端、80 後端、81,81A,81B ライン、87 余白幅、91,92 分割画像データ(分割した画像データ)、LEnd 画像長さ、LPrn 最小媒体長さ、LAli 最大長さ、LUsr 設定長さ。   Reference Signs List 10 PC (information processing device), 12 CPU (control unit), 50 printer, 67 tape (recording medium), 69 transport direction, 75 image data, 79 leading edge, 80 trailing edge, 81, 81A, 81B line, 87 margin width , 91, 92 Divided image data (divided image data), Lend image length, LPrn minimum medium length, LAli maximum length, LUsr set length.

Claims (9)

情報処理装置のコンピュータが読み取り可能なプログラムであり、長尺の記録媒体に印刷を行うプリンタに印刷対象の画像データを出力するプログラムであって、
前記コンピュータに、
前記プリンタが前記記録媒体を搬送する搬送方向に直交する方向に応じた主走査方向について、前記主走査方向おける前記画像データの1ラインずつに有効画素が存在するか否かを判断し、有効画素が存在するライン数に基づく長さであり且つ前記画像データの副走査方向の長さである画像長さを特定する特定ステップと、
前記画像長さが、前記搬送方向における前記記録媒体の長さであり且つ前記プリンタによって前記記録媒体を搬送可能な最小の長さである最小媒体長さ以上であるか否かを判断する判断ステップと、
前記画像長さが前記最小媒体長さ以上である場合に、前記画像データにおける前記画像長さの範囲をラスタデータに変換する変換ステップと、
変換した前記ラスタデータを前記プリンタに出力する出力ステップと、
を実行させる、プログラム。
A computer-readable program of the information processing apparatus, a program that outputs image data to be printed to a printer that performs printing on a long recording medium,
On the computer,
For a main scanning direction corresponding to a direction orthogonal to a conveyance direction in which the printer conveys the recording medium, it is determined whether or not an effective pixel exists for each line of the image data in the main scanning direction. A specifying step of specifying an image length that is a length based on the number of existing lines and is a length in the sub-scanning direction of the image data;
A determining step of determining whether or not the image length is equal to or longer than the minimum length of the recording medium in the transport direction and the minimum length which is the minimum length capable of transporting the recording medium by the printer; When,
When the image length is equal to or longer than the minimum medium length, a conversion step of converting the range of the image length in the image data to raster data,
Outputting the converted raster data to the printer;
To run the program.
前記コンピュータに、
前記判断ステップにおいて前記画像長さが前記最小媒体長さより短い場合に、前記変換ステップにおいて前記画像データにおける前記最小媒体長さの範囲をラスタデータに変換させる、請求項1に記載のプログラム。
On the computer,
The program according to claim 1, wherein when the image length is shorter than the minimum medium length in the determining step, the conversion step converts the range of the minimum medium length in the image data into raster data.
前記コンピュータに、
前記特定ステップにおいて、有効画素が存在する前記ラインの位置のうち、前記副走査方向における後端側の前記ラインの位置について、前記副走査方向における前記画像データの先端から有効画素が存在する先端の前記ラインの位置までの余白幅を付加する位置の調整を行い、前記画像データの先端から前記調整した前記ラインの位置を、前記画像長さとして特定する、請求項1又は請求項2に記載のプログラム。
On the computer,
In the specifying step, of the positions of the lines where the effective pixels are present, the positions of the lines on the trailing end side in the sub-scanning direction are described from the leading end of the image data in the sub-scanning direction where the effective pixels are present 3. The image processing apparatus according to claim 1, wherein a position of adding a margin width up to the position of the line is adjusted, and the adjusted position of the line from a leading end of the image data is specified as the image length. 4. program.
前記プリンタは、
前記搬送方向における長さが決められた前記記録媒体への印刷が可能であり、
前記コンピュータに、
長さが決められた前記記録媒体へ印刷を実行する場合、前記特定ステップ及び前記判断ステップを実行させずに、前記画像データをそのまま前記ラスタデータに変換させた後、前記プリンタに出力させる、請求項1乃至請求項3の何れか1項に記載のプログラム。
The printer is
It is possible to print on the recording medium whose length in the transport direction is determined,
On the computer,
When printing is performed on the recording medium having a determined length, the image data is converted into the raster data as it is without performing the specifying step and the determining step, and then output to the printer. The program according to any one of claims 1 to 3.
前記コンピュータに、
前記副走査方向に沿って前記画像データを複数に分割し、分割した前記画像データをそれぞれ印刷するスプリット印刷を実行させる場合、前記特定ステップ、前記判断ステップ、前記変換ステップ、及び前記出力ステップを、分割した前記画像データごとに実行させる、請求項1乃至請求項4の何れか1項に記載のプログラム。
On the computer,
In the case where the image data is divided into a plurality of pieces along the sub-scanning direction and split printing for printing the divided image data is performed, the specifying step, the determining step, the converting step, and the outputting step include: The program according to claim 1, wherein the program is executed for each of the divided image data.
前記コンピュータに、
前記副走査方向に沿って前記画像データを複数に分割し、分割した前記画像データをそれぞれ印刷するスプリット印刷を実行させる場合、分割した前記画像データの各々の前記画像長さのうち、最も長い前記画像長さを前記特定ステップで特定させ、前記判断ステップの結果に応じた前記変換ステップ及び前記出力ステップを、分割した前記画像データの各々について実行させる、請求項1乃至請求項4の何れか1項に記載のプログラム。
On the computer,
When the image data is divided into a plurality of pieces along the sub-scanning direction, and split printing for printing the divided image data is executed, the longest one of the image lengths of each of the divided image data is used. The image length is specified in the specifying step, and the converting step and the outputting step according to the result of the determining step are performed for each of the divided image data. The program described in section.
前記コンピュータに、
長尺の前記記録媒体が有色であるか否かを判断する有色判断ステップを実行させ、
前記記録媒体が有色である場合に、前記最も長い前記画像長さを前記特定ステップで特定させ、前記判断ステップの結果に応じた前記変換ステップ及び前記出力ステップを、分割した前記画像データの各々について実行させる、請求項6に記載のプログラム。
On the computer,
A colored determination step of determining whether the long recording medium is colored,
When the recording medium is colored, the longest image length is specified in the specifying step, and the conversion step and the output step according to the result of the determination step are performed for each of the divided image data. The program according to claim 6, which is executed.
前記コンピュータに、
前記ラスタデータに変換する前記画像データの範囲を設定する設定長さを受け付けた場合に、前記変換ステップにおいて、前記画像長さ、前記最小媒体長さ、前記設定長さのうち、最も長い長さの範囲で前記画像データを前記ラスタデータに変換させる、請求項1乃至請求項7の何れか1項に記載のプログラム。
On the computer,
In a case where a set length for setting a range of the image data to be converted to the raster data is received, in the conversion step, the image length, the minimum medium length, and the longest length among the set lengths The program according to any one of claims 1 to 7, wherein the image data is converted into the raster data in the range of (1) to (8).
制御部を備え、長尺の記録媒体に印刷を行うプリンタに印刷対象の画像データを出力する情報処理装置であって、
前記制御部は、
前記プリンタが前記記録媒体を搬送する搬送方向に直交する方向に応じた主走査方向について、前記主走査方向における前記画像データの1ラインずつに有効画素が存在するか否かを判断し、有効画素が存在するライン数に基づく長さであり且つ前記画像データの副走査方向の長さである画像長さを特定する特定処理と、
前記画像長さが、前記搬送方向における前記記録媒体の長さであり且つ前記プリンタによって前記記録媒体を搬送可能な最小の長さである最小媒体長さ以上であるか否かを判断する判断処理と、
前記画像長さが前記最小媒体長さ以上である場合に、前記画像データにおける前記画像長さの範囲をラスタデータに変換する変換処理と、
変換した前記ラスタデータを前記プリンタに出力する出力処理と、
を実行する、情報処理装置。
An information processing apparatus that includes a control unit and outputs image data to be printed to a printer that prints on a long recording medium,
The control unit includes:
For a main scanning direction corresponding to a direction orthogonal to a conveyance direction in which the printer conveys the recording medium, it is determined whether or not an effective pixel exists for each line of the image data in the main scanning direction. Is a length based on the number of existing lines, and a specifying process of specifying an image length that is a length in the sub-scanning direction of the image data;
Judgment processing for judging whether or not the image length is equal to or longer than the minimum length of the recording medium in the conveyance direction and the minimum length of the recording medium conveyable by the printer. When,
When the image length is equal to or longer than the minimum medium length, a conversion process of converting the range of the image length in the image data to raster data,
Output processing for outputting the converted raster data to the printer;
An information processing device that executes
JP2018134952A 2018-07-18 2018-07-18 Programs, information processing equipment Active JP7077838B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018134952A JP7077838B2 (en) 2018-07-18 2018-07-18 Programs, information processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018134952A JP7077838B2 (en) 2018-07-18 2018-07-18 Programs, information processing equipment

Publications (2)

Publication Number Publication Date
JP2020014115A true JP2020014115A (en) 2020-01-23
JP7077838B2 JP7077838B2 (en) 2022-05-31

Family

ID=69170761

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018134952A Active JP7077838B2 (en) 2018-07-18 2018-07-18 Programs, information processing equipment

Country Status (1)

Country Link
JP (1) JP7077838B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06237363A (en) * 1993-02-09 1994-08-23 Canon Inc Facsimile equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06237363A (en) * 1993-02-09 1994-08-23 Canon Inc Facsimile equipment

Also Published As

Publication number Publication date
JP7077838B2 (en) 2022-05-31

Similar Documents

Publication Publication Date Title
CN107025082B (en) Printing system, information processing apparatus, and method thereof
US9979846B2 (en) Non-transitory computer readable mediums and information processing apparatus generating print data and preview data
US9274728B2 (en) Print control apparatus and print control method
JP7031270B2 (en) Inspection equipment, inspection system and inspection method
CN107038005B (en) Printing system, information processing apparatus, and method thereof
US9747061B2 (en) Recording medium that stores printing program for instructing image forming apparatus of print job based on variable print data
US20100158591A1 (en) Printing Apparatus and Printer Driver
JP7298297B2 (en) application program
JP6651902B2 (en) Printing system, driver program, and printer
JP7077838B2 (en) Programs, information processing equipment
JP2014083776A (en) Printer, control method thereof, and program
JP6659108B2 (en) Image forming apparatus, image forming method, and program
US20210058531A1 (en) Printer and printing control method
JP2020049903A (en) Printer and program
US10908852B2 (en) Image processing apparatus receiving, generating, processing, and outputting print data
US11347455B2 (en) Information processing device, control method for information processing device, and program
JP7396017B2 (en) Driver program and registration program
JP7354655B2 (en) Programs and information processing equipment
JP2016043642A (en) Printer, control method and program
US11681484B2 (en) Generating layout image data representing layout image in which two images are arranged adjacent to each other
US11816516B2 (en) Storage medium storing computer-readable instructions for generating processed image data representing processed image in which gap area is arranged within range including longitudinal center position thereof
JP6962433B2 (en) Program and printer set
JP6773201B2 (en) Program and printer set
JP2018206163A (en) Control program, information processor, printer, and communication system
JP7263830B2 (en) printer and module

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210615

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220208

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220406

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: 20220419

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220502

R150 Certificate of patent or registration of utility model

Ref document number: 7077838

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150