Printer capable of printing in a desired print range

Abstract: Print data sent from a host computer can be printed in a specified print range even if the print data received from the host computer has a fixed print range. Both the fixed print range and the specified print range are represented by coordinates on a sheet of paper, and the coordinates of an image for the fixed range are converted to another coordinates adapted to print in the specified print range while changing the size of the entire image.

Description: The present invention relates to a printer for carrying out printing upon receiving data from a host computer for example. Conventionally, print data sent from a host computer are set to be printed in a predetermined range in a sheet of paper by a preselected printer. If there is a change of print range owing to the change of a print paper size or the change of the printer, it has been required that a host computer change print data each time such change occurs. However, the change of the print data cannot be easily done in the host computer when it is desired to carry out printing within an optional print range. JP-A-1,249,463, upon which the precharacterising portion of appended claim 1 is based, describes a system which takes a document stored on a magnetic disk and converts the data to a bit image. A processing means then modifies the bit image data to enlarge or reduce the image according to the size of paper selected by the user. JP-A-255,170 describes a device that takes in and stores image data. A processing means then either enlarges or reduces the image and/or rotates it through 90 degrees to change the orientation of the printed images. The present invention has been made to solve the above problem, and accordingly it is an object of the present invention to provide a printing device wherein print data sent from a host computer is adapted for printing within a fixed range in a sheet of paper, letters and/or graphic images are printable to match a desired print range without need for modifying the print data at the host computer. According to the present invention there is provided a printer comprising: print data storage means for storing print data on a page basis; first print range storage means for storing a first print range; specifying means for specifying a second print range; second print range storage means for storing the second print range; and converting means responsive to said first and second print ranges for converting the print data, such that the converted print data is printed in a position in the second print range corresponding to a position in the first print range; characterised in that the first print range represents the extremities of the area which said print data would occupy if printed, based on the print data stored in said print data storing means; the printer further comprises developing means for calculating the first print range; and the specifying means is for specifying a second print range which represents the extremities of the area in which it is desired to print one page of print data wherein both the first and second print ranges are represented by coordinates. Both the first and second print range are represented by coordinates on the sheet of print paper, and the converting means converts the coordinates of an image to be printed in the first print range to other coordinates to be printed in the second print range. Further, the converting means changes size of the image so that one page print data are printed in the second print range in its entirety. The particular features and advantages of the invention as well as other objects will become apparent from the following description taken by way of example in connection with the accompanying drawings, in which:- Fig. 1 is a block diagram showing an arrangement of a printer according to an embodiment of the present invention; Fig. 2 is a flow chart illustrating an operational sequence executed by the printer according to the embodiment of the present invention; Figs. 3(a) through 3(c) are explanatory diagrams for describing processing of one page print data to compute and update a printing range; and Figs. 4(a) through 4(c) are explanatory diagrams for describing computation of print data to print in a desired print range. Fig. 1 shows in block form an electrical arrangement of a printer according to a preferred embodiment of the present invention. An interface 1 is connected via a reception buffer 3 to a central processing unit (CPU) 2. The CPU 2 carries out various kinds of jobs and it can be divided into various sections in terms of the jobs executed. The CPU 2 serves as a print data detecting section 2a, a print range developing section 2b, a print range specifying section 2c, a print data converting section 2d, and a print control section 2e. The print data detecting section 2a detects a change-of-page command contained in the print data indicating that print data for one page has been received. The print range developing section 2b develops a predefined print range or first print range on a sheet of paper based on the print data stored in a print data storage section 5a. The print range is a selected print area on the sheet of paper on which the print data are printed. The print range or print area is defined by determining upper, lower, left and right margins. The print range specifying section 2c detects a print range specifying command contained in the print data transmitted to the printer from a host computer, and specifies a second print range in which the one page print data stored in a print data storage section 5b are actually printed. The print range specifying section 2c may specify the second print range in accordance with the output from a paper size detector 7 which detects the paper size or a paper tray in which print papers of a particular size are stored. Alternately, the print range specifying section 2c may specify the second print range in accordance with the print range inputted through a panel switch 8 provided in the printer. The print data converting section 2d converts the print data stored in the print data storage section 5a to data to be printed in the second print range. As will be described later, the first and second print ranges are represented by coordinates on the print paper, and the print range converting section 2d converts the coordinates of an image adapted to the first print range to another coordinates to be printed in the second print range upon effecting reduction, enlargement or movement of the image to be printed in the first print range. The print control section 2e controls printing operation of a printer engine 6 which carries out printing based on the print data processed by the CPU 2 on the sheet of paper. A reception buffer 3 is connected between the interface 1 and the CPU 2 and temporarily stores the print data received through the interface 1. A read-only memory (ROM) 4 stores a program for running the CPU 2. A random access memory (RAM) 5 has various storage locations which are the print data storage section 5a for storing one page print data detected by the print data detecting section 2a, a first print range storage section 5b for storing the first print range developed by the print range developing section 2b, a second print range storage section 5c for storing the second print range specified by the print range specifying section 2c, and a print data storage section 5d for storing the print data converted by the print data converting section 2d. Operation of the printer will be described with reference to the flow chart shown in Fig. 2. In step S201, initialization of the RAM 5 is performed. In step S202, the data received through the interface 1 and stored in the reception buffer 3 are read. In step S203, it is checked that the data thus read are a print range specifying command. If "YES", the print range represented by the print range specifying command is stored in the second print range storage section 5c in step S204. On the other hand, if the decision made in step S203 is "NO", it is checked that the data read in step S202 are a change-of-page command in step S205. If the data read in step S205 are not the change-of-page command, the data are determined as either letter data or graphic data and are stored in the print data storage section 5a. In step S207, the size of each image (letter or graphic) is developed and the print range stored in the first print range storage section 5a is updated, whereupon the routine returns to step S202. When the data read in step S205 are the change-of-page command, it is determined that one page print data have been received. In step S208, the print data are converted to be printable in the second print range now stored in the second print range storage section 5c. As will be described later, the first and second print ranges are represented by coordinates on the sheet of paper, and the coordinates of the image to be printed in the first print range is converted to another coordinate to be printed in the second print range. In step S209, the print data converted in step S208 is stored in the print data storage section 5d. In step S210, the print data stored in the print data storage section 5d are printed. In step S211, both the print data storage section 5d and the first print range storage section 5b are cleared for the subsequent processing, whereupon the routine returns to step S202. In the operation described, no matter in what print range the print data have been set, this print range is developed and the print data are converted so as to meet the specified print range, whereby the printing can be carried out in the specified print range. Next, the processing in step S207 will be further described in detail with reference to Figs. 3(a) through 3(c). In the following description, an origin of the coordinate on the sheet of paper is set to lower left corner thereof. The print zone of each letter or each graphic image is set to be a minimum rectangular shape in which the letter or graphic image can be included. The position of the rectangular print zone is defined by the lower left coordinates, and the size of the print zone is defined by the width and height of the rectangular zone. It is assumed that print data representative of letter "A", print data representative of letter "B" and graphic image data representative of a circle are sequentially transmitted from the host computer in the stated order. Fig. 3 (a) shows a processing of the print data regarding the letter "A". The print data regarding the letter "A" is composed of letter print position data (Xa, Ya), letter width data Wa, letter height data Ha, and a letter code which may be an ASCII code representing the letter "A". Thus the print zone of the letter "A" is defined by a dotted line. The print range define by a solid line is stored in the first print range storage section 5b to store the lower left coordinates (Xa, Ya), the width Wa, and the height Ha. Fig. 3 (b) shows a processing of the letter "B" print data received following the letter "A" print data. Like the letter "A" print data, the letter "B" print data are composed of letter print position data (Xb, Yb), letter width data Wb, letter height data Hb, and a letter code representing the letter "B". The print zone of both the letters "A" and "B" is indicated by a dotted line in Fig. 3(b) and the data stored in the first print range storage section 5b are updated to data representing the print zone define by the solid line in Fig. 3(b). That is, the data now stored in the first print range storage section 5b are the lower left coordinates (Xb', Yb'), the width Wb', and the height Hb'. Xb' is set to the smaller value of Xa and Xb. Yb' is set to be the smaller value of Ya and Yb. Wb' is set to be the larger value of (Xa + Wa - Xb') and (Xb + Wb - Xb'). Hb' is set to be the larger value of (Ya + Ha - Yb') and (Yb + Hb - Yb'). In the rectangular zone drawn by the solid line in Fig. 3(b), Xb' = Xa, Yb' = Yb, Wb' = Xb + Wb - Xa, Hb' = Ya + Ha - Yb. Fig. 3 (c) shows a processing executed when graphic data are received. The graphic data represent a circle and are composed of circular center coordinate data (Xd, Yd) and circular radial data Rd. The print zone of the circle as indicated by a dotted line in Fig. 3(c) is defined by the lower left coordinate (Xc, Yc), width Wc and height Hc. Therefore, the following relations exist: Xc = Xd - Rd, Yc = Yd - Rd, Wc = 2Rd, and Hc = 2Rd. The data in the first print range storage section Sb is updated to indicate the rectangular zone indicated by a solid line in Fig. 3(c) which is defined by the lower left coordinates (Xc', Yc'), width Wc' and height Hc'. Xc' is set to be the smaller value of Xb' and Xc. Yc' is set to be the smaller value of Yb' and Yc. Wc' is set to be the larger value of (Xb' + Wb' - Xc') and (X c + Wc - Xc'). Hc' is set to be the larger value of (Yb' + Hb' - Yc') and (Yc + Hc - Yc'). In the example shown in Fig. 3(c), Xc' = Xb', Yc' = Yc, Wc' = (Xc + Wc - Xc'), and Hc'= (Yb' + Hb' - Yc). . In this manner, the print zone is updated each time the letter or graphic data are received from the host computer until a change-of-page command is detected. Next, the processing in steps S208, S209 and S210 will be further described in detail with reference to Figs. 4(a) through 4(c). In Fig. 4 (a), the blackened portions indicate the printed portions. The print range a1 is developed based on one page print data transmitted from the host computer and the print range a2 is specified to carry out printing in this range. The print range a1 is represented by the lower left coordinates (Xa, Ya), width Wa, and height Ha as computed in step S207. The print range a2 is specified in step S204, which is represented by the lower left coordinates (Xa', Ya'), the width Wa' and the height Ha'. Fig. 4(a) shows a relationship of Xa > Xa', Ya < Ya', Wa = Wa' and Ha = Ha'. The leftside of Fig. 4(a) indicates printing carried out by the conventional printer, wherein only an overlapped portion of the print ranges a1 and a2 is printed and the rest of the print range a2 is not printed. With the printer of the present invention, as shown in the rightside of Fig. 4(a), by adding coordinates (X'a - Xa, Y'a - Ya) to the coordinates of the print data, the print position is shifted so that printing is carried out within the print range a2. Referring next to Fig. 4(b), the print range b1 is determined by one page print data transmitted from the host computer and the print range b2 is specified to carry out printing in this range. The print range b1 is represented by the lower left coordinates (Xb, Yb), width Wb, and height Hb as computed in step S207. The print range b2 is specified in step S204, which is represented by the lower left coordinates (Xb', Yb'), the width Wb' and the height Hb'. Fig. 4(b) shows a relationship of Xb = Xb', Yb = Yb', Wb > Wb' and Hb > Hb'. The leftside of Fig. 4(b) indicates printing carried out by the conventional printer, wherein only an overlapped portion of the print ranges b1 and b2 is printed and the rest of the print range b2 is not printed. With the printer of the present invention, as shown in the rightside of Fig. 4(b), by setting Wb'/Wb or Hb' /Hb whichever is smaller as a reduction ratio Eb and then multiplying the reduction ratio Eb to the coordinates of the printing letter or the print letter size, printing can be carried out within a reduced print area and the letters and the graphics to be printed in the print range b1 can be printed in the specified print range b2. Referring to Fig. 4(c), the print range c1 is determined by one page print data transmitted from the host computer and the print range c2 is specified to carry out printing in this range. The print range c1 is represented by the lower left coordinates (Xc, Yc), width Wc, and height Hc as computed in step S207. The print range c2 is specified in step S204, which is represented by the lower left coordinates (Xc', Yc'), the width Wc' and the height Hc'. Fig. 4(c) shows the relationship of Xc = Xc', Yc = Yc', Wc < Wc' and Hc < Hc'. The leftside of Fig. 4(c) indicates printing carried out by the conventional printer, wherein the entire print range c1 is printed but not the entire print range c2. With the printer of the present invention, on the other hand, as shown in the rightside of Fig. 4(c), by setting Wc'/Wc or Hc' /Hc whichever is smaller as an enlargement ratio Ec and then multiplying the enlargement ratio Ec to the coordinates of the printing letter or the print letter size, printing can be carried out within an enlarged print area and the letters and the graphics to be printed in the print range c1 can be printed in the specified print range c2. As described, the print data are converted based on both a first print range obtained from the print data and a second print range as specified, whereby the print data can be printed within the specified print range in its entirety. Even if the data sent from a host computer are of a fixed print range, the data can he printed in a specified print range without altering the print data each time the print range is changed. While the present invention has been described with reference to a specific embodiment, it can be understood for a person skilled in the art that a variety of changes and modifications may be made without departing from the scope of the present invention as specified by the claims.

Claims: A printer (10) comprising: print data storage means (3) for storing print data on a page basis; first print range storage means (5b) for storing a first print range; specifying means (2c) for specifying a second print range; second print range storage means (5c) for storing the second print range (a2, b2, c2); and converting means (2d) responsive to said first and second print ranges for converting the print data, such that the converted print data is printed in a position in the second print range corresponding to a position in the first print range; the specifying means (2c) is for specifying a second print range which represents the extremities of the area in which it is desired to print one page of print data characterised in that the first print range (a1, b1, c1) represents the extremities of the area which said print data would occupy if printed, based on the print data stored in said print data storing means; the printer further comprises developing means (2b) for calculating the first print range (a1, b1, c1) responsive to the print data; and wherein both the first and second print ranges are represented by coordinates. The printer according to claim 1, wherein said converting means (2d) converts the coordinates of an image to be printed in the first print range to another coordinate to be printed in the second print range. The printer according to claim 1 or 2, wherein said converting means (2d) changes the size of the image so that one page of print data is printed in the second print range in its entirety. The printer according to claim 1, 2 or 3, wherein the change in the image size is determined based on the ratio of the width (Wa', Wb', Wc') of the second print range to the width (Wa, Wb, Wc) of the first print range. The printer according to claim 1, 2, 3 or 4, wherein the change in the image size is determined based on the ratio of the height (Ha', Hb', Hc') of the second print range to the height (Ha, Hb, Hc) of the first print range. The printer according to any preceding claim, wherein the print data include character data representing a character to be printed, the character being identified by a character code, a print position of the character being defined by print position data represented by coordinates on a sheet of print paper, and the size of the character being defined by width data representative of the width of the character and height data representative of the height of the character. The printer according to any preceding claim, wherein the print data include graphic data representing a graphic image to be printed, a print position of the graphic image being defined by print position data represented by coordinates on the sheet of print paper, and a configuration of the graphic image being defined by configuration data. The printer according to claim 7, wherein graphic data representing a circle is defined by coordinates of a centre of the circle and a radius of the circle. The printer according to any preceding claim, wherein the print data include a print range specifying command, and a change-of-page command, and wherein said specifying means specifies the second print range in accordance with the print range specifying command. The printer according to any preceding claim, further comprising an interface (1) for receiving the print data from an external device, and detecting means for detecting a change-of-page command included in the print data, the detection of the change-of-page command indicating that one page of print data has been received from the external device, wherein said print data storage means stores the one page print data. The printer according to claim 10, further comprising buffer means (3) for temporarily storing the print data received from the external device. The printer according to any preceding claim, further comprising paper size detecting means (7) for detecting the size of print paper on which printing is to be carried out, wherein said specifying means (2c) specifies the second print range depending on the size of the print paper detected by said paper size detecting means. The printer according to any preceding claim, further comprising input means (8) for inputting a desired print range, and wherein said specifying means (2c) specifies the second print range in accordance with the print range inputted by said input means.

Inventors: FUKAYA KOSUKE, FUKAYA, KOSUKE, Fukaya, Kosuke, c/o Brother Kogyo K. K.
Applicants: BROTHER IND LTD, BROTHER KOGYO KABUSHIKI KAISHA
Application year: 1992
Main classification: G06K15
IPC codes: B41J21, B41J2, G06K15, B41J5