diff options
| author | polo <ordipolo@gmx.fr> | 2022-12-14 12:52:11 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2022-12-14 12:52:11 +0100 |
| commit | a45a3e0345890b9df3c5fa7c82966a64491eca02 (patch) | |
| tree | e56b328a497cc315095dbf7f513f2ceb76d4351b /php/latexToPdf.php | |
| parent | eda2e96c17d8d22cfc2615698efa5c757dbfb0a5 (diff) | |
| download | AppliGestionPHP-a45a3e0345890b9df3c5fa7c82966a64491eca02.tar.gz AppliGestionPHP-a45a3e0345890b9df3c5fa7c82966a64491eca02.tar.bz2 AppliGestionPHP-a45a3e0345890b9df3c5fa7c82966a64491eca02.zip | |
MODEL + reorganisation
Diffstat (limited to 'php/latexToPdf.php')
| -rw-r--r-- | php/latexToPdf.php | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/php/latexToPdf.php b/php/latexToPdf.php deleted file mode 100644 index 18ff452..0000000 --- a/php/latexToPdf.php +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | // php/latexToPdf.php | ||
| 3 | |||
| 4 | // contenu | ||
| 5 | $latex = '\documentclass{article} | ||
| 6 | |||
| 7 | \usepackage[french]{babel} | ||
| 8 | \usepackage[utf8]{inputenc} | ||
| 9 | \usepackage[T1]{fontenc} | ||
| 10 | |||
| 11 | \begin{document} | ||
| 12 | Bravo, ça compile !! | ||
| 13 | \end{document}'; | ||
| 14 | |||
| 15 | $fileName = 'latex.tex'; | ||
| 16 | $latexPath = ''; | ||
| 17 | $pdfPath = ''; | ||
| 18 | |||
| 19 | //~ writeLatex($latex, $fileName, $latexPath); | ||
| 20 | |||
| 21 | function latexToPdf(string $fileName, string $latexPath, string $pdfPath) | ||
| 22 | { | ||
| 23 | $outputDir = ''; | ||
| 24 | if($pdfPath !== '') | ||
| 25 | { | ||
| 26 | $outputDir = '-output-directory=' . $pdfPath . ' '; | ||
| 27 | } | ||
| 28 | |||
| 29 | // compilation | ||
| 30 | exec('pdflatex ' . $outputDir . $latexPath . $fileName); | ||
| 31 | |||
| 32 | // nettoyage | ||
| 33 | $basename = basename($fileName, '.tex'); | ||
| 34 | unlink($pdfPath . $basename . '.aux'); | ||
| 35 | unlink($pdfPath . $basename . '.log'); | ||
| 36 | } | ||
| 37 | |||
| 38 | //~ latexToPdf($fileName, $latexPath, $pdfPath); | ||
