Printing device, control method thereof, and program

The printing device addresses data spool depletion by controlling connection management and data storage to resume printing normally, preventing job loss and ensuring proper job handling during interruptions.

JP7824754B2Active Publication Date: 2026-03-05CANON KK
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2021191432
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2026-03-05
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

Printing systems face issues where the data spool area becomes depleted due to printing errors, leading to interrupted data transmission and potential loss of print jobs or abnormal outputs, especially when the host PC or printer enters sleep mode without resolving errors.

Method used

A printing device that temporarily stores received print data in a spool area and controls connection disconnection based on user settings, either maintaining the connection to wait for resolution of errors or proactively disconnecting after a predetermined time, depending on the OS or application type.

Benefits of technology

Ensures normal resumption of printing processing even if data reception is interrupted, preventing job loss and ensuring proper cancellation or continuation of print jobs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007824754000001
    Figure 0007824754000001
  • Figure 0007824754000002
    Figure 0007824754000002
  • Figure 0007824754000003
    Figure 0007824754000003
Patent Text Reader

Abstract

To enable printing processing to be normally resumed even when reception of printing data from an external device stops midway in a printer.SOLUTION: A printer establishes connection with an external device (host PC) according to a prescribed communication protocol, receives printing data transmitted via the connection from the external device, and temporarily stores the data in a spool area. The printer executes printing processing on the basis of the printing data stored in the spool area. The printer performs control on whether or not to cut the connection with the external device from the printer side according to the setting previously performed via a setting screen 600 in a case where reception of the printing data from the external device stops midway and a prescribed time elapses in such a state that the reception is stopped.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a printing apparatus, a control method thereof, and a program. [Background technology]

[0002] LPR printing has been proposed, in which a host PC issues a print command to a printer running an LPD (Line Printer Daemon) using an LPR (Line Printer Remote) command. In LPR printing, RFC (Request For Comments) 1179 requires that the host PC notify the printer of print data size information before sending the print data. A known printing system sets a value in this size information notification that indicates a size larger than the actual print data size, thereby disconnecting the communication connection between the host PC and the printer after the print data has been sent from the host PC to the printer.

[0003] Regarding data communication between a host PC and a printer, Patent Document 1 discloses a control method for setting a timeout period on the printer side that is shorter than the predetermined timeout period of the host PC, and for pausing and resuming printing. Patent Document 2 also discloses a control method for notifying the host PC from the printer of the data size that can be received in the receive buffer. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2003-256178 [Patent Document 2] Japanese Patent Application Laid-Open No. 2011-116083 Summary of the Invention [Problem to be solved by the invention]

[0005] Printing systems generally employ a data spool mechanism to smoothly receive print data in parallel with printing operations. The data spool (spool area) is a memory area of ​​a specific size. Even if print data exceeding the size of the data spool is sent from the host PC to the printer, the free space in the data spool will not run out as long as the printing operation on the printer is performed smoothly. However, if the printing operation stops due to an error such as running out of paper or a paper jam, the free space in the data spool may run out.

[0006] If the free space in the data spool is depleted, the transmission of print data from the host PC to the printer will be interrupted. If, for example, the host PC goes into sleep mode or is restarted, or if the printer goes into sleep mode (error sleep) without resolving an error, the communication connection between the host PC and the printer will be severed. As a result, the printer will not be able to properly cancel the print job, and an abnormal printout, such as an invalid character string, may be output. Furthermore, if the size of the print data is smaller than the size of the data spool, the print job may be lost even if a cancellation operation is not performed.

[0007] SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a technique that enables a printing device to resume printing processing normally even if reception of print data from an external device is interrupted midway. [Means for solving the problem]

[0008] A printing device according to one aspect of the present invention is a printing device capable of communicating with an external device, having at least one processor or at least one circuit, wherein the at least one processor or the at least one circuit Establish a connection with an external device according to a predetermined communication protocol Shi Receives print data transmitted from the external device via the connection and temporarily stores it in a spool area. Shi A printing process is performed based on the print data stored in the spool area.i When reception of print data from the external device is stopped midway and a predetermined time has elapsed while the reception is stopped, control is performed as to whether or not the connection with the external device is to be disconnected from the printing device side in accordance with a setting previously made by a user operation. 、 It is characterized by:

[0009] A printing device according to another aspect of the present invention is a printing device capable of communicating with an external device, comprising: having at least one processor or at least one circuit, wherein the at least one processor or the at least one circuit Establish a connection with an external device according to a predetermined communication protocol Shi Receives print data transmitted from the external device via the connection and temporarily stores it in a spool area. Shi A printing process is performed based on the print data stored in the spool area. i When reception of print data from the external device is stopped midway and a predetermined time has elapsed while the reception is stopped, the size of the print data transmitted from the external device and , for spooling print data, predetermined Based on the size of the spool area, the printer controls whether to disconnect the connection with the external device. 、 It is characterized by: [Effects of the Invention]

[0010] According to the present invention, even if the printing device stops receiving print data from an external device midway, it is possible to resume printing processing normally. [Brief explanation of the drawings]

[0011]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Embodiments for Carrying Out the Invention

[0012] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the invention according to the claims. Although a plurality of features are described in the embodiments, not all of these plurality of features are essential for the invention, and the plurality of features may be arbitrarily combined. Further, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and duplicate explanations are omitted.

