aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term_ps.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-10-25 20:48:48 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-10-25 20:48:48 +0000
commit0a6870bb8da5aa8cf6bb45c632846ec269ad95c3 (patch)
tree5b71d323078e167e65fbf932ba73ec265e466501 /term_ps.c
parent510dcb54fd61cdb212e16acc8c5bd71017f5b8e7 (diff)
downloadmandoc-0a6870bb8da5aa8cf6bb45c632846ec269ad95c3.tar.gz
mandoc-0a6870bb8da5aa8cf6bb45c632846ec269ad95c3.tar.zst
mandoc-0a6870bb8da5aa8cf6bb45c632846ec269ad95c3.zip
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.
Diffstat (limited to 'term_ps.c')
-rw-r--r--term_ps.c4
1 files changed, 1 insertions, 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 <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;