This invention relates to a printing system constituting by a printing apparatus which operates upon receiving print information from a data processing apparatus (host computer), and a print data processing apparatus which is a combination of software modules referred to as printer drivers and device drivers that generate print information at the host computer side for the printing apparatus. The invention relates further to a printing control method, a data processing apparatus, a data processing method and a storage medium therefor.
A printing control method and the flow of processing in a conventional printing system will be described first.
In general, a printing system is constructed by connecting a host computer and a printing apparatus via parallel communication means, such as a Centronics interface, or via network communication means.
At the host computer, application software such as a word processor or spreadsheet runs on a so-called basic operating system such as Windows (the registered trademark of Microsoft Corporation). If printing is performed using the application software, the program implements printing using a graphic subsystem, which is one of several subsystems provided by the basic operating system.
The graphic subsystem, which is called GDI (Graphic Device Interface) in the Windows environment, supervises the processing of image information for a display or printer.
In order to compensate for dependency upon the particular device, such as a display or printer, the GDI dynamically links modules referred to as device drivers and executes output processing in regard to each device. The module for a printer is referred to as a printer driver. With a printer driver it is necessary to prepare a group of functions referred to as a DDI (Device Driver Interface) whose inclusion in the device driver is decided beforehand depending upon the capabilities and functions of the printer driver. In regard to the calling of an API (Application Programming Interface) of application software, the arrangement is such that the GDI performs a data conversion for the device driver, the group of DDI functions of this device driver are called from the GDI as appropriate and the prescribed print processing is executed. The GDI sequentially processes print requests from the application software via the printer driver. The processing of the printer driver can be classified into two types, namely a PDL type and an image type.
The PDL type is suitable for an arrangement in which the printing apparatus is equipped with a controller that is capable of processing a control command referred to as PDL (Printer Description Language). The processing involved is mainly processing for converting the DDI, which is delivered from the system, to a PDL command.
The image type, on the other hand, does not execute highly sophisticated plot processing on the side of the printing apparatus but rather expands print images on the side of the printer driver and sends the images to the printing apparatus so that they may be printed.
In processing for printing text, for example, the PDL-type processing mode performs printing by utilizing fonts incorporated in the printing apparatus or allocates IDs specific to character patterns expanded as necessary on the side of the printer driver in advance, first registers the character patterns on the side of the printing apparatus and then prints the characters based upon print position information and ID.
With the image-type processing mode, the printer driver possesses a plotter memory which stores data in band or full-page units, and characters are expanded in this memory. When one band or a full page of plot processing ends, the content of the plotter memory is transferred to the printing apparatus as image data and the prescribed image is printed out.
The prior art includes an arrangement in which the PDL and image types are utilized exclusively in one printer driver. In general, which should be utilized is decided by the user per se depending upon the content of the document to be printed, and the setting is made using the interface (referred to as a xe2x80x9cuser interfacexe2x80x9d below) of the printer driver.
The example of the prior art cited above has a number of problems.
(1) There are instances where it is difficult for the user to decide the optimum processing mode (PDL or image) from the content of a document.
Generally, the PDL processing mode is possible to process plain text data in high speed compared with the image processing mode.
However, the high speed performance of the PDL processing mode is not necessarily secured, because the processing performance depends on the contents of data.
For example, in case of a high resolution image such as a photograph taking up the entire side of a sheet of paper and having characters written thereon (see FIG. 3), it is highly likely that processing will be executed at higher speed by the image driver. That is, the processing time needed to obtain a printed result, which depends upon the size of the area plotted, whether there is a background beneath the characters and whether the document consists of a plurality of pages (i.e., whether or not there is a hit in the font cache), differs greatly depending upon the type of driver operation.
The image takes up the full side of a sheet of paper in the case of printing as shown in FIG. 3. Even if text separation processing is performed and the characters are cut from the document separately and processed as PDL in this case, there is an increase in the commands and textual data that are required for processing the characters as PDL. As a result, there is an increase in the overall print data and it is necessary to execute two kinds of processing, namely image plotting and text printing. The result is significant overhead from the standpoint of amount of processing.
In the case of such a full-page image, the superior choice is the image-type printer driver, in which characters also are pasted on the image expanded on the host side and the entirety is sent to the printer as an image.
(2) Allowing the user to select the optimum processing mode leads to ever more complicated user interfaces for the printer driver and is likely to lead to greater confusion for the user. Even in a case where it is attempted to lighten user load in regard to setting different conditions by allowing the setting of these conditions to be represented by icons, as shown in FIG. 4, there is still the danger that the user will be confused if a greater number of various printing modes is provided.
(3) A method that has been considered to solve the problems that arise when the selection is made by the user involves storing DDI information temporarily as a file and having the printer driver itself analyze this information to thereby precisely determine the optimum processing mode. However, storing the DDI information temporarily as a file takes time, with the likelihood that performance will decline.
(4) In order to precisely determine the optimum processing mode, it is necessary to ascertain the correlation (extent of overlap) among plot objects. If there is a very large number of plot objects, the processing for detecting them will instead lead to greater overhead and may make the desired result unobtainable.
(5) When the degree of overlap between text and other plot objects is examined, ascertaining pattern overlap in the plotter memory is processing executed in units of pixels. Detection processing in pixel units leads to greater overhead and may make the desired result unobtainable.
For example, in a case where characters ABC, an ellipse having a hatched pattern and a single slanted line have been drawn closely together, as illustrated in FIG. 5, it is difficult to precisely ascertain the degree of overlap, if any. In such case, the conventional practice is to discriminate degree of overlap based upon information referred to as a xe2x80x9cfont boundary boxxe2x80x9d, which encloses the character string in the manner indicated by the dashed-line box shown in FIG. 5. In such case, however, taking FIG. 5 as an example, despite the fact that there actually is no overlap between the rendered patterns of the respective objects, the result of area discrimination is that overlap exists (because the hatched portion and the dashed-line box are found to overlap).
In general, the prior art is such that the PDL- and image-type drivers are switched between on a print-job basis. However, a hybrid scheme in which these two types of drivers are used properly on a per-object basis in dependence upon the content of the print data also has been considered. However, the following problems arises when implementing a hybrid scheme of this kind:
(6) In a hybrid scheme, the components of both the PDL- and image-type drivers are combined. However, with the image-type implementation, for example, there are many cases where a banding approach is adopted from the viewpoint of using memory efficiently. In an instance where text is printed with such an arrangement, a DDI call for printing text takes place twice for characters that bridge bands even through characters are processed in PDL. More specifically, as illustrated in FIG. 6, a DDI call that clips the upper half of a character and expands it in an initial band is generated, then the lower half of the character also is clipped and this half is rendered in the next band. This form of processing is the same regardless of whether a driver is of the image type or PDL type because the processing step occurs at the processing stage of the DDI call. The processing of a character that spans bands in this manner invites a decline in processing speed because the printing of one character requires four steps ({circle around (1)} the setting of a clipping area in band n, {circle around (2)} the expansion of the character pattern, {circle around (3)} the setting of a clipping area in band nxe2x88x921 and {circle around (4)} the expansion of the character pattern).
First, in regard to problem (1) cited above, whether a character to be printed has background is a key point when performing area discrimination.
In regard to problem (2), a preferred arrangement is one having an autonomous decision mechanism in which, in principle, the driver itself, rather than the user, makes decisions and printing processing is executed by the optimum processing method thus decided.
In regard to problem (3), it is desirable to adopt a method in which DDI information is judged sequentially (in real time) whenever it arrives, instead of an n-pass scheme in which DDI information is stored as a file in the first pass and the information in the file is examine to judge the information.
In regard to problem (4), it is preferred that processing speed be given priority consideration over strictness in terms of degree of overlap at the dot level in view of the fact that the gist of the present invention is an improvement in performance. Thus a scheme that makes judgments using information relating to a rectangle circumscribing a character string is desired.
In regard to problem (5), if a condition can be imposed to the effect that a character that has been cut from a document by text separation processing will not have any background, then, when printing is performed in PDL, there will no longer be the need for clipping and it will be possible to eliminate the second cycle of printing processing.
The present invention solves the above-mentioned problems mainly by the arrangements described below by taking into account the aforesaid methods of dealing with these problems.
Specifically, the present invention provides a printing system constituted by a printing apparatus and a data processing apparatus capable of communicating with the printing apparatus via a prescribed communications medium, the system comprising: print information generating means for generating print information, which is to be printed by the printing apparatus, in response to a print request command; area information registration means for registering, in a registration area, coordinate information of a plotting area of a print object generated as the print information; and area discrimination means for comparing the coordinate information registered by the area information registration means with character-string print position information when the character string is printed, and discriminating whether or not these two items of information overlap, wherein type of processing for printing the character string is switched based upon results of discrimination by the area discrimination means.
A print control method according to the present invention comprises: a print information generating step of generating print information regarding a printing apparatus in response to a print request command; an area information registration step of registering, in a registration area, coordinate information of a plotting area of a print object generated as the print information; and an area discrimination step of comparing the coordinate information registered at the area information registration step with character-string print position information when the character string is printed, and discriminating whether or not these two items of information overlap, wherein form of processing for printing the character string is switched based upon results of discrimination.
The present invention further provides a data processing apparatus for outputting print information to a printing apparatus via a prescribed communications medium, comprising: print information generating means for generating print information that is to be printed by the printing apparatus; area information registration means for registering, in a registration area, coordinate information of a plotting area of the print information that has been generated; area information updating means which, when the coordinate information is registered, is for updating the coordinate information as the maximum area that contains the plotting area; and area discrimination means for comparing the coordinate information registered by the area information registration means with character-string print position information when the character string is printed, and discriminating whether or not these two items of information overlap.
The present invention further provides a data processing method for processing print information that is output to a printing apparatus, comprising: a print information generating step of generating print information that is to be printed by the printing apparatus; an area information registration step of registering, in a registration area, coordinate information of a plotting area of the print information that has been generated; an area information updating step which, when the coordinate information is registered, is a step of updating the coordinate information as the maximum area that contains the plotting area; and an area discrimination step of comparing the coordinate information registered at the area information registration step with character-string print position information when the character string is printed, and discriminating whether or not these two items of information overlap.
The present invention further provides a storage medium storing a data processing program for processing print information that is output to a printing apparatus, the data processing program comprising: code of a print information generating step of generating print information that is to be printed by the printing apparatus; code of an area information registration step of registering, in a registration area, coordinate information of a plotting area of the print information that has been generated; code of an area information updating step which, when the coordinate information is updated, is a step of updating the coordinate information as the maximum area that contains the plotting area; and code of an area discrimination step of comparing the coordinate information registered at the area information registration step with character-string print position information when the character string is printed, and discriminating whether or not these two items of information overlap.
The present invention further provides a storage medium storing a print control program, comprising: code of a print information generating step of generating print information, which is to be printed by a printing apparatus, in response to a print request command; code of an area information registration step of registering, in a registration area, coordinate information of a plotting area of a print object generated as the print information; and code of an area discrimination step of comparing the coordinate information registered at the area information registration step with character-string print position information when the character string is printed, and discriminating whether or not these two items of information overlap.
In accordance with a preferred embodiment of the present invention, the printing system described above further comprises first character printing means for printing a character pattern, which has been expanded on the side of the printing apparatus, if there is no overlap in the plotting area of the print object based upon results of discrimination performed by the area discrimination means; and second character printing means for printing a character pattern, which has been expanded by the data processing apparatus, as a bitmap image if there is overlap in the plotting area of the print object based upon results of discrimination performed by the area discrimination means.
In a preferred embodiment of the present invention, the area information registration means performs registration using area information relating to a rectangle circumscribing the plot object.
In a preferred embodiment of the present invention, the area information registration means registers, in the registration area, minimum values of top-left coordinates and maximum values of bottom-right coordinates of a rectangle circumscribing each plot object that is possibly background of text.
In a preferred embodiment of the present invention, the area discrimination means performs discrimination processing sequentially based upon print information generated sequentially in the print information generating means.
In a preferred embodiment of the present invention, the print information generating means generates print information that has been rasterized in units obtained by partitioning one page into a plurality of band areas.
In a preferred embodiment of the present invention, the print information generating means executes processing upon virtually connecting the plurality of band areas to expand them as one area in a case where a plotting area of a print object relating to a character bridges a plurality of the band areas according to the result of discrimination by the area discrimination means.
In a preferred embodiment of the present invention, the area information registration means and the area discrimination means perform registration and discrimination upon partitioning and managing a band area in the print information generating means as a plurality of sub-areas.
In a preferred embodiment of the present invention, the area information registration means saves, in the registration area, coordinate-value information which defines the maximum rectangular area that contains all print objects.
In a preferred embodiment of the present invention, the registration area has: a flag portion for identifying an attribute of the plotting area of the print object; a parent-area portion for identifying a parent area when the plotting areas are connected; a management area for saving coordinate information of the print object; and a registration area for saving area information of background of the print object.
In a preferred embodiment of the present invention, if the area discrimination means has discriminated overlap between an area of a character string processed as PDL and coordinate information of a subsequently entered print object which is background of the character string, the area discrimination means sets an image assurance flag for identifying the overlap and, after the image assurance flag has been set, subjects all print objects to print processing by the first character printing means, thereby eliminating inconsistency of printed results due to advance in the plotting order of the print objects.
In a preferred embodiment of the present invention, the printing system further comprises holding means for holding, on the side of the data processing apparatus, print information of a character string processed as PDL in the band area, wherein if the area discrimination means has discriminated that the area of the character string processed as PDL and coordinate information of a subsequently entered print object which is background of the character string overlap, the area discrimination means calls the print information of the character string being held by the holding means, performs expansion in a plotter memory by the data processing apparatus based upon the print information of the character string, and updates the coordinate information of the plotting area, which has been registered in the registration area, as well as the print information of the character string, thereby eliminating inconsistency of printed results due to advance in the plotting order of the print objects.
In accordance with a preferred embodiment of the present invention, the printing control system described above further comprises a first character printing step of printing a character pattern, which has been expanded by the printing apparatus, if there is no overlap in the plotting area of the print object based upon results of discrimination performed at the area discrimination step; and a second character printing step of printing a character pattern, which has been expanded by the data processing apparatus, as a bitmap image if there is overlap in the plotting area of the print object based upon results of discrimination performed at the area discrimination step.
In a preferred embodiment of the present invention, the area information registration step performs registration using area information relating to a rectangle circumscribing the plot object.
In a preferred embodiment of the present invention, the area information registration step registers, in the registration area, minimum values of top-left coordinates and maximum values of bottom-right coordinates of a rectangle circumscribing each plot object that is possibly background of text.
In a preferred embodiment of the present invention, the area discrimination step performs discrimination processing sequentially based upon print information sequentially generated at the print information generating step.
In a preferred embodiment of the present invention, the print information generating step generates print information that has been rasterized in units obtained by partitioning one page into a plurality of band areas.
In a preferred embodiment of the present invention, the print information generating step executes processing upon virtually connecting the plurality of band areas to expand them as one area in a case where a plotting area of a print object relating to a character bridges a plurality of the band areas according to the result of discrimination at the area discrimination step.
In a preferred embodiment of the present invention, the area information registration step saves, in the registration area, coordinate-value information which defines the maximum rectangular area that contains all print objects.
In a preferred embodiment of the present invention, the registration area has: a flag portion for identifying an attribute of the plotting area of the print object; a parent-area portion for identifying a parent area when the plotting areas are connected; a management area for saving coordinate information of the print object; and a registration area for saving area information of background of the print object.
In a preferred embodiment of the present invention, if the area discrimination step has discriminated overlap between an area of a character string processed as PDL and coordinate information of a subsequently entered print object which is background of the character string, the area discrimination step sets an image assurance flag for identifying the overlap and, after the image assurance flag has been set, subjects all print objects to print processing by the first character printing step, thereby eliminating inconsistency of printed results due to advance in the plotting order of the print objects.
In a preferred embodiment of the present invention, the printing control system further comprises a holding step of holding, in a memory on the side of the data processing apparatus, print information of a character string processed as PDL in the band area, wherein if the area discrimination step has discriminated that the area of the character string processed as PDL and subsequently entered coordinate information of a print object which background of the character string overlap, the area discrimination step calls the print information of the character string being held in the memory, performs expansion in a plotter memory on the side of the data processing apparatus based upon the print information of the character string, and updates the coordinate information of the plotting area, which has been registered in the registration area, as well as the print information of the character string, thereby eliminating inconsistency of printed results due to advance in the plotting order of the print objects.
In a preferred embodiment of the present invention, the area discrimination means performs discrimination processing based upon print information without spooling.
In a preferred embodiment of the present invention, the area discrimination step performs discrimination processing based upon print information without spooling.
In a preferred embodiment of the present invention, the code of area discrimination step performs discrimination processing based upon print information without spooling.
It should be noted that, as a general rule, the present invention holds with the following assumption as a condition, and that a correctly printed result will be assured under this limited precondition (though this is a general rule at best; a way of coping with instances where the rule is violated will be described later in conjunction with a third embodiment): The precondition is that a plot object which is the background of a character contains the character, and that the DDI of a plot object constituting background is called before a text printing DDI at the time of print processing. Further, a plot object of the kind for which a logical operation is performed on a character is not drawn.
For example, in a case where printing of the kind shown in FIG. 7A is performed, the character string xe2x80x9cFile Namexe2x80x9d has background. Characters in a case such as this are subjected to image-type processing without being cut out as characters to be processed in PDL. The discrimination method used at this time will be described in simple terms with reference to FIG. 7B. In an ordinary printed document, the background of a character string having such background surrounds the character string. In such case print commands which the system delivers to the printer driver also are processed in order starting from the information of the plotting area.
More specifically, in the case of FIG. 7B, first a ruled line (a straight line) of a table constituting background is delivered as a rectangular image to the printer driver by a DDI call DrvBitBlt ({circle around (1)}). At this time the printer driver first registers, in prescribed area information storage means, two items of coordinate information, namely the point (point A) at the top left of this plot object (a rectangle in this case) and the point at the bottom right (point B, which, since this is a rectangular image of a straight line, is the point at the extreme right end of the straight line).
Next, a portion (rectangular) that is a hatched part of the table is delivered to the printer driver by a DDI call DrvBitBlt ({circle around (2)}). Here also two items of coordinate information, namely the top-left point (point A) and bottom-right point (point C) of this rectangular area are registered in the prescribed area information storage means by area information registration means. However, this information is compared with the area information already registered, and a smaller value in the top-left direction and a larger value in the bottom-right direction are registered. In other words, the area information managed by the area information storage means is always taken as two points in this case.
The area information is referred to in this manner for each plot object so that the largest rectangular area that will contain these plot objects may always be ascertained. If the next item arrived at under these conditions is a character string, it is determined whether there is overlap between information relating to a circumscribing rectangle that contains the character string and a rectangular area registered by the area information registration means thus far.
If there is even slight area overlap, it is judged that the character string includes background and, hence, the character string is subjected to processing of the image type. For example, in regard to xe2x80x9cFile Namexe2x80x9d ({circle around (3)}), a rectangular area defined by Axe2x80x2 and Cxe2x80x2 and the hatched portion of {circle around (2)} overlap.
On the other hand, if the result of area discrimination is that there is no overlap (e.g., the character-string portion xe2x80x9cTag.1xe2x80x9d in FIG. 7B), this character string is subjected to processing of the PDL type. This makes it possible to instantly judge the optimum processing means at all times.
The foregoing is the principle of operation of the inventive means for solving the aforementioned problems. These means solve the problems of the prior art, make it possible to shorten the time needed for printing processing and provide a transition from operating mode decisions made by the user to autonomous operating mode decides made by the printer driver. As a result, it is no longer necessary to make settings through a complicated user interface, thereby improving operability for the user.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.
USPTO Backgrounds
USPTO Backgrounds