[0013] [First Embodiment] FIG. 1 shows an example of a network configuration according to this embodiment. The multifunction peripheral (MFP) 100 is connected to a LAN (Local Area Network) 105. The LAN 105 may be composed of a wired LAN or may be composed of a wireless LAN. PCs 101 and 102 are also connected to the LAN 105. The MFP 100 can communicate with the PCs 101 and 102 via the LAN 105. The PCs 101 and 102 can cause the MFP 100 to execute the print job by transmitting the print job to the MFP 100 via the LAN 105. The PCs 101 and 102 may also be referred to as client PCs or host PCs.

[0014] <Hardware Configuration of MFP> 2 is a block diagram showing an example of the hardware configuration of MFP 100. MFP 100 includes a controller (control unit) 200, and an operation unit 220, a printer (printer engine) 221, and a scanner 222 connected to the controller. Controller 200 includes a CPU 201 and controls the overall operation of MFP 100. Controller 200 further includes CPU 201, RAM 202, ROM 203, HDD (hard disk drive) 204, operation unit I / F (interface) 205, printer I / F 206, scanner I / F 207, and LAN I / F 208.

[0015] The CPU 201 loads a control program stored in the ROM 203 or the HDD 204 into the RAM 202, reads out the loaded control program, and executes it to perform various types of control or processing, such as communication control and image processing. The RAM 202 is a volatile storage medium (storage device) and is used as the CPU 201's main memory and work area. The HDD 204 is a non-volatile storage medium (storage device). The HDD 204 stores various data and programs and is also used to temporarily store image data generated in print processing or copy processing. In this manner, the hardware, such as the CPU 201, the ROM 203, the RAM 202, and the HDD 204, constitutes a so-called computer. Note that in the MFP 100 of this embodiment, one CPU 202 executes each process shown in the flowcharts described below using a control program loaded into one memory (RAM 202), but other configurations are also possible. For example, each process shown in the flowcharts described below can be executed by multiple processors, memories, and storages working together.

[0016] The printer I / F 206 is an interface that connects the printer 221 and the controller 200. The printer 221 performs printing processing to print (form) an image on a sheet fed from a paper feed unit (not shown) such as a paper feed cassette, based on image data input from the controller 200 via the printer I / F 206. The printer 221 forms an image using, for example, an electrophotographic method or an inkjet method.

[0017] Scanner I / F 207 is an interface that connects scanner 222 and controller 200. Scanner 222 reads an image of a document placed on the document platen and generates image data. The image data generated by scanner 222 is input to controller 200 via scanner I / F 207 and can be used for printing by printer 221, stored in HDD 204, or transmitted to an external device via LAN I / F 208.

[0018] Operation unit I / F 205 is an interface that connects operation unit 220 and controller 200. Operation unit 220 receives user operations (for example, operations for various settings of MFP 100). Operation unit 220 includes a display device (display unit) that displays a screen and can display, for example, the state of MFP 100.

[0019] LAN I / F 208 is a communication interface connected to LAN 105 and capable of communicating with an external device via LAN 105. CPU 201 can transmit, via LAN I / F 208, for example, image data generated by scanner 222 to an external device and receive, from an external device, print data including image data for printing by printer 221. Note that MFP 100 may further include a wireless LAN I / F capable of connecting to a wireless LAN.

[0020] <Functional Configuration of MFP> FIG. 3 is a block diagram showing an example of the software configuration (functional configuration) of MFP 100. The functions of each block (software) shown in FIG. 3 are realized in MFP 100 by CPU 201 reading a program stored in ROM 203 or HDD 204 into RAM 202 and executing it.

[0021] The operation control unit 301 displays a screen for the user (operation screen) on the operation unit 220 and accepts user operations via the operation unit 220. The operation control unit 301 executes processing associated with display objects such as buttons on the display screen in accordance with the accepted user operations. In this embodiment, for example, the operation control unit 301 displays a setting screen 600 shown in FIG. 6, which will be described later, on the operation unit 220. The operation control unit 301 can further accept, via the setting screen 600, a setting as to whether or not to disconnect a connection with an external device from the MFP 100 side when a predetermined time has elapsed while reception of print data from the external device (host PC) has stopped.

[0022] The data storage unit 305 saves data such as setting values ​​in the ROM 203 or the HDD 204 and reads out the saved data based on requests from each functional unit (control unit). For example, when a user wants to change some device setting, the operation control unit 301 accepts user input via the operation unit 220 and requests the data storage unit 305 to save setting values ​​corresponding to the input content. The data storage unit 305 saves the setting values ​​in the ROM 203 or the HDD 204 in accordance with the request from the operation control unit 301. The data storage unit 305 also allocates a spool area (data spool) in a storage area of ​​a volatile memory such as the RAM 202 or a non-volatile memory such as the HDD 204 as a spool area in which print data received from an external device (host PC) is temporarily stored.

[0023] The environment setting unit 306 sets the environment of the MFP 100 when the system is started or when a setting change is detected, in accordance with the setting values ​​stored in the data storage unit 305. Specifically, the environment setting unit 306 sets various network settings, including an IP address, and various parameters for the print function and copy function of the MFP 100.

[0024] NW applications 310 to 312 are application modules that execute network functions and run on MFP 100. In this embodiment, a configuration in which these three NW applications run on MFP 100 will be described, but any number of applications can run on MFP 100 as long as they implement the functions of MFP 100 using network functions.

