From 0a6870bb8da5aa8cf6bb45c632846ec269ad95c3 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 25 Oct 2017 20:48:48 +0000 Subject: The page footer line (psmarg) is created in ps_begin(), and the last call writing to it is always ps_endline(), which ends with ps_pclose(), which prints "ET" (end text). Consequently, do not print another instance of "ET" in ps_closepage() after the footer line and before the "endstream" for the page. Fixing a PDF syntax error found while investigating the bug report from Jan Stary that also resulted in the previous commit. --- term_ps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/term_ps.c b/term_ps.c index 93b0fc38..8677cbbe 100644 --- a/term_ps.c +++ b/term_ps.c @@ -1,4 +1,4 @@ -/* $Id: term_ps.c,v 1.86 2017/10/25 18:52:06 schwarze Exp $ */ +/* $Id: term_ps.c,v 1.87 2017/10/25 20:48:48 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -742,8 +742,6 @@ ps_closepage(struct termp *p) ps_printf(p, "%s", p->ps->psmarg); if (TERMTYPE_PS != p->type) { - ps_printf(p, "ET\n"); - len = p->ps->pdfbytes - p->ps->pdflastpg; base = p->ps->pages * 4 + p->ps->pdfbody; -- cgit v1.2.3