The invention relates to a data processing device, a method for printing document data from a data processing device to a printer, and a computer program product encoding a computer program of instructions for executing a computer process for printing document data from a data processing device to a printer.
Printing document data from a data processing device over a connection to a printer may be problematic. This is because generally all printers require that the data processing device print with a specific printer driver designed just for that printer. Especially for manufacturers of mobile data processing devices it is almost impossible to provide and store all the possible printer drivers.
If the data processing device prints over a Bluetooth® connection to the printer then a protocol called Basic Printing Profile (BPP) may be used. BPP provides a standard solution using XHTML™-Print, which is a XHTML (Extensible Hypertext Markup Language) based data stream suitable for printing. But BPP has certain restrictions: it does not support what-you-see-is-what-you-get or WYSIWYG printing (in a pixel-perfect fashion), and certain features such as common drawing primitives are totally missing.
The present invention seeks to provide an improved data processing device, an improved method for printing document data from a data processing device to a printer, and an improved computer program product encoding a computer program of instructions for executing a computer process for printing document data from a data processing device to a printer.
According to an aspect of the present invention, there is provided a data processing device, comprising a transceiver; and a processing unit coupled to the transceiver configured to define at least one compressed image file in a definition file written in a markup language, to print document data into the compressed image file, and to transfer the definition file and the compressed image file with the transceiver to a printer capable of interpreting the definition file and printing the compressed image file, whereby the document data is printed.
According to another aspect of the present invention, there is provided a method for printing document data from a data processing device to a printer, comprising: defining at least one compressed image file in a definition file written in a markup language; printing document data into the compressed image file; and transferring the definition file and the compressed image file to a printer capable of interpreting the definition file and printing the compressed image file, whereby the document data is printed.
According to another aspect of the present invention, there is provided a computer program product encoding a computer program of instructions for executing a computer process for printing document data from a data processing device to a printer, the process comprising: defining at least one compressed image file in a definition file written in a markup language; printing document data into the compressed image file; and transferring the definition file and the compressed image file to a printer capable of interpreting the definition file and printing the compressed image file, whereby the document data is printed.
According to another aspect of the present invention, there is provided a data processing device, comprising means for communicating with a printer; means for defining at least one compressed image file in a definition file written in a markup language; means for printing document data into the compressed image file; and means for transferring the definition file and the compressed image file with the means for communicating to a printer capable of interpreting the definition file and printing the compressed image file, whereby the document data is printed.
The present invention provides several advantages. With the invention, it is possible to print document data of high quality, even in a WYSIWYG fashion, without having to implement a massive amount of different printer drivers to a certain data processing device.
In the following, the invention will be described in greater detail with reference to the embodiments and the accompanying drawings, in which
With reference to
The data processing device 100 communicates over a connection 124 with a printer 126. In order to do this, the data processing device 100 includes a transceiver 122. The transceiver 122 may be a wireless transceiver as illustrated in
The data processing device 100 also includes a processing unit 102 coupled to the transceiver 122. The processing unit 102 may be implemented in ways known in the art of computers and subscriber terminals. Implementation techniques include: one or more processors, depending on the necessary processing power, one or more application-specific integrated circuits (ASIC), one or more integrated circuits (IC), one or more electronic circuits. In the processor, software that implements part of the desired functionality may be run. A combination of these different implementation techniques may also be used: the data processing device 100 may include one or more ASICs for processing the communication signals and further, one or more microprocessors for processing other data. Specialized processors, for example for processing game data, may also be utilized. It is to be noted that this list of various implementation possibilities may not be exhaustive, but also other implementation techniques may be used.
Because the current embodiments relate to printing, other structural parts of the data processing device 100 are not further described here. Such parts may include, among other things: memory devices, user interface elements (keyboards, displays, buttons, pointing devices, loudspeakers, microphones) and transceivers of a cellular radio network, such as GSM (Global System for Mobile Communications, UMTS (Universal Mobile Telecommunications System), or GPRS (General Packet Radio Service).
The processing unit 102 includes an application 106 that processes document data 104. The application 106 may be a software application such as Microsoft® Word™, Microsoft® Excel™, Microsoft® PowerPoint®, Microsoft® Outlook®, or Microsoft® Internet Explorer™. Naturally, the application 106 may also be any other application used for processing document data 104. The document data 104 may include any alphanumeric or image data, which can be printed (on paper, foil, photography paper, or any other known material used for prints). One typical example of document data 104 includes a PowerPoint™ presentation. Such a presentation includes one or more slides, and each slide may include a number of alphanumeric text fields placed on the slide and a number of images placed on the slide.
The processing unit 102 is configured to define at least one compressed image file in a definition file written in a markup language and to print document data into the compressed image file. Let us study a simple example how this can be achieved.
In
The BPP HTML image printer driver 110 also takes care of the generation of the definition file 114 written in a markup language. The markup language is used to describe the structure of structured data, based on the use of specified tags. Markup languages include, but are not limited to, XML (Extensible Markup Language), HTML (Hypertext Markup Language), and XHTML (Extensible Hypertext Markup Language). More information on the use of the XHTML in connection with printing may be obtained from the document “XHTML™-Print”, Draft 0.95, Jan. 1, 2002, or other documents relating to it published by the World Wide Web Consortium (W3C), whose current web-address is www.w3.org. In the following, an example definition file 114 is shown:
In the embodiment, illustrated by the above-shown definition file 114, the processing unit 102 is configured to include in the definition file 114 a reference to the compressed image file. If we map this definition file 114 to the example of
In another embodiment, the processing unit 102 is configured to include in the definition file 114 information on the decomposition of the document data 104 into the compressed image files 116, 118, 120. One way to ensure that the compressed image files 116, 118, 120 are in a correct position is to put them in a table and to use a Cascading Style Sheet (CSS) definition, as shown above.
In an embodiment, the processing unit 102 is configured to paginate the document data 104. The size of the print material may be received from the printer 126 via the transceiver 122 or it may be a default value known by the printing framework 108. DIN (Deutsche Industrie-Norm) standard may be used for defining the size of the print material, for example. Examples of DIN standard sizes include DIN A3, A4 and A5. Also the size of the printable area needs to be known. The processing unit 102 may be configured to split each page of the paginated document data 104 into bands having a predetermined width and height. The bands may be as described in
In an embodiment, the processing unit 102 is configured to print the document data 104 into the compressed image file 116, 118, 120 in a what-you-see-is-what-you-get or WYSIWYG fashion. A WYSIWYG result may be achieved so that the processing unit 102 is configured to print the document data 104 into the compressed image file 116, 118, 120 in two stages including the printing of the document data into a bit map file and converting the bit map file into the compressed image file.
The processing unit 102 is configured to transfer the definition file 114 and the compressed image file 116, 118, 120 with the transceiver 122 to a printer 126 capable of interpreting the definition file 114 and printing the compressed image file 116, 118, 120, whereby the document data 104 is printed. As illustrated in
Next, some embodiments enhancing the memory handling of the above-described data processing device 100 are described. These embodiments may also have an effect on the memory handling of the printer 126.
In a first embodiment, the processing unit 102 is further configured to delete the definition file 114 after it has been transferred to the printer 126.
In a second embodiment, the processing unit 102 is further configured to delete each compressed image file 116, 118, 120 after it has been transferred to the printer 120.
In a third embodiment, the processing unit 102 is further configured to divide the document data 104 into compressed image files 116, 118, 120 not exceeding a predetermined size limit.
In a fourth embodiment, the processing unit 102 is further configured to generate the compressed image file 118 after the previous compressed image file 116 has been transferred to the printer 126 and deleted from the processing unit 102.
In a fifth embodiment, the processing unit 102 is further configured to receive an image request from the printer 126 via the transceiver 122 and to transfer the compressed image file 116 via the transceiver 122 to the printer 126 in response to the received image request. In connection with the fifth embodiment, there may exist a sixth embodiment, in which the processing unit 102 is further configured to generate the compressed image file 116 after the image request for it has been received. These two embodiments may be implemented so that first a definition file 114, written in XHTML, is created and then sent to the printer 126. When the BPP printer 126 reads the definition file 114 and encounters an image link to a compressed image file 116, it uses a BPP object channel to retrieve the image 116 from the data processing device 100. The printer driver 110 in the data processing device 100 knows which band is requested to be rendered and creates a compressed image file 116 for that. After the compressed image file 116 is transferred to the printer 126 it can be deleted from the memory of the data processing device 100, thus only one band is in the memory of the data processing device 100 at any given time and minimum amount of memory is needed.
With these six embodiments it is possible to control the contents of the memory of the processing unit 102 in order to be able to print even large amounts of document data 104 without high memory capacity. It is to be noted that the document data 104 may fit into one compressed image file 116 or more than one compressed image files 116, 118, 120 may be needed. The number of compressed image files may depend on the above-mentioned pre-determined size limit for the compressed image file.
Next, with reference to
The method starts in 400. The method may be initiated by an application giving 500 a print document data command to a printing framework.
At least one compressed image file is defined in a definition file written in a markup language in 402. The printing framework may give 502 a create-definition-file command to a BPP HTML image printer driver.
Next, document data is printed into the compressed image file in 404. As explained above, this may be done so that all compressed image files are created in one go or one by one (possibly on-demand).
As explained above in connection with the data processing device 100, the definition file may include a reference to the compressed image file. It is possible to include in the definition file also information on the decomposition of the document data into the compressed image files.
Finally, in 406, the definition file and the compressed image file(s) are transferred to a printer capable of interpreting the definition file and printing the compressed image file(s), whereby the document data is printed.
After the printing method ends in the data processing device, the method ends in 408.
The data processing device 100 of the type described above may be used to implement the method, but also other types of data processing devices may be suitable for the implementation. In an embodiment, a computer program product encodes a computer program of instructions for executing a computer process of the above-described method for printing document data from a data processing device to a printer. The computer program product may be embodied on a computer program distribution medium. The computer program distribution medium includes all manners known in the art for distributing software, such as a computer readable medium, a program storage medium, a record medium, a computer readable memory, a computer readable software distribution package, a computer readable signal, a computer readable telecommunication signal, and a computer readable compressed software package.
In an embodiment the method further comprises: paginating the document data, splitting each page of the paginated document data into bands having a predetermined width and height, and printing each band into the compressed image file. The printing of the document data into the compressed image file may be done in a what-you-see-is-what-you-get or WYSIWYG fashion. In order to achieve WYSIWYG printing, the method may print the document data into the compressed image file in two stages including the printing of the document data into a bit map file and converting the bit map file into the compressed image file.
The server may fetch the compressed image files from the client using an object channel and a GetReferencedObjects operation. XHTML-Print format requires that the printer be able to retrieve objects (such as images) from the sender. In
In order to enhance the memory handling some optional operations may be done. The definition file may be deleted after it has been transferred to the printer. Each compressed image file may also be deleted after it has been transferred to the printer. The document data may be divided into compressed image files not exceeding a predetermined size limit. The compressed image file may be generated after the previous compressed image file has been transferred to the printer and deleted from the processing unit. The compressed image file may be generated after the image request for it has been received.
Even though the invention is described above with reference to an example according to the accompanying drawings, it is clear that the invention is not restricted thereto but it can be modified in several ways within the scope of the appended claims.