Forum Moderators: coopster
$LabelImage = "$DeliveryConfirmationLabel[1]";
echo base64_decode($LabelImage);
when i echo the file apears in a pdf viewer..
so far i have tryed to save the file but i just can't seem to get it to work.... here is my code
$LabelImage = "$DeliveryConfirmationLabel[1]";
$decodeimage = base64_decode($LabelImage);
this so far i know works...
and then something like this
$data = $decodeimage;
header('Content-type: application/pdf');
header('Content-disposition: inline; filename=decodedimage.pdf');
header('Content-length: ' . strlen($data));
then something like this
fwrite($data, decodedimage.pdf)
I don't have a good grasp of what is going on...
i am having a hard time with fwrite() all the examples i read have me open a file with
$filepointer = fopen("nameoffile.txt","w")
and then it has me close the file with
fclose($filepointer)
or fwrite
but they are making the assumption that i have a saved file that i am working with... which i don't
you're using fwrite() [de2.php.net] falsely. next to
$datait needs a filepointer as parameter. you get one by using fopen() on a filename. fwrite is binary safe, so after fopen, fwrite and fclose your file should be readable.