WO2018232733A1 - Method and device for providing a printing service - Google Patents

Method and device for providing a printing service Download PDF

Info

Publication number
WO2018232733A1
WO2018232733A1 PCT/CN2017/089750 CN2017089750W WO2018232733A1 WO 2018232733 A1 WO2018232733 A1 WO 2018232733A1 CN 2017089750 W CN2017089750 W CN 2017089750W WO 2018232733 A1 WO2018232733 A1 WO 2018232733A1
Authority
WO
WIPO (PCT)
Prior art keywords
printer
file
data
server
cups
Prior art date
Application number
PCT/CN2017/089750
Other languages
French (fr)
Inventor
Han Wu
Feng MI
Yinghua Liu
Original Assignee
Thomson Licensing
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Thomson Licensing filed Critical Thomson Licensing
Priority to PCT/CN2017/089750 priority Critical patent/WO2018232733A1/en
Publication of WO2018232733A1 publication Critical patent/WO2018232733A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/23Reproducing arrangements
    • H04N1/2307Circuits or arrangements for the control thereof, e.g. using a programmed control device, according to a measured quantity
    • H04N1/2392Circuits or arrangements for the control thereof, e.g. using a programmed control device, according to a measured quantity for displaying or indicating, e.g. a condition or state
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/23Reproducing arrangements
    • H04N1/2307Circuits or arrangements for the control thereof, e.g. using a programmed control device, according to a measured quantity
    • H04N1/2346Circuits or arrangements for the control thereof, e.g. using a programmed control device, according to a measured quantity according to a detected condition or state of the reproducing device, e.g. temperature or ink quantity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2201/00Indexing scheme relating to scanning, transmission or reproduction of documents or the like, and to details thereof
    • H04N2201/21Intermediate information storage
    • H04N2201/214Checking or indicating the storage space
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2201/00Indexing scheme relating to scanning, transmission or reproduction of documents or the like, and to details thereof
    • H04N2201/21Intermediate information storage
    • H04N2201/218Deletion of stored data; Preventing such deletion