[0025] The NW application 310 is an LPD module that complies with the LPD (Line Printer Daemon) protocol. The LPD module is an application that performs reception processing to receive print data from an external device such as the PC 101 using an LPR (Line Printer Remote) command. The LPD specifications are standardized by RFC1179. The NW application 311 is a RAW module. The RAW module is an application that performs reception processing to receive print data from an external device such as the PC 102 using TCP / IP port 9100. The NW application 312 is an application that manages device information of the MFP 100.

[0026] The NW application 312 collects information about the device configuration and consumables of the MFP 100 in response to a request from an external device such as the PC 102, and outputs a response including the collected information. In this embodiment, the NW application 312 is configured as an SNMP agent that outputs device information in the form of a management information base (MIB object) in accordance with the Simple Network Management Protocol (SNMP) defined in RFC1157.

[0027] The network control unit 314 is configured with a protocol stack and is configured as part of an OS that performs overall control of the controller 200. Generally, a protocol stack corresponds to a group of programs in which software functions are stacked hierarchically, each consisting of multiple programs corresponding to a protocol for realizing a network function. The protocol stack can be configured with a session layer, a transport layer, a network layer, and a data link layer in accordance with the OSI reference model. The session layer performs connection control, etc. The transport layer manages data transfer. The network layer controls address management and route selection. The data link layer identifies and transfers data frames. The network control unit 314 (protocol stack) of this embodiment further includes a device driver 315 for controlling the LAN I / F 208.

[0028] The network control API 313 is an API library for calling a protocol stack held by the network control unit 314, and is provided in the OS as a general socket function (socket API). The environment setting unit 306 and the NW applications 310 to 312 set parameters in the network control API 313 and call the network control API, thereby performing data communication in accordance with each communication protocol.

[0029] The job control unit 302 controls the execution of jobs for each of the multiple functions (copy function, print function, file transmission function, etc.) of the MFP 100. When executing a print job, the job control unit 302 establishes a connection with an external device (host PC) according to the LPD protocol using the NW application 310. The job control unit 302 receives print data transmitted from the external device via the established connection and temporarily stores the received print data in a spool area.

[0030] The printing processing unit 303 performs a printing process based on the print data received from an external device and stored in the spool area in accordance with an instruction from the job control unit 302. Specifically, the printing processing unit 303 interprets the print data to generate image data, and transmits the generated image data to the printer 221 via the printer I / F 206, so that the printer 221 performs printing.

[0031] The scanning processing unit 304 reads an image of a document by the scanner 222 via the scanner I / F 207 and generates image data in accordance with an instruction from the job control unit 302, and stores the image data as scanned image data in the HDD 204.

[0032] Note that the printing processing unit 303 can also read the scanned image data stored by the scanning processing unit 304 and perform a printing process based on the image data. For example, when the copy function is executed, when the operation control unit 301 receives a copy function execution instruction from the user via the operation unit 220, it instructs the job control unit 302 to execute the copy function. The job control unit 302 instructs the scanning processing unit 304 to read a document, and acquires scanned image data from the scanning processing unit 304. The job control unit 302 further instructs the printing processing unit 303 to perform a printing process based on the acquired scanned image data, and outputs a sheet on which an image of the document is printed as a copy result of the document.

[0033] <LPR Command and LPR Settings> Figure 4(A) shows part of the RFC1179 specification that defines the LPD (Line Printer Daemon) protocol, and illustrates the specifications for the LPR command, which is a control command related to received data files. As shown in the figure, this LPR command stores the size information (number of bytes) of the data file after the command code "03," and then stores the name of the data file after a single space. This LPR command is sent from the host PC to the printing device (MFP100) on which the LPD is running before the main body of the print data is sent.

[0034] FIG. 4B shows an example of a setting screen (setting screen 400) for configuring a print port on the host PC side that instructs MFP 100 to execute printing using an LPR command. The setting screen 400 allows the user to select "RAW," "IPP," or "LPR" as the print protocol (communication protocol) to be used. In the example of FIG. 4B, "LPR" is selected as the print protocol, as indicated by reference numeral 401. The setting screen 400 also allows the user to set whether or not to enable LPR byte counting as an LPR setting. In the example of FIG. 4B, the setting for setting LPR byte counting to "OFF" is selected as the LPR setting, as indicated by reference numeral 402. In other words, the setting for not enabling LPR byte counting is selected.

[0035] FIG. 5A shows an example of a received packet including an LPR command when LPR byte counting is enabled (LPR byte count = ON). In the packet shown in FIG. 5A, the predetermined range starting from the command code "03" indicated by reference numeral 501 corresponds to the LPR command indicating the received data file. As described with reference to FIG. 4, when LPR byte counting is enabled on the host PC side, size information indicating the size of the print data sent from the host PC to the printing device (MFP 100) is appropriately set in size information 502. In this example, "39865" bytes is set as size information 502.

[0036] FIG. 5B shows an example of a received packet containing an LPR command when LPR byte counting is not enabled (LPR byte count = OFF). In the packet shown in FIG. 5B, the predetermined range starting with command code "03" indicated by reference numeral 501 corresponds to the LPR command indicating the received data file. Size information 502 is not set appropriately to indicate the size of the print data sent from the host PC to the printing device (MFP 100). In this example, size information 503 is set to "125899906843000" bytes (approximately 114.5 TB), indicating an imaginary, huge file size.

