install chrome headless and generate BreeLaPointeResume.pdf from homebrew live

This commit is contained in:
Bel LaPointe
2023-10-19 08:55:19 -06:00
parent 52b7176c69
commit 3062630e1d
2 changed files with 16 additions and 2 deletions

View File

@@ -30,8 +30,22 @@ trap cleanup EXIT
rm -rf $outdir
mkdir -p $outdir/public
cp homebrew/homebrew.html $outdir/public/index.html
cp homebrew/homebrew.pdf $outdir/public/BreeLaPointeResume.pdf
cp -r ./homebrew/fonts $outdir/public/
if which google-chrome-stable; then
echo PRINTING PDF
google-chrome-stable \
--no-sandbox \
--headless \
--disable-gpu \
--print-to-pdf=$outdir/public/BreeLaPointeResume.pdf \
--run-all-compositor-stages-before-draw \
--no-pdf-header-footer \
$outdir/public/index.html
else
cp homebrew/homebrew.pdf $outdir/public/BreeLaPointeResume.pdf
fi
cat $outdir/public/BreeLaPointeResume.pdf | base64 | tr -d '\n'; echo
false
(
if ! which woff2_compress; then