Definitions

  • the present disclosure relates to data processing, and more particularly relates to a method and a device for providing a printing service.
  • CUPS (formerly an acronym for Common UNIX Printing System) is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server.
  • Fig. 1 is a diagram showing a method for CUPS to process a print job or task.
  • a computer running CUPS 100 is a host or server that can accept print jobs or tasks from client computers, process them, and send them to the appropriate printer.
  • CUPS consists of a print spooler and scheduler 101, a filter 102, and a backend 103.
  • CUPS 100 makes extensive use of PostScript (PS, a page description language) and rasterization of data to convert the data into a format suitable for the destination printer.
  • PostScript PS, a page description language
  • the CUPS scheduler 101 implements Internet Printing Protocol (IPP) over HTTP/1.1.
  • a helper application (cups-lpd) converts Line Printer Daemon protocol (LPD) requests to IPP.
  • the scheduler also provides a web-based interface for managing print jobs and queues, the configuration of the server, and for documentation about CUPS itself. System administrators can configure the device drivers which CUPS supplies by editing text files in Adobe's PostScript Printer Description (PPD) format.
  • PPD PostScript Printer Description
  • the scheduler allows for classes of printers.
  • Applications can send requests to groups of printers in a class, allowing the scheduler to direct the job to the first available printer in that class.
  • the CUPS scheduler manages print jobs, sending them to the filter and backend processes for final conversion and printing, and monitoring the status messages from those processes.
  • the CUPS spooler 101 allows printing files to be stored in a queue.
  • the files are formatted and written to the queue at the speed of the format conversion device, e.g. a user computer or printer server.
  • the files are retrieved and printed at the speed of the destination printer. Multiple clients that have files to be printed can write files to the spool without waiting, and then perform the other tasks, while the spooler manages the queue.
  • the filter system 102 enables CUPS to process a variety of data formats on the print server. It converts the print-job data into the final language or format of the printer via a series of filters. It uses MIME type (Multipurpose Internet Mail Extensions or media type) that is a two-part identifier for identifying file formats and format contents.
  • MIME type Multipurpose Internet Mail Extensions or media type
  • the CUPS daemon loads two MIME databases: mime. types that defines the known file types that CUPS can accept data for, and mime. convs that defines the programs or algorithms that process each particular MIME type. Then the filter system determines the data format of the file that is being input and the filter to be used through the use of the MIME databases.
  • image data will be detected and processed through a particular filter, and HTML data detected and processed through another filter.
  • the filter system converts the print job data in its original format into a printer data in a format suitable for and understandable by the destination printer.
  • CUPS can convert supplied data either into PostScript data or directly into raster data. If the data is converted into PostScript data an additional filter called a prefilter is applied. The prefilter runs the PostScript data through another PostScript converter so that CUPS can add printer specific options like selecting page ranges to print, setting n-up mode and other device-specific things.
  • the data can either be sent directly to a CUPS backend if using a PostScript printer, or be passed to another filter like Foomatic by linuxprinting. org.
  • the data can be passed to ghostscript, which converts the PostScript into an intermediary CUPS-raster format.
  • the intermediary raster format is then passed onto a final filter which converts the raster data to a printer-specific format.
  • the backends 103 are the ways in which CUPS sends printer data to the printers. There are several backends available for CUPS: parallel, serial, and USB (Universal Serial Bus) ports, cups-pdf PDF Virtual Printing, as well as network backends that operate via the IPP, JetDirect (AppSocket) , Line Printer Daemon ( "LPD” ) , and SMB protocols.
  • CUPS offers a standard and modularised printing system that can process numerous data formats on the print server.
  • CUPS Before CUPS, it was difficult to find a standard printer management system that would accommodate the very wide variety of printers on the market using their own printer languages and formats. For instance, the System V and Berkeley printing systems were largely incompatible with each other, and they required complicated scripts and workarounds to convert the program's data format to a printable format. They often could not detect the file format that was being sent to the printer and thus could not automatically and correctly convert the data stream. Additionally, data conversion was performed on individual workstations rather than a central server. CUPS allows printer manufacturers and printer-driver developers to more easily create drivers that work natively on the print server. Processing occurs on the server, allowing for easier network-based printing than with other Unix printing systems. More information about CUPS can be found on the web site: https: //www. cups. org .
  • CUPS is a printing system for Unix-like computer operating systems.
  • CUPS can be configured to share printers between two GNU/Linux systems (GNU is an operating system that is a complete free software system, upward-compatible with Unix) .
  • GNU is an operating system that is a complete free software system, upward-compatible with Unix
  • CUPS can be configured to share printers between a GNU/Linux system and Microsoft Windows.
  • Samba software program
  • users can address printers on remote Windows computers, and generic PostScript drivers can be used for printing across the network.
  • Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients.
  • SMB Server Message Block
  • Microsoft SMB Protocol A set of message packets that define a particular version of the protocol is called a dialect.
  • CIFS Common Internet File System
  • SMB and CIFS are also available on VMs (virtual machines) , several versions of Unix, and other operating systems.
  • Samba is software that can be run on a platform other than Microsoft Windows, for example, UNIX, Linux, IBM System 390, OpenVMS, and other operating systems.
  • Samba uses the TCP/IP protocol that is installed on the host server. When correctly configured, it allows that host to interact with a Microsoft Windows client or server as if it was a Windows file and print server.
  • CUPS uses spooling technology, the entire content of the file to be printed is stored on the gateways by default. Because the gateways intrinsically aren’t equipped with a large memory storage, the available memory that can be used by CUPS is quite limited. When the gateway receives a large-size file to be printed, it will be very likely to fail for the lack of enough printing space.
  • a method for a device to provide a printing service wherein a printer is connected to the device.
  • the method comprises steps of receiving a request to print a file from a client device, wherein the request comprises size of printer data of the file; when determining there is not enough free memory in the device and there is enough memory in an external storage device by using the size of the printer data of the file, using the external storage device to store the printer data of the file; and transmitting the printer data to the printer.
  • a device for providing a printing service comprises at least one port for connecting to an external storage device; a transceiver for receiving a request to print a file from a client device, wherein the request comprises size of printer data of the file; and a processor for when determining there is not enough free memory in the device and there is enough memory in an external storage device by using the size of the printer data of the file, using the external storage device to store the printer data of the file, and using the transceiver to transmit the printer data to a printer .
  • a computer program comprising program code instructions executable by a processor for implementing a method described above.
  • a computer program product which is stored on a non-transitory computer readable medium and comprises program code instructions executable by a processor for implementing a method described above.
  • Fig. 1 is a diagram showing a method for CUPS to process a print job or task according to prior art
  • Fig. 2 is a diagram showing a system for providing a printing service according to an embodiment of present disclosure
  • Fig. 3 is a block diagram of an exemplary gateway for providing a printing service according to the embodiment of the present disclosure.
  • Fig. 4 is a flow chart showing a method for providing printing service according to the embodiment of the present disclosure.
  • the present disclosure provides a gateway working as print server for remote client devices, such as PC, laptop, tablet, smart phone etc. It solves a technical problem that insufficient memory space on the gateway leads to the failure of the printing of a large size file.
  • the gateway automatically switches to a proper printing directory as a temporary directory of the CUPS printer to support the printing of large size file on gateway.
  • the proper printing directory resides in an external storage device plugged in the gateway, such as a USB drive (also called USB flash drive, USB memory) .
  • Fig. 2 is a diagram showing a system for providing a printing service according to an embodiment of present disclosure.
  • the system comprises a gateway 201, several client devices –comprising a laptop 202, a tablet 203 and a mobile 204–that have files to be printed, and a printer 205.
  • the gateway 201 and the several client devices 202, 203 and 204 are connected in a wired or wireless manner, e.g. through an Ethernet cable, a USB cable or a Wi-Fi channel in accordance with 802.11 protocol etc.
  • the gateway 201 and the printer 205 are connected in a wired or wireless manner, e.g. through an Ethernet cable, a USB cable or a Wi-Fi channel in accordance with the 802.11 protocol etc.
  • the gateway 201 works in part as a print server for accepting the print requests from the client devices and for transmitting the data in a format used by the printer 205 to the printer 205.
  • Fig. 3 is a block diagram of an exemplary gateway for providing a printing service according to the embodiment of the present disclosure. It includes at least one microprocessor (MPC) or processor 301, at least one transceiver 302, at least one external storage interface or port 303, a power supply 304, a volatile storage 305 and a non-volatile storage 306.
  • MPC microprocessor
  • the MPC 301 is used to process program instructions stored on the non-volatile storage 306, e.g. software codes of Samba server and CUPS server.
  • the transceiver 302 is used to receive and send data from and to the Internet. Its type comprises Ethernet transceiver, DSL transceiver, Wi-Fi transceiver, ONU (optical network unit) or ONT (optical network terminal) , USB port etc.
  • the at least one transceiver 302 includes a Wi-Fi transceiver for communicating with the client devices and the printer.
  • the at least one transceiver 302 includes a Wi-Fi transceiver for communicating the client devices and a USB port or an Ethernet port for communicating with the printer.
  • the at least one port 303 is used to connect to an external storage device or storage memory.
  • the port 303 is a USB port
  • the external storage device is a USB drive.
  • the at least one port 303 further comprises a USB port for connecting to a USB printer. If the printer has a Wi-Fi adaptor, it can connect to the gateway via the transceiver 302.
  • the power supply 304 is used to supply power to all modules of the gateway. It typically converts alternating current to a 5 V direct current.
  • the volatile storage 305 is used to store temporary data. In implementations, it can use volatile random access memory (RAM) , e.g. SDRAM.
  • RAM volatile random access memory
  • the volatile storage 305 in the gateway is in part used to store the printer data of a format corresponding to the destination printer.
  • the non-volatile storage 306 is used to store data and program instructions, which remain in the non-volatile storage 306 even when it is not powered. In implementations, it can use read only memory (ROM) , flash etc. As to flash, it can use NOR flash and NAND flash.
  • ROM read only memory
  • flash it can use NOR flash and NAND flash.
  • Fig. 4 is a flow chart showing a method for providing printing service according to an embodiment of the present disclosure.
  • both CUPS server and Samba server are integrated and deployed in the gateway with additional logical program codes. So the gateway can work as print server to provide printing service to both Unix client devices and Microsoft Windows client devices.
  • the gateway shares a printer that connects to the gateway.
  • An administrator or a user can use the Graphic User Interface provided by the Samba to share a printer as Samba-based printer share.
  • the Graphic User Interface is used to add, modify and delete printer configurations in a share named [printers] in the configuration file of Samba. If Samba server has lp, pcl and ps printers in its printer capabilities file, Samba will automatically read them from the printer capabilities file and create a printer share for each of the 3 printers.
  • Each printer share has the same name as the printer and is configured with the options in the [printers] share.
  • the printer can be a serial printer, parallel printer or a USB printer.
  • the client devices can access the shared Samba server without any security authentication.
  • the client devices can find and access the shared printer by entering Samba server’s IP address.
  • the printer share in the Samba server shows up in the list of shares offered in the Network Neighborhood of the client device. But if the security level of Samba is configured to “user” , a user name and a password are required to authenticate the access of the client device.
  • the Samba server in the gateway receives a request to print a file from a client device.
  • the file format can be text, picture, word, excel, ppt (power point file) , pdf etc.
  • the application software prints the file by utilizing the system's printer driver for the printer. It is the printer driver software running on the client device that translates data of the file into a stream of binary data (i.e. printer data) specific to the model of printer in use. Instead of transmitting the printer data directly to the printer, the client device calculates file size of the printer data and include the file size in the request.
  • the Samba server determines if there is enough free memory in the RAM of the gateway for the printer data. This is implemented by comparing the size of free memory in the RAM of the gateway to the file size carried in the request.
  • the core of the gateway is Linux.
  • Command “cat/proc/meminfo” is used to obtain the free memory size of the RAM. Below is a result of the command execution with irrelevant information removed for the purpose of conciseness. MemFree represents the free memory size.
  • the Samba server determines if there is enough free memory in the external storage device connected to the gateway. It is implemented by detecting if there an external storage device connected to the gateway on some port -e.g. a USB port in case that the external storage device is a USB drive -detecting if there is enough free memory in the USB drive, and comparing the size of free memory in the USB drive to the size of printer data.
  • the Samba server checks if partitions, e.g. “sda” , in directory “/mnt/usb” has been added.
  • command “df /mnt/usb/sda1/” can be used.
  • the value of ‘Available’ parameter indicates free space size. Below shows an example with underline added to the “available” parameter and its value.
  • the Samba server closes the request to print the file.
  • the Samba server can either transmit a response indicating the closing of the request to the client device or just discard the request.
  • the Samba server sets the printer file temporary directory with the external storage device mounted directory, such as “/mnt/usb/sda” .
  • the following is the Samba printing configuration file in the gateway, “option ‘path’ ” is used to set the printer file temporary directory. Samba server will load this configuration file, and use the directory '/var/spool/samba'to as printer file temporary directory first when it starts.
  • the Samba server receives and stores the printer data in the temporary directory as indicated in the Samba configuration file, in response to a “write file” message from the client device. Specifically, because the Samba server receives the request to print file at step 402, the Samba server sends a response message indicating that the Samba server is ready to receive the printer data.
  • the temporary directory is located in the RAM of the gateway by default. But it may change to an external storage device as a result of step 406.
  • the printer driver software running on the client device has generated the printer data. And when the printer data arrives at the Samba server, the printer data is temporarily written to disk in the temporary directory specified by the “path” option of the printer share.
  • the Samba server prints the printer data of the file. It is implemented by using the temporary directory as specified by the Samba server as the printer directory in the CUPS server so that the destination printer, e.g. a USB printer can use the directory to print directly, and sending a request to print the file to the CUPS server. Then the CUPS server can transmit the printer data to the destination printer through the corresponding port on the gateway, e.g. a USB port connecting to the destination printer.
  • the destination printer e.g. a USB printer
  • the CUPS server is integrated in the gateway.
  • the client device accesses the destination printer via IPP or LPD.
  • the CUPS server carries out steps in the figure 4 with the following differences.
  • the CUPS server sets the printer files temporary directory to external storage device mounted directory such as “/mnt/usb/sda” .
  • the cups-files. conf is in “/etc/cups/cups-files. conf” in the gateway.
  • Each line in the file can be a configuration directive, a blank line, or a comment.
  • Configuration directives typically consist of a name and zero or more values separated by whitespace.
  • the “RequestRoot directory” in the file specifies the directory that contains print jobs and other HTTP request data.
  • the default is "/var/spool/cups” .
  • the value is set to “/mnt/usb/sda” .
  • the CUPS server transmits the printer data to the destination printer through the corresponding port on the gateway.
  • aspects of the present principles can be embodied as a system, method or computer readable medium. Accordingly, aspects of the present principles can take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, and so forth) , or an embodiment combining software and hardware aspects that can all generally be referred to herein as a “circuit, ” “module” , or “system. ” Furthermore, aspects of the present principles can take the form of a computer readable storage medium. Any combination of one or more computer readable storage medium (s) may be utilized.
  • a computer readable storage medium can take the form of a computer readable program product embodied in one or more computer readable medium (s) and having computer readable program code embodied thereon that is executable by a computer.
  • a computer readable storage medium as used herein is considered a non-transitory storage medium given the inherent capability to store the information therein as well as the inherent capability to provide retrieval of the information therefrom.
  • a computer readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

