Patent ID: 12260137

EMBODIMENT

FIG.1is a block diagram showing an image formation system1according to the present embodiment. The image formation system1shown inFIG.1is provided with a printer10as an example of a printing device and a PC50. The printer10is a device that can execute various processes including a printing process.

The printer10is provided with a controller12, a liquid crystal display (LCD)13, a memory14, an input interface15, a reading member16, a recording member17, and a communication interface18. Here, “IF” is used as an abbreviation for “interface” in the drawings. These components can communicate with each other via a bus11.

The printer10can communicate with the PC50via the communication interface18. The communication interface18includes a LAN interface20, and a USB interface21. The LAN interface20is used for communication via a local area network (LAN) and a wide area network (WAN). The LAN interface20may be configured to execute wireless or wired communication. The LAN interface20is an example of a first communication interface. The USB interface21is used for inputting data from and outputting data to USB devices. The USB interface21is provided with one or more connectors for connecting a USB cable and a USB device such as USB memory. The USB interface21is an example of a second communication interface.

The controller12is provided with a CPU. In addition to the CPU, the controller12may also be configured of an application-specific integrated circuit (ASIC) and a plurality of logic integrated circuits. The controller12executes processes in accordance with a control program30stored in the memory14. The memory14is also provided with a data storage area31. The data storage area31stores data and the like necessary for executing the control program30and the like. The memory14further includes a nonvolatile memory such as ROM and flash memory, and a volatile memory such as RAM. The data storage area31may be provided in the nonvolatile memory (flush memory, for example) in the memory14. The data storage area31can store a conversion rule set32. The conversion rule set32is configured to include one or more conversion rules. Each conversion rule is used to convert a received command to a command that the printer10can interpret.

The memory14may include any storage medium that can be read by a computer. A computer-readable storage medium is a non-transitory medium. In addition to the above examples, non-transitory media include CD-ROM and DVD-ROM. A non-transitory medium is also a tangible medium. On the other hand, electric signals that convey programs downloaded from a server or the like on the Internet are a computer-readable signal medium, which is one type of computer-readable medium but is not considered a non-transitory computer-readable storage medium.

The LCD13displays various information on the printer10. The display in this disclosure is not limited to a liquid crystal display but may be a display configured of another system such as an organic light-emitting diode (OLED) display. The input interface15is a touchscreen integrally configured with the display, for example. The input interface15receives user operations through icons, buttons, and the like displayed on the display. In addition to the touchscreen, the input interface15may include hard keys and the like.

The reading member (scanner)16is provided with an image sensor. The reading member16executes scanning operations to read images on a document with the image sensor. The recording member (printer)17is an electrophotographic printing mechanism, for example. Alternatively, the recording member17may be an inkjet printing mechanism. The recording member17may be a print engine and include a print head to form an image on a sheet.

In the following description, actions such as “determine,” “extract,” “select,” “calculate,” “decide,” “identify,” “acquire,” “receive,” “control,” “set,” and the like represent processes executed by the controller12. Processes executed by the controller12include the processes according to the control program30and processes that control hardware through APIs provided in the OS. Hereinafter, the expressions such as “using the OS” are omitted when operations of programs are described. For example, the phrase “the program B controls the hardware C” may signify that the program B controls the hardware C using an API provided in the OS. A process executed by the controller12according to instructions described in a program may be described using abbreviated expressions, such as “the controller12executes.”

Note that the term “acquire” in this specification is used as a concept that does not necessarily require a request. In other words, a process by which the controller12receives data without requesting that data is included in the concept of “the controller12acquires data.” The term “data” described herein is expressed as bit strings that can be read by a computer. Data of different formats are treated as the same data when the content of the data is essentially the same. The same holds true for “information” in this specification. An “instruction,” a “request,” or the like is processed by communicating information indicating the “instruction,” or the “request.” The terms “instruction” and “request” may also be used to describe information indicating an “instruction” or a “request.”

Further, a process executed by the controller12to determine whether information A indicates circumstance B may be described conceptually as “determining whether circumstance B based on information A.” A process in which the controller12determines whether information A indicates circumstance B or circumstance C may be described conceptually as “determining whether circumstance B or circumstance C based on information A.”

Next, a process executed between the PC50and the printer10via the communication interface18will be described with reference toFIG.2.FIG.2shows a sample process executed when the printer10receives a Printer Job Language (PJL) file outputted from the PC50. Here, the printer10can receive PJL files outputted from the PC50via the LAN interface20or the USB interface21of the communication interface18. When receiving PJL files via the LAN interface20, the printer10can receive the PJL files according to the Hyper Text Transfer Protocol Secure (HTTPS) protocol or can receive the PJL files according to a specific communication protocol other than HTTPS. For example, the specific communication protocol is Hyper Text Transfer Protocol (HTTP), File Transfer Protocol (FTP), or Line Printer Daemon Protocol (LPR). Another example of the specific communication protocol is a protocol used by the Standard TCP/IP port monitor provided by Windows (U.S. trademark of Microsoft Corporation). Hereinafter, the protocol used by the Standard TCP/IP port monitor is simply referred to as “Standard TCP/IP port monitor” or “Standard TCP/IP port”. The Standard TCP/IP port monitor is a protocol that uses, as a default port, port 9100 of TCP/IP to communicate according to the RAW protocol. The Standard TCP/IP port monitor may use port 515 to communicate according to the LPR protocol. The standard TCP/IP protocol that uses port 9100 may be abbreviated as “PORT 9100” protocol. The specific communication protocol is an example of a first protocol, and the HTTPS protocol is an example of a second protocol.

