I was wondering if its possible to add text on the fly on a PDF download when using the below code, I've been unable to get it to work, I've tried echoing it and adding it to the var that the files being stored to with no luck, any ideas?
Code:
$chunksize = 1*($fileChunkSize); $bytes_send = 0; if ($file = fopen($file, 'r')) { if(isset($_SERVER['HTTP_RANGE'])) fseek($file, $range); while(!feof($file) && (!connection_aborted()) && ($bytes_send<$new_length)) { $buffer = fread($file, $chunksize); print($buffer); flush(); $bytes_send += strlen($buffer); } fclose($file); } else die('Error - can not open file.');
Comment