A method for a device to provide a printing service is provided, wherein a printer is connected to the device. The method comprises receiving a request to print a file from a client device (402), wherein the request comprises size of printer data of the file; when determining there is not enough free memory in the device and there is enough memory in an external storage device by using the printer data of the file (404), using the external storage device to store the printer data of the file (406), and transmitting the printer data to a printer (408).

Description

METHOD AND DEVICE FOR PROVIDING A PRINTING SERVICE TECHNICAL FIELD
The present disclosure relates to data processing, and more particularly relates to a method and a device for providing a printing service.
BACKGROUND
CUPS (formerly an acronym for Common UNIX Printing System) is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server. Fig. 1 is a diagram showing a method for CUPS to process a print job or task. A computer running CUPS 100 is a host or server that can accept print jobs or tasks from client computers, process them, and send them to the appropriate printer. CUPS consists of a print spooler and scheduler 101, a filter 102, and a backend 103. CUPS 100 makes extensive use of PostScript (PS, a page description language) and rasterization of data to convert the data into a format suitable for the destination printer.
--The CUPS scheduler 101 implements Internet Printing Protocol (IPP) over HTTP/1.1. A helper application (cups-lpd) converts Line Printer Daemon protocol (LPD) requests to IPP. The scheduler also provides a web-based interface for managing print jobs and queues, the configuration of the server, and for documentation about CUPS itself. System administrators can configure the device drivers which CUPS supplies by editing text files in Adobe's PostScript Printer Description (PPD) format. There are a number of user interfaces for different platforms that can configure CUPS, and it has a built-in web-based interface. Moreover, the scheduler allows for classes of printers. Applications can send requests to groups of printers in a class, allowing the scheduler to direct the job to the first available printer in that class. The CUPS scheduler manages print jobs, sending them to the filter and backend processes for final conversion and printing, and monitoring the status messages from those processes.
--The CUPS spooler 101 allows printing files to be stored in a queue. At the input side of the queue, the files are formatted and written to the queue at the speed of the format conversion device, e.g. a user computer or printer server. At the output side of the queue, the files are retrieved and printed at the speed of the destination printer. Multiple clients that have files to be printed can write files to the spool without waiting, and then perform the other tasks, while the spooler manages the queue.
--The filter system 102 enables CUPS to process a variety of data formats on the print server. It converts the print-job data into the final language or format of the printer via a series of filters. It uses MIME type (Multipurpose Internet Mail Extensions or media type) that is a two-part identifier for identifying file formats and format contents. During start-up, the CUPS daemon loads two MIME databases: mime. types that defines the known file types that CUPS can accept data for, and mime. convs that defines the programs or algorithms that process each particular MIME type. Then the filter system determines the data format of the file that is being input and the filter to be used through the use of the MIME databases. For instance, image data will be detected and processed through a particular filter, and HTML data detected and processed through another filter. And then the filter system converts the print job data in its original format into a printer data in a format suitable for and understandable by the destination printer. Specifically, CUPS can convert supplied data either into PostScript data or directly into raster data. If the data is converted into PostScript data an additional filter called a prefilter is applied. The prefilter runs the PostScript data through another PostScript converter so that CUPS can add printer specific options like selecting page ranges to print, setting n-up mode and other device-specific things. After the pre-filtering is done, the data can either be sent directly to a CUPS backend if using a PostScript printer, or be passed to another filter like Foomatic by linuxprinting. org. Alternatively, the data can be passed to Ghostscript, which converts the PostScript into an intermediary CUPS-raster  format. The intermediary raster format is then passed onto a final filter which converts the raster data to a printer-specific format.
--The backends 103 are the ways in which CUPS sends printer data to the printers. There are several backends available for CUPS: parallel, serial, and USB (Universal Serial Bus) ports, cups-pdf PDF Virtual Printing, as well as network backends that operate via the IPP, JetDirect (AppSocket) , Line Printer Daemon ( "LPD" ) , and SMB protocols.
An advantage of CUPS is that it offers a standard and modularised printing system that can process numerous data formats on the print server. Before CUPS, it was difficult to find a standard printer management system that would accommodate the very wide variety of printers on the market using their own printer languages and formats. For instance, the System V and Berkeley printing systems were largely incompatible with each other, and they required complicated scripts and workarounds to convert the program's data format to a printable format. They often could not detect the file format that was being sent to the printer and thus could not automatically and correctly convert the data stream. Additionally, data conversion was performed on individual workstations rather than a central server. CUPS allows printer manufacturers and printer-driver developers to more easily create drivers that work natively on the print server. Processing occurs on the server, allowing for easier network-based printing than with other Unix printing systems. More information about CUPS can be found on the web site: https: //www. cups. org.
As described above, CUPS is a printing system for Unix-like computer operating systems. CUPS can be configured to share printers between two GNU/Linux systems (GNU is an operating system that is a complete free software system, upward-compatible with Unix) . Moreover, it can be configured to share printers between a GNU/Linux system and Microsoft Windows. In order to enable the Microsoft Windows Operating System to access CUPS, a software program called Samba is needed. With Samba installed, users can address  printers on remote Windows computers, and generic PostScript drivers can be used for printing across the network.
Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients. Herein, the Server Message Block (SMB) Protocol is a network file sharing protocol, and as implemented in Microsoft Windows is known as Microsoft SMB Protocol. A set of message packets that define a particular version of the protocol is called a dialect. The Common Internet File System (CIFS) Protocol is a dialect of SMB. Both SMB and CIFS are also available on VMs (virtual machines) , several versions of Unix, and other operating systems. Samba is software that can be run on a platform other than Microsoft Windows, for example, UNIX, Linux, IBM System 390, OpenVMS, and other operating systems. Samba uses the TCP/IP protocol that is installed on the host server. When correctly configured, it allows that host to interact with a Microsoft Windows client or server as if it was a Windows file and print server.
It is desired to provide a shared printer of a group of shared printers for a plurality of remote devices that have files to be printed. Nowadays, some gateways use CUPS and Samba together so that the gateways can work in part as a printer server to support remote printing. Because CUPS uses spooling technology, the entire content of the file to be printed is stored on the gateways by default. Because the gateways intrinsically aren’t equipped with a large memory storage, the available memory that can be used by CUPS is quite limited. When the gateway receives a large-size file to be printed, it will be very likely to fail for the lack of enough printing space.
SUMMARY
According to an aspect of the present disclosure, it is provided a method for a device to provide a printing service, wherein a printer is connected to the device. The method comprises steps of receiving a request to print a file from a client device, wherein the request comprises size of printer data of the file; when determining there is not enough free memory in the device and there is enough  memory in an external storage device by using the size of the printer data of the file, using the external storage device to store the printer data of the file; and transmitting the printer data to the printer.
According to another aspect of the present disclosure, it is provided a device for providing a printing service. The device comprises at least one port for connecting to an external storage device; a transceiver for receiving a request to print a file from a client device, wherein the request comprises size of printer data of the file; and a processor for when determining there is not enough free memory in the device and there is enough memory in an external storage device by using the size of the printer data of the file, using the external storage device to store the printer data of the file, and using the transceiver to transmit the printer data to a printer .
According to another aspect of the present disclosure, it is provided a computer program comprising program code instructions executable by a processor for implementing a method described above.
According to another aspect of the present disclosure, it is provided a computer program product which is stored on a non-transitory computer readable medium and comprises program code instructions executable by a processor for implementing a method described above.
It is to be understood that more aspects and advantages of the invention will be found in the following detailed description of the present invention.
BRIEF DESCRIPTION OF THE DRAWINGS
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, will be used to illustrate an embodiment of the invention, as explained by the description. The invention is not limited to the embodiment.
In the drawings:
Fig. 1 is a diagram showing a method for CUPS to process a print job or task according to prior art;
Fig. 2 is a diagram showing a system for providing a printing service according to an embodiment of present disclosure;
Fig. 3 is a block diagram of an exemplary gateway for providing a printing service according to the embodiment of the present disclosure; and
Fig. 4 is a flow chart showing a method for providing printing service according to the embodiment of the present disclosure.
DETAILED DESCRIPTION
The present disclosure will now be described in detail in conjunction with the drawings. In the following description, some detailed descriptions of known functions and configurations may be omitted for clarity and conciseness.
According to an embodiment of the present disclosure, it provides a gateway working as print server for remote client devices, such as PC, laptop, tablet, smart phone etc. It solves a technical problem that insufficient memory space on the gateway leads to the failure of the printing of a large size file. The gateway automatically switches to a proper printing directory as a temporary directory of the CUPS printer to support the printing of large size file on gateway. In the present disclosure, the proper printing directory resides in an external storage device plugged in the gateway, such as a USB drive (also called USB flash drive, USB memory) .
Fig. 2 is a diagram showing a system for providing a printing service according to an embodiment of present disclosure. The system comprises a gateway 201, several client devices –comprising a laptop 202, a tablet 203 and a mobile 204–that have files to be printed, and a printer 205. The gateway 201 and the  several client devices  202, 203 and 204 are connected in a wired or wireless manner, e.g. through an Ethernet cable, a USB cable or a Wi-Fi channel in accordance with 802.11 protocol etc. The gateway 201 and the printer 205 are connected in a wired or wireless manner, e.g. through an  Ethernet cable, a USB cable or a Wi-Fi channel in accordance with the 802.11 protocol etc. Besides the routing functions provided by conventional gateways, the gateway 201 works in part as a print server for accepting the print requests from the client devices and for transmitting the data in a format used by the printer 205 to the printer 205.
Fig. 3 is a block diagram of an exemplary gateway for providing a printing service according to the embodiment of the present disclosure. It includes at least one microprocessor (MPC) or processor 301, at least one transceiver 302, at least one external storage interface or port 303, a power supply 304, a volatile storage 305 and a non-volatile storage 306.
The MPC 301 is used to process program instructions stored on the non-volatile storage 306, e.g. software codes of Samba server and CUPS server.
The transceiver 302 is used to receive and send data from and to the Internet. Its type comprises Ethernet transceiver, DSL transceiver, Wi-Fi transceiver, ONU (optical network unit) or ONT (optical network terminal) , USB port etc. In an example, the at least one transceiver 302 includes a Wi-Fi transceiver for communicating with the client devices and the printer. In another example, the at least one transceiver 302 includes a Wi-Fi transceiver for communicating the client devices and a USB port or an Ethernet port for communicating with the printer.
The at least one port 303 is used to connect to an external storage device or storage memory. In an example, the port 303 is a USB port, and the external storage device is a USB drive. In addition, the at least one port 303 further comprises a USB port for connecting to a USB printer. If the printer has a Wi-Fi adaptor, it can connect to the gateway via the transceiver 302.
The power supply 304 is used to supply power to all modules of the gateway. It typically converts alternating current to a 5 V direct current.
The volatile storage 305 is used to store temporary data. In implementations, it can use volatile random access memory (RAM) , e.g.  SDRAM. The volatile storage 305 in the gateway is in part used to store the printer data of a format corresponding to the destination printer.
The non-volatile storage 306 is used to store data and program instructions, which remain in the non-volatile storage 306 even when it is not powered. In implementations, it can use read only memory (ROM) , flash etc. As to flash, it can use NOR flash and NAND flash.
Fig. 4 is a flow chart showing a method for providing printing service according to an embodiment of the present disclosure. In the embodiment, both CUPS server and Samba server are integrated and deployed in the gateway with additional logical program codes. So the gateway can work as print server to provide printing service to both Unix client devices and Microsoft Windows client devices.
At step 401, the gateway shares a printer that connects to the gateway. An administrator or a user can use the Graphic User Interface provided by the Samba to share a printer as Samba-based printer share. The Graphic User Interface is used to add, modify and delete printer configurations in a share named [printers] in the configuration file of Samba. If Samba server has lp, pcl and ps printers in its printer capabilities file, Samba will automatically read them from the printer capabilities file and create a printer share for each of the 3 printers. Each printer share has the same name as the printer and is configured with the options in the [printers] share. Herein, the printer can be a serial printer, parallel printer or a USB printer. If the security level of Samba in the gateway is configured to “share” , the client devices can access the shared Samba server without any security authentication. The client devices can find and access the shared printer by entering Samba server’s IP address. The printer share in the Samba server shows up in the list of shares offered in the Network Neighborhood of the client device. But if the security level of Samba is configured to “user” , a user name and a password are required to authenticate the access of the client device.
At step 402, the Samba server in the gateway receives a request to print a file from a client device. The file format can be text, picture, word, excel, ppt (power point file) , pdf etc. Specifically, on the client device, the application software prints the file by utilizing the system's printer driver for the printer. It is the printer driver software running on the client device that translates data of the file into a stream of binary data (i.e. printer data) specific to the model of printer in use. Instead of transmitting the printer data directly to the printer, the client device calculates file size of the printer data and include the file size in the request.
At step 403, the Samba server determines if there is enough free memory in the RAM of the gateway for the printer data. This is implemented by comparing the size of free memory in the RAM of the gateway to the file size carried in the request. In an example, the core of the gateway is Linux. Command “cat/proc/meminfo” is used to obtain the free memory size of the RAM. Below is a result of the command execution with irrelevant information removed for the purpose of conciseness. MemFree represents the free memory size.
Figure PCTCN2017089750-appb-000001
At step 404, when there is not enough free memory in the gateway, the Samba server determines if there is enough free memory in the external storage device connected to the gateway. It is implemented by detecting if there an external storage device connected to the gateway on some port -e.g. a USB port in case that the external storage device is a USB drive -detecting if there is enough free memory in the USB drive, and comparing the size of free memory in the USB drive to the size of printer data. Herein, in order to detect if there is  an external storage device connected to the gateway like USB drive, the Samba server checks if partitions, e.g. “sda” , in directory “/mnt/usb” has been added. In order to get the free space size of usb storage, command “df /mnt/usb/sda1/” can be used. The value of ‘Available’ parameter indicates free space size. Below shows an example with underline added to the “available” parameter and its value.
Figure PCTCN2017089750-appb-000002
At step 405, when there is not enough free memory in the USB drive, the Samba server closes the request to print the file. The Samba server can either transmit a response indicating the closing of the request to the client device or just discard the request.
At step 406, when there is enough free memory in the external storage device, the Samba server sets the printer file temporary directory with the external storage device mounted directory, such as “/mnt/usb/sda” . The following is the Samba printing configuration file in the gateway, “option ‘path’ ” is used to set the printer file temporary directory. Samba server will load this configuration file, and use the directory '/var/spool/samba'to as printer file temporary directory first when it starts.
Figure PCTCN2017089750-appb-000003
Figure PCTCN2017089750-appb-000004
At step 407, the Samba server receives and stores the printer data in the temporary directory as indicated in the Samba configuration file, in response to a “write file” message from the client device. Specifically, because the Samba server receives the request to print file at step 402, the Samba server sends a response message indicating that the Samba server is ready to receive the printer data. As to the storage place, the temporary directory is located in the RAM of the gateway by default. But it may change to an external storage device as a result of step 406. As above described, the printer driver software running on the client device has generated the printer data. And when the printer data arrives at the Samba server, the printer data is temporarily written to disk in the temporary directory specified by the “path” option of the printer share.
At step 408, the Samba server prints the printer data of the file. It is implemented by using the temporary directory as specified by the Samba server as the printer directory in the CUPS server so that the destination printer, e.g. a USB printer can use the directory to print directly, and sending a request to print the file to the CUPS server. Then the CUPS server can transmit the printer data to the destination printer through the corresponding port on the gateway, e.g. a USB port connecting to the destination printer.
In another embodiment of the present disclosure, only the CUPS server is integrated in the gateway. The client device accesses the destination printer via IPP or LPD. In this embodiment, the CUPS server carries out steps in the figure 4 with the following differences. At step 406, the CUPS server sets the printer  files temporary directory to external storage device mounted directory such as “/mnt/usb/sda” . The cups-files. conf is in “/etc/cups/cups-files. conf” in the gateway. Each line in the file can be a configuration directive, a blank line, or a comment. Configuration directives typically consist of a name and zero or more values separated by whitespace. The “RequestRoot directory” in the file specifies the directory that contains print jobs and other HTTP request data. The default is "/var/spool/cups" . In the embodiment, the value is set to “/mnt/usb/sda” . At step 408, the CUPS server transmits the printer data to the destination printer through the corresponding port on the gateway.
As will be appreciated by one skilled in the art, aspects of the present principles can be embodied as a system, method or computer readable medium. Accordingly, aspects of the present principles can take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, and so forth) , or an embodiment combining software and hardware aspects that can all generally be referred to herein as a “circuit, ” “module” , or “system. ” Furthermore, aspects of the present principles can take the form of a computer readable storage medium. Any combination of one or more computer readable storage medium (s) may be utilized.
A computer readable storage medium can take the form of a computer readable program product embodied in one or more computer readable medium (s) and having computer readable program code embodied thereon that is executable by a computer. A computer readable storage medium as used herein is considered a non-transitory storage medium given the inherent capability to store the information therein as well as the inherent capability to provide retrieval of the information therefrom. A computer readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. It is to be appreciated that the following, while providing more specific examples of computer readable storage mediums to which the present principles can be applied, is merely an  illustrative and not exhaustive listing as is readily appreciated by one of ordinary skill in the art: a portable computer diskette; a hard disk; a read-only memory (ROM) ; an erasable programmable read-only memory (EPROM or Flash memory) ; a portable compact disc read-only memory (CD-ROM) ; an optical storage device; a magnetic storage device; or any suitable combination of the foregoing.
Thus, for example, it will be appreciated by those skilled in the art that the block diagrams presented herein represent conceptual views of illustrative system components and/or circuitry embodying the principles of the invention. Similarly, it will be appreciated that any flow charts, flow diagrams, state transition diagrams, pseudo code, and the like represent various processes which may be substantially represented in computer readable storage media and so executed by a computer or processor, whether or not such computer or processor is explicitly shown.
A number of implementations have been described. Nevertheless, it will be understood that various modifications may be made. For example, elements of different implementations may be combined, supplemented, modified, or removed to produce other implementations. Additionally, one of ordinary skill will understand that other structures and processes may be substituted for those disclosed and the resulting implementations will perform at least substantially the same function (s) , in at least substantially the same way (s) , to achieve at least substantially the same result (s) as the implementations disclosed. Accordingly, these and other implementations are contemplated by this application and are within the scope of the invention as defined by the appended claims.

