Loading ...
Sorry, an error occurred while loading the content.

creating pdf file in php error

Expand Messages
  • pritesh loke
    Hello I am creating pdf file using php.They dont give me any error but not opening that file. pls checked the code
    Message 1 of 1 , Nov 3, 2006
    • 0 Attachment
      Hello
      I am creating pdf file using php.They dont give me any error but not opening that file.
      pls checked the code
      <?
      $pdf = pdf_new();
      pdf_open_file($pdf,"pml.pdf");
      pdf_set_info($pdf,"author","priteshloke");
      pdf_set_info($pdf,"title","priteshloke.x10hosting.com tutorials");
      pdf_set_info($pdf,"creator","priteshloke.x10hosting.com");
      pdf_set_info($pdf,"subject","Tutorials Links");
      pdf_begin_page($pdf,450,450);
      $font = PDF_findfont($pdf, "Helvetica-Bold", "winansi",0);
      pdf_setfont($pdf,$font,12);
      pdf_show_xy($pdf,"Hello pritesh loke this is first string form pdf",5,255);
      pdf_end_page($pdf);
      pdf_close($pdf);
      $buffer = pdf_get_buffer($pdf);
      header("Content-type: application/pdf");
      header("Content-Length: ".strlen($buffer));
      header("Content-Disposition: inline; filename=zend.pdf");
      print $buffer;
      pdf_delete($pdf);
      ?>
      If any problem pls tell me the solution.




      ---------------------------------
      Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.