Using Print2flashsetup.exe documents to go to SWF

Source: Internet
Author: User

By using Print2flash , you can easily convert your document into a real Adobe Flash format, with the best assurance that your content will actually be visible, and that it does not have an installation problem with the viewing tool compared to other formats.

There is a Interop.Print2Flash3.dll in Print2flash

Preparatory work:

1: Install Print2flashsetup.exe First and start the Windows service.

2: Make sure that the computer has Microsoft Office software installed.

3: Create the project and add reference Interop.Print2Flash3.dll, such as.

4: Also need to install Flash Player.

Write code:

The following code was validated successfully under the w732 system.

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading;usingSystem.IO;usingSystem.Collections;namespacepdftoswf{classProgram {Static voidMain (string[] args) {ArrayList alist=NewArrayList (); Alist. ADD ("temp_pdf.pdf"); Alist. ADD ("temp_ppt.ppt"); Alist. ADD ("temp_pptx.pptx"); Alist. ADD ("Temp_doc.doc"); Alist. ADD ("Temp_docx.docx"); Alist. ADD ("Temp_xls.xls"); Alist. ADD ("temp_xlsx.xlsx");  for(inti =0; I < Alist. Count; i++)            {                Try                {                    stringPdffilepath =Alist[i].                    ToString (); FileInfo Pdffi=NewFileInfo (Pdffilepath); stringfilepath =Pdffi.fullname; Console.WriteLine ("is transitioning"+ Pdffilepath +"file ...");                Print2falsh (filepath); }                Catch(Exception ex) {Console.WriteLine ("Error:"+Ex.                Message);        }} console.readkey (); }         Public Static stringPrint2falsh (stringsourceFileName) {            stringURL =string.            Empty; //generates a SWF file with the same file name under the current file directory.             stringfilename =path.getfilenamewithoutextension (sourceFileName).            ToLower (); stringImagedirectorypath =Path.getdirectoryname (sourceFileName); stringOutputFileName = Imagedirectorypath +"/"+ filename +". swf"; intInterfaceoptions = (int) (Print2flash3.interface_option. Intdrag | Print2flash3.interface_option. Intseltext |print2flash3.interface_option. Introtate| Print2flash3.interface_option. Intnewwind | Print2flash3.interface_option. Intbackbutton |print2flash3.interface_option. Intforwardbutton| Print2flash3.interface_option. Intfullscreen |print2flash3.interface_option. Intprint| Print2flash3.interface_option. Intsearchbox |print2flash3.interface_option. Intsearchbut| Print2flash3.interface_option. Intfitwidth |print2flash3.interface_option. Intfitpage| Print2flash3.interface_option. Intzoomslider |print2flash3.interface_option. Intzoombox| Print2flash3.interface_option. Intprevpage |print2flash3.interface_option. Intgotopage|print2flash3.interface_option.            Intnextpage); Print2flash3.server2 P2fserver=NewPrint2flash3.server2 (); P2fServer.DefaultProfile.InterfaceOptions=interfaceoptions; P2fServer.DefaultProfile.ProtectionOptions= (int) print2flash3.protection_option.            Protenapi; P2fserver.convertfile (sourceFileName, OutputFileName,NULL,NULL,NULL); URL=OutputFileName; returnURL; }    }}

Get Source:

http://download.csdn.net/detail/luomingui/9170879

Using Print2flashsetup.exe documents to go to SWF

Related Article

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.