Merge branch 'upstream'

Conflicts:
	chant_img.php
This commit is contained in:
jperon 2014-06-30 12:44:34 +02:00
commit 8a5adad71e
2 changed files with 8 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ include/db.php
*~
license.txt
readme.html
index.php
wp-activate.php
wp-admin/
wp-blog-header.php

View File

@ -180,12 +180,19 @@ function makeimgfiles($id, $tex, $suffix = '') {
fclose($f[0]);
chdir(dirname($f[1]));
exec('lualatex --interaction=nonstopmode '.basename($f[1]));
<<<<<<< HEAD
exec('gs -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300x300 -sOutputFile='.$path.'png/'.$id.$suffix.'.png -- '.substr($f[1],0,-4).'.pdf -c quit');
chmod($path.'png/'.$id.$suffix.'.png', 0666);
exec('gs -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r100x100 -sOutputFile='.$path.$id.$suffix.'.png -- '.substr($f[1],0,-4).'.pdf -c quit');
chmod($path.$id.$suffix.'.png', 0666);
=======
>>>>>>> upstream
exec('pdfcrop '.substr($f[1],0,-4).'.pdf '.$path.'pdf/'.$id.$suffix.'.pdf');
chmod($path.'pdf/'.$id.$suffix.'.pdf', 0666);
exec('gs -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=bbox -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300x300 -sOutputFile='.$path.'png/'.$id.$suffix.'.png -- '.$path.'pdf/'.$id.$suffix.'.pdf -c quit');
chmod($path.'png/'.$id.$suffix.'.png', 0666);
exec('gs -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=bbox -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r100x100 -sOutputFile='.$path.$id.$suffix.'.png -- '.$path.'pdf/'.$id.$suffix.'.pdf -c quit');
chmod($path.$id.$suffix.'.png', 0666);
exec('gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=epswrite -dCompatibilityLevel=1.3 -dEmbedAllFonts=true -dSubsetFonts=true -sOutputFile='.$path.'eps/'.$id.$suffix.'.eps '.$path.'pdf/'.$id.$suffix.'.pdf');
chmod($path.'eps/'.$id.$suffix.'.eps', 0666);
unlink($f[1]);