The HTTPS protocol is a protocol requiring a transmission device to send a password to a receiving device so that the receiving device permits the transmission device to transmit data when authentication using the password is successful. Accordingly, the HTTPS protocol ensures a prescribed level of security. The specific communication protocol, such as the port 9100 protocol, does not require a transmission device to send a password, and thus a receiving device permits the transmission device to transmit data without executing authentication. Accordingly, the specific communication protocol does not ensure the prescribed level of security.

First, a process in which the printer10receives a PJL file via the LAN interface20according to the HTTPS protocol will be described. HTTPS is a protocol that defines an authentication procedure by which a device on the transmitting side transmits a password to a device on the receiving side before sending data via the LAN interface20. When the receiving device can authenticate the received password, the receiving device grants permission to the transmitting device to transmit data. HTTPS uses port 443 as the TCP/IP port. In ST1ofFIG.2, the PC50transmits an authentication request containing a password to the printer10according to the procedure defined in HTTPS, while specifying 443 as the receiving side port number. The printer10receives the authentication request via the LAN interface20according to HTTPS.

The password that the PC50transmits to the printer10in ST1may be any information that can uniquely identify the source of the authentication request, information that can uniquely identify the user operating the PC50, or information that can uniquely identify the PC50or the application executed by this PC50.

Upon receiving an authentication request, in ST2the printer10executes a process to confirm the password included in the authentication request. Here, an authentication password may be stored in the memory14of the printer10in advance, for example. In this case, the controller12of the printer10confirms whether the password included in the authentication request matches the authentication password stored in the memory14. When the passwords match, in ST3the controller12returns a response to the PC50via the LAN interface20indicating that authentication was successful.

When an authentication successful response is received from the printer10, in ST4the PC50transmits the PJL file to the printer10according to HTTPS. The PJL file includes one or more PJL commands and other data, depending on the content. This example will assume that the PJL file includes a conversion-rule targeting command as the PJL command.

A conversion-rule targeting command is a PJL command instructing the execution of a process targeting one or more conversion rules, for example. Here, the one or more conversion rules targeted in the conversion-rule targeting command may be conversion rules included in the conversion rule set32stored in the memory14. Alternatively, the conversion-rule targeting command may be a PJL command instructing execution of a process targeting the conversion rule set32stored in the memory14. Further, the conversion-rule targeting command may be a PJL command instructing execution of a process modifying the conversion rule set. In this embodiment, the conversion rule set32is data or a file stored in the data storage area31of the memory14describing conversion rules (hereinafter, simply referred to as rules) for converting commands included in PJL files to other commands. The conversion rule is a rule mapping a pre-conversion command to a post-conversion command. In the present embodiment, the conversion rule set32includes rules for converting PJL commands to other PJL commands and rules for converting Printer Command Language (PCL) commands to other PCL commands, as will be described later. The PCL command is an example of the Page Description Language (PDL) command. For example, a printer driver manufactured by a third party or a vendor other than the vendor of the printer10may instruct the printer10using another company's proprietary PJL commands. When the printer10receives a PJL file including another company's proprietary PJL commands, it is conceivable that the controller12is unable to interpret those proprietary PJL commands and the commands may not yield the expected result. Accordingly, when receiving proprietary PJL commands developed by another company, the controller12uses the conversion rules included in the conversion rule set32to convert the proprietary PJL commands to commands that the controller12can interpret.

In ST4the printer10receives a conversion-rule targeting command in the PJL file, which is received via the LAN interface20according to HTTPS. Upon receiving the PJL file, the printer10executes the process of ST5. Here, the process of ST5when the controller12receives the PJL file containing the PJL command will be described with reference toFIG.3. When the PJL file includes a plurality of commands, the process shown inFIG.3is executed on each of the commands. In S10ofFIG.3, the controller12identifies the PJL command included in the PJL file.

In S11the controller12references configuration information stored in the memory14to determine whether a PJL security setting has been enabled. The PJL security setting indicates whether security measures are to be executed for processes using PJL commands. This PJL security setting is enabled or disabled in a settings screen (not shown) at a separate timing from the timing at which the process inFIGS.2and3is executed. For example, the controller12displays a settings screen on the LCD13in response to operations via the input interface15. The settings screen includes a radio button for enabling the PJL security setting, and a radio button for disabling the PJL security setting. When the user executes an operation in the settings screen through the input interface15to select the radio button specifying “Enable,” the controller12stores configuration information in the memory14indicating that the PJL security setting was enabled. When the user executes an operation to select the radio button specifying “Disable,” the controller12stores configuration information in the memory14indicating that the PJL security setting was disabled. Thus, the user can switch the PJL security setting in this way. Note that the PJL security setting is enabled when the printer10is shipped from the factory.

