Show
Ignore:
Timestamp:
02/26/06 13:42:16 (3 years ago)
Author:
schst
Message:

Fixed bug #153: pdflatex stops on errors (patch by p_ansell <at> yahoo [dot] com

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/patTemplate/OutputFilter/PdfLatex.php

    r355 r426  
    99 * @author      Stephan Schmidt <schst@php.net> 
    1010 */ 
    11   
     11 
    1212/** 
    1313 * patTemplate output filter that creates PDF files from latex 
     
    3434                           'cacheFolder' => './' 
    3535                       ); 
    36      
     36 
    3737   /** 
    3838    * tidy the data 
     
    4545    { 
    4646        $cacheFolder = $this->getParam('cacheFolder'); 
    47         $texFile     = tempnam($cacheFolder, 'pt_tex_')
     47        $texFile     = tempnam($cacheFolder, 'pt_tex_') . '.tex'
    4848        $fp = fopen($texFile, 'w'); 
    4949        fwrite($fp, $data); 
    5050        fclose($fp); 
    51          
    52         $command = 'pdflatex '.$texFile; 
     51 
     52        $command = 'pdflatex --interaction=nonstopmode '.$texFile; 
    5353        exec($command); 
    5454        exec($command); 
    55          
     55 
    5656        $pdf = $texFile . '.pdf'; 
    5757        $pdf = file_get_contents($pdf); 
    58          
     58 
    5959        return $pdf; 
    6060    }