Files
luos/thirdparty/html2ps_pdf/destination._http.class.php
Paula Quispe 9eb7d6cac2 HOR-2689
2017-08-03 17:00:30 -04:00

24 lines
618 B
PHP

<?php
class DestinationHTTP extends Destination {
function DestinationHTTP($filename) {
$this->Destination($filename);
}
function headers($content_type) {
die("Unoverridden 'header' method called in ".get_class($this));
}
function process($tmp_filename, $content_type) {
header("Content-Type: ".$content_type->mime_type);
$headers = $this->headers($content_type);
foreach ($headers as $header) {
header($header);
};
// NOTE: readfile does not work well with some Windows machines
// echo(file_get_contents($tmp_filename));
readfile($tmp_filename);
}
}
?>