When the PJL security setting is not enabled (S11: NO), the controller12advances to S17and executes a process corresponding to the type of the command included in the PJL file. That is, when the PJL security setting has been disabled, restrictions need not be set on processes targeting one or more conversion rules described later. The process of S17will be described later in greater detail. However, when the PJL security setting has been enabled (S11: YES), in S12the controller12determines whether the PJL file was received via the USB interface21. Since the PJL file was received via the LAN interface20in this example (S12: NO), the controller12advances to S13.

In S13the controller12determines whether the PJL file was received via the LAN interface20according to HTTPS. Since the PJL file was received via the LAN interface20according to HTTPS in this example (S13: YES), the controller12advances to S17and executes a process corresponding to the data type of the PJL command in the PJL file. In other words, security is ensured when a YES determination is reached in S13, eliminating the need to restrict processes targeting one or more conversion rules in S17described below.

FIG.4is a flowchart illustrating steps in the process of S17. In S20ofFIG.4, the controller12determines whether the type of the command in the PJL file, is a conversion-rule targeting command. When the command included in the PJL file is not of a conversion-rule targeting command type (S20: NO), in S27the controller12executes a process according to the command in the PJL file. Subsequently, the controller12returns toFIG.3and ends the process.

However, when the command in the PJL file is of the conversion-rule targeting command type (S20: YES), in S21the controller12determines the command type of the conversion-rule targeting command. In this embodiment, there are three types of conversion-rule targeting commands: “Read,” “Write,” and “Delete.” The command type “Read” is a PJL command instructing the controller12to read one or more conversion rules from the conversion rule set32stored in the memory14. The command type “Write” is a PJL command instructing the controller12to write one or more conversion rules to the conversion rule set32in the memory14or to rewrite one or more conversion rules included in the conversion rule set32stored in the memory14. The command type “Delete” is a PJL command instructing the controller12to delete one or more conversion rules in the conversion rule set32or delete the conversion rule set32.

When the command type of the conversion-rule targeting command is “Write,” in S25the controller12newly writes one or more conversion rules to the conversion rule set32of the data storage area31or rewrites one or more conversion rules in the conversion rule set32in accordance with the conversion-rule targeting command.FIG.5Ashows a conversion-rule targeting command of the command type “Write.” The conversion-rule targeting command includes the text “EC%-12345X@PJL” indicating the beginning of the command. In the lines following this line are a header information part Ha1, and a conversion rules part F1.

In the conversion-rule targeting command shown inFIG.5A, the header information part Ha1includes information indicating the type of the conversion-rule targeting command is “Write.” The conversion rules part F1describes one or more conversion rules to be written to or rewritten in the conversion rule set32. Each rule is configured of a combination of a “pre-conversion PJL command N” denoting the PJL command subject to conversion and a “post-conversion PJL command N” denoting the PJL command to which the pre-conversion PJL command N is converted. The conversion rule set32can store a plurality of conversion rules. Here, N is a natural number indicating an identifier.

The controller12determines whether each “pre-conversion PJL command N” of rules included in the conversion rules part F1corresponds to any one of the “pre-conversion PJL commands” of conversion rules included in the conversion rule set32. Here, “correspond to” is a concept that signifies “the same as,” for example. However, “correspond to” may also include the concept of not being the same as but being regarded as the same when certain rules are followed.

The controller12writes, to the conversion rule set32, all rules described in the conversion rules part F1whose “pre-conversion PJL command N” does not correspond to the “pre-conversion PJL command” of any rule included in the conversion rule set32. Specifically, when “pre-conversion PJL command 1” does not correspond to the pre-conversion PJL command of any rule in the conversion rule set32, the controller12writes a rule that is a combination of “pre-conversion PJL command 1” and “post-conversion PJL command 1” to the conversion rule set32. The same process holds for rules whose target is a PCL command.FIG.6shows a conversion-rule targeting command targeting one or more conversion rules for PCL commands. When “pre-conversion PCL command 3” included in the conversion rules part F1of this example does not correspond to the pre-conversion PCL command of any rule in the conversion rule set32for example, the controller12writes the rule of the conversion rules part F1to the conversion rule set32that includes a combination of “pre-conversion PCL command 3” and “post-conversion PCL command 3.” Thus, the controller12adds a new rule to the conversion rule set32.

For rules described in the conversion rules part F1whose “pre-conversion PJL command N” corresponds to the “pre-conversion PJL command N” of a rule in the conversion rule set32, the controller12overwrites the corresponding (or found) rule of the conversion rule set32using the post-conversion PJL command N in the conversion rules part F1so that the overwritten rule describes the correlation between the pre-conversion PJL command N and the post-conversion PJL command N in the conversion rules part F1. As a specific example, when “pre-conversion PJL command 2” in the conversion rules part F1corresponds to the pre-conversion PJL command of one conversion rule in the conversion rule set32, the controller12overwrites that rule in the conversion rule set32so that the “post-conversion PJL command” originally included in the rule of the conversion rule set32is replaced with “post-conversion PJL command 2” in the conversion rules part F1. The same process applies to conversion rules targeting PCL commands. Specifically, when “pre-conversion PCL command 4” in the conversion-rule targeting command shown inFIG.6corresponds to the pre-conversion PCL command of one conversion rule in the conversion rule set32, the controller12overwrites that rule in the conversion rule set32so that the “post-conversion PCL command” originally included in that rule is replaced with the “post-conversion PCL command 4” in the conversion rules part F1. In this way, the controller12modifies part of the corresponding rule in the conversion rule set32.

