Code: Select all
// ... controller:action starts
$response->setHeader('Content-Description', 'File Transfer');
$response->setHeader('Content-Disposition', 'attachment; filename=diagram.pdf');
$response->setHeader('Content-type', 'application/pdf');
$response->setHeader('Cache-Control', '');
$response->setHeader('Pragma', '');
$response->setContent($buff);
return true;
// ... controller:action finishedThe field type is BLOG. I'm using a simple SELECT data_buffer from table type query - is there special handing required for BLOB's? The PDF magic bytes appear to be present in the first 5 of so bytes of the output so i'm assuming the corrupt is being caused by missing data - not why or how to fix this anyone have any similar experience?
Cheers,
Alex