Showing posts with label PHP exec file conversion. Show all posts
Showing posts with label PHP exec file conversion. Show all posts

Friday, July 2, 2010

PDF to SWF converstion through PHP

I want to share this to you all. I was struct to convert PDF to SWF from PHP using EXEC() function. Problem i faced is the folder name with white spaces. I was tried all the poosibilities. Finally I catch the solution. The code i used is


<?php
// Syntax: exec('path_to_exe "path_to_source_PDF_file" -o "path_to_converting_swf_file"');
// I missed the double codes (") in the path_to_source_PDF_file and path_to_converting_swf_file. Hence the conversion not happened.
// Example: [ I used SWFtools to convert PDF o SWF]
exec("C:\\SWFTools\\pdf2swf.exe c:\\test.pdf -o C:\\navneeth.swf");
?>


I hope this will help to someone.