The process targeting one or more conversion rules of the conversion rule set32executed in S17may employ a conversion-rule targeting command that targets rules for both PJL command(s) and PCL command(s). In the sample conversion-rule targeting command illustrated inFIG.7, the conversion rules part F1describes a rule including a combination of “pre-conversion PJL command 1” and “post-conversion PJL command 1”; a rule including a combination of “pre-conversion PJL command 2” and “post-conversion PJL command 2”; a rule including a combination of “pre-conversion PCL command 3” and “post-conversion PCL command 3”; and a rule including a combination of “pre-conversion PCL command 4” and “post-conversion PCL command 4.” In S25ofFIG.4the controller12writes conversion rules to the conversion rule set32or rewrites conversion rules in the conversion rule set32in the data storage area31according to the conversion-rule targeting command illustrated inFIG.7, for example. The same process applies to conversion-rule targeting commands having the command type “Read” and “Delete” described later.

After completing a write or rewrite of the conversion rules in the conversion rule set32in S25, in S26the controller12constructs response data based on results of the process of S25. As a specific example, when the controller12executes a process targeting one or more conversion rules using the conversion-rule targeting command shown inFIG.5A, the controller12constructs the response data shown inFIG.5B. This response data includes a response header part Hb1. The response header part Hb1describes the process status for the process using the conversion-rule targeting command. Examples of process statuses include “success,” “no target file (or no target data),” “end not detected,” and “parameter analysis not possible.” The process status “success” indicates that the process according to the corresponding conversion-rule targeting command “Read,” “Write,” or “Delete” was executed successfully. The process status “no target file (or no target data)” indicates that there is no file (or data) to be read according to the conversion-rule targeting command “Read” or no file (or data) to be deleted according to the conversion-rule targeting command “Delete.” In other words, a “no target file (or no target data)” process status indicates that some of the conversion rules of reading or deletion target are not included in the conversion rule set32stored in the data storage area31or no conversion rules of reading or deletion target are not included in the conversion rule set32. The process status “end not detected” indicates that the conversion-rule targeting command is cut off in the middle and could not be processed. The process status “parameter analysis not possible” indicates that the content of the conversion-rule targeting command is not analyzable and could not be processed.

Returning to S22inFIG.4, when the command type of the conversion-rule targeting command is “Read,” in S24the controller12reads the conversion rules included in the conversion rule set32stored in the memory14in accordance with the conversion-rule targeting command.FIG.8Ashows a conversion-rule targeting command having the command type “Read.”

A header information part Ha2in the conversion-rule targeting command shown inFIG.8Aincludes information specifying the type of the conversion-rule targeting command is “Read.” The conversion rules part F1in the conversion-rule targeting command ofFIG.8Adoes not include any information since the reading target is all of the conversion rules included in the conversion rule set32. When the conversion rules part F1includes data identifying rules that are the reading target, the controller12may read only those rules identified by this data from the conversion rule set32as the reading target. Data in the conversion rules part F1identifying a rule as the reading target may be a rule name of the reading target, a “pre-conversion PJL command” that is included in the rule of the reading target, or a “pre-conversion PCL command” that is included in the rule of the reading target. The controller12reads the conversion rules included in the conversion rule set32stored in the memory14to a volatile area of memory in accordance with the conversion-rule targeting command shown inFIG.8A.

After the controller12has finished reading the target conversion rules from the conversion rule set32in S24, in S26the controller12constructs response data based on the results of the process of S24. As a specific example, when the controller12has executed a process targeting the conversion rules according to the conversion-rule targeting command shown inFIG.8A, the controller12constructs the response data shown inFIG.8B. The response data in the example ofFIG.8Bincludes a response header part Hb2, and a response conversion rule part F2. As with the example described inFIG.5B, the response header part Hb2inFIG.8Bincludes the process status for the process executed using the conversion-rule targeting command inFIG.8A. The response conversion rule part F2includes the conversion rules read from the conversion rule set32in accordance with the conversion-rule targeting command “Read.”

Further, when the command type of the conversion-rule targeting command is “Delete,” in S23the controller12deletes the conversion rules from the conversion rule set32stored in the data storage area31in accordance with the conversion-rule targeting command.FIG.9Ashows a conversion-rule targeting command whose command type is “Delete.”

A header information part Ha3in the conversion-rule targeting command shown inFIG.9Aincludes information indicating that the type of the conversion-rule targeting command is “Delete.” The conversion rules part F1in the conversion-rule targeting command ofFIG.9Aincludes no information since the target of deletion is all of the conversion rules included in the conversion rule set32. However, when the conversion rules part F1includes data identifying specific rules that are targeted for deletion, the controller12may set only those rules in the conversion rule set32identified by this data as the deletion target. Data in the conversion rules part F1used to identify a rule may be a rule name of the deletion target, or other identification data such as a “pre-conversion PJL command” that is included in a rule of the deletion target or a “pre-conversion PCL command” that is included in a rule of the deletion target. The controller12deletes all or part of the conversion rules included in the conversion rule set32stored in the memory14in accordance with the conversion-rule targeting command ofFIG.9A. When the deletion target is all of the conversion rules in the conversion rule set32, the controller12may delete the entire conversion rule set32.