Claims (14)

  1. A method for a device to provide a printing service, wherein a printer is connected to the gateway, comprising
    receiving (402) a request to print a file from a client device, wherein the request comprises a size of printer data of the file;
    upon determination (403) that there is not enough free memory in the device and that there is enough free memory in an external storage device (404) for the printer data of the file, storing (407) the printer data of the file in the external storage device; and
    transmitting the printer data from the external storage device to the printer (408) .
  2. The method of claim 1, further comprising
    upon determination (403) that there is enough free memory in the device for the printer data of the file (403) , storing (407) the printer data in a volatile storage of the device.
  3. The method of claim 1, further comprising
    upon determining that there is not enough free memory in the device and that there is not enough memory in an external storage device for the printer data of the file (403, 404) , discarding (405) the request.
  4. The method of claim 1, further comprising
    receiving (407) the printer data of the file from the client device.
  5. The method of claim 1, further comprising
    integrating a Samba server and a CUPS server in the device, wherein Samba share is used by the client device to access the printer.
  6. The method of claim 1, further comprising
    integrating a CUPS server in the device, wherein Internet Printing Protocol or Line Printer Daemon Protocol is used by the client device to access the printer.
  7. A device for providing a printing service, comprising
    at least one port (303) for connecting to an external storage device;
    a transceiver (302) for receiving a request to print a file from a client device, wherein the request comprises a size of printer data of the file; and
    a processor (301) for upon determining that there is not enough free memory in the device and that there is enough memory in an external storage device for the printer data of the file, storing the printer data of the file in the external storage device, and using the transceiver (302) to transmit the printer data to a printer.
  8. The device of claim 7, further comprising
    a volatile storage (305) , and wherein
    the processor (301) is further used for upon determining that there is enough free memory in the volatile storage (305) for the printer data of the file, storing the printer data in the volatile storage (305) of the device.
  9. The device of claim 7, wherein
    the processor (301) is further used for when determining there is not enough free memory in the device and there is not enough memory in an external storage device by using the size of the printer data of the file, discarding the request.
  10. The device of claim 7, wherein
    the transceiver (302) is further used for receiving the printer data of the file from the client device.
  11. The device of claim 7, further comprising
    a non-volatile storage (306) for storing codes of Samba server and CUPS server in the device, wherein Samba share is used by the client device to access the printer.
  12. The device of claim 7, further comprising
    a non-volatile storage (306) for storing codes of CUPS server in the device, wherein Internet Printing Protocol or Line Printer Daemon Protocol is used by the client device to access the printer.
  13. Computer program comprising program code instructions executable by a processor for implementing a method according to at least one of claims 1 to 6.
  14. Computer program product which is stored on a non-transitory computer readable medium and comprises program code instructions executable by a processor for implementing a method according to at least one of claims 1 to 6.
