From 96b7bf1452007c6a39105277ade7fa53fb3632b3 Mon Sep 17 00:00:00 2001
From: janneke <janneke>
Date: Wed, 13 Apr 2005 23:10:59 +0000
Subject: [PATCH] ($(outdir)/%.pdf): Bugfix.

---
 make/ly-rules.make | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/make/ly-rules.make b/make/ly-rules.make
index 71c279a155..d276e188ef 100644
--- a/make/ly-rules.make
+++ b/make/ly-rules.make
@@ -34,7 +34,20 @@ $(outdir)/%-book.ps: $(outdir)/%.ps
 	pstops '2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)' $<.tmp $@
 
 $(outdir)/%.pdf: $(outdir)/%.dvi
-	$(cd $(outdir) && dvips $(DVIPS_FLAGS)  -o $(notdir $@).pdfps -t $(DVIPS_PAPERSIZE)  $(notdir $<)  \
+	$(shell cd $(outdir) \
+		&& dvips $(DVIPS_FLAGS) -t $(DVIPS_PAPERSIZE) \
+			-o $(notdir $@).pdfps $(notdir $<) \
+	 	&& gs -dCompatibilityLevel=1.2\
+			-sPAPERSIZE=a4\
+			-q\
+			-dNOPAUSE\
+			-dBATCH\
+			-sDEVICE=pdfwrite\
+			-sOutputFile=$(notdir $@)\
+			-dCompatibilityLevel=1.2\
+			-sPAPERSIZE=a4\
+			-c .setpdfwrite\
+			-f $(notdir $@).pdfps)
 
 $(outdir)/%.html.omf: %.tely
 	$(call GENERATE_OMF,html)
-- 
2.39.5