After the controller12has finished deleting the targeted conversion rules from the conversion rule set32in S23, in S26the controller12constructs response data based on the results of the process of S23. When the controller12has executed a process targeting one or more conversion rules based on the conversion-rule targeting command shown inFIG.9A, the controller12constructs the response data shown inFIG.9B. The response data in this example includes a response header part Hb3. As in the example described inFIG.5B, the response header part Hb3includes the process status for the process executed according to the conversion-rule targeting command ofFIG.9A.

Returning toFIG.2, in ST6the controller12of the printer10transmits the response data constructed in S26ofFIG.4to the PC50via the LAN interface20. On the basis of the content of this response data, the PC50can confirm the results of the process targeting one or more conversion rule and can execute subsequent processes. In a case that the PJL file includes a plurality of commands, the process of ST6may be executed each time the process ofFIG.3is ended for one command or after the processes for all the commands included in the PJL file are ended.

Next, a process executed when the printer10receives a PJL file according to a communication protocol other than HTTPS will be described with reference toFIG.10. Many clients that transmit PJL files to printers10use “Port 9100” protocol described above as the specific communication protocol (the non-HTTPS communication protocol). For example, Windows (registered trademark) uses port 9100 as the standard TCP/IP port for communicating with printers. Unlike HTTPS, the Port 9100 protocol does not specify an authentication procedure. Accordingly, the sequence chart shown inFIG.10does not include a step in which the PC50sends an authentication request to the printer10or a step in which the printer10authenticates a password.

In ST11the PC50transmits a PJL file to the printer10that includes a conversion-rule targeting command, while specifying 9100 as the port number. The printer10receives the PJL file via the LAN interface20according to the Port 9100 protocol. Thus, when the printer10receives this PJL file, in ST12the printer10starts the process similarly to the process of ST5ofFIG.2when receiving a PJL file containing one or more PJL commands.

The process of ST12when using the Port 9100 protocol will be described with reference toFIG.3. In a case that the controller12determines in S11that the PJL security setting has been disenabled (S11: NO), the controller12executes the process of S17as described above. In a case that the controller12determines in S11that the PJL security setting has been enabled (S11: YES), the controller11determines in S12that the PJL file was received via the LAN interface20(S12: NO), determines in S13that the PJL file was received according to the Port 9100 protocol (S13: NO), and advances to S14.

In S14the controller12determines the type of the command included in the PJL file. When the command included in the PJL file is of a conversion-rule targeting command type (S15: YES), in S16the controller12executes a read and discard process (or a skipping process) on the PJL command. In the read and discard process, the controller12skips over the content described from the beginning of the PJL command “EC%-12345X@PJL” to the end “EC%-12345X”, thereby not executing a process in accordance with the conversion-rule targeting command included in the PJL file. In other words, the controller12does not execute a process targeting one or more conversion rules since the conversion-rule targeting command was received according to Port 9100 protocol for which security is not ensured.

When executing the read and discard process in S16, the controller12constructs response data indicating that a process targeting one or more conversion rules was not executed as the process status and transmits this response data to the PC50in ST13ofFIG.10. Alternatively, the controller12need not execute the process of ST13after executing the read and discard process of S16. When the controller12determines in S15that the PJL file received from the PC50includes a command other than a conversion-rule targeting command (S15: NO), in S17the controller12executes a process corresponding to the command type included in the PJL file. Returning toFIG.10, in ST13the controller12of the printer10transmits response data to the PC50via the USB interface21when response data was constructed in S26ofFIG.4.

In a case that the PJL file includes a plurality of commands, the process of ST13may be executed each time the process ofFIG.3is ended for one command or after the processes for all the commands included in the PJL file are ended.

Next, a process executed when the printer10receives a PJL file via the USB interface21will be described. For example, when the user connects the PC50to the printer10with a USB cable, the PC50can transmit a PJL file to the printer10through the USB cable as indicated in ST11ofFIG.10. When the controller12of the printer10receives a PJL file via the USB interface21, the controller12executes the process indicated in ST12ofFIG.10when receiving a PJL file containing one or more PJL commands.

The process executed when the PJL file was received via the USB interface21will be described with reference toFIG.3. In a case that the controller12determines in S11that the PJL security setting has been disenabled (S11: NO), the controller12executes the process of S17as described above. In a case that the controller12determines in S11that the PJL security setting has been enabled (S11: YES), the controller12determines in S12that the PJL file was received via the USB interface21(S12: YES), and in S17executes a process corresponding to the type of data included in the PJL file. Since the process of S17has already been described with reference toFIG.4, a description of this process will not be repeated here.

In the embodiment, the process of ST5inFIG.2, the process of ST12inFIG.10, and the process shown inFIG.3are examples of the conversion rule targeting process.

Returning toFIG.10, in ST13the controller12of the printer10transmits the response data constructed in S26ofFIG.4to the PC50via the USB interface21. In this case, in a case that the PJL file includes a plurality of commands, the process of ST3may be executed each time the process ofFIG.3is ended for one command or after all the processes for all the commands included in the PJL file are ended.