PCT/CN2017/089750 2017-06-23 2017-06-23 Method and device for providing a printing service WO2018232733A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/089750 WO2018232733A1 (en) 2017-06-23 2017-06-23 Method and device for providing a printing service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/089750 WO2018232733A1 (en) 2017-06-23 2017-06-23 Method and device for providing a printing service

Publications (1)

Publication Number Publication Date
WO2018232733A1 true WO2018232733A1 (en) 2018-12-27

Family

ID=64736160

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/089750 WO2018232733A1 (en) 2017-06-23 2017-06-23 Method and device for providing a printing service

Country Status (1)

Country Link
WO (1) WO2018232733A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006239944A (en) * 2005-03-01 2006-09-14 Seiko Epson Corp Printer with confidential printing function, printer control method, and printer control program
JP2010212743A (en) * 2009-03-06 2010-09-24 Canon Inc Image processing apparatus, image processing method and program
JP2013123093A (en) * 2011-12-09 2013-06-20 Kyocera Document Solutions Inc Image reading device and image forming device
CN104427196A (en) * 2013-08-22 2015-03-18 佳能株式会社 Image forming apparatus and method of controlling image forming apparatus
US20150189119A1 (en) * 2013-12-27 2015-07-02 Brother Kogyo Kabushiki Kaisha Data output device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006239944A (en) * 2005-03-01 2006-09-14 Seiko Epson Corp Printer with confidential printing function, printer control method, and printer control program
JP2010212743A (en) * 2009-03-06 2010-09-24 Canon Inc Image processing apparatus, image processing method and program
JP2013123093A (en) * 2011-12-09 2013-06-20 Kyocera Document Solutions Inc Image reading device and image forming device
CN104427196A (en) * 2013-08-22 2015-03-18 佳能株式会社 Image forming apparatus and method of controlling image forming apparatus
US20150189119A1 (en) * 2013-12-27 2015-07-02 Brother Kogyo Kabushiki Kaisha Data output device