[0037] <Settings screen> FIG. 6 shows an example of a setting screen (setting screen 600) displayed on the operation unit 220 of the MFP 100 according to this embodiment. The setting screen 600 is used to configure settings related to printing by LPD. The setting screen 600 includes setting items 601 to 603 as setting items for network settings (LPD settings). The setting item 601 indicates whether or not to use the LPD printing function. This setting can be configured using an ON button and an OFF button. The operation control unit 301 controls the display of the operation unit 220 so that either the ON button or the OFF button is selected for the setting item 601 in accordance with a user operation. To use the LPD printing function in the MFP 100, the user needs to select the ON button for the setting item 601.

[0038] A setting item 602 indicates whether or not to print a banner page for each print job during LPD printing. This setting can be made using an ON button and an OFF button. The operation control unit 301 controls the display of the operation unit 220 so that either the ON button or the OFF button for the setting item 602 is selected in accordance with a user operation. When a setting to print a banner page (not shown) is made, information such as the user name of the user who instructed execution of the print job and the file name used to execute the print job is printed as a separator page for the print job.

[0039] A setting item 603 indicates a setting for the operation (behavior) of the MFP 100 after a predetermined time has elapsed since the printing operation stopped due to a paper shortage, a paper jam, or the like. This setting can be made using a drop-down list 604. Specifically, the setting is to maintain the TCP / IP connection with the host PC and continue waiting ("Wait for connection"), or to disconnect the TCP / IP connection ("Disconnect connection"). The setting of the setting item 603 is reflected in the setting value of the reset response flag stored in the ROM 203 or HDD 204.

[0040] The reset response flag indicates whether the connection (TCP / IP connection) with an external device (host PC) is to be disconnected from the printing device (MFP 100) when a predetermined time has elapsed while reception of print data from the external device has stopped. If "Wait for connection" is selected as the setting for the setting item 603, the reset response flag is set to OFF. That is, it is set so that the connection with the external device (host PC) is not to be disconnected from the printing device (MFP 100) when a predetermined time has elapsed while reception of print data from the external device (host PC) has stopped. On the other hand, if "Disconnect" is selected as the setting for the setting item 603, the reset response flag is set to ON. That is, it is set so that the connection with the external device is to be disconnected from the printing device (MFP 100) when a predetermined time has elapsed while reception of print data from the external device (host PC) has stopped. The connection is disconnected by sending an RST packet (RST command) to the external device (host PC) as a disconnection request to disconnect the connection.

[0041] When the setting reflect button 611 is pressed (touched) on the setting screen 600, the setting contents on the setting screen 600 are saved in the data storage unit 305 and thereby enabled. The NW application 310 (LPD module) refers to and uses the saved setting contents. After the setting reflect button 611 is pressed, the operation control unit 301 transitions the display screen of the operation unit 220 from the setting screen 600 to a setting screen (not shown) related to a higher-level setting item. On the other hand, when the cancel button 612 is pressed, the setting contents are not reflected and a similar transition of the display screen occurs.

[0042] <Processing Procedure> 7 is a flowchart showing the procedure of a print data reception process executed by CPU 201 in MFP 100 of this embodiment. The process of each step in FIG. 7 is realized in MFP 100 by CPU 201 reading a program stored in ROM 203 or HDD 204 into RAM 202 and executing it.

[0043] When the power supply of the MFP 100 is turned on, the CPU 201 performs various initialization processes (not shown). As a result, when the MFP 100 becomes available as a printer connected to the network, the CPU 201 starts executing the process according to the procedure shown in FIG.

[0044] First, in step S701, the CPU 201 enters a standby state, waiting for the establishment of a TCP / IP connection. When the CPU 201 receives a request packet requesting the establishment of communication from a host PC (external device) such as PC 101 or 102 via the LAN I / F 208, the CPU 201 establishes a connection with the host PC in accordance with the request packet.

[0045] After the connection is established, the CPU 201 determines in step S702 whether the request from the host PC over the established connection is a print request using an LPR command (LPR print request). If the CPU 201 determines that the request from the host PC is not an LPR print request, the process proceeds to step S703. If the CPU 201 determines that the request is an LPR print request, the process proceeds to step S704.

[0046] In S703, the CPU 201 receives print data from the host PC using a different type of reception process other than the reception process based on the LPR print request, and then ends the process. Note that other types of reception processes may include, for example, a process based on a print request via the RAW protocol (TCP port 9100) or a process based on a print request via the IPP (Internet Printing Protocol). The CPU 201 then resumes execution of the process shown in FIG. 7 and enters a standby state in S701, waiting for a connection to be established.

[0047] S70 2 If the process proceeds to S704 from step S701, the CPU 201 determines in S704 whether an impeding factor has occurred that impedes reception of print data. Examples of impeding factors include MFP 100 running out of paper, a paper jam, or a lack of consumables required for printing. If such an impeding factor occurs, reception of print data from the host PC stops midway (reception cannot be carried out smoothly). For example, if print processing stops and unprocessed print data continues to accumulate in the spool area, causing the free space in the spool area to become depleted, the CPU 201 will have no choice but to stop receiving print data from the host PC (external device). In this way, reception of print data is impeded.

[0048] If it is determined that no obstructing factor that would prevent reception of print data has occurred, the CPU 201 proceeds to S705. In S705, the CPU 201 receives print data from the host PC via the established connection. The received print data is temporarily stored in a spool area and is used sequentially for printing. Then, in S706, the CPU 201 determines whether reception of the print data is complete. The print data is divided into multiple packets over the network and sent from the host PC. Therefore, in S706, the CPU 201 determines whether reception of all of the series of multiple packets into which the print data is divided has been completed. If reception of the print data is not complete (packet reception is continuing), the CPU 201 returns the process from S706 to S704 and repeats the processes of S704 to S706.

