0 Replies Latest reply on May 1, 2008 4:34 AM by Pranjal_Mehta

    Pdf file opened in new window at the time of converting PDF to swf from .net programming


      I am using FlashPaper.exe to convert a PDF to SWF.
      I want to do that programmatically in c#.net.
      So i write the code as below

      string sourcefilename = @"D:\projects\Test.pdf";
      string destinationfilename = @"D:\projects\ACT.swf";

      System.Diagnostics.Process p = new System.Diagnostics.Process();
      p.StartInfo.UseShellExecute = false;
      p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
      p.StartInfo.WorkingDirectory = @"C:\Program Files\Macromedia\FlashPaper 2";
      p.StartInfo.FileName = @"C:\Program Files\Macromedia\FlashPaper 2\FlashPrinter.exe";

      string arguments = @"" + sourcefilename + " -o " + destinationfilename;
      p.StartInfo.Arguments = arguments;


      This code works fine, and generates SWF perefectlly. But problem is that during this conversion, it opens the PDF file into Acrobat Reader as new window.
      So user has to close that PDF file manually. But my application will be on server, and lots of users were accessing it.

      so is there any way so that pdf file will not open as a new window ?

      Pranjal Mehta