title: Can one convert pdf to swf dynamically?
body: <p>Can one convert PDF to SWF dynamically? I have been trying, but it proved to be difficult.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php
  include('include\settings.php');
  
  $title = "k";
  $makeswf= mysql_query("SELECT * FROM books WHERE title = '$title'");
  $rows = mysql_num_rows($makeswf);
  
  if ($rows !=0)
  {
  while($rows = mysql_fetch_assoc($makeswf))
  {
  
  //where blocation is the pdf file need to be converted.
  
  $file = $rows['blocation'];
  
  echo exec('D:\wamp\www\dspzlibrary\converter\pdf2swf.exe books\$file.pdf -o books\$file.swf -f -T 9 -t -s storeallcharacters');
  }
  
    }
  
  else
  echo"empty";
  
  ?&gt;
  </code></pre>
  
  <p>And here is the error I received:</p>
  
  <blockquote>
    <p>ERROR Couldn't open books\$file.pdf</p>
  </blockquote>
  
  <p>Any assistance will be appreciated.</p>