Next, a process that the controller12of the printer10executes in ST5ofFIG.2or ST12ofFIG.10upon receiving a PJL file specifying a print job will be described with reference toFIG.12. As will be described later, a PJL file specifying a print job includes one or more PJL commands and image data (a PDL part42described later). In the present embodiment, when the controller12receives one or more PJL commands together with image data, the controller12executes a printing process based on the image data by executing processes in accordance with the PJL commands, irrespective of the communication path, such as the communication interface18or the protocol used for communication. In other words, when the controller12receives PJL commands in a PJL file that specifies a print job, the controller12executes printing based on the print job in accordance with the PJL command(s) and/or PCL command(s) described later included in the print job, without altering the process according to the type of communication interface18or the type of protocol. That is, when the print job including the PJL and/or PCL command(s) is received, the controller12executes the printing based on irrespective of whether the print job is received via the LAN interface20or the USB interface21and irrespective of whether the print job is received via the HTTPS protocol or the port 9100 protocol.

In S40at the beginning ofFIG.12, the controller12determines whether the conversion rule set32has been saved in the memory14. When the controller12determines that no conversion rule set32is saved in the memory14, that is, no conversion rules are saved in the memory14(S40: NO), the controller12advances to S42. However, when the conversion rule set32has been saved in the memory14(S40: YES), in S41the controller12reads the conversion rules from the conversion rule set32in the data storage area31and develops these conversion rules in RAM, i.e., volatile memory. Note that when one or more conversion rules have been developed and stored in RAM in advance, the process of S41may be omitted.

In S42the controller12acquires data for one line contained in the PJL file.FIG.11shows the structure of a PJL file40specifying a print job. The PJL file40includes a PJL part41including PJL commands instructing the printing of an image, and a PDL part42including descriptions in a page description language instructing the drawing of image data. The top of the PJL file40has data D1indicating the beginning of the PJL file. Here, the data D1includes “EC%-12345X@PJL”. The data D1indicates that the PJL part41begins from the next line. PJL commands provided in the PJL part41include a command indicating that data is image data (or indicating starting of image data or starting of a PDL part), a command specifying the job name for the print job, a command specifying the username for the print job, a command specifying printing parameters to be used when printing, and a command indicating whether the print job is to be printed according to a special method. An example of the special method is a method of storing the print job in the memory14rather than printing immediately and subsequently printing the print job in response to instructions received through operations on the input interface15. The PJL commands may also include a command indicating where the image data begins in the print job, and a command indicating the format of the PDL part42. Example formats of the PDL part42are Printer Command Language (PCL), PostScript (PS; PostScript is a U.S. trademark of Adobe Inc.), Portable Document Format (PDF), Joint Photographic Experts Group (JPEG), and RAW.

The PJL part41also includes a command D2. In this example, the command D2is “@PJL ENTER LANGUAGE=PCL XL” signifying that the PDL part42begins in the middle of the PJL file40, and specifically from the next line. In this embodiment, the command D2indicates that PCL is used as the data type of the page description language included in the PDL part42. The PDL part42includes data D3. The data D3in this example is “EC%-12345X@PJL EOJ NAME=‘office-PDF (A&A4).pdf’”, which is a command specifying the end of the PDL part42. Data D4“EC%-12345X” is provided on the line following the data D3line to indicate the end of the PJL file, i.e., the end of the data specifying the print job.

In S43ofFIG.12the controller12determines the type of the command included in the data for the line acquired in S42. When the acquired data of the line begins with the tag “@PJL”, the controller12determines that the command included in the currently acquired data is of the PJL command type. In S44the controller12determines whether the command included in the acquired data is of a PJL command type. When the command included in the acquired data is not of the PJL command type (S44: NO), the controller12advances to S48. For example, when the data acquired in S42is the data D1indicating the beginning of the PJL file, the controller12determines that the command is not of the PJL command type because the line in the data D1does not begin with the tag “@PJL” (S44: NO), and the controller12advances to S48.

In S48the controller12determines whether the data acquired in S42for the current line includes a command indicating that a next line of the current line is the start line of the PDL part42. When the command of the current line is not the command D2(S48: NO), the controller12returns to S42.

In S42the controller12acquires data for the next line following the current line and in S43determines whether the command included in the newly acquired data is of the PJL command type. When the command included in the newly acquired data is of the PJL command type (S44: YES), in S45the controller12determines whether the PJL command is a convertible PJL command that can be converted according to the conversion rules in the conversion rule set32. For example, the memory14may store a list of PJL commands for which conversion is prohibited. Any PJL command not included in this list corresponds to a convertible PJL command for which conversion is permitted. That is, when the PJL command included in the newly acquired data does not correspond to any one of the commands in the prohibition list, the controller12determines that the PJL command in the newly acquired data is a command for which conversion is permitted. PJL commands included in the prohibition list may be PJL commands that should be executed without conversion. That is, the PJL commands in the prohibition list will be executed without any conversion. Or, PJL commands included in the prohibition list may be PJL commands that have potential risks that these PJL commands may be converted to PJL commands that may cause any problems when executed under specific situations. Examples of PJL commands having potential risks for which conversion is prohibited are a PJL command instructing the printer10to upload a file stored on the printer10to the network, and a PJL command instructing the printer10to delete a file. When the newly acquired PJL command is not a convertible PJL command (S45: NO), the controller12advances to S47without executing the process of S46described later to convert the PJL command. This configuration can shield the printer10from attacks by malicious individuals attempting to upload or delete files on the printer10when the printer10is connected to a network such as the Internet. In other words, this configuration enhances security for the printer10. The conversion rule set32may include conversion rules for converting JL commands having risks or potential risks to commands with no risk such as commands that do not instruct execution of any essential operation. In such cases, these PJL commands having risks or potential risks may not be included in the prohibition list.

