I have a service from angular.js that call directly to node.js and everything is fine, the pdf file is application/pdf.
when I added php as middle server I run this code :
$output = callToExport();
header('Content-type: application/pdf');
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Content-Disposition: inline;filename=myfile.pdf'");
header("Content-length: ".strlen($output));
echo $output;
then in angularjs the result is a BLOB but the type is text/HTML
how can I fix that? I just need to get result from pdf service and returned it back