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.
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
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();
}
}
}
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";
- System.Diagnostics.Process p = new System.Diagnostics.Process();
- p.StartInfo.UseShellExecute = false;
- p.StartInfo.RedirectStandardOutput = true;
- p.StartInfo.CreateNoWindow = true;
- p.StartInfo.RedirectStandardError = true;
- p.StartInfo.WorkingDirectory = HttpContext.Current.Server.MapPath("~");
- p.StartInfo.FileName = HttpContext.Current.Server.MapPath("extention of the swftools");
- p.StartInfo.Arguments = "-F " + "\"" +HttpContext.Current.Server.MapPath("specify the font") + "\"" + " -p " + pageNumber + " " + fileName + " -o " + fileName + pageNumber + ".swf";
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
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
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();
Re: Convert pdf to swf using .net code
Quote:
Originally Posted by
MindSpace
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.
Re: Convert pdf to swf using .net code
Quote:
Originally Posted by
binh180381
---------------------------------------------------------------------
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");
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.