This application claims priority under 35 U.S.C. §119 from Japanese Patent Application No. 2007-091915 filed on Mar. 30, 2007. The entire subject matter of the application is incorporated herein by reference.
1. Technical Field
The following description relates to an image forming device configured to form images on recording sheets. In particular, the following description relates to an image forming device capable of retrieving print data from a portable storage detachably connectable to the image forming device and forming images based on the print data retrieved from the portable storage.
2. Related Art
Conventionally, there is known an image forming device provided with a print data retrieving unit which retrieves print data from a portable storage, and an image forming unit which forms images on recording sheets based on the retrieved print data. With this type of image forming device, if the portable storage such as a USB (Universal Serial Bus) memory or a memory card, in which the print data has been stored in advance, is connected to the image forming device, the print data retrieving unit retrieves the print data stored therein and the image forming unit forms images on the recording sheets such as printing sheets.
When the print data is stored in such a portable storage using a printer driver installed in a personal computer, an image forming device to be used for forming the image based on the print data stored in the portable storage cannot be identified. Therefore, the print data is generated assuming that the printer to be used for printing the print data stored in the portable storage is, for example, similar to a printer locally connected to the personal computer. Accordingly, there could be a case where the print data stored in the portable storage may not conform to optional settings such as a tray setting of the image forming device to be actually used for printing the print data stored in the portable storage.
To deal with such a deficiency, there has been suggested an image forming device which is configured to automatically replace the print settings with practical settings if the print settings included in the print data cannot be handled by the image forming device to be actually used. An example of such a configuration of automatic replacement of the print data is disclosed in Japanese Patent Provisional Publication No. 2006-56176 (hereinafter, referred to as '176 publication).
However, in such a configuration, the replaced print settings may not meet a user's demand. For example, when a maximum printable range of a printer engine is an A3 size with predetermined margin along each side, and print data including the print setting of A3 size recording sheet without margins, whether the print data is converted to the print setting of A3 with margins or to the print setting of B4 size sheet without margins should be determined by the user depending on the necessity. Further, once the print data has been replaced with modified print data, for example, to meet the image forming device having a relatively low function, it would be very difficult to print the same print data using an image forming device having a relatively high functionality.
In consideration of the above problem, the present invention is advantageous in that an improved image forming device is provided, with which images can be formed with appropriate print settings conforming with the functionality of the image forming device and printing options, without modifying the print data.
According to aspects of the invention, there is provided an image forming device to which an external storage is connectable. The image forming device is provided with a print data retrieving unit configured to retrieve print data from the external storage, an image forming unit configured to form an image on a recording sheet based on the print data retrieved by the print data retrieving unit, a modifying information retrieving unit configured to retrieve modifying information representing modification of at least one of a command and data, which constitute the print data, from the external storage if the modifying information is stored in the external storage, a modifying unit configured to modify the at least one of the command and the data of the print data based on the modifying information retrieved by the modifying information retrieving unit. If the at least one of the command and the data is modified by the modifying unit, the image forming unit forms the image on the recording sheet based on the modified print data.
According to another aspect of the invention, there is provided a method of printing, for an image forming device, based on print data stored in an external storage which is connectable to the image forming device. The method includes the steps of retrieving print data from the external storage, retrieving modifying information representing modification of at least one of a command and data, which constitute the print data, from the external storage if the modifying information is stored in the external storage, storing the print data retrieved by the step of retrieving if the modifying information is stored in the external storage, modifying the at least one of the command and the data of the print data based on the modifying information retrieved by the step of retrieving and forming an image on a recording sheet based on the print data if the at least one of the command and the data is modified.
According to a further aspect of the invention, there is provided a computer accessible recording medium storing a program to be executed by a computer of an image forming device which is configured to print images on recording sheets based on print data stored in an external storage which is connectable to the image forming device. The program causing the computer to execute the steps of retrieving print data from the external storage, retrieving modifying information representing modification of at least one of a command and data, which constitute the print data, from the external storage if the modifying information is stored in the external storage, storing the print data retrieved by the step of retrieving if the modifying information is stored in the external storage, modifying the at least one of the command and the data of the print data based on the modifying information retrieved by the step of retrieving and forming an image on a recording sheet based on the print data if the at least one of the command and the data is modified.
According to the above configurations, when the print data stored in the external storage is read out and images can be formed with appropriate print settings conforming with the functionality of the image forming device and printing options, without modifying the print data stored in the external storage.
Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings.
As shown in
The image forming unit 30 executes an image forming operation in accordance with a well-known electrophotographic imaging process. That is, a laser beam is ON/OFF modulated based on the image data and scanned within a predetermined angular range so that the surface of a photoreceptive drum, which is rotated, is scanned by the modulated laser beam (not shown) to form a electrostatic latent image thereon. The latent image is then developed as toner is applied thereto, thereby a toner image is formed. The toner image is transferred onto a recording sheet which is fed from the sheet feed cassette 4. The toner image transferred on the recording sheet is fixed on the recording sheet, which is discharged and stacked on the tray section 6. As described above, the image forming unit 30 is configured as a so-called page printer, which forms an page of the image (toner image) on one page of the recording sheet. It should be noted that the invention need not be limited to this configuration (i.e., the electrophotographic imaging device), but can be of other types such as an inkjet type serial printer (i.e., not a page printer).
The printer 1 is configured to retrieve print data 900 (see
The PC 300 is provided with a main body 310, which accommodates a CPU 311, a ROM 312, a RAM 313 and an HDD 314. Further, the PC 300 is provided with a connection unit 316 (see
Next, a process executed in PC 300 will be described.
According to the embodiment, portions of the print data 900, which are defined based on language specification of PCL, PJL and PS, will be treated as commands, and the other portion of the print data 900 will be treated as data. For example, print data described by PCL and represents 100-byte raster data, <ESC>%b100W<100-byte raster data>, will be treated such that a portion “<ESC>%b100W” will be treated as a command, and the 100-byte raster data following the “command” will be treated as the data.
Regarding the PJL section of the print data 900, for example, “@PJL SET PAPER=A4” can be treated as a command if the parameter portion is presumable (e.g., A4, B4, LEGAL, LETTER, etc.), the entire portion including the parameter portion can be regarded as a command. However, if the PJL section reads, for example, @PJL JOB NAME=“name”, since the “name” portion is not presumable (i.e., variable), “@PJL JOB NAME=” is treated as a command, and the remaining portion (i.e., “name”) is treated as the data. It should be noted that the division of the command and data need not be limited to the manner described above, and may be appropriately changed depending on, for example, the specification and/or characteristics of the used language.
According to the embodiment, in addition to the print data 900, a setting file as shown in
<RULE FORMAT 1> shows a format of a rule for deleting a command. An item before colon (:) indicates an interpreter to be used, and an item after the colon (:) is a command to be deleted. An example indicated the section of Rule 1 represents deletion of a command (i.e., JOBNAME) for indicating a job name.
<RULE FORMAT 2> shows a format of a rule for replacing parameters. An item before colon (:) indicates an interpreter to be used, and items after the colon (:) indicate a command, a parameter to be replaced and a parameter to replace, in this order. If a symbol * is used as the parameter to be replaced, all the possible parameters corresponding to the command are subject to the replacement. An example indicated in the section of Rule 2 represents replacement of all the parameters of the media type with “REGULAR.”
<RULE FORMAT 3> shows a format of a rule for replacing commands. An item before colon (:) indicates an interpreter to be used, and items after the colon (:) indicate a command to be replaced and a command to replace, in this order. A first example indicated in the section of Rule 3 represents replacement of a command “[ESC](s4101T” with another command “[ESC](s16602T.” A second example represents replacement of a size of a page of “A4 and no margin” (“PageSize[621 8681”) with a page of “A4 and with margin” (“PageSize[595 8421”).
<RULE FORMAT 4> shows usage of a conditional expression by sandwiching the condition with symbols “<” and “>”. An example indicated in the section of Rule 4 represents replacement of a font “CG Times” with another font “Arial” if the printer 1 satisfies the condition indicated between “<” and “>” (i.e., the printer 1 does not have the “CG Times” font).
The replacement/deletion according to the rules are well-known operations and description regarding execution of the replacement/deletion operations will be omitted for brevity.
When the main process starts, the process pauses in S1 until the print data 900 is received through the network interface 32 or the USB memory 14 is connected to the connection unit 28. If the print data 900 is received or the USB memory 14 is connected, the process proceeds to S3, and judges whether the print data 900 is received or the USB memory 14 is connected. If the print data 900 is received (S3: DATA), the process proceeds to S5 and controls the image forming unit 30 to execute a printing process based on the received print data 900. Then, the process returns to S1.
If the USB memory 14 is connected (S3: medium), the process proceeds to S7, and displays a file selection screen listing the files of the print data 900 stored in the USB memory 14 on the display unit 8. The process then pauses in S7 until the user selects one of the listed files. When the user selects a file, the process proceeds to S9, and the process retrieves the selected file of the print data 900 from the USB memory 14. Then, the process judges whether the print setting file as described above is stored in association with the print data 900. If such a print setting file is not stored in the USB memory 14 (S11: NO), the process executes the normal print process with respect to the selected file of the print data 900 (S5). If the print setting file is stored in the USB memory 14 (S11: YES), the process executes a file modifying process to modify the selected file of the print data 900 (S20) based on the print setting file, and then executes the print process in S5. It should be noted that, when modified, the print data 900 is once copied to the RAM 24, and the print data 900 stored in the RAM 24 is modified. Therefore, when the print data is modified 900, the print process (S5) is executed based on the print data 900 stored in the RAM 24.
As shown in
In S51, the process parses the rules by analyzing the print setting file stored in the RAM 24. In S52, the process reads one of the unprocessed rules, and judges whether the rule includes a conditional expression by sandwiching the condition with symbols “<” and “>” (S53). If the rule includes a conditional expression (S53: YES), the process judges whether the condition is satisfied (S54). If the condition is satisfied (S54: YES), the process proceeds to S55. If the rule does not include a conditional expression (S53: NO), the process proceeds to S55. In S55, the process reads the print data 900 on a command or a piece of data basis, searches for a command which is the same as a token, defined by the rule, before replacement. In S56, the searched command is deleted or replaced in accordance with the rule.
In S57, the process judges whether the above-described searching and replacing/deleting operation has been applied to all the commands of the subjected interpreter (in this example, all the commands in the sections 902 and 903 of the print data 900 stored in the RAM 24). If the searching or replacing/deleting operation has not been finished (S57: NO), the process returns to S55. If the searching and replacing/deleting operations have been finished (S57: YES), the process proceeds to S58 and then the process judges whether the above-described process has been finished with respect to all the rules contained in the print setting file. If the process has not been finished (S58: NO), the process returns to S52 where the next unprocessed rule is read out and the above-described steps are repeated. If the rule contains a conditional description (S53: YES), and the condition is not satisfied (S54: NO), no process is executed for the condition and the process proceeds to S58. When the above-described process is executed with respect to all the rules (S58 YES), the process returns to S26 of
Back to
If the PS is employed as the PDL in the printer 1 (S26: PS), the process proceeds to S35, where the PDL section 901 described in PS is parsed and is divided into the command and the data. In S36, the process attempts to read out the rules with respect to the PS in the print setting file (S37). If there is not a rule regarding the PS (S37: NO), the process returns to S5 (see
As described above, according to the embodiment, if the print setting file corresponding to an option to the printer 1 is stored in the USB memory 14 together with the print data 900, printing can be executed with modifying the command of the print data 900 arbitrarily and automatically. The print setting file may be stored in the USB memory 14 when it is necessary for the user. Further, even though the print setting file is stored, the print data 900 stored in the USB memory 14 will not be modified since the print data 900 is copied to the RAM 24, and the copied data is modified. Therefore, according to the embodiment, printing can be executed with appropriate setting which corresponds to the performance of the printer 1 and/or the print options. If a condition allowing the replacement or deletion described above is set, the command of the print data can be modified further appropriately.
Further, according to the embodiment, if both the rules for PS and rules for PCL are stored in the print setting file, only the rules corresponding to the PDL employed in the printer are processed (S26-S38). Thus, the rules which will not be processed by the printer 1 are skipped, which may accelerate the printing process.
In the above-described exemplary embodiment, by parsing the print data 900, the commands and the data are separated, and thereafter the rule applying process is executed (S22, S31 and S35). Thus, even if there exists a character string which coincidentally match a command subject to processed by the rule process in the data section of print data 900, the character string will not be subject to the rule applying process, and therefore, the replacement or deletion of the character string will be prevented.
It should be appreciated that the invention need not be limited to the configuration of the above-described exemplary embodiment, and can be modified in various ways without departing from the gist of the invention. For example, when a plurality of print setting files are stored in the USB memory 14, a file modifying process is executed using an appropriate one of the print setting files.
When a file of the print data 900 selected in S9 is retrieved, according to the file system, the process researches the owner information of the selected file in S109. The owner information is recorded as a part of the print data, or recorded as a part of file information in the file system. Then, in S111, the process judges whether a file, which has a name similar to the name of the owner and having an extension “.cfg” is stored in the USB memory 14.
If the file having the name of the owner and having the extension “.cfg” does not exit (S11: NO), the process skips S20 and proceeds to S5. If the file exists (S11: YES), the process sets the file as the print setting file and proceeds to S20. That is, with respect to the file of the print data 900 retrieved in S9, the modifying process shown in
According to the above modification, if the name of the owner is unknown or there is no owner name, the file modifying process is executed using a default print setting file (S20). With this configuration, an appropriate print setting file is selected in accordance with the name of the owner of the print data 900. Thus, modification of the commands meeting the demand of the user can be executed.
Alternatively, the print setting file may be selected by the user.
In this case, if the file of the print data 900 selected in S9 is retrieved, a print setting file selection window is displayed in the display unit 8, and the process is paused until the user select or cancel a file from the displayed list. When no files are selected, i.e., when the selection is cancelled (S211: NO), the process proceeds to the print process (S5). If a print setting file is selected (S211: YES), the process executes the file modifying process in S20 based on the print setting file as selected. With this configuration, according to the operation of the user who executes the printing, modification of the command meeting the demand of the user can be performed.
Further, in the above-described embodiment and modifications, replacement/deletion of the commands are executed. The invention need not be limited to such a configuration and replacement/deletion may be performed with respect the data. Such a modification will be described with reference to
As shown in
In S155, the process reads out one rule for the data from the print setting file, and applies the rule to the data section (i.e., the data), which is also stored in the RAM 24 copied from the USB memory 14, in S156. Similar to the above, the “application” of the rule is to execute steps S53-S57 of
In S158, the process judges whether the above process (i.e., S53-S57) has been executed for the all the print data 900 stored the USB memory 14. If the process has not yet been finished (S158: NO), the process returns to S151 and repeats the similar process. When all the print data 900 is processed (S158: YES), the process returns to the file modifying process S5 shown in
As described above, if the rule is set for the data, the rule may be used as indicated below. For example, if a rule: “PCL: DATA %%%NAME%%% Suzuki” is set, and the print data 900 is created such that portions at which a name of a person may be replaced has a character string of “%%%NAME%%%” which is to be replaced. By creating the data file 900, it is possible to replace the above character string with a name when the printing is executed. It should be noted that the character string “%%%” is used since such a character string hardly appear in a normal text and thus ensures that the replacement can be executed only at the intended portions. Therefore, different character string (“@@@” for example) may be used instead of “%/%%.” Accordingly, for example, if a rule: “PCL: @@@DATA@@@ Original Copy” is set, a character string “Original” can be replaced with “Copy” throughout a text.
Further, according to the above process, the rule process for the commands and the rule process for the data are executed independently. Therefore, confusion between the change made to the commands and change made to the data can be suppressed, and enables the printing operation with an appropriate setting.
As the image forming device, various image forming devices such as a printer, an MFP (Multi-Functional Peripheral) provided with a scanner and a modem and the like may be used. Further, as the portable storage, various media such as a memory card, a portable hard disk, a CD-R and a CD-RW may be used as well as the USB memory.
It should be noted that the print setting file is not limited to one created by the text editor or dedicated tools. For example, as described below with reference to
If the creation of the print setting file is not instructed in the setting dialogue of the printer driver (S201: NO), the process does not create the print setting file and proceeds to S204 (store print data to file). If the print setting file is already stored (S202: YES), the process does not create the print setting file and proceeds to S204 so as to prevent the print setting file that has been stored by the user from being deleted by overwriting. When the file is not to be output (S200: NO), the process does not create the print setting file, outputs the print data and then the process is terminated.
In template of the print setting file created in the above process, comment marks are added for each items. The comment marks make the each setting items disabled. Therefore, the contents of the print setting file (template) are disregarded unless the user removes the comment marks. By removing the comment mark, the corresponding setting is enabled. That is, the user may remove such a comment mark to make the necessary setting item effective. By removing the comment marks, the user can make setting items effective, modify the setting items, or add new setting items, by referring to existing items with comment marks in the template. With this configuration, even a user who does not have sufficient knowledge of print commands can creates the print setting file relatively easily.
Number | Date | Country | Kind |
---|---|---|---|
2007-091915 | Mar 2007 | JP | national |