From 2a8c5e487a1b5644626e55afb0eeaa887579dd98 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 12 Dec 2023 02:18:31 +0100 Subject: [PATCH] avoid %%BeginSetup, %%BeginPageSetup if doing eps --- src/psprint.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/psprint.c b/src/psprint.c index cb282501..b00efea2 100644 --- a/src/psprint.c +++ b/src/psprint.c @@ -1169,13 +1169,15 @@ void create_ps(char **psfile, int what, int fullzoom, int eps) if(what & 2) { /* page */ ++numpages; - fprintf(fd, "%%%%BeginSetup\n"); - fprintf(fd, "<< /PageSize [%g %g] /Orientation 0 >> setpagedevice\n", pagex, pagey); - fprintf(fd, "%%%%EndSetup\n"); - fprintf(fd, "%%%%Page: %d %d\n\n", numpages, numpages); - fprintf(fd, "%%%%BeginPageSetup\n"); - fprintf(fd, "%%%%EndPageSetup\n"); - + + if(!eps) { + fprintf(fd, "%%%%BeginSetup\n"); + fprintf(fd, "<< /PageSize [%g %g] /Orientation 0 >> setpagedevice\n", pagex, pagey); + fprintf(fd, "%%%%EndSetup\n"); + fprintf(fd, "%%%%Page: %d %d\n\n", numpages, numpages); + fprintf(fd, "%%%%BeginPageSetup\n"); + fprintf(fd, "%%%%EndPageSetup\n"); + } /* add small page title */ if(tclgetboolvar("ps_page_title") && fullzoom != 2) fprintf(fd, "/Helvetica FF 10 SCF SF NP 20 %g MT (%s) show\n", pagey - 20, xctx->current_name);