2. The method of claim 1 , further comprising the steps of: compressing, by the document sender, the GDI document; and decompressing, by the document receiver, the received GDI document.
1. A method for transmitting a sharing document containing only text and pictures over a network, comprising the steps of: converting, by a virtual printer module in a first client device, GDI (Graph Device Interface) functions corresponding to a sharing document to be transmitted into GDI instructions, forming a GDI document by synthesizing the GDI instructions, and sending the GDI document to a document sender in the first client device; receiving, by a document receiver in a second client device, the GDI document sent from the document sender through a network; and restoring, by the document receiver, the received GDI document, and contents of the restored GDI document being the same as that of the sharing document; the method for said converting the GDI functions corresponding to the sharing document into GDI instruction, wherein forming the GDI document by synthesizing the GDI instructions comprises the steps of: opening, by an application of the sharing document on the document sender, the interface for interacting with the virtual printer module and starting to perform virtual printing of the sharing document; determining, by the application of the sharing document, whether the virtual printing should be terminated, if the virtual printing should be terminated, terminating the virtual printing of the sharing document by sending a GDI function indicating the end of the sharing document to the virtual printer module and terminating current procedure for generating the GDI document; if the virtual printing should not be terminated, sending, by the application of the sharing document, based on the contents of the sharing document and by calling print driver GDI transfer interface function, a GDI function to the virtual printer module, and converting, by the virtual printer module, the received GDI function into a GDI instruction and returning the result of the conversion to the application of the sharing document; and determining, by the application of the sharing document, based on the result of the conversion returned by the virtual printer module, whether the conversion is successful, and if the conversion is successful, starting, by the application of the sharing document, to deal with the next GDI function and cycling back to the step of determining whether the virtual print should be terminated; if the conversion is unsuccessful, terminating, by the application of the sharing document, the virtual printing of the sharing document by sending a GDI function indicating the end of the sharing document to the virtual printer module and terminating the procedure for generating the GDI document; the GDI instruction comprises at least: the name of GDI function, number of GDI function and serial number of GDI performance; the method for converting, by the virtual printer module, the received GDI function into the GDI instruction and retuning the result of the conversion to the application of the sharing document, comprising the steps of: calling, by the application of sharing document, the print driver GDI transfer interface function, determining, by the virtual printer module, whether the received GDI function is a GDI function indicating start of virtual printing of the sharing document, if the received GDI function is a GDI function indicating start of virtual printing of the sharing document, acquiring, by the virtual printed module, a corresponding table of names and numbers of GDI functions from a GDI subsystem, initializing the variable of the serial number of GDI performance to 0, establishing and opening an empty GDI document, and generating an initialization variable indicating the completion situation of the initialization; if the received GDI function is nota GDI function indicating start of virtual printing of the sharing document, determining, based on the initialization variable, whether the initialization has been completed, and if the initialization has been completed, determining whether the received GDI function is a GDI function indicating end of the virtual printing of the sharing document, if the received GDI function is a GDI function indicating end of the virtual printing of the sharing document, closing the GDI document, and returning, by the virtual printer module, the result of the conversion to the application of the sharing document; if the received GDI function is not a GDI function indicating end of the virtual print of the sharing document, determining whether the number of GDI function corresponding to the current GDI function is found, and if the number of GDI function corresponding to the current GDI function is found, adding 1 to the variable of the serial number of GDI performance, encoding the name of GDI function, the variable of the serial number of GDI performance and the GDI function based on the format of GDI instruction stream so as to generate GDI instruction, and writing the GDI instruction into the GDI document; and if the number of GDI function corresponding to the current GDI function is not found, returning, by the virtual printer module, the result of the conversion to the application of the sharing document; and if initialization has not been completed, cycling back to the step of acquiring, by the virtual printer module, a corresponding table of names and numbers of GDI functions from a GDI subsystem, initializing the variable of the serial number of GDI performance to 0, establishing and opening an empty GDI document, and generating an initialization variable indicating the completion situation of the initialization.