{oapdf_gg}
Office software is closely linked to the PDF,the PDF is also must have to control!      Set home Page  Add to Favorites  
You are here:Home > PDF Application > PDF Development
PDF Development
C# language or ASP.Net combat: convert PDF to Word format
Finishing by: Date:2009-04-20 21:54:47 Popularity: Tags:


IV: Use C # to call ConvertDoc2PDF.js script
Create a new C # the WINDOWS application, add a button button1
Add a function, function names StartConvertPDF
public void StartConvertPDF ()
(
Process proc = new Process ();
proc.StartInfo.FileName = "cmd.exe";
proc.StartInfo.WorkingDirectory = @ "c: \";
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardInput = true;//input redirection

proc.Start ();
proc.StandardInput.WriteLine (@ "cscript//nologo c: \ ConvertDoc2PDF.js c: \ test.doc c: \");
proc.StandardInput.WriteLine ( "exit");
proc.WaitForExit ();
)

then CLICK the button to add the incident to call the code thread
private void button1_Click (object sender, System.EventArgs e)
(
//Definition of line procedures
Thread thConvert = new Thread (new ThreadStart (StartConvertData));
thConvert.Start ();
)

Note: In testing the above C # program, it is important to add the following namespace
using System.Diagnostics;
using System.Threading;

there isArticle InformationsComment Information
Category column

Site Help | Site Map | Feedback |
OAPDF.COM Copyright 2009 V1.1