However, when the controller12determines that the newly acquired PJL command is a convertible PJL command for which the conversion is permitted (S45: YES), in S46the controller12executes a PJL command conversion process using the conversion rule in the conversion rule set32.FIG.13is a flowchart illustrating steps in the process of S46and the process of S50(described later) executed by the controller12. In S60at the beginning of this process, the controller12determines whether the newly acquired PJL command corresponds to a command of a conversion rule in the conversion rule set32. As described above, the conversion rule set32stores conversion rules specifying correlations between PJL commands subject to conversion (“pre-conversion PJL commands”) and “post-conversion PJL commands.” When the newly acquired PJL command corresponds to a “pre-conversion PJL command” included in one conversion rule of the conversion rule set32(S60: YES), in S61the controller12converts this PJL command to the corresponding “post-conversion PJL command” in the conversion rule included in the conversion rule set32. However, when the newly acquired PJL command does not correspond to the “pre-conversion PJL command” of any one of conversion rules included in the conversion rule set32(S60: NO), the controller12advances to S47ofFIG.12without converting the PJL command.

In S47the controller12analyzes the PJL command of the current line and stores the detailed print instruction(s) specified in the PJL command in a volatile area of the memory14. When the PJL command was converted in S46according to the conversion rules included in the conversion rule set32, in S47the controller12analyzes the “post-conversion PJL command.” When the PJL command was not converted in S46, in S47the controller12analyzes the PJL command acquired in S42. In a case that the controller12determines in S44that the command is of the PJL command type (S44: YES) and the process in S47is executed, in S48the controller12determines that a command indicating that the next line of the current line is the start line of the PDL part42was not detected (S48: NO) and returns to S42. In S42the controller12acquires data for the next line following the current line of data. The controller12then repeats the process in S43-S47described above for the newly acquired data. The series of processes of S44-S47executed by the controller12is an example of a PJL command execution process.

When the controller12subsequently detects a command specifying that the next line of the current line is the start of the PDL part42through the analysis in S47, e.g., when the controller12detects the command D2“@PJL ENTER LANGUAGE=PCL XL” (S48: YES), in S49the controller12determines whether the command included in the data for the line following the newly acquired data (the line following the command D2in this case) is of a PCL command type. For example, when detecting the command D2, the controller12may determine that the PDL part42containing a PCL command is described in the next line. When the controller12determines that the command included in the data for the next line is of the PCL command type (S49: YES), in S50the controller12executes a PCL command conversion process according to the target PCL command.

Here, the PCL command conversion process executed by the controller12in S50will described while referring toFIG.13. In S60at the beginning of this process, the controller12determines whether the acquired PCL command corresponds to one of the commands in the conversion rules included in the conversion rule set32. As described above, the conversion rule set32stores conversion rules specifying correlations between PCL commands subject to conversion (“pre-conversion PCL commands”) and “post-conversion PCL commands.” When the acquired PCL command corresponds to a “pre-conversion PCL command” of the conversion rules included in the conversion rule set32(S60: YES), in S61the controller12converts this PCL command to the corresponding “post-conversion PCL command” according to the conversion rule included in the conversion rule set32. However, when the acquired PCL command does not correspond to the “pre-conversion PCL command” included in any of the conversion rules stored in the conversion rule set32(S60: NO), the controller12advances to S51ofFIG.12without converting the PCL command. When the PJL file includes a plurality of PCL commands, the controller12executes the PCL command conversion process for each PCL command, and advances to S51after the PCL command conversion processes are executed for all the PCL commands.

In S51the controller12executes a raster image processor (RIP) process. In the RIP process, the controller12generates raster data for one page in accordance with drawing instructions specified by one or more PCL commands in the PDL part42. In other words, for one or more PCL commands that were converted in S50according to the conversion rules in the conversion rule set32, in S51the controller12analyzes the corresponding “post-conversion PCL commands” when generating a page of raster data. For each PCL command that was not converted in S50according to a conversion rule in the conversion rule set32, in S51the controller12analyzes the original nonconverted PCL command when generating the page of raster data. When generating one page of raster data at this time, the controller12uses the print instructions for the RIP process from among those print instructions stored during the analysis of PJL commands in S47. When the PDL part42describes image data for multiple pages, the controller12generates raster data for the same number of pages in the RIP process.

After completing the RIP process in S51, in S52the controller12executes a printing process using the raster data for one page. In the printing process, the controller12converts the raster data generated in the RIP process to data that the recording member17can process and instructs the recording member17to execute a printing process based on the converted data. At this time, the controller12prints an image using the print instructions for the printing process from among the print instructions stored during the analysis of PJL commands in S47. After completing the printing process in S52, the controller12ends the process inFIG.12. The series of the processes of S49-S52executed by the controller12is an example of a PDL command execution process.

As described above, the process shown inFIG.12is executed in ST5ofFIG.2or ST12ofFIG.10upon receiving a PJL file specifying a print job. However, the process shown inFIG.3is executed in ST5ofFIG.2or ST12ofFIG.10when a PJL file not specifying any print job is received. In other words, on a condition that a PJL command is received independently of any print job, the process shown inFIG.3on that PJL command is executed. That is, on a condition that a PJL command is received in a manner that the PJL command is not included in any print job, the process shown inFIG.3on that PJL command is executed.

The embodiment described above can obtain the following effects. In a case that the controller12of the printer10receives a PJL command instructing a process that targets one or more conversion rules, the controller12does not execute a process in accordance with the received PJL command when the PJL command was received over the LAN interface20through unsecured communication. However, the controller12executes a process in accordance with a received PJL command instructing a process that targets one or more conversion rules when the PJL command was received via the USB interface21. Hence, when the printer10is instructed through an unsecured communication to execute a process targeting one or more conversion rules, the printer10does not execute the process. This can enhance security for the printer10by preventing the conversion rule set32from being vulnerable to modifications.

In a case that the controller12receives, via the LAN interface20, a PJL command instructing a process targeting one or more conversion rules, the controller12executes the process in accordance with the PJL command when the PJL command instructing the process was received according to HTTPS. This configuration can improve security for the printer10even when a PJL command is received via the LAN interface20, since the controller12executes a process targeting one or more conversion rules when the PJL command was received according to a protocol that ensures security.

In a case that the configuration information stored in the memory14includes a value indicating that the PJL security setting is disabled, the controller12executes processes in accordance with any received PJL command targeting one or more conversion rules, even when the PJL command was received via the LAN interface20. This enables the user to change the state of the printer10to one of a state executing processes targeting conversion rules and a state prohibiting execution of processes targeting conversion rules in accordance with PJL commands by modifying the value of the configuration information stored in the memory14.

Variations of the Embodiment

In the above embodiment, the printer10varies the process executed after receiving a PJL command instructing the printer10to execute a process targeting one or more conversion rules on the basis of the type of communication interface and the type of protocol used to receive the PJL command. As an alternative, the printer10may vary the process executed subsequent to receiving a PJL command on the basis of on only the type of protocol used to receive the command. In this case, when the controller12receives a PJL command according to HTTPS (S13: YES), in S17the controller12executes a process targeting one or more conversion rules in accordance with the received PJL command. However, when the PJL command was received via port 9100 protocol (S13: NO), the controller12proceeds to S14. In this variation, the process of S12can be omitted fromFIG.3.

In the above embodiment, when the controller12receives a PJL command instructing the controller12to execute a process targeting one or more conversion rules, the controller12varies the ensuing process on the basis of the type of communication interface18and the type of protocol used to receive the PJL command. It is also conceivable that the printer10could receive a PDL command from the PC50instructing a process targeting one or more conversion rules to be executed. In this case, the controller12may determine whether or not to execute the process instructed by the PDL command on the basis of the type of communication interface18and the type of protocol used to receive the PDL command.

In this case, when the controller12receives a file from the PC50that contains a PDL command including the PCL command described above different from a PJL file specifying a print job, the controller12identifies the PDL command in S10ofFIG.3, just as when the PJL command was identified. When the controller12determines in S11that the security setting is enabled (S11: YES), in S12the controller12determines whether the PDL command was received via the USB interface21. When the PDL command was received via the USB interface21(S12: YES), in S17the controller12executes a process targeting one or more conversion rules in accordance with the PDL command. Further, when the PDL command was received via the LAN interface20according to HTTPS (S13: YES), the controller12advances to S17and executes the above process. However, when the PDL command was received via the LAN interface20through an unsecured non-HTTPS protocol (specific communication protocol) (S13: NO), the controller12advances to S14. After completing the processes in S14and S15, in S16the controller12executes a process to read and discard the PDL command. In this case, the series of processes S10-S17is an example of a conversion rule targeting process when the PDL command is used.

Commands instructing to execute processes targeting one or more conversion rules are not limited to PJL commands but may be any command instructing the controller12to execute a process targeting one or more conversion rules. For example, the command may be a proprietary command developed by the vendor of the printer10.

While the above embodiment limits the port using HTTPS to port 443. The present disclosure is not limited to these port numbers. Various port numbers may be used for HTTPS. Further, the port 9100 protocol is described as an example of the specific communication protocol other than HTTPS protocol. However, the specific communication protocol may be protocols not using the port 9100.

While HTTPS is employed in the above embodiment, a protocol that is a proprietary extension of HTTPS developed for the printer10may be used in place of HTTPS. This protocol also defines an authentication procedure, whereby the receiving device grants permission to the transmitting device to transmit data when a password received from the transmitting device could be authenticated.

While a PCL command was provided as an example of the PDL command, the PDL commands are not limited to this. For example, PDL commands may be PCL XL commands, PDF commands, or PS commands.

The embodiment describes rules associating “pre-conversion PCL commands” to “post-conversion PCL commands” as an example of the rules mapping “pre-conversion PDL commands” to “post-conversion PDL commands,” but the present disclosure is not limited to these rules. For example, the rules may associate “pre-conversion PCL XL commands” to “post-conversion PCL XL commands,” rules that associate “pre-conversion PDF commands” to “post-conversion PDF commands,” and/or rules that association “pre-conversion PS commands” to “post-conversion PS commands.”