Embodiments described herein relate generally to a printer and print method for printing a barcode or a two-dimensional code (QR code) on a recording medium using an ink ribbon or the like.
In recent years, the manner of using printers becomes increasingly complicated and diversified. There is available a printer for printing a barcode or a two-dimensional code (QR code) on a recording medium using an ink ribbon or the like. In this type of printer, printing functions may be performed by inserting an insert image into a two-dimensional code (QR code).
According to some embodiments, a printer includes a determining unit configured to determine whether a two-dimensional code complies with a readout condition of a printed matter when inserting an insert image into a two-dimensional-code image. The printer further includes a print unit configured to print, on a recording medium, the two-dimensional-code image inserted with the insert image if the determining unit determines that the two-dimensional code complies with the readout condition within a predetermined range.
Reference will now be made in detail to various embodiments of the subject matter, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present subject matter. However, it will be apparent to one of ordinary skill in the art that the present subject matter may be practiced without these specific details. In other instances, well-known methods, procedures, systems, and components have not been described in detail so as not to unnecessarily obscure aspects of the described subject matter.
A printer 1 according some embodiments is described in detail with reference to
Referring now to
Referring to
In the printer 1 configured as above, in response to the operations of the operation unit 4 or instructions from the host computer 42, the thermal head 28 performs printing operations on the paper D (as the recording medium) under the control of the control unit 31. The paper D is conveyed by the conveying roller 10, the platen roller 13 and the pinch roller 50 and is discharged to the discharge port 3.
Next, the generation of a two-dimensional code (QR code) in the printer 1 configured as above will be described in detail with reference to
Examples of two-dimensional codes (QR codes) having an insert image inserted therein are described with reference to
Printer 1 may for example be a label printer, and may include an image buffer (not shown) with a storage capability corresponding to a specified paper size provided by the image generating unit 41 of
The image generating unit 41 may be configured to include a function of erasing a designated portion (“superimposed area”) of the two-dimensional code image for superimposing an insert image over the designated portion. Such a superimposed area may be designated when rendering a two-dimensional-code image in the image buffer of the image generating unit 41. Further, the image generating unit 41 may include a function for rendering a two-dimensional-code image in which an insert image can be inserted into the two-dimensional code image. The QR code determining unit 40 may determine whether the partially erased two-dimensional code image is normally read out within a tolerable error correction rate or normal readout rate (e.g., 30%), using a two-dimensional-code error correction function of a two-dimensional-code reader engine.
In some embodiments, by forming an erased portion in the two-dimensional code, as described above, it can be determined in advance whether the two-dimensional code meets a readout condition of a printed matter, by executing a two-dimensional-code error correction function to make error computations. It is also possible to recognize in advance any constraints on the error correction level and the insertion position of the insert image. In other words, it is possible to determine whether the error correction can be normally performed depending on the insertion position and size of the insert image. This makes it possible to prevent the insert image from being erroneously inserted into an area in the two-dimensional code image that should not be erased to conform to the two-dimensional-code readout function. Accordingly, a proper image insertion area can be specified while complying with the requirements of the two-dimensional code.
The image insertion area may be displayed beforehand on, e.g., a display screen of the host computer 42 (e.g., a personal computer as an external device) or the display unit 5 of the printer 1 (e.g., as a label printer). This makes it possible to easily notify a user of the image insertion area before the printout is executed.
Next, specific operations of inserting an insert image into a two-dimensional code using the printer 1 as a label printer is described in detail with reference to the flowchart shown in
If the two-dimensional code (QR code) is determined to be readable by the control unit 31 and the QR code determining unit 40, the image generating unit 41 generates a two-dimensional-code (QR-code) image based on the provided characters, or the like, and inserts the provided insert image into the two-dimensional-code (QR-code) image under the above-described insertion condition (e.g., based on the insertion position and size of the insert image), thereby generating a composite image. Based on the composite image supplied from the image generating unit 41, the thermal head 28 may print, on a recording medium such as a label, various types of two-dimensional codes (QR codes) as illustrated in
Since the insert image inserting process and the determining process as described above may affect the printing throughput, the control unit 31 may switch on and off the insert image inserting process and the determining process. For example, if the printing needs to be performed in an expedited manner, the insert image inserting process and the determining process may be turned off.
Also, according some embodiments, a two-dimensional code generating process, including the insert image inserting process and the determining process, may be performed internally in a printer. Thus, the two-dimensional code can be generated in such a manner that the generated code is optimally customized according to the throughput of the printer. Also, this makes it possible for the printer to operate in its optimal performance condition irrespective of the other conditions related to an external device such as a host computer.
In alternate embodiments, the insert image inserting process and the determining process may be positively performed using the host computer 42, which functions as an input unit or the personal computer as an external device, as described with reference to the flowchart shown in
More specifically, the control unit 31 of the printer 1 as a label printer receives a two-dimensional code (QR code) inserted with an insert image in advance from the host computer 42 or the personal computer through the communication unit 16 (Act A21). The control unit 31 and the image generating unit 41 renders an image on a buffer based on the given QR code image (Act A22). Then, the control unit 31 and the QR code determining unit 40 determine whether the rendered QR code image is normally read out within a range of a normal readout rate (e.g., 30%), using a two-dimensional-code error correction function of a two-dimensional-code reader engine (Act A23).
If it is determined that the rendered QR code image is not normally read out within a range of normal readout rate (e.g., 30%) (Act A24), the control unit 31 and the QR code determining unit 40 display an occurrence of an error on the display unit 5 of the printer 1, the display screen of the host computer 42 or the display screen of the personal computer, and also display information on how to change the insertion options (such as the size, shape and position of the insert image) to enable normal printing (Act A26). If it is determined that the rendered QR code image is normally read out within a range of normal readout rate (e.g., 30%) (Act A24), the control unit 31 and the QR code determining unit 40 controls the thermal head 28 to print a QR code image inserted with the insert image (see, e.g.,
As described above, the printer 1 can determine in advance whether the two-dimensional code (QR code) inserted with the insert image in accordance with a predetermined insert image insertion condition complies with the readout condition. This eliminates the waste of time and resources due to erroneous printing of an unreadable QR code image.
As used in this application, entities for executing the actions can refer to a computer-related entity, either hardware, a combination of hardware and software, software, or software in execution. For example, an entity for executing an action can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and a computer. By way of illustration, both an application running on an apparatus and the apparatus can be an entity. One or more entities can reside within a process and/or thread of execution and an entity can be localized on one apparatus and/or distributed between two or more apparatuses.
The program for realizing the functions can be recorded in the apparatus, can be downloaded through a network to the apparatus, or can be installed in the apparatus from a computer readable storage medium storing the program therein. A form of the computer readable storage medium can be any form as long as the computer readable storage medium can store programs and is readable from an apparatus such as a disk type ROM and a solid-state computer storage media. The functions, obtained by installation or download in advance, in this way can be realized in cooperation with an OS (Operating System) in the apparatus.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel printer and print method described herein may be embodied in a variety of other forms or in combination any part(s) of the various embodiments described. Furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit or scope of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.