Changeset 426 for trunk/patTemplate/OutputFilter
- Timestamp:
- 02/26/06 13:42:16 (3 years ago)
- Files:
-
- trunk/patTemplate/OutputFilter/PdfLatex.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/patTemplate/OutputFilter/PdfLatex.php
r355 r426 9 9 * @author Stephan Schmidt <schst@php.net> 10 10 */ 11 11 12 12 /** 13 13 * patTemplate output filter that creates PDF files from latex … … 34 34 'cacheFolder' => './' 35 35 ); 36 36 37 37 /** 38 38 * tidy the data … … 45 45 { 46 46 $cacheFolder = $this->getParam('cacheFolder'); 47 $texFile = tempnam($cacheFolder, 'pt_tex_') ;47 $texFile = tempnam($cacheFolder, 'pt_tex_') . '.tex'; 48 48 $fp = fopen($texFile, 'w'); 49 49 fwrite($fp, $data); 50 50 fclose($fp); 51 52 $command = 'pdflatex '.$texFile;51 52 $command = 'pdflatex --interaction=nonstopmode '.$texFile; 53 53 exec($command); 54 54 exec($command); 55 55 56 56 $pdf = $texFile . '.pdf'; 57 57 $pdf = file_get_contents($pdf); 58 58 59 59 return $pdf; 60 60 }
