Requirements and ideas
This article mainly aims to upload documents online and convert them to falsh. Du Niang said that flashpaper can implement this function. The following are my experiences.
Tool Introduction
FlashpaperIt is an electronic document tool launched by Macromedia. By using this program, you can convert the required documents to Flash Animation in swf format through simple settings, the layout style and font display of the original document will not be affected. The advantage of this is that no matter what the platform or language version of the document is, you can freely watch the electronic document animation you have created, it also allows you to freely zoom in, zoom out, print, flip, and other operations, which is very good for the dissemination of documents, and because of the popularity of Flash Animation and powerful adjustable. (Note: This article is taken from Baidu Baike flashpaper)
When flashpaper is working, you will find a program that automatically jumps out (this program is related to the document type you want to convert). After the printing is complete, the program will be automatically closed. Yes, that's how he works:YesUse the flashpaper virtual printer to convert printable documents to SwF or PDF documents.
Call method: use process method: "flashpaper execution file path input file path-O output .swf file path"
Download Tool
The attachment contains the green flashpaper version 2.02. Click to download: Green flashpaper2.02.rar.
After downloading and decompressing the package, click \ flashpaper \ initialization. bat in the directory to register the component. You may need to run the package as an administrator Based on the permission.
Initial code
Protected Boolean convertfile (string filename) {// you can set string flashprinter = server. mappath ("~ /Flashpaper/flashprinter.exe "); // obtain the absolute path of the input and output files. String infile = getfilepath (filename); string OUTFILE = getflashpath (getflashname (filename )); // process operation process PSS = new process (); PSS. startinfo. createnowindow = false; PSS. startinfo. filename = flashprinter; PSS. startinfo. arguments = string. format ("{0} {1}-o {2}", flashprinter, infile, OUTFILE); try {PSS. start (); While (! Pss. hasexited) {continue;} return true;} catch (exception) {return false ;}}Release Problems
The call to components is limited in window2003. Click here for details.
Method 1: configure the Web. config file to simulate the account of the local system during each request.
Specific Operation: Add the following nodes to the Web. config file:
<Identity impersonate = "true" username = "accountname" Password = "password"/>
Here, username is the local account to be simulated, and password is the password of this account.
Test Problems
After multiple tests, we found that there were many problems to be solved during the next development:
- You cannot convert multiple files at the same time. Otherwise, the conversion will fail.
- If the conversion fails and the process does not end, it will become an endless loop.
- An error occurred while converting the Office files.
For more information about how to solve the problem, see. Net again using flashpaper.