This invention relates to print drivers.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, the approaches described in this section may not be prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
Generally speaking, print drivers are processes that process print data generated by an application program and convert the print data into a format supported by a printing device that is intended to process the print data. For example, a user creates an electronic document using a word processing application. The user then selects a print option in the application program to request that the electronic document be printed to a particular printing device. The application program generates and provides print data to a print driver installed on the user's client device. Sometimes this involves the use of an intermediary process referred to as a spooler which saves the print data locally. The print driver processes the print data and generates translated print data that is in a format supported by the particular printing device. For example, the print driver may process the print data and generate translated print data that conforms to the postscript format. The print driver then transmits the translated print data to the particular printing device. The particular printing device processes the translated print data and generates a printed version of the electronic document.
Conventional print drivers are printing device specific. That is, each print driver is designed to translate print data into a format that conforms to a particular format supported by a particular printing device. The device-specific nature of print drivers is the reason for several drawbacks. One issue is that a print driver for each printing device that a user is interested in using must be installed on a user's client device. Print drivers are usually provided on storage media when a printing device is purchased and may also be downloaded over the Internet. When a user travels to a different location the user may not know what printing devices are available to the user or the capabilities of the available printing devices and in many cases does not have the correct driver or access to the Internet to download a correct print driver. Users typically must inquire as to the available printing devices and their capabilities and also must acquire, install and configure the necessary print drivers. These problems can be exacerbated when users are using small portable devices with limited user interfaces because downloading, installing and configuring print drivers can be more difficult with these types of limited devices. Another problem is that if the features or capabilities of a printing device change, then all the instances of drivers for that printing device must also be updated to enable those features or capabilities to be used, which can be a difficult and time consuming process.
An on-demand print driver application is configured to generate print drivers on-demand, based upon the current capabilities of a printing device. The on-demand print driver application queries a printing device for configuration data that specifies current capabilities of the printing device. The current capabilities may include functionality supported by the printing device and any currently-installed options. According to one embodiment of the invention, the configuration data may include metadata, print configuration data, print capabilities data and extensions data. The on-demand print driver application receives the configuration data from the printing device and generates a print driver data file based upon both a set of basic capabilities common to multiple printing devices and the current capabilities of the printing device specified in the configuration data. For example, the basic capabilities may include basic functionality and printing options that are common to multiple printing devices. The on-demand print driver application generates a print driver for the printing device that includes at least the print driver data file, a UI module and a rendering module. The UI module is configured to use the print driver data file to generate a graphical user interface that allows a user to select printing options and settings. The rendering module is configured to use the print driver data file to process application data generated by an application program, such as a word processor, and generate print data that conforms to a format supported by the printing device. The UI module and the rendering module may be common to and used with multiple printing devices, with the particular functionality or extensions supported by the particular printing device being reflected in the print driver data file. The print driver may be stored in a print driver repository and/or installed on a client device. The on-demand print driver application allows a print driver to be generated on-demand, at any time, based upon the current capabilities of the printing device.
According to one embodiment of the invention, a computer-implemented method is provided for generating a print driver. An on-demand print driver application queries a printing device for configuration data that specifies current capabilities of the printing device. The on-demand print driver application receiving the configuration data from the printing device. The on-demand print driver application generates a print driver data file based upon both a specified set of common printing device capabilities that are common to multiple printing devices and the current capabilities of the printing device specified by the configuration data. The on-demand print driver application generates a print driver for the printing device that includes the print driver data file, a user interface module and a rendering module, wherein both the user interface module and the rendering module are common to the multiple printing devices.
In the figures of the accompanying drawings like reference numerals refer to similar elements.
In the following description, for the purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to avoid unnecessarily obscuring the present invention. Various aspects of the invention are described hereinafter in the following sections:
I. OVERVIEW
II. ON-DEMAND PRINT DRIVER ARCHITECTURE
III. FUNCTIONAL OVERVIEW
IV. ON-DEMAND PRINT DRIVER APPLICATION
V. IMPLEMENTATION MECHANISMS
An on-demand print driver application is configured to generate print drivers on-demand, based upon the current capabilities of a printing device.
Client device 202 may be any type of client device and the invention is not limited to any particular type of client device. Examples of client device 202 include, without limitation, a desktop computer, a laptop computer, a personal digital assistant (PDA), a mobile device and a telephony device. In the present example, client device 202 includes a user interface 214, an application program 216, an on-demand print driver application 218, a spooler 220, a print driver 222 and storage 224.
Printing devices 204, 206, 208 may be any type of device that is capable of processing print data and generating a printed version of an electronic document reflected in the print data. Examples of printing devices 204, 206, 208 include, without limitation, printers, network-enabled copy machines and multi-function peripherals (MFPs), and the approaches described herein are not limited to any particular type of printing devices 204, 206, 208. Embodiments of the invention are described herein in the context of four printing devices depicted in
User interface 214 may be implemented by any mechanism(s) and/or process(es) that allow for the exchange of information between client device 202 and users. Examples of user interface 214 include, without limitation, a display, such as a cathode ray tube (CRT) or liquid crystal display (LCD), and an input device, such as a keypad, touchpad, touch screen, keyboard or mouse, or any combination of displays and input devices.
Application program 216 may be any type of application that is capable of generating print data. Examples of application program 216 include, without limitation, a word processing program, a spreadsheet program, an email program or any other type of application.
On-demand print driver application 218 generates print drivers for printing devices on an on-demand basis as described in more detail hereinafter. On-demand print driver application 218 may be implemented as one or more processes, modules or components in computer hardware, computer software, or any combination of computer hardware and computer software. For purposes of explanation, on-demand print driver application 218 is depicted in the figures and described herein in the context of being implemented n client device 202, but the invention is not limited to this context and on-demand print driver application 218 may be implemented on other network elements. On-demand print driver application 218 is described in more detail hereinafter.
Print driver 222 may include a wide variety of modules and components, depending upon a particular implementation. In the example depicted in
Storage 224 may be implemented by any type of storage. Examples of storage 224 include, without limitation, volatile memory, such as random access memory (RAM) and non-volatile storage, such as one or more disks or flash memory. Client device 202 may include other mechanisms, modules, processes, etc., depending upon a particular implementation, that are not depicted in
In Step 3, the WSD printer generates and transmits to the network discovery provider a response to the request. In Step 4, the network discovery provider forwards the response to the function discovery API. The function discovery API creates a function instance for each discovered printer and in Step 5, provides a list of printer function instances to the network folder process. The network folder process displays a list of discovered printers. In Step 6, the user selects a “Create & Install” option from a context menu for a particular discovered printer. The on-demand print driver application generates a print driver data file and a print driver for the particular printer and in Step 7, the print driver store is updated. In Step 8, the add printer wizard is launched and the print driver for the particular printer is installed.
As described in more detail hereinafter, several of the modules of on-demand print driver application 400 use information obtained from a config file that contains detailed information for a creating a print driver. Table I includes example contents of a config file. For purposes of explanation, the data contained in the example config file in Table I is organized and labeled according to the different modules that use the config file. The config file may be any format, depending upon the requirements of a particular implementation, and the invention is not limited to the config file being in any particular format. Example formats include, without limitation, text, rich text and a markup language, such as XML.
The print driver package creation module 402 is configured to create a work folder 414 in which the print driver package is created. The term “package” is used to refer to a collection of data items that include executable code as well as data. The work folder 414 may be any type of temporary storage and does not have to be a “folder” type of data structure, although the term “folder” is used herein for purposes of explanation. According to one embodiment of the invention, the print driver package creation module 402 includes in the work folder 414 a set of standard data items that are used for multiple print drivers. In the present example, the config file of Table I includes a “DriverDataFileExtraFile” tag that identifies the standard data items that are to be stored into the work folder 414. In the present example, these data items are data files that include another configuration file, which in
The printing device query module 404 is configured to retrieve configuration data 418 from the printing device 416. The configuration data specifies the capabilities of the printing device. In the present example, the configuration data includes metadata, print configuration data, print capabilities data and extensions data, which may be stored in any number of data files or any format. An explanation of this data is as follows:
The INF File creation module 406 is configured to create an INF file that is included in the print driver files. The INF file used to install the print driver.
In step 708, the PnPID string in the INF file is replaced with a new PnPID string generated by a PnPID creation module. In step 710, several other strings are replaced in the basic INF file. This may include, for example, replacing the device model, the manufacturer, the manufactuer's URL and data file name strings as follows:
Both steps 708 and 710 may include using information retrieved from printing device 416 via the printing device query module 404. In step 712, the modified INF file is saved to the work folder 414.
The print driver data (GPD) file creation module 408 is configured to create a print driver data file that is used by the UI module 226 and the rendering module 228.
In step 804, the print driver data (GPD) file creation module 408 retrieves the name of a print driver data file template from the config file. The print driver data file template serves as a starting point for the target print driver data file. More specifically, the print driver data file template contains data that is common to most, if not all, print driver data files, and includes, for example, basic commands required to create a print job. For example, the print driver data file template may include commands that support the spooler process in rendering a print job. The example config file of Table I includes a tag named “BasicGPDFile value” that specifies the name of a GPD file template.
In step 806, the print driver data (GPD) file creation module 408 copies the contents of the print driver data file template into the target print driver data file. Alternatively, the print driver data (GPD) file creation module 408 may include a directive to include the print driver data file template. In step 808, the print driver data (GPD) file creation module 408 copies the data file section from the config file and creates relevant entries in the target print driver data file. In step 810, the print driver data (GPD) file creation module 408 copies features, macros, display order, supported functions and constraints from the configuration data 418, e.g., included in the extensions data, and creates relevant entries in the target print driver data file.
In step 812, the print driver data (GPD) file creation module 408 creates relevant entries in the target print driver data file based upon the print configuration, print capabilities, extensions and default printticket from and the printing device, as well as the mapping and macro files. The mapping file contains data that maps a display name from a semantic to a resource dll. This is particularly useful when a resource dll is localized by a vendor, e.g., Microsoft. For example, the mapping file list all possible features of a printing device and all possible options for each feature A particular printer model may define a subset of these features, and defines a subset of options for each feature. If a printer model carries a new feature, which may be not defined inside the mapping file, the print driver data (GPD) file creation program needs to obtain the display name of this feature from Semantic Printer XML files. Under this situation, the feature inside the created print driver data (GPD) file includes a fixed string as its display name. A vendor, e.g., Microsoft, may not provide localization for this particular feature in driver's UI. For each Semantic feature a printer model provides, the print driver data (GPD) file creation program reads through this mapping file and find the corresponding section for this feature. Next, the program reads this feature's GPD keyword name, and uses this name to create a GPD feature inside GPD file. Then, the print driver data (GPD) file creation module 408 reads current feature's resource ID from mapping file, and puts it under the GPD feature as its resource ID. This resource ID is used as this feature's display name in the UI. The print driver data (GPD) file creation module 408 does the same to each option defined by Printer Semantic capabilities inside the feature. A resource ID is used instead of a fixed string because vendors, such as Microsoft, provide a mechanism in their OS to translate these resource strings automatically to different languages. So that there is no need for vendor's printer driver to provide localized strings.
The macro file defines a set of default command strings for printer feature options. Similar to printer driver data (GPD) file template, the contents of the macro file may be either inserted into the end of target print driver (GPD) data file, or as a separate file as part of the print driver package of files, referenced by an “*include” directive in the target print driver (GPD) file. The macro file provides symbolic GPD command strings for the print driver do perform PCL job rendering. In many circumstances, a command string defined in the macro file may not be a subset of a current printer model's command set. In this situation, the real command string for the current model is created based on a semantic ticket by a translation process. This happens after the printing device receives the rendered PDL data stream that contains a semantic ticket. The translation process may be implemented separate from the print driver and the on-demand print driver application 118 described here. Since semantic files do not provide any command string to GPD, the print driver has no way to know what current printer's command set is. Therefore, command strings provided by the macro file are used as a temporarily substitute for the real commands from the current printer model. Without this symbolic replacement, there is no PDL command inside the rendered PDL Job data, which can cause problems with an operating system. For example, a printer driver that does not include valid PDL commands may not be considered to be a valid PDL data package. Also, there may be situations where a user saves the PDL job data rendered by a print driver and then later sends the saved PDL job to a printing device from a different manufacturer. Without any PDL commands inside, the PDL job data will not accepted by any other printing devices. On the contrary, most PDL-based printing devices can partially accept valid PDL data, even though command set may be different.
The print driver storage update module 410 is configured to store print driver files from the work folder 414 into the print driver storage 420. This may include, for example, calling operating system routines to perform the transfer. The print driver installation module 412 is configured to install print drivers from the print driver storage 420. This may be accomplished, for example, using operating system software installation routines.
The approach described herein for generating on-demand print drivers may be implemented on any type of computing architecture or platform. Furthermore, the approach may be implemented in computer hardware, computer software, or any combination of computer hardware and computer software. For purposes of explanation,
Computer system 900 may be coupled via bus 902 to a display 912, such as a cathode ray tube (CRT), for displaying information to a computer user. An input device 914, including alphanumeric and other keys, is coupled to bus 902 for communicating information and command selections to processor 904. Another type of user input device is cursor control 916, such as a mouse, a trackball, or cursor direction keys for communicating direction information and command selections to processor 904 and for controlling cursor movement on display 912. This input device typically has two degrees of freedom in two axes, a first axis (e.g., x) and a second axis (e.g., y), that allows the device to specify positions in a plane.
The invention is related to the use of computer system 900 for implementing the techniques described herein. According to one embodiment of the invention, those techniques are performed by computer system 900 in response to processor 904 executing one or more sequences of one or more instructions contained in main memory 906. Such instructions may be read into main memory 906 from another computer-readable medium, such as storage device 910. Execution of the sequences of instructions contained in main memory 906 causes processor 904 to perform the process steps described herein. In alternative embodiments, hard-wired circuitry may be used in place of or in combination with software instructions to implement the invention. Thus, embodiments of the invention are not limited to any specific combination of hardware circuitry and software.
The term “computer-readable medium” as used herein refers to any medium that participates in providing data that causes a computer to operation in a specific manner. In an embodiment implemented using computer system 900, various computer-readable media are involved, for example, in providing instructions to processor 904 for execution. Such a medium may take many forms, including but not limited to, non-volatile media and volatile media. Non-volatile media includes, for example, optical or magnetic disks, such as storage device 910. Volatile media includes dynamic memory, such as main memory 906. Common forms of computer-readable media include, for example, a floppy disk, a flexible disk, hard disk, magnetic tape, or any other magnetic medium, a CD-ROM, any other optical medium, a RAM, a PROM, and EPROM, a FLASH-EPROM, any other memory chip or memory cartridge, or any other medium from which a computer can read.
Various forms of computer-readable media may be involved in carrying one or more sequences of one or more instructions to processor 904 for execution. For example, the instructions may initially be carried on a magnetic disk of a remote computer. The remote computer can load the instructions into its dynamic memory and send the instructions over a telephone line using a modem. A modem local to computer system 900 can receive the data on the telephone line and use an infra-red transmitter to convert the data to an infra-red signal. An infra-red detector can receive the data carried in the infra-red signal and appropriate circuitry can place the data on bus 902. Bus 902 carries the data to main memory 906, from which processor 904 retrieves and executes the instructions. The instructions received by main memory 906 may optionally be stored on storage device 910 either before or after execution by processor 904.
Computer system 900 also includes a communication interface 918 coupled to bus 902. Communication interface 918 provides a two-way data communication coupling to a network link 920 that is connected to a local network 922. For example, communication interface 918 may be an integrated services digital network (ISDN) card or a modem to provide a data communication connection to a corresponding type of telephone line. As another example, communication interface 918 may be a local area network (LAN) card to provide a data communication connection to a compatible LAN. Wireless links may also be implemented. In any such implementation, communication interface 918 sends and receives electrical, electromagnetic or optical signals that carry digital data streams representing various types of information.
Network link 920 typically provides data communication through one or more networks to other data devices. For example, network link 920 may provide a connection through local network 922 to a host computer 924 or to data equipment operated by an Internet Service Provider (ISP) 926. ISP 926 in turn provides data communication services through the world wide packet data communication network now commonly referred to as the “Internet” 928. Local network 922 and Internet 928 both use electrical, electromagnetic or optical signals that carry digital data streams.
Computer system 900 can send messages and receive data, including program code, through the network(s), network link 920 and communication interface 918. In the Internet example, a server 930 might transmit a requested code for an application program through Internet 928, ISP 926, local network 922 and communication interface 918. The received code may be executed by processor 904 as it is received, and/or stored in storage device 910, or other non-volatile storage for later execution.
In the foregoing specification, embodiments of the invention have been described with reference to numerous specific details that may vary from implementation to implementation. Thus, the sole and exclusive indicator of what is, and is intended by the applicants to be, the invention is the set of claims that issue from this application, in the specific form in which such claims issue, including any subsequent correction. Hence, no limitation, element, property, feature, advantage or attribute that is not expressly recited in a claim should limit the scope of such claim in any way. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.
The present application is related to U.S. patent application Ser. No. 11/846,869, entitled Controlling A Computer Peripheral Device Using A Universal Driver and Device-Generated User Interface Information, filed by Yao-Tian Wang et al., on Aug. 29, 2007, the entire contents of which are incorporated herein by reference. The present application is related to U.S. patent application Ser. No. 11/846,884, entitled Capability-Based Control Of A Computer Peripheral Device, filed by Hitoshi Sekine et al., on Aug. 29, 2007, the entire contents of which are incorporated herein by reference. The present application is related to U.S. patent application Ser. No. 11/846,926, entitled, Automatically Generating Capability-Based Computer Peripheral Device Drivers, filed by Hitoshi Sekine et al., on Aug. 29, 2007, the entire contents of which are incorporated herein by reference.