[0049] When reception of the print data is complete, the CPU 201 sends a reception confirmation response to the last received packet to the host PC, and the process proceeds from S706 to S707. In S707, the CPU 201 receives a FIN packet sent from the host PC in response to the reception confirmation response, and thereby disconnects the connection with the host PC. That is, the host PC disconnects the connection with the printer (MFP 100) by sending a FIN packet. When the disconnection with the host PC is thus completed, the CPU 201 ends the print data reception process according to the procedure in FIG. 7.

[0050] On the other hand, if it is determined in S704 that an obstruction that obstructs reception of print data has occurred, CPU 201 proceeds to S708. In S708, CPU 201 determines whether a timeout event has occurred on a predetermined timer. The predetermined timer is started when an obstruction occurs and is used to measure the elapsed time since the obstruction occurred. CPU 201 determines that a timeout event has occurred when the timer reaches a predetermined time (upper limit time). This timeout event is an event that indicates that a predetermined time has elapsed (timed out) while reception of print data has stopped because the obstruction that obstructs reception of print data has not been resolved. If CPU 201 determines that a timeout event has occurred, it proceeds to S709, and if it determines that a timeout event has not occurred, it returns to S704.

[0051] In S709, the CPU 201 determines whether the reset response flag is set to ON. As described above, the setting value of the reset response flag is stored in the ROM 203 or the HDD 204 according to the setting using the setting screen 600. The CPU 201 determines whether the reset response flag is set to ON by referring to the stored setting value of the reset response flag.

[0052] If the reset response flag is set to ON (i.e., if the setting item 603 on the setting screen 600 is set to "Disconnect"), the CPU 201 proceeds to step S710. In this way, if the setting is such that the printer disconnects the connection with the host PC as the action to be taken when reception of print data is stopped due to the occurrence of an obstruction, the CPU 201 proceeds to step S710. On the other hand, if the reset response flag is set to OFF (i.e., if the setting item 603 on the setting screen 600 is set to "Wait for connection"), the CPU 201 returns to step S704. In this way, if the setting is such that the printer does not send an RST packet to the host PC but continues to wait while maintaining the connection with the host PC as the action to be taken when reception of print data is stopped due to the occurrence of an obstruction, the CPU 201 returns to step S704.

[0053] In step S710, the CPU 201 sends an RST packet (RST command) to the host PC that is the sender of the print data via the LAN I / F 208. The RST packet corresponds to a TCP / IP disconnection request. By sending the RST packet, the printer (MFP 100) proactively disconnects the connection with the host PC.

[0054] In this way, CPU 201 controls whether or not to disconnect the connection with the external device (host PC) from MFP 100, according to a setting made in advance by a user operation (setting of the reset response flag). Specifically, if a predetermined time has elapsed while reception of print data from the external device has stopped and it has been set that the connection with the external device should be disconnected from MFP 100, CPU 201 sends an RST packet to the external device. The RST packet corresponds to a disconnection request that requests that the connection be disconnected. On the other hand, if a predetermined time has elapsed while reception of print data from the external device has stopped and it has not been set that the connection with the external device should be disconnected from MFP 100, CPU 201 maintains the connection with the external device.

[0055] After the RST packet is sent in S710, when the disconnection with the host PC is completed, the CPU 201 ends the print data reception process according to the procedure in FIG.

[0056] <Effect of switching operation when reception stops> In this embodiment, the operation (operation mode) of the MFP 100 is switched when reception of print data from the host PC is stopped due to the occurrence of an obstruction, based on the settings made using the setting screen 600. Such operation switching has the following effects.

[0057] Assume that the host PC (PC 101 or 102) uses the LPR protocol of a standard TCP / IP port in the Microsoft Windows (registered trademark) OS (operating system) for printing. In this case, the standard TCP / IP port has a connection wait time threshold (timeout time). If the connection with the host PC is maintained when reception of print data stops, and the print processing does not proceed even after the timeout time has elapsed (reception of print data has not resumed), the print job is canceled on the host PC side.

[0058] In this embodiment, this can be avoided by setting setting item 603 on setting screen 600 to "Disconnect." Specifically, before the print job is canceled by the host PC, the MFP 100 proactively disconnects the TCP / IP connection by sending an RST packet (S710). For this reason, the predetermined time associated with the timeout event (S708) is set to a time shorter than the timeout period until the external device (host PC) cancels the print job if the MFP 100 does not resume receiving print data. As a result, a print retry operation is performed between the host PC and MFP 100 via the standard TCP / IP port described above before the print job is canceled by the host PC. As a result, cancellation of the print job can be avoided, and printed material can be output. In other words, even if the MFP 100 (printing device) stops receiving print data from the host PC midway, the print process can be resumed normally.

[0059] In addition, the operation control unit 301 may be configured to be able to change the predetermined time related to the above-mentioned timeout event (S708) in accordance with a user operation received via a setting screen (not shown) displayed on the operation unit 220.

