CMS  Version 3.9
generate.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("pdf");
3 
4 $uri = $_GET["uri"];
5 
6 $file = basename(preg_replace("/\\?.*/", "", $uri)) . ".pdf";
7 
8 $pdf = new PDF($uri, false, isset($user));
9 $output = $pdf->generate();
10 $size = strlen($output);
11 
12 header("Content-Type: application/pdf");
13 header("Content-Disposition: attachment;filename=\"" . $file . "\"");
14 header("Content-Length: $size");
15 echo $output;
16 ?>
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
Definition: pdf.inc:359
global $user
$uri
Definition: generate.inc:4
$output
Definition: generate.inc:9
$pdf
Definition: generate.inc:8
$file
Definition: generate.inc:6
$size
Definition: generate.inc:10