&1 > $filename ")) === "404") { header('Content-Type: application/json; charset=UTF-8'); header('Status: 404'); header('Content-Length: 22'); echo "{\"error\":\"not found\"}\n"; exit; } header('Content-Type: application/pdf'); header('Content-Length: ' . filesize($filename)); header('Content-Disposition: inline; filename="' . $pdfName . '"'); readfile($filename);