Error added: 2006-06-05T07:10:29Z
PDF_begin_document() function is deprecated since PDFlib version 6.we cant access the function in lower version.so try the program as below. <?php $p =pdf_new(); pdf_open_file($p,\"test.pdf\"); pdf_set_info($p, \"Creator\", \"hello.php\"); pdf_set_info($p, \"Author\", \"Rainer Schaaf\"); pdf_set_info($p, \"Title\", \"Hello world (PHP)!\"); pdf_begin_page($p, 595, 842); $font = pdf_findfont($p, \"Helvetica-Bold\", \"winansi\", \"\"); pdf_setfont($p, $font, 10); pdf_set_text_pos($p, 50, 700); pdf_show($p, \"Hello world!\"); pdf_continue_text($p, \"(says PHP)\"); pdf_end_page($p); $buf = pdf_get_buffer($p); $len = strlen($buf); header(\"Content-type: application/pdf\"); header(\"Content-Length: $len\"); header(\"Content-Disposition: inline; filename=hello.pdf\"); print $buf; echo $buf; pdf_delete($p); ?>
Same problem is faced by me. I think, this is version problem of PHP/Apache as LIBPDF is also installed.
\'PDFlibException\' with message \'Don\'t fetch buffer
tertertert
<a href=\"http://www.google.com/search?client=opera&rls=en&q=libpdf+solution&sourceid=opera&ie=utf-8&oe=utf-8\">google search for libpdf solution</a>
If you know the answer, please add your own solution below.
If you don't know, but find out later, please come back and share your answer - there will be other people
struggling with this too.
If you want to be notified via email when this is solved, enter your email address here: