I use php5, windows os.
when i ues the php_open_jpeg() function . the browser page shows the
"Fatal error: Call to undefined function pdf_open_jpeg() in D:\ApacheGroup\Apache2\htdocs\test\pdf\images.php on line 9" words. i don't know why.
the following is my code:
<?php
$p=pdf_new();
pdf_open_file($p,"");
pdf_set_info($p,"Creator","images.php");
pdf_set_info($p,"Author","kelvin");
pdf_set_info($p,"Title","Images");
pdf_begin_page($p,612,792);
$im=pdf_open_jpeg($p,"images.jpg");
pdf_place_image($p,$im,200,700,1.0);
pdf_place_image($p,$im,200,600,0.75);
pdf_place_image($p,$im,200,535,0.50);
pdf_place_image($p,$im,200,501,0.25);
pdf_place_image($p,$im,200,486,0.10);
$x= pdf_get_value($p,"imagewidth",$im);
$y = pdf_get_value($p,"imageheight",$im);
pdf_close_image($p,$im);
$font = pd_findfont($p,'Helvetica-Bold','host',0);
pdf_setfont($p,$font,38.0);
pdf_show_xy($p,"$x by $y",425,750);
pdf_end_page($p);
pdf_close($p);
$buf=pdf_get_buffer($p);
$len=strlen($buf);
header('content-type: application/pdf');
header('content-length: $len');
header('content-disposition: inline; filename=images.pdf');
echo $buf;
pdf_delete($p);
?>I gotta, pdf_open_jpeg() function is deprecated since PDFlib version 3.
....................I gotta, pdf_open_jpeg() function is deprecated since PDFlib version 3.
....................
This means you are using code that was written (not by you I assume) when PDFlib version 3 was available and since the server has access to PDFlib version > 3 obviously, the pdf_open_jpeg() function is not used anymore. You now need to read the PDFlib manual to find which function replaced it. You may even need to do the whole thing slightly different.
when i ues the php_open_jpeg() function . the browser page shows the
"Fatal error: Call to undefined function pdf_open_jpeg() in D:\ApacheGroup\Apache2\htdocs\test\pdf\images.php on line 9" words. i don't know why.
the following is my code:
<?php
$p=pdf_new();
pdf_open_file($p,"");
pdf_set_info($p,"Creator","images.php");
pdf_set_info($p,"Author","kelvin");
pdf_set_info($p,"Title","Images");
pdf_begin_page($p,612,792);
$im=pdf_open_jpeg($p,"images.jpg");
pdf_place_image($p,$im,200,700,1.0);
pdf_place_image($p,$im,200,600,0.75);
pdf_place_image($p,$im,200,535,0.50);
pdf_place_image($p,$im,200,501,0.25);
pdf_place_image($p,$im,200,486,0.10);
$x= pdf_get_value($p,"imagewidth",$im);
$y = pdf_get_value($p,"imageheight",$im);
pdf_close_image($p,$im);
$font = pd_findfont($p,'Helvetica-Bold','host',0);
pdf_setfont($p,$font,38.0);
pdf_show_xy($p,"$x by $y",425,750);
pdf_end_page($p);
pdf_close($p);
$buf=pdf_get_buffer($p);
$len=strlen($buf);
header('content-type: application/pdf');
header('content-length: $len');
header('content-disposition: inline; filename=images.pdf');
echo $buf;
pdf_delete($p);
?>I gotta, pdf_open_jpeg() function is deprecated since PDFlib version 3.
....................I gotta, pdf_open_jpeg() function is deprecated since PDFlib version 3.
....................
This means you are using code that was written (not by you I assume) when PDFlib version 3 was available and since the server has access to PDFlib version > 3 obviously, the pdf_open_jpeg() function is not used anymore. You now need to read the PDFlib manual to find which function replaced it. You may even need to do the whole thing slightly different.