[0060] Also, assume that the host PC (PC 101 or 102) uses CUPS (registered trademark) (Common Unix Printing System) on the Linux (registered trademark) OS for printing. In this case, if the TCP / connection is disconnected from the MFP 100 side, the following problem may occur. When the TCP / connection is disconnected on the host PC, the print job stops according to the default settings of CUPS. In this way, unlike print processing using a standard Windows TCP / IP port, the print job is not canceled on the host PC. However, to resume a stopped print job, it is necessary to log in to the Linux system with privileges equivalent to that of a system administrator and perform the resume operation.

[0061] In this embodiment, this can be avoided by setting setting item 603 on setting screen 600 to "Wait for connection." In the default settings of CUPS, unlike standard TCP / IP ports in Windows, a connection wait time threshold (timeout time) is not set. Therefore, by maintaining the TCP / IP connection between the host PC and MFP 100 and continuing to wait, the print job will not be stopped on the host PC as described above. Furthermore, it will no longer be necessary to log in with authority equivalent to that of a system administrator to resume the print job. As a result, it will be possible to resume printing processing normally after the factor inhibiting reception of print data on the MFP 100 is resolved.

[0062] As described above, in this embodiment, CPU 201 establishes a connection with an external device (host PC) according to a predetermined communication protocol, receives print data transmitted from the external device via the connection, and temporarily stores the data in a spool area. CPU 201 executes print processing based on the print data stored in the spool area. CPU 201 further controls whether to disconnect the connection with the external device from MFP 100 according to a setting previously configured by a user operation when reception of print data from the external device is stopped midway and a predetermined period of time has elapsed while reception is stopped. This allows MFP 100 to resume print processing normally even when reception of print data from the external device is stopped midway.

[0063] [Second embodiment] Next, a second embodiment of the present disclosure will be described. In the following, a description of the same parts as those in the first embodiment will be omitted.

[0064] In the first embodiment, when reception of print data continues to be suspended, the printer switches between sending an RST packet (S710) and waiting for a FIN packet to be received from the host PC (S707) according to the settings on the setting screen 600. The settings on the setting screen 600 are made to suit, for example, the OS (operating system) of the host PC connected to the MFP 100, or the print data transmission application used by the host PC.

[0065] However, for example, when MFP 100 is shared by multiple host PCs, it is conceivable that multiple host PCs with different OSs (for example, Windows OS and Linux OS) installed will connect to MFP 100. In such a case, it is desirable to be able to dynamically switch the above-mentioned operation in accordance with the currently connected host PC when reception of print data continues to be stopped.

[0066] Also, if the host PC is running the Windows OS, it is possible that applications on the Windows OS will operate in a similar manner to CUPS on the Linux OS, rather than printing using the standard TCP / IP port of the Windows OS. In such a case, it is desirable to set the setting item 603 on the setting screen 600 to "Waiting for connection" rather than "Disconnected" in accordance with printing processing using the standard TCP / IP port of the Windows OS.

[0067] Therefore, in this embodiment, it is possible to dynamically switch the above-mentioned operation when reception of print data continues to be stopped in MFP 100. Specifically, whether to disconnect the connection with the external device from the MFP 100 side is controlled based on the size of the print data sent from the external device (host PC) and the size of the spool area for temporarily storing the print data.

[0068] <Processing Procedure> 8 is a flowchart showing the procedure of a print data reception process executed by the CPU 201 in the MFP 100 of this embodiment. The process of each step in FIG. 8 is realized in the MFP 100 by the CPU 201 reading a program stored in the ROM 203 or HDD 204 into the RAM 202 and executing the program.

[0069] The processing in steps S701 to S703 is the same as in embodiment 1. In this embodiment, if the CPU 201 determines in step S702 that the request from the host PC is an LPR print request, the processing proceeds to step S801.

[0070] In S801, CPU 201 extracts size information of print data from a received packet transmitted from the host PC prior to transmission of the print data for LPR printing. Specifically, size information described in the LPR command is extracted from a received packet containing the control command (LPR command) described above with reference to Figures 4 and 5. In this way, CPU 201 obtains the size of the print data from the control command (LPR command) transmitted from the host PC prior to transmission of the print data. Then, in S802, CPU 201 determines whether the size of the print data indicated by the extracted size information exceeds the size of the spool area reserved for spooling the print data.

[0071] If the size of the print data exceeds the size of the spool area, CPU 201 proceeds to S803. In S803, CPU 201 sets the oversize flag to ON (for example, a value of 1), and proceeds to S704. On the other hand, if the size of the print data does not exceed the size of the spool area, CPU 201 proceeds to S804. In S804, CPU 201 sets the oversize flag to OFF (for example, a value of 0), and proceeds to S704. In this way, when the oversize flag is ON, this flag indicates that the size of the print data exceeds the size of the spool area (exceeds). The setting value of the oversize flag is saved in ROM 203 or HDD 204.

[0072] The processing of S704 to S708 is the same as that of Embodiment 1. In this embodiment, if the CPU 201 determines in S708 that a timeout event caused by a predetermined timer has occurred, the processing proceeds to S805, and if the CPU 201 determines that a timeout event has not occurred, the processing returns to S704.

[0073] In S805, CPU 201 determines whether the oversize flag is set to ON by referencing the saved setting value of the oversize flag. If the oversize flag is set to OFF (i.e., the size of the print data is equal to or smaller than the size of the spool area), CPU 201 returns the process to S704. This allows CPU 201 to wait until the reception obstruction factor is resolved and reception of the print data resumes. On the other hand, if the oversize flag is set to ON (i.e., the size of the print data exceeds the size of the spool area), CPU 201 proceeds to S710.

