summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_quarto.yml4
-rwxr-xr-xbin/pdfcompress.sh10
2 files changed, 14 insertions, 0 deletions
diff --git a/_quarto.yml b/_quarto.yml
index da6255e..7a32c70 100644
--- a/_quarto.yml
+++ b/_quarto.yml
@@ -1,5 +1,9 @@
project:
type: website
+ post-render:
+ - bin/pdfcompress.sh _site/tryk/oroeposten_1.pdf
+ - bin/pdfcompress.sh _site/tryk/oroeposten_promo_1.pdf
+ - bin/pdfcompress.sh _site/tryk/spiseseddel1.pdf
website:
title: Orøposten
diff --git a/bin/pdfcompress.sh b/bin/pdfcompress.sh
new file mode 100755
index 0000000..3fecd8f
--- /dev/null
+++ b/bin/pdfcompress.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -au
+
+INFILE=$1
+
+[ -n "$QUARTO_PROJECT_RENDER_ALL" ] || exit
+
+ps2pdf -dPDFSETTINGS=/printer "$INFILE" "$INFILE"~
+mv --force "$INFILE"~ "$INFILE"