From 889a7c76f6ac2540654af4218bcfce99646c0435 Mon Sep 17 00:00:00 2001 From: Olivier Berten Date: Mon, 22 Mar 2021 23:34:45 +0100 Subject: [PATCH] Allow bigger scores, like passions --- chant_img.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chant_img.php b/chant_img.php index 9ef2030..4c1198e 100644 --- a/chant_img.php +++ b/chant_img.php @@ -87,7 +87,7 @@ function mgabc2tex($c, $firstverse = False) { \documentclass[12pt]{article} \usepackage{geometry} -\geometry{paperwidth=16cm,paperheight=200cm} +\geometry{paperwidth=16cm,paperheight=600cm} \usepackage{gregoriotex} \usepackage{fullpage} \usepackage{multicol} @@ -177,12 +177,12 @@ function makeimgfiles($id, $tex, $suffix = '') { chdir(dirname($f[1])); exec('lualatex --interaction=nonstopmode '.basename($f[1])); exec('lualatex --interaction=nonstopmode '.basename($f[1])); # for variable line height - exec('convert -density 300 '.substr($f[1],0,-4).'.pdf -flatten -trim '.$path.'png/'.$id.$suffix.'.png'); - chmod($path.'png/'.$id.$suffix.'.png', 0666); - exec('convert -resize 33.333333% '.$path.'png/'.$id.$suffix.'.png '.$path.$id.$suffix.'.png'); - chmod($path.$id.$suffix.'.png', 0666); exec('pdfcrop '.substr($f[1],0,-4).'.pdf '.$path.'pdf/'.$id.$suffix.'.pdf'); chmod($path.'pdf/'.$id.$suffix.'.pdf', 0666); + exec('mutool draw -F png -r 300 -o '.$path.'png/'.$id.$suffix.'.png '.$path.'pdf/'.$id.$suffix.'.pdf'); + chmod($path.'png/'.$id.$suffix.'.png', 0666); + exec('mutool draw -F png -r 100 -o '.$path.$id.$suffix.'.png '.$path.'pdf/'.$id.$suffix.'.pdf'); + chmod($path.$id.$suffix.'.png', 0666); exec('mutool draw -F svg -o '.$path.'svg/'.$id.$suffix.'.svg '.$path.'pdf/'.$id.$suffix.'.pdf'); chmod($path.'svg/'.$id.$suffix.'.svg', 0666); exec('gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=eps2write -dCompatibilityLevel=1.3 -dEmbedAllFonts=true -dSubsetFonts=true -sOutputFile='.$path.'eps/'.$id.$suffix.'.eps '.$path.'pdf/'.$id.$suffix.'.pdf');