[0074] In S710, similarly to the first embodiment, the CPU 201 transmits an RST packet (RST command) to the host PC that is the sender of the print data via the LAN I / F 208. That is, by transmitting the RST packet, the printer (MFP 100) proactively disconnects the connection with the host PC.

[0075] In this way, CPU 201 controls whether to disconnect the connection with the external device from MFP 100, based on the size of the print data transmitted from the external device (host PC) and the size of the spool area. Specifically, CPU 201 transmits an RST packet to the external device if a predetermined time has elapsed while reception of print data from the external device has stopped and the size of the print data transmitted from the external device exceeds the size of the spool area. The RST packet corresponds to a disconnection request requesting disconnection. On the other hand, CPU 201 maintains the connection with the external device if a predetermined time has elapsed while reception of print data from the external device has stopped and the size of the print data transmitted from the external device does not exceed the size of the spool area. In this case, even if the printing process has stopped, the entire received print data can be stored in the spool area, so the connection is maintained and reception of the print data continues.

[0076] After the RST packet is sent in S710, when the disconnection with the host PC is completed, the CPU 201 ends the print data reception process according to the procedure in FIG.

[0077] As described above, in this embodiment, CPU 201 establishes a connection with an external device (host PC) according to a predetermined communication protocol, receives print data transmitted from the external device via the connection, and temporarily stores the data in a spool area. CPU 201 executes printing processing based on the print data stored in the spool area. If reception of print data from the external device is stopped midway and a predetermined time has elapsed while reception is stopped, CPU 201 further controls whether to disconnect the connection with the external device from MFP 100 based on the size of the print data transmitted from the external device and the size of the spool area.

[0078] In this way, it is possible to dynamically switch the operation when the reception of print data is suspended for a long time in accordance with the connected host PC, which makes it possible to resume the print process normally even if the reception of print data from an external device is suspended midway in the MFP 100.

[0079] [Third embodiment] Next, a third embodiment of the present disclosure will be described. In the following, descriptions of parts that are the same as those in the first and second embodiments will be omitted.

[0080] In the second embodiment, depending on whether the size of the print data exceeds the size of the spool area, the printer can dynamically switch between disconnecting the connection (S710) and waiting for a FIN packet to be received from the host PC (S707). However, as described above, unless the obstructing factor that prevents the reception of print data is resolved, the reception of print data from the host PC will remain suspended. In this state, for example, if the host PC goes into sleep mode or restarts, or if the MFP 100 goes into sleep mode (error sleep) without resolving an error, the connection between the host PC and the printer will be disconnected. As a result, the MFP 100 may not be able to properly cancel the print job, potentially resulting in an abnormal printed output.

[0081] Therefore, the MFP 100 of this embodiment performs the following operation to avoid outputting a printed document in which an error has occurred: If a predetermined time has elapsed while reception of print data from an external device has stopped and the size of the print data sent from the external device does not exceed the size of the spool area, the MFP 100 controls whether to disconnect the connection with the external device from the MFP 100 side, based on whether the spool area is configured with volatile memory.

[0082] <Processing Procedure> 9 is a flowchart showing the procedure of a print data reception process executed by the CPU 201 in the MFP 100 of this embodiment. The process of each step in FIG. 9 is realized in the MFP 100 by the CPU 201 reading a program stored in the ROM 203 or HDD 204 into the RAM 202 and executing it.

[0083] The processes of S701 to S703, S801 to S804, S704 to S708, and S805 are the same as those in the second embodiment. In this embodiment, if the size excess flag is set to OFF in S808 (i.e., if the size of the print data is equal to or smaller than the size of the spool area), the CPU 201 proceeds to S901.

[0084] In S901, the CPU 201 determines whether the spool area is configured with volatile memory. If the spool area is configured with non-volatile memory (HDD, SD memory, USB memory, etc.), the CPU 201 returns the process to S704, and if the spool area is configured with volatile memory, the CPU 201 proceeds to S710.

[0085] In S710, the CPU 201, as in the first and second embodiments, sends an RST packet (RST command) to the host PC that is the sender of the print data via the LAN I / F 208. That is, by sending the RST packet, the printer (MFP 100) proactively disconnects the connection with the host PC. In this way, when the disconnection with the host PC is completed, the CPU 201 ends the print data reception process according to the procedure in FIG. 7.

[0086] As described above, the MFP 100 of this embodiment operates as follows when a predetermined time has elapsed while reception of print data from an external device has stopped, and the size of the print data sent from the external device does not exceed the size of the spool area. Specifically, if the spool area is configured as volatile memory, the MFP 100 sends a disconnection request to the external device requesting disconnection. On the other hand, if the spool area is configured as nonvolatile memory, the MFP 100 maintains the connection with the external device. In this way, the MFP 100 maintains the connection with the external device only if the size of the print data sent from the external device does not exceed the size of the spool area and if the spool area is configured as nonvolatile memory. This process allows the MFP 100 to resume printing normally, avoiding the output of printed material with an error, even if reception of print data from the external device is stopped midway.

[0087] [Other embodiments] The present invention can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program.The present invention can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.

[0088] The invention is not limited to the above-described embodiments, and various changes and modifications can be made without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]

[0089] 100: MFP (printing device), 200: controller, 201: CPU, 202: RAM, 203: ROM, 204: HDD, 220: operation unit, 221: printer, 222: scanner

Claims

