comparison_pdfs.sh 332 Bytes
Newer Older
1 2 3
#!/bin/bash
for filename in public/comparison/pdfs/*.html; do
  pdffilename=${filename/.html/.pdf}
4
  pdffilename=${pdffilename/public/source}
5 6 7 8
  echo "👉  Generating PDF for $filename..."

  wkhtmltopdf --margin-left 0 --margin-right 0 --margin-top 0 --zoom 3 $filename $pdffilename

9
  echo "✅  PDF $pdffilename generated!"
10
done