Convert PDF To SWF FLASH - Asp Net MVC

2

Good night, I'm generating pdf using Itextsharp and I need to send a swf to the client, however I'm having difficulties, the client gets a white flash screen. I am using this strategy because with the flash I can block the options to print the pdf and save as. Would some ninja programmer have any tips on how to do this?

    
asked by anonymous 27.11.2015 / 22:06

2 answers

0

Found this tool here .

The code below, second this question here and this other topic here , do the conversion:

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();
    
27.11.2015 / 22:58
-1

I found the answer need to run two commands. The first to generate the swf  and the second command to combine the generated swf with some default template. 1) pdf2swf.exe indicator.pdf -o test.swf 2) swfcombine.exe C: \ swftools \ rfxview.swf viewport = plano1.swf -o plano1.swf

    
28.11.2015 / 03:52