Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Convert pdf to swf using .net code

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 28-11-2009
Member
 
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 06:49 PM.
Reply With Quote
  #2  
Old 28-11-2009
Member
 
Join Date: May 2008
Posts: 2,004
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
Reply With Quote
  #3  
Old 28-11-2009
Member
 
Join Date: Apr 2008
Posts: 1,999
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();
   }
  }
}
Reply With Quote
  #4  
Old 28-11-2009
Member
 
Join Date: May 2008
Posts: 2,289
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";
Reply With Quote
  #5  
Old 28-11-2009
Member
 
Join Date: Oct 2005
Posts: 2,388
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
Reply With Quote
  #6  
Old 26-02-2010
Member
 
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
Reply With Quote
  #7  
Old 26-02-2010
Member
 
Join Date: Feb 2008
Posts: 1,844
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();
Reply With Quote
  #8  
Old 09-05-2012
Member
 
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.
Reply With Quote
  #9  
Old 09-05-2012
Member
 
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");
Reply With Quote
  #10  
Old 07-01-2013
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Convert pdf to swf using .net code"
Thread Thread Starter Forum Replies Last Post
pls convert this c++ to java code xSim21 Software Development 4 26-03-2012 06:32 PM
convert code to as3 gege79 Software Development 1 01-05-2011 12:29 AM
How to Convert VB6 code to C# Carson Software Development 5 27-01-2010 09:06 PM
How to convert C++ code to VB6 LetsC Software Development 3 05-10-2009 05:10 PM
How to convert Javascript code to Html code Bosch Software Development 3 21-09-2009 01:20 PM


All times are GMT +5.5. The time now is 01:42 PM.