Skip to main content
2 de 2
replaced http://stackoverflow.com/ with https://stackoverflow.com/

Achei esta ferramenta aqui.

O código abaixo, segundo esta pergunta aqui e este outro tópico aqui, faz a conversão:

int pageNumber = 1;
string filename = @"MeuArquivo.pdf";
string outputfile = @"ArquivoConvertido.swf";
System.Diagnostics.Process pdf2swfprocess = new System.Diagnostics.Process();
pdf2swfprocess.StartInfo.UseShellExecute = false;
pdf2swfprocess.StartInfo.RedirectStandardOutput = true;
pdf2swfprocess.StartInfo.CreateNoWindow = true;
pdf2swfprocess.EnableRaisingEvents = false;
pdf2swfprocess.StartInfo.WorkingDirectory = HttpContext.Current.Server.MapPath("~");
pdf2swfprocess.StartInfo.RedirectStandardError = true;
pdf2swfprocess.StartInfo.FileName = HttpContext.Current.Server.MapPath("~/PDF2SWF/pdf2swf.exe");
//pdf2swfprocess.StartInfo.Arguments = inputfile + "-o" + outputfile;
pdf2swfprocess.StartInfo.Arguments = "\"" + HttpContext.Current.Server.MapPath("~/PDF2SWF/FONTS") + "\"" + " -p " + pageNumber + " " + filename + " -o " + filename + pageNumber + ".swf";

pdf2swfprocess.Start();
pdf2swfprocess.WaitForExit();
pdf2swfprocess.Close();
Leonel Sanches da Silva
  • 89,6mil
  • 9
  • 125
  • 233