Article Title: Read CHM, WDL, and other formats in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Most e-books on the Internet are in pdf, chm, wdl, and word document doc formats. Some books also use plain text txt format. The txt format can be opened by a text reader in linux? Ma Mei? The inux platform supports Chinese display. Pdf format is widely used and has been well supported in linux. You can use xpdf, KGhostView, and so on to open and read, you can also download Acrobat Reader for linux at www.adobe.com (the latest version is 5.0. In addition, compared with txt, pdf supports image display, hyperlinks, and other functions, making it easier to use. For other e-book formats, such as chm, wdl, and superstar e-book formats, it is inconvenient to use because there is no reading tool on the linux platform. Especially for books that learn how to operate and program on the linux platform, you need to switch between windows and linux platforms while reading and operating. Because I need to learn programming on the linux platform, I have to read some of the downloaded e-books in chm or wdl format and restart them to linux, then start windows, learn a part, and then switch back to linux. it takes a long time for humans and machines to get stuck. I also searched on the Internet, except for finding a lot of problems such as "How to Use chm and wdl in linux", I did not find any good solutions. One day, when you use Kwrite in linux, you do not have to open the print menu. One of the displayed printers is Acrobat into write. Press the print button, enter the name of the file to be saved, and then use mongobatreader to open it, everything is displayed normally. The original article can be converted into pdf format. If you can convert e-books on the windows platform into pdf in this way, it will not be very convenient to use in the future. So I restarted the windows platform. after a while of exploration, I found two similar solutions: print them into ps format and print them into pdf format. The former one is easy to convert and has good versatility, but the effect is poor. The latter has many advantages, but requires special software support.
I. Convert e-books into ps format
Most of the reading tools on windows have the printing function. Therefore, it is easy to convert the format of books by printing to files. First, check whether there is a printer in the windows Control Panel. If not, add the printer. Note: The added printer must support the PostScript format, select the default value for other parameter settings. On my system, I chose the HP LaserJet III Si PostScript v52.3 printer. Then I went to the print menu of the reading tool and selected print. After selecting the printer, the key step was coming, select "print to file", Press "print", specify the file storage path and file name, and press "OK, A file with the suffix prn is generated in the directory you specified. If nothing happens, restart linux and open the file with GhostView. You should be able to see the content of the file. The following uses Objective C ++ in chm format as an example to describe the entire process.
After the printer is installed in windows, run the effectiveC ++. chm file. The reading interface is displayed. Click the print icon on the toolbar above to display a selection window titled "Print topic". The default option is "Print selected topic ", change to "Print selected subject and all title", click "OK", and the print page appears. Select a printer (HP LaserJet III Si PostScript v52.3 printer on my system ), click the box in front of "print to file (F)" and click "print". A "print to file..." appears ..." In the dialog box, specify the file storage path and file name, and click "OK" to generate the prn file. Restart linux and run ghostview or kghostview to view the file. Both the text and image are displayed.
The conversion of doc in word document format is also very simple. You only need to select print in word and then follow the above procedure. Other e-book formats, such as wdl, can also be processed in the same way. However, the size of the converted prn file is not small. The first part of a 300-page linux reference book contains nearly 8 Mb after conversion. The format of the superstar e-book can also be handled in this way. As long as the reading tool supports printing, e-books in any format can be converted to ps files in this way.
Problems: Converting e-books into ps files may cause more or less problems, such as changes in some fonts and no hyperlinks to ps files converted by chm. If the text is too light and not very clear, you can try another printer. Some printer drivers can set the resolution, which is better after conversion. For wdl documents, if the converted fonts overlap each other, you can define the width of the paper during printing.
Ii. Convert e-books into pdf Format
Like converting to a ps format, converting to a pdf format also needs to be printed. However, the print driver used this time can only be adobe's volume write. the best way to install the printer driver is to install the Acrobat software provided by adobe. Here, we should note that it is not common to use mongobatreader. Acrobat is used to create pdf files, various electronic documents can be made into PDF files. AcrobatReader can only read and print PDF files, but cannot create PDF files. Acrobat can be downloaded from the adobe website, but an account is required. So I chose a Chinese site to download Acrobat 5.0, which is not small, with 108 MB. You must use a custom method to install the composer writer and composer fonts. After the installation is complete, there will be a two-dimensional Acrobat printer and a two-dimensional Acrobat Distiller printer. Here we only use the pluwriter printer. The operation method is similar to converting to ps. When selecting a printer, You must select printer writer, but do not select print to file (F). Click OK to automatically display a dialog box, you can specify the storage location of the file and the file name to be saved, and then generate the file. If you have the conditions, you can install the conditional writer directly, but you must have adobe exchange support.
Pdf format has some advantages that ps does not have. For example, the converted chm File still maintains the hyperlink function, which makes it easy to use and can maintain the original file style completely. Therefore, I recommend conditional friends to use this method.
When converting wdl documents, there will also be a problem of overlapping fonts. After repeated experiments, we found that defining the paper as 400 × 400 can ensure sufficient spacing between characters. At the same time, set the resolution to 600, so that the font will be clearer after the conversion.
As a matter of fact, many netizens may not be able to use their own skills. They have found these two methods. However, many netizens, especially cainiao, often ask similar questions. So I am writing this article, hoping to help you. If anyone has a better method, they can post it online to share with you. You can also send me a mail directly, my email is kangjie501@hotmail.com.