Results 1 to 10 of 10

Thread: Convert pdf to swf using .net code

  1. #1
    Join Date
    Nov 2009
    Posts
    57

    Convert pdf to swf using .net code

    Hi,

    My problem is with the pdf file. I need to convert my PDF file to the SWF file format but i am not getting any help to do the same. Is there any thing by using that i can do so or any software is available online to convert the same. Please help me to fine the solution. I have already searched for the same but could not find any help regarding this. So finally i am passing this query to you. Hope that this the right place to ask the query.

    Thanks in advance.
    Last edited by Sheena_thakkar; 28-11-2009 at 07:49 PM.

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: Convert pdf to swf using .net code

    Hi there,

    It can not be done directly. For doing the conversion from the pdf file format to the swf file format you need to use third party library. One more library which can extract the information from the PDF file. There are lots of online tools are available to make the change in the PDF file. Download it from the site or purchase it from the shop and enjoy the conversion.

    Hope you will fine the solution with same

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Convert pdf to swf using .net code

    Here i am posting the coed for the conversion of the file from the pdf to the swf using C#. Hope this will help you.

    Code:
    namespace ConsoleApplication1
    {
    class Program
    {
      static void Main(string[] args)
      {
         Process proc = new Process();
         proc.StartInfo.FileName = @"Exe file name ";
         string strArguments = "";
         strArguments += "-swfburst";
         strArguments += " Here type the destination of the input and out put file";
         Console.WriteLine(strArguments);
         proc.StartInfo.Arguments = @strArguments;
         proc.Start();
         proc.WaitForExit();
       }
      }
    }

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: Convert pdf to swf using .net code

    Hey i have a code of asp.net to convert file from PDF to Flash. The tool which will convert the file is known as the SWF TOOLS.

    int pageNumber = 1;
    string fileName = "name of the file";
    1. System.Diagnostics.Process p = new System.Diagnostics.Process();
    2. p.StartInfo.UseShellExecute = false;
    3. p.StartInfo.RedirectStandardOutput = true;
    4. p.StartInfo.CreateNoWindow = true;
    5. p.StartInfo.RedirectStandardError = true;
    6. p.StartInfo.WorkingDirectory = HttpContext.Current.Server.MapPath("~");
    7. p.StartInfo.FileName = HttpContext.Current.Server.MapPath("extention of the swftools");
    8. p.StartInfo.Arguments = "-F " + "\"" +HttpContext.Current.Server.MapPath("specify the font") + "\"" + " -p " + pageNumber + " " + fileName + " -o " + fileName + pageNumber + ".swf";

  5. #5
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Convert pdf to swf using .net code

    SWF was known as the "Small Web Format" but later on it is modified as the "Shockwave Flash" by the one of the manufacturing company known as the Macromedia but this is not the end it again changes to the Small Web Format. But this happen because the company wants to give a phrase of Shockwave.

    SWF in present time is used for the format for displaying "animated" vector graphics. It is widely used on the web for exceeding the use of the W3C open standard SVG,It also used for the program i.e gaming

    Thanks you

  6. #6
    Join Date
    Feb 2010
    Posts
    1

    Re: Convert pdf to swf using .net code

    Hi All,

    I am getting the different size on generating the swf file from command prompt

    i.e i am getting less size through the command promp compare to the generating c# application.

    please help me on how to generate swf file with less size(same as command prompt generated file) in c# application.

    Thanks & Regards
    Shankar Naspuri

  7. #7
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Convert pdf to swf using .net code

    According to me, I suggest you to install the SWFTOOLS in your browser. After installing this tool on your local machine, simply copy the "font
    " and the PDF2SWF.exe file into a folder in your application root folder "PDF2SWF" and can make use of the following code as :
    Code:
    int Pgno = 1;
    string fNm = "Files/1.pdf";
    System.Diagnostics.Process r = new System.Diagnostics.Process();
    r.StartInfo.UseShellExecute = false;
    r.StartInfo.RedirectStandardOutput = true;
    r.StartInfo.CreateNoWindow = true;
    r.StartInfo.RedirectStandardError = true;
    r.StartInfo.WorkingDirectory = HttpContext.Current.Server.MapPath("~");
    r.StartInfo.fNm = HttpContext.Current.Server.MapPath("~/PDF2SWF/PDF2SWF.exe");
    r.StartInfo.Arguments = "-F " + "\"" 
                      +HttpContext.Current.Server.MapPath("~/PDF2SWF/FONTS") + 
                     "\"" + " -p " + Pgno + " " + fNm + " -o " + fNm + Pgno + ".swf";
    r.Start();
    r.WaitForExit();
    r.Close();

  8. #8
    Join Date
    May 2012
    Posts
    1

    Re: Convert pdf to swf using .net code

    Quote Originally Posted by MindSpace View Post
    According to me, I suggest you to install the SWFTOOLS in your browser. After installing this tool on your local machine, simply copy the "font
    " and the PDF2SWF.exe file into a folder in your application root folder "PDF2SWF" and can make use of the following code as :
    Code:
    int Pgno = 1;
    string fNm = "Files/1.pdf";
    System.Diagnostics.Process r = new System.Diagnostics.Process();
    r.StartInfo.UseShellExecute = false;
    r.StartInfo.RedirectStandardOutput = true;
    r.StartInfo.CreateNoWindow = true;
    r.StartInfo.RedirectStandardError = true;
    r.StartInfo.WorkingDirectory = HttpContext.Current.Server.MapPath("~");
    r.StartInfo.fNm = HttpContext.Current.Server.MapPath("~/PDF2SWF/PDF2SWF.exe");
    r.StartInfo.Arguments = "-F " + "\"" 
                      +HttpContext.Current.Server.MapPath("~/PDF2SWF/FONTS") + 
                     "\"" + " -p " + Pgno + " " + fNm + " -o " + fNm + Pgno + ".swf";
    r.Start();
    r.WaitForExit();
    r.Close();
    ---------------------------------------------------------------------
    You help me with this error:
    Error 2 'System.Diagnostics.ProcessStartInfo' does not contain a definition for 'fNm'
    Thank you very much.

  9. #9
    Join Date
    Jan 2006
    Posts
    605

    Re: Convert pdf to swf using .net code

    Quote Originally Posted by binh180381 View Post
    ---------------------------------------------------------------------
    You help me with this error:
    Error 2 'System.Diagnostics.ProcessStartInfo' does not contain a definition for 'fNm'
    Thank you very much.
    Can you try to supply the code? It could be a syntax error. Try to re-type the whole line. watch that the web-url gets blue in the codeview.

    Working example:
    Code:
    System.Diagnostics.Process.Start("iexplore.exe", "http://www.techarena.in");
    *But*: You simply could start a process with the url, then the default browser starts:
    
    System.Diagnostics.Process.Start("http://www.techarena.in");

  10. #10
    Join Date
    Jan 2013
    Posts
    26

    Re: Convert pdf to swf using .net code

    Hi there
    I agree with Katty that "It can not be done directly"
    Use code to convert pdf to swf is very hard stuff, maybe you can use a convert software.
    From my experience, free converters like "free pdf to swf", "Free 3DPageFlip PDF to Flash Converter" is you good choice.

Similar Threads

  1. pls convert this c++ to java code
    By xSim21 in forum Software Development
    Replies: 4
    Last Post: 26-03-2012, 06:32 PM
  2. convert code to as3
    By gege79 in forum Software Development
    Replies: 1
    Last Post: 01-05-2011, 12:29 AM
  3. How to Convert VB6 code to C#
    By Carson in forum Software Development
    Replies: 5
    Last Post: 27-01-2010, 10:06 PM
  4. How to convert C++ code to VB6
    By LetsC in forum Software Development
    Replies: 3
    Last Post: 05-10-2009, 05:10 PM
  5. How to convert Javascript code to Html code
    By Bosch in forum Software Development
    Replies: 3
    Last Post: 21-09-2009, 01:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,653,274.53613 seconds with 17 queries