|
From: | Anthony Mac Egan |
Subject: | [Swftools-common] Getting pdf2swf to work on a WIN NT server |
Date: | Thu, 25 Nov 2010 10:21:05 -0000 |
Hi Guys, I am hoping ye can help me as I am a newbie to Swftools. I am trying to create a swf on the fly server side. I am using code I found posted at http://www.mail-archive.com/address@hidden/msg02540.html . It works perfectly on my windows machine using WAMP’s localhost but not on my server. I basically uploaded the contents from the SWFTools folder to my server. All can be seen at http://banteerhistory.ie//PDFFiles/SWFTools/ with http://banteerhistory.ie//PDFFiles/SWFTools/testP2S.php calling the pdf2swf.exe. There is an info.php file in the same folder. From the phpinfo() function I see the Environment; HTTP_USER_AGENT--Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 and my server is using PHP Version 5.2.9. Can anyone give me some pointers where to go from here to get this working. My code is as follows; note trying both system() and exec() functions. <?php $output = array(); $return = 0; $pdfFile = "dearg.pdf"; $swfFile = "outfile.swf"; $PDF2SWFOptions = "--flashversion=10"; // Ensure pdf2swf is in your ($)path, or define the full path here. if(PHP_OS == "WIN32" || PHP_OS == "WINNT") $pdf2Swf = 'pdf2swf.exe '; else // if (PHP_OS == "Linux") $pdf2Swf = 'pdf2swf '; // $command = $pdf2Swf . $PDF2SWFOptions . $pdfFile . '" -o "' . $swfFile; $command = $pdf2Swf . $PDF2SWFOptions . ' "' . $pdfFile . '" -o "' .$swfFile . '"'; $result = system($command); echo "<pre>$command</pre>"; exec($command, $output, $return); ?> Best regards, Anthony |
[Prev in Thread] | Current Thread | [Next in Thread] |