title: Flex problem in saving PDF at server
body: <p>I am a new bee to flex.
  What i am trying to do is to generate and save the layout design which nothing but canvas to a pdf format at the server. Currently i am able to display the pdf in browser (see the function below:) but cannot save the file at the server.</p>
  
  <pre><code>  private function continueToPdf():void{
              myPDF = new PDF(  Orientation.LANDSCAPE, Unit.MM, Size.A4 );
              myPDF.setDisplayMode ( Display.FULL_WIDTH ); 
              myPDF.addPage();
              myPDF.addImage(layout_cnv);
              myPDF.save( Method.REMOTE, "http://flexindia.org/designtool/upload/create.php",Download.INLINE ,"drawing.pdf" );
       }
  </code></pre>
  
  <p>where layout_cnv is a canvas.Also i am using AlivePDF.swc lbrary for this.
  The php file at server is create.php</p>
  
  <pre><code>                   &lt;?php
                   $method = $_GET['method'];
                   $name = $_GET['name'];
  
                   if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) {
  
  // get bytearray
  $pdf = $GLOBALS["HTTP_RAW_POST_DATA"];
  
  // add headers for download dialog-box
  header('Content-Type: application/pdf');
  header('Content-Length: '.strlen($pdf));
  header('Content-disposition:'.$method.'; filename="'.$name.'"');
  echo $pdf;
  
       }  else echo 'An error occured.';
  
             ?&gt;
  </code></pre>
  
  <p>Can someone help me please.</p>