A while ago, we realized the function of converting word to image, researched feasible methods, and sorted it out. For more information, see. :)
1. Copy the word to the clipboard in the format of Image
Select each page and use the page operation function of word to select each page. Call the copytoclipboard method to copy the page to the clipboard. The Clipboard contains the image format and can be pasted as an image.
Advantages: simple implementation and high efficiency;
Disadvantage: When this function is called, you and other programs cannot use the clipboard.
2. Use a virtual printer and print it as an image.
Use the virtual printer provided by office to print the word into a PNG image, and then convert the format.
Advantage: the process is low and the speed is relatively high.
Disadvantage: The printer needs to be installed. The printing function is relatively complex. Similar to the clipboard, the printer cannot be used by users or other programs when this function is called.
3. Convert PDF to image
A. word2007 is saved as PDF
Advantages: the solution is reliable and the implementation method is not defective.
Disadvantage: there are requirements for the version;
B. Save acrobat as PDF
Advantages: Same as above
Disadvantage: special software needs to be installed;
4. convert HTML to image
Advantage: Word provides an interface for converting to HTML.
Disadvantage: HTML conversion is rarely implemented.
5. Install OpenOffice on the server, and convert the Java program on the server to an image.
Advantages: independent from clients; reliable solution.
Disadvantage: You need to upload the source file and download the generated image.