. Net first uses flashpaper. Net again uses flashpaper

Source: Internet
Author: User
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:

  1. You cannot convert multiple files at the same time. Otherwise, the conversion will fail.
  2. If the conversion fails and the process does not end, it will become an endless loop.
  3. An error occurred while converting the Office files.

For more information about how to solve the problem, see. Net again using flashpaper.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.