After reading the online documentation, it appears that I should be using the following code, however it does not appear to work. Are there some obvious errors?

        if ($row) {
          $pdf_file = $row->CLM_IMG_FILE;
          $msg = $pdf_file;
          $SRC_FILE = "/tmp/" . $pdf_file;
          $download_size = filesize($SRC_FILE);
          $filename = basename($SRC_FILE);
//print("Filename: " . $filename . "<br>");
//print("SRC_FILE: " . $SRC_FILE . "<br>");
//print("Size: " . $download_size . "<br>");
          header("Content-Type: application/pdf");
          header("Content-Disposition: inline; filename=image.pdf");
          //header("Content-Disposition: attachment; filename=image.pdf");
          header("Content-Length: $download_size");
          header("Connection: close");
          readfile($SRC_FILE);
        } else {
          $msg = "Cannot find the claim";
        }

Todd

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to