Gossip:
Online Library Process
1. upload documents; 2. Online reading of documents;
I guess this big process is roughly classified as two points. Of course, the difficulty is 2. Online reading of documents. Next I will propose my own solutions around "online reading of documents.
1. Online reading of documents
You must use the flash file player to load swf files online and then play the files online.
This requires the user to use the uploaded files to be converted, that is, to convert doc, xls, ppt and other files into swf files that flash players can load.
Here I recommend two good tools to you;
(1) flashpaper: using the flashpaper virtual printer, we can convert files such as doc, xls, and ppt into the swf file we want, or into PDF files. In programming mode, install flashpaper on the server side, and then start the flashpaper process in the program through encoding to complete the desired file conversion. In the actual coding process, you may encounter some permission issues and other details. I believe you will know a little bit about it.
The advantage of flashpaper is that it integrates the flash playback function with the swf file to be converted. This makes it easy to operate when presenting documents, you only need to perform the same operations as inserting flash into html. As the playback function and content become one, the built-in playback function can be used to flexibly operate the content. This function is sufficient for simple online documentation and online reading.
Flashpaper has both advantages and disadvantages. flashpaper is no exception because it generates the player and content as a whole, in addition, only one swf file can be generated for a very large doc file, which leads to slow client loading. To achieve the same preload effect as Baidu Library, such operations and content are not separated, which is quite difficult in coding and operation. At the same time, flashpaper may be charged. If you choose to use it commercially and don't want to spend any money, you don't have to go to the dark.
Summary: For how to use flashpaper and programming examples, you can use baidu and google. These two instructors will give you a detailed answer.
(2) flexpaper: after reading the advantages and disadvantages of flashpaper, let's take a look at flexpaper. As an open-source file player, it provides us with a lot of imagination, the rich configuration items and complete functions are all in our minds. Let's take a look at flexpaper:
Flexpaper also needs to load swf files, and also needs to convert the files uploaded by the user. The conversion tool supporting flexpaper is ipv2swf. Unfortunately, from the name, we can see that it is used to convert a PDF file into a swf file. What should I do with doc, xls, and other files? We also need to use other tools to complete the conversion process from files such as doc and xls to pdf. This process seems to be too slow and long. I have been looking for better solutions from the Internet for a long time. However, most of them are subject-specific and similar content. Thanks for the powerful content crawler.
Advantages of flexpaper: first, it is open-source. We can find its source code on the Internet and perform secondary development based on the actual requirements of the features we have developed, fortunately, the company has a beautiful flash master mm. I don't have to work too much on this task. At the same time, flexpaper has many attribute configuration items, which can make flexpaper display more flexible. The ipv2swf tool also brings us great news. He can convert every page of the document into a swf file, this provides a good solution for implementing document pre-installation. Both loading by name and loading by reading the database can achieve the effect of pre-loading, of course, I am currently working on the implementation of the pre-load. The pre-loading greatly improves the user experience. This method is not the only one. I believe there are always better methods. Mining.
Disadvantages of flexpaper: This kind of file conversion is not flexible, which makes me feel crazy. doc, xls-> pdf-> swf, if the complicated conversion process is too dizzy, crazy, depressed. Of course, there are some solutions. You can use flashpaper to convert files such as doc and xls into pdf files first, and then convert the pdf file into swf by using ipv2swf. Of course, we can use programs to control these conversions. Optimize the physical storage of documents. Are you afraid of flashpaper charges! This process of converting from the background to pdf does not require flashpaper charges.
Summary: After summing up flashpaper and flexpaper, my solution also came out. I used flexpaper to show my online documents. It was a little complicated but acceptable. Considering the server performance, it would be terrible if a conversion process always occupies too many server resources. So I added a small detail to my business, that is, the files uploaded by the user need to be reviewed. The files that have passed the review will be converted in batch at midnight.
The younger brother is not talented. He still has an initial understanding of flashpaper and flexpaper. I hope your predecessors will give you some advice. The bricks must be shot. If you find anything wrong with me, please correct me, I also look forward to a better solution, or I will die.
Beijing is snowing, and the year of the rabbit is awesome. Let's just write it here. I am a hundred spirits.