C#
trinity666
Messages postés
131
Statut
Membre
-
trinity666 Messages postés 131 Statut Membre -
trinity666 Messages postés 131 Statut Membre -
bonjour
je ne comprends pas pourquoi le code ne marche pas
static void pdf2html(String fichierpdf, String fichierhtml)
{
//char g = '\"';
String fich = @"D:\Mes Documents\Visual Studio 2005\Projects\ConsoleApplication1\ConsoleApplication1\pdftohtml.exe" ;
String cmd = fichierpdf + " " + fichierhtml;
//String cmd2 = fich + cmd;
Console.WriteLine(cmd);
try
{
//Process.Start("IExplore.exe", "www.google.fr"); celui la marche
Process.Start(fich,cmd);// celui la ne marche pas il ouvre le prgm mé ne lui mé pas lé arguments
}
catch(Exception e){Console.WriteLine("erreur ");}
Console.ReadKey();
}
}
}
merci pour votre aide
je ne comprends pas pourquoi le code ne marche pas
static void pdf2html(String fichierpdf, String fichierhtml)
{
//char g = '\"';
String fich = @"D:\Mes Documents\Visual Studio 2005\Projects\ConsoleApplication1\ConsoleApplication1\pdftohtml.exe" ;
String cmd = fichierpdf + " " + fichierhtml;
//String cmd2 = fich + cmd;
Console.WriteLine(cmd);
try
{
//Process.Start("IExplore.exe", "www.google.fr"); celui la marche
Process.Start(fich,cmd);// celui la ne marche pas il ouvre le prgm mé ne lui mé pas lé arguments
}
catch(Exception e){Console.WriteLine("erreur ");}
Console.ReadKey();
}
}
}
merci pour votre aide
1 réponse
ben jen été reduite a faire cette horreur pour que ca marche
static void pdfToHtml(String pdf, String html) {
char g = '\"';
StreamWriter sw = null;
String str = g+"D:\\Documents\\Visual Studio 2005\\Projects\\ConsoleApplication1\\ConsoleApplication1\\pdftohtml.exe"+g;
try
{
if (File.Exists("D:\\Documents\\pdf2html.bat"))
{
File.Delete("D:\\Documents\\pdf2html.bat");
Console.WriteLine("il a existé");
Console.ReadKey();
}
sw = new StreamWriter("D:\\Documents\\pdf2html.bat");
sw.WriteLine("@echo off ");
sw.WriteLine(str +" "+pdf + " " +html);
sw.WriteLine("pause");
sw.Close();
sw = null;
Process.Start("D:\\Documents\\pdf2html.bat");
}
catch (Exception e) { Console.WriteLine(e.ToString()); }
}
}
:( decue rarement de reponses a mes questions
static void pdfToHtml(String pdf, String html) {
char g = '\"';
StreamWriter sw = null;
String str = g+"D:\\Documents\\Visual Studio 2005\\Projects\\ConsoleApplication1\\ConsoleApplication1\\pdftohtml.exe"+g;
try
{
if (File.Exists("D:\\Documents\\pdf2html.bat"))
{
File.Delete("D:\\Documents\\pdf2html.bat");
Console.WriteLine("il a existé");
Console.ReadKey();
}
sw = new StreamWriter("D:\\Documents\\pdf2html.bat");
sw.WriteLine("@echo off ");
sw.WriteLine(str +" "+pdf + " " +html);
sw.WriteLine("pause");
sw.Close();
sw = null;
Process.Start("D:\\Documents\\pdf2html.bat");
}
catch (Exception e) { Console.WriteLine(e.ToString()); }
}
}
:( decue rarement de reponses a mes questions