This application claims priority to Japanese Patent Application No. 2020-156275, filed on Sep. 17, 2020, the entire contents of which are incorporated herein by reference.
The description herein discloses a control device configured to cause a print executing unit to print an image represented by a file included in an email.
A system including a guest terminal, a printer, and a server is known. The guest terminal is configured to send an email including an attached file to the server. The server is configured to generate print data with a body of the email and the attached file as print targets and send this print data to the printer.
In the above technique, no consideration is given to an email including a body in which an image is inserted. The description herein provides an art configured to suitably execute printing related to an email including a body part in which an image is inserted.
A control device configured to cause a print executing unit to print is disclosed herein. The control device may include a controller. The controller may be configured to: receive an email including a header part and a body part, wherein a first file image represented by a first file is inserted in the body part; in a case where the body part includes a text different from the first file image, supply first print data for printing a first print image on a first print medium to the print executing unit, wherein the first print image includes the text, the first file image, and header information which is at least a part of information included in the header part; and in a case where the body part does not include the text different from the first file image, supply second print data for printing a second print image on a second print medium to the print executing unit, wherein the second print image includes the first file image but does not include the header information.
A computer program, a non-transitory computer-readable recording medium storing computer readable instructions for the control device, and a method executed by the control device are also novel and useful.
(Configuration of Communication System 2:
As shown in
The printer 100A and the printer 100B respectively have identification information, printer IDs “P1”, “P2”, for identifying the printers. The PC 200 is a user terminal for causing the printers 100A, 100B to print.
(Configuration of Print Mediation Server 10)
The print mediation server 10 is installed on the Internet 4 by a vendor of the printer 100A for example. However in a variant, the print mediation server 10 may be installed by a business entity different from the vendor. The print mediation server 10 is configured to mediate communication for the PC 200 to cause the printers 100A, 100B to print. Especially, the print mediation server 10 has an email print function. The email print function is for receiving an email from the PC 200 and causing one of the printers 100A, 100B to print an image represented by a file included in this email. Hereinbelow, the print mediation server 10 will be denoted short as “mediation server 10”.
The mediation server 10 includes a communication interface 20 and a controller 30. The communication interface 20 is connected to the Internet 4. The controller 30 includes a CPU 32 and a memory 34. The CPU 32 is configured to execute various processes according to a program 40 stored in the memory 34. The memory 34 is constituted of a volatile memory and a nonvolatile memory, and stores a printer table 42 in addition to the aforementioned program 40.
The printer table 42 stores an email address, a printer ID, and a body print setting in association with each other. For example, an email address “aaa@print.com” and a printer ID “P1” of the printer 100A are associated therein. This means that when the mediation server 10 receives an email having the email address “aaa@print.com” as a recipient, it causes the printer 100A to print an image represented by a file included in this email. The body print setting indicates a value indicating one of “(body print:) enabled”, indicating that a text written in a body part of an email is to be printed, and “(body print:) disabled”, indicating that the text written in the body part of the email is not to be printed.
The email address and the printer ID in the printer table 42 are information stored when various types of communication are executed between the mediation server 10, the printer 100A (or 100B), and the PC 200. When a user of the printer 100A, 100B wishes to use the email print function, the user performs operation for storing the email address and the printer ID in the mediation server 10 in advance. The body print setting in the printer table 42 is information designated by users of the printers 100A, 100B. After the email address and the printer ID are stored in the printer table 42, the user of the printer 100A, 100B performs operation of designating either “enabled” or “disabled” as the body print setting.
(Processes Executed by Mediation Server 10:
Next, processes executed by the CPU 32 of the mediation server 10 will be described with reference to
In S10, the CPU 32 monitors receiving an email from the PC 200. The CPU 32 determines YES to S10 in a case of receiving an email from the PC 200 and proceeds to S20.
In S20, the CPU 32 firstly specifies a recipient address included in the email and specifies body print setting associated with this recipient address from the printer table 42. Then, the CPU 32 determines whether this body print setting indicates “enabled” or “disabled”. The CPU 32 proceeds to S30 in a case of determining that it indicates “enabled” (YES to S20) and proceeds to S32 in a case of determining that it indicates “enabled” (NO to S20).
In S30, the CPU 32 executes an enabled print process (see
In S32, the CPU 32 executes a disabled print process (see
In S40, the CPU 32 determines whether the email includes an attached file. The CPU 32 proceeds to S42 in a case of determining that it includes an attached file (YES to S40), and skips S42 and returns to the process of S10 in a case of determining that it does not include an attached file (NO to S40).
In S42, the CPU 32 generates print data corresponding to the attached file. Specifically, the CPU 32 executes a conversion process on the attached file and generates print data having a data format which a printer (such as 100A) is capable of interpreting. Here, the data format which the printer is capable of interpreting may for example be a well-known data format such as Joint Photographic Experts Group (JPEG), or may be a data format developed by the vendor of the printer. The print data generated hereof does not include information in a header part of the email (such as a subject, a recipient address, a sender address, and date-and-time information) and also does not include information in the body part of the email (such as the text and an image inserted in the body part).
In S42, the CPU 32 further specifies the recipient address (such as aaa@print.com) included in the email and specifies a printer ID (such as P1) associated with the specified email address from the printer table 42 (see
In actuality, prior to sending the print data to the printer, the CPU 32 sends a notification to the printer indicating that the print data has been generated and receives a sending request of the print data from the printer, and thereafter sends the print data to the printer. However, in the present embodiment, communication of such notification and sending request is omitted from the drawings. The same applies to processes for sending print data below (such as S124 of
(Enabled Print Process:
Next, the enabled print process of S30 of
In S110, the CPU 32 specifies one body file from the one or more body files.
In S120, the CPU 32 determines whether the image represented by the specified body file can be printed within the body. In other words, the CPU 32 determines whether this image can be printed on same print medium as the text included in the body part. Specifically, in a case where the specified body file has a predetermined file format, the CPU 32 determines that the image can be printed within the body (YES to S120) and proceeds to S122. Here, in the present embodiment, the predetermined file format is JPEG and PNG. However, in a variant, the predetermined file format may be another file format (such as GIF, TIFF, and BMP). Hereinbelow, the body file having the predetermined file format will be denoted as “body print-available file”. On the other hand, in a case where the specified body file does not have the predetermined file format, the CPU 32 determines that the image cannot be printed within the body (NO to S120) and proceeds to S124. For example, the CPU 32 determines that print within the body is not possible when the specified body file is a PDF. Hereinbelow, the body file not having the predetermined file format will be denoted as “body print-unavailable file”.
In S122, the CPU 32 determines whether the body part includes a text. Details of this process of S122 will be described with reference to
The header part 310 includes the sender address, the recipient address, the date-and-time information, and the subject. The body part 350 includes respective HTML commands, and especially includes the text “I'm sending you the photograph”. As such, an image 350A representing the body part 350 (such as an image displayed in a mailer of a sender of this email) includes the text “I'm sending you the photograph”. The body part 350 further includes a body file 370. That is, the image 350A representing the body part 350 includes an image 370A represented by the body file 370. In other words, the image 370A is inserted in the body part 350. The attached file 390 represents an image 390A. In a state where the email is displayed on the mailer, information of the header part 310 and the image 350A are displayed and the image 390 is not displayed. The image 390A is displayed when the attached file 390 is opened by the user in the mailer.
In S122, the CPU 32 firstly deletes one start tag “<”, an end tag “>” corresponding to this start tag, and a letter string “!DOCTYPE html” between these start tag and end tag from the body part 350. The CPU 32 executes similar process for other sets of start tag and end tag. As a result in the example of
In S124, the CPU 32 generates print data corresponding to the body file. Specifically, the CPU 32 generates the print data by executing the conversion process on the body file. The print data generated hereof does not include information in the header part nor information in the body part. In S124, the CPU 32 further specifies the printer ID from the recipient address similar to the description of S42 as above, and sends the print data to the printer identified by the specified printer ID. As a result of this, the printer prints an image represented by this print data, that is, the image represented by the body file.
In S126, the CPU 32 determines whether all of the one or more body files included in the body part have been specified in S110. In a case of determining that all of the one or more body files have been specified (YES to S126), the CPU 32 proceeds to S130. On the other hand, in a case of determining that all of the one or more body files have not been specified (NO to S126), the CPU 32 returns to S110 and specifies the body file(s) that have not yet been specified.
In S130, the CPU 32 determines whether there is a body file that can be printed within the body (i.e., “printable file”) and the body part includes a text. That is, the CPU 32 determines whether S120 has been determined YES and S122 has been determined YES. In a case where there is one or more printable files and the body part includes the text, the CPU 32 determines YES to S130 and proceeds to S132. On the other hand, in a case where there is no printable file or a case where the body part does not include the text, the CPU 32 determines NO to S130 and proceeds to S140.
In S132, the CPU 32 generates print data corresponding to header information, the text included in the body part, and the one or more printable files. The header information is the sender address and the subject included in the header part. Specifically, the CPU 32 firstly generates print data corresponding to the header information so that the header information will be printed at a top of the print medium. Then, the CPU 32 generates print data corresponding to the text and the one or more printable files. Here, the CPU 32 generates the print data such that the text and one or more images represented by the one or more printable files are printed on the print medium as aforementioned in accordance with an order in which they are written in the body part of the email. For example, in the example of the email 300 of
In S132, the CPU 32 further specifies the printer ID from the recipient address similar to the description of S42 as above, and sends the print data to the printer identified by the specified printer ID. As a result of this, the printer prints images represented by the print data, that is, the header information, the text, and the one or more images. When S132 is completed, the process of
In S140, the CPU 32 determines whether the body part includes a text, similar to S122. The CPU 32 proceeds to S142 in a case of determining that the body part includes the text (YES to S140), and skips S142 and terminates the process of
(Disabled Print Process:
Next, the disabled print process of S32 of
S210 to S226 are to the same as S110 to S126 of
(Specific Print Results:
Next, specific print results realized by the processes of
(Case where body print setting is “enabled” and only one body file is included:
In a case where the file format of the body file is JPEG (YES to S100, YES to S120 of
When the user writes a text in the body part, he/she normally intends the header information and the text to be printed altogether rather than printing only the text. Further, when the user inserts a printable file (i.e., JPEG image) in addition to the text, he/she normally intends the header information, the text, and the JPEG image to be printed altogether. In the above case of printing on the print medium P1, such intention of the user can be realized.
Further, in a case where the email includes an attached file (YES to S40 of
When the user includes the attached file in the email, he/she normally intends the attached file image to be printed separately from the body part. In the above case of printing on the print medium P2, such intention of the user can be realized.
In a case where the file format of the body file is JPEG (YES to S100, YES to S120 of
When the user does not write a text in the body part and inserts the printable file (i.e., JPEG image) in the body part, he/she normally intends only the JPEG image to be printed as in the printing of the attached file included in the email. In the above case of printing on the print medium P3, such intention of the user can be realized.
In a case where the file format of the body file is PDF (YES to S100, NO to S120 of
Even when a non-printable file (i.e., PDF image) is inserted in the body part, the PDF image cannot be printed on a same print medium as the text. As such, only the PDF image is printed on the print medium P6. Further, when the user writes a text in the body part, he/she normally intends the header information and the text to be printed altogether. In the above case of printing on the print medium P5, such intention of the user can be realized.
In a case where the file format of the body file is PDF (YES to S100, NO to S120 of
(Case where body print setting is “enabled” and only two body files are included: FIG. 7)
Next, the print result of a case where there are two body files will be described with reference to
Further, in a case where the email includes the attached file (YES to S40 of
In a case where the file format of both of the two body files is JPEG (YES to S100, YES to S120 of
In a case where the file format of one of the two body files is JPEG (YES to S100, YES to S120 of
In a case where the file format of one of the two body files is JPEG (YES to S100, YES to S120 of
(Case where body print setting is “disabled”:
Next, the print result of a case where the body print setting is “disabled” will be described with reference to
When the user sets the body print setting to “disabled”, he/she intends that the body part is not to be printed. In the above case that does not generate or send the print data to the printer, such intention of the user can be realized.
Further, in a case where the email includes the attached file (YES to S40 of
In a case where the file format of the body file is JPEG (YES to S200, YES to S220 of
In both cases of the print medium P3 of
In a case where the file format of the body file is PDF (YES to S200, NO to S220 of
In a case where the user inserted the non-printable file (i.e., PDF image) in the body part although the body print setting is set to “disabled”, he/she normally intends the non-printable file to be treated similar to the attached file. That is, the user intends to print only the PDF image. In the above case of printing on the print medium P34, such intention of the user can be realized.
In a case where the file format of the body file is PDF (YES to S200, NO to S220 of
(Effects of Present Embodiment)
According to the present embodiment, in the case where the body part in which the JPEG image “X” is inserted includes the text, the mediation server 10 can cause the printer to print the image including the header information, the text, and the JPEG image “X” (see print medium P1 of
(Corresponding Relationship)
The mediation server 10 and the printer (such as 100A) are respectively an example of “control device” and “print executing unit”. The print mediums P1, P3 of
S10, S42 of
(Variant 1) The mediation server 10 may not be provided. For example, the printer 100 may receive the email from the PC 200 without intervention of the mediation server 10. In this case, a controller (i.e., CPU) of the printer 10 executes the processes of
(Variant 2) The mediation server 10 may not store the body print setting. In this case, S20, S32 of
(Variant 3) The email may be configured capable of inserting only a body printable file in a body part and incapable of inserting a body print-unavailable file in the body part. In this case, S120 of
(Variant 4) The email may be configured incapable of including the attached file when the body file is inserted in the body part. In the present variant, “supply fifth print data” may be omitted.
(Variant 5) The mediation server 10 may determine whether the body part includes a text using a method different from that of the above embodiment. For example, the email may be written according to a text format instead of being written according to HTML. In this case, the mediation server 10 may determine that the body part includes a text when the body part includes a letter string and determine that the body part does not include a text when the body part does not include a letter string.
(Variant 6) The header information may include one or both of the recipient address and the date-and-time information instead of or in addition to the sender address and the subject. Further, in another variant, the header information may include information (such as information indicating a data format of the email) different from the sender address, the recipient address, the subject, and the date-and-time information.
(Variant 7) In the case of NO to S140 of
(Variant 8) The mediation server 10 may not have the XMPP connection established with the printer to be used. In this case, for example, when the email is received and the print data is generated, the mediation server 10 may send a PIN to the PC being a sender of the email. The mediation server stores the print data and the PIN in association with each other. After having seen the PIN displayed on the PC, the user inputs this PIN to the printer. In this case, the printer sends a request including the PIN to the mediation server 10. When the request including the PIN is received from the printer, the mediation server 10 sends the print data associated with this PIN to the printer. In another variant, when the email is received and the print data is generated, the mediation server 10 stores the print data and the sender address in association with each other. The user selects the email address stored in the printer and matching the sender address on a display unit of the printer. In this case, the printer sends a request including this email address to the mediation server 10. When the request including the email address is received from the printer, the mediation server 10 sends the print data associated with this email address to the printer.
(Variant 9) In the above embodiment, the processes of
Number | Date | Country | Kind |
---|---|---|---|
JP2020-156275 | Sep 2020 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
7136180 | Utsunomiya | Nov 2006 | B2 |
7283272 | Johnson | Oct 2007 | B2 |
8073822 | Sell | Dec 2011 | B2 |
8237966 | Honda | Aug 2012 | B2 |
8964218 | Oshima | Feb 2015 | B2 |
20120194864 | Oshima et al. | Aug 2012 | A1 |
20150124293 | Oshima et al. | May 2015 | A1 |
20170024172 | Oshima et al. | Jan 2017 | A1 |
Number | Date | Country |
---|---|---|
2012-159914 | Aug 2012 | JP |
Number | Date | Country | |
---|---|---|---|
20220083289 A1 | Mar 2022 | US |