Similar Documents

Publication Publication Date Title
CN202171797U (en) System convenient for driver-free printing and computing equipment
CN202394219U (en) Printer and system convenient for non-driven printing
US9584679B2 (en) Information processing apparatus, control method therefor, and medium
US9928013B2 (en) Print control system, method of controlling printing, and recording medium
US20120274979A1 (en) Image forming apparatus, control method for image forming apparatus, and program thereof
US7689731B2 (en) Exposing the supply state of a shared peripheral device to a remote network resource
US9001363B2 (en) Printing control system, printing control method, and image processor
JP6371697B2 (en) Information processing apparatus, print control method, and program
US20130326012A1 (en) Information processing apparatus, information processing method and storage medium
US8861008B2 (en) Bidirectional communication technique between an information processing apparatus and an image processing apparatus
US9691010B2 (en) Information processing apparatus, distributed printing system, and method of controlling printing
JP2007323162A (en) Client device, server device, and program
US12112084B2 (en) Information processing apparatus, method for controlling information processing apparatus, and storage medium for using print driver extensions to convert a format of print data
US9354834B2 (en) Printing with virtual printer
US8643861B2 (en) Image processing apparatus, data processing method of image processing apparatus, and storage medium for performing multitask processing and single task processing while interpreting PDL data
US9946498B2 (en) Information processing apparatus and control method by request processing module operating on information processing apparatus
WO2018232733A1 (en) Method and device for providing a printing service
JP5933929B2 (en) Print job scheduling system and method
JP5298725B2 (en) Image processing apparatus, image processing method, image processing system, and program
JP2009054153A (en) System and method for customizing driver of document processing device
JP6115253B2 (en) Print system, spool server, spool method, and program
CN103516943A (en) Image forming system and image forming method
JP5696744B2 (en) Image processing apparatus, image processing method, image processing system, and program
JP2007140663A (en) Image processor
JP2006164026A (en) Device, system, and method for setting output management system, program, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17914989

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17914989

Country of ref document: EP

Kind code of ref document: A1