pdf nightmare...
howdy folks...
this is darnit driving me totally crazy. nobody of wich i spoken to so far knows the awnser to this.. maybe some of you out there do, cuz i am going nutz!
[code]
Function PrintPhoto() {
GLOBAL $pdf, $row, $Base;
$imglen = $Base->GetImageLen($row[Foto]);
$url = "https:///get_image.php?id=$row[Foto]";
$img = PDF_open_image($pdf, "jpeg" , "url" , $url , $limglen , 88 , 142, 0, 0,"");
PDF_place_image($pdf, $img, 50,550,88);
PDF_close_image($pdf,$img);
PDF_rect($pdf, 50 ,550,88,114);
PDF_stroke($pdf);
}
[/code]
there's my problem.. i managed to get the file size by running another query against my images database. i get the image length thru that so that i can give pdf_open_image its file size. well, now there is a problem to that, the 2 zero's in there.. according to the manual this is supposed to be 1st int bpc, and the other int components .. but i havent got the foggiest idea what those mean???? google is no help for me either :/
the php manual reads:
[manual]
pdf_open_image
(PHP 4 >= 4.0.5)
pdf_open_image -- Versatile function for images
Description
int pdf_open_image ( int PDF-document, string imagetype, string source, string data, long length, int width, int height, int components, int bpc, string params)
Use image data from a variety of data sources. Supported types are "jpeg", "ccitt", "raw". Supported sources are "memory", "fileref", "url". len is only used for type="raw", params is only used for type="ccitt".
[/manual]
this is really starting to get to me.. i cant store the images on the server itself, i googled for it so many times that i lost count...
what the bugger am i doing wrong? the rest of my PDF document renders just ok.. i just cant get this damm image into the file!! :( :(
this is darnit driving me totally crazy. nobody of wich i spoken to so far knows the awnser to this.. maybe some of you out there do, cuz i am going nutz!
[code]
Function PrintPhoto() {
GLOBAL $pdf, $row, $Base;
$imglen = $Base->GetImageLen($row[Foto]);
$url = "https://
$img = PDF_open_image($pdf, "jpeg" , "url" , $url , $limglen , 88 , 142, 0, 0,"");
PDF_place_image($pdf, $img, 50,550,88);
PDF_close_image($pdf,$img);
PDF_rect($pdf, 50 ,550,88,114);
PDF_stroke($pdf);
}
[/code]
there's my problem.. i managed to get the file size by running another query against my images database. i get the image length thru that so that i can give pdf_open_image its file size. well, now there is a problem to that, the 2 zero's in there.. according to the manual this is supposed to be 1st int bpc, and the other int components .. but i havent got the foggiest idea what those mean???? google is no help for me either :/
the php manual reads:
[manual]
pdf_open_image
(PHP 4 >= 4.0.5)
pdf_open_image -- Versatile function for images
Description
int pdf_open_image ( int PDF-document, string imagetype, string source, string data, long length, int width, int height, int components, int bpc, string params)
Use image data from a variety of data sources. Supported types are "jpeg", "ccitt", "raw". Supported sources are "memory", "fileref", "url". len is only used for type="raw", params is only used for type="ccitt".
[/manual]
this is really starting to get to me.. i cant store the images on the server itself, i googled for it so many times that i lost count...
what the bugger am i doing wrong? the rest of my PDF document renders just ok.. i just cant get this damm image into the file!! :( :(