1. A printing device capable of communicating with an external device, at least one processor or at least one circuit; The at least one processor or the at least one circuit Establishing a connection with an external device according to a predetermined communication protocol; receiving print data transmitted from the external device via the connection and temporarily storing the data in a spool area; performing a printing process based on the print data stored in the spool area; When reception of print data from the external device is stopped midway and a predetermined time has elapsed while the reception is stopped, control is performed as to whether or not the connection with the external device is to be disconnected from the printing device side in accordance with a setting previously made by a user operation. A printing device characterized by:

2. The at least one processor or the at least one circuit sets whether or not to disconnect the connection with the external device from the printing device side when a predetermined time has elapsed while reception of print data from the external device has stopped, in accordance with a user operation accepted via a setting screen displayed on a display means of the printing device.

2. The printing device according to claim 1.

3. When the predetermined time has elapsed while reception of print data from the external device has stopped and the connection with the external device is set to be disconnected from the printing device side, the at least one processor or the at least one circuit transmits a disconnection request to the external device to request disconnection of the connection.

3. The printing device according to claim 1, wherein the printing device is a printer.

4. The at least one processor or the at least one circuit maintains the connection with the external device when the predetermined time has elapsed while reception of print data from the external device has stopped and when the printer is configured not to disconnect the connection with the external device.

4. The printing device according to claim 1, wherein the printing device is a printer.

5. A printing device capable of communicating with an external device, at least one processor or at least one circuit; The at least one processor or the at least one circuit Establishing a connection with an external device according to a predetermined communication protocol; receiving print data transmitted from the external device via the connection and temporarily storing the data in a spool area; performing a printing process based on the print data stored in the spool area; when reception of print data from the external device is stopped midway and a predetermined time has elapsed while the reception is stopped, control is performed as to whether or not to disconnect the connection with the external device from the printing device side based on the size of the print data transmitted from the external device and the size of the spool area predetermined for spooling the print data; A printing device characterized by:

6. The at least one processor or the at least one circuit obtains the size of the print data from a control command transmitted from the external device prior to transmission of the print data.

6. The printing device according to claim 5.

7. When the predetermined time has elapsed while reception of print data from the external device has stopped and the size of the print data sent from the external device exceeds the size of the spool area, the at least one processor or the at least one circuit sends a disconnection request to the external device, requesting that the connection be disconnected.

7. The printing device according to claim 5, wherein the printing device is a printer.

8. The at least one processor or the at least one circuit maintains the connection with the external device when the predetermined time has elapsed while reception of print data from the external device has stopped and the size of the print data sent from the external device does not exceed the size of the spool area.

8. The printing device according to claim 5, wherein the printing device is a printer.

9. When the predetermined time has elapsed while reception of print data from the external device has stopped and the size of the print data sent from the external device does not exceed the size of the spool area, the at least one processor or the at least one circuit controls whether or not to disconnect the connection with the external device from the printing device side based on whether or not the spool area is configured with volatile memory.

8. The printing device according to claim 5, wherein the printing device is a printer.

10. When the predetermined time has elapsed while reception of print data from the external device has stopped and the size of the print data sent from the external device does not exceed the size of the spool area, the at least one processor or the at least one circuit: If the spool area is configured as a volatile memory, a disconnection request is sent to the external device to request disconnection of the connection; If the spool area is configured as a nonvolatile memory, the connection with the external device is maintained.

10. The printing device according to claim 9.

11. The predetermined time is set to a time shorter than a timeout period until the external device cancels the print job if the printing device does not resume receiving print data.

11. The printing device according to claim 1.

12. The at least one processor or the at least one circuit changes the predetermined time in accordance with a user operation received via a setting screen displayed on a display means of the printing device.

12. The printing device according to claim 1, wherein the printing device is a printer.

13. The predetermined communication protocol is the LPD (Line Printer Daemon) protocol.

13. The printing device according to claim 1, wherein the printing device is a printer.

14. A method for controlling a printing device capable of communicating with an external device, comprising: an establishing step of establishing a connection with an external device in accordance with a predetermined communication protocol; a receiving step of receiving print data transmitted from the external device via the connection and temporarily storing the print data in a spool area; a printing step for performing printing processing based on the print data stored in the spool area; a control step of controlling whether or not to disconnect the connection with the external device from the printing device side in accordance with a setting previously made by a user operation when reception of print data from the external device is stopped midway and a predetermined time has elapsed while the reception is stopped; 10. A method for controlling a printing device, comprising:

15. A method for controlling a printing device capable of communicating with an external device, comprising: an establishing step of establishing a connection with an external device in accordance with a predetermined communication protocol; a receiving step of receiving print data transmitted from the external device via the connection and temporarily storing the print data in a spool area; a printing step of performing printing processing based on the print data stored in the spool area; a control step of controlling whether or not to disconnect the connection with the external device from the printing device side, when reception of print data from the external device is stopped midway and a predetermined time has elapsed while the reception is stopped, based on the size of the print data transmitted from the external device and the size of the spool area predetermined for spooling the print data; 10. A method for controlling a printing device, comprising:

16. A program for causing a computer to function as the printing device according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Control device and method of data communications between devices

    JP2003256178A

  • Printing apparatus and printing method

    JP2006123261A

  • Image forming apparatus, printing controlling method, printing controlling program and recording medium with this program recorded

    JP2009291983A

  • Printer and control method therefor, program

    JP2011116083A

  • Information processor, and print data processing method and program in the information processor

    JP2012098816A