From 93f07dff389a4742e241fb70f3d109fc2a2ce784 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Fri, 15 Nov 2013 12:11:26 +0100 Subject: [PATCH] Do not close stdout in pdftotext --- utils/pdftotext.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc index f7b2b0e..f2d7233 100644 --- a/utils/pdftotext.cc +++ b/utils/pdftotext.cc @@ -18,7 +18,7 @@ // Copyright (C) 2006 Dominic Lachowicz // Copyright (C) 2007-2008, 2010, 2011 Albert Astals Cid // Copyright (C) 2009 Jan Jockusch -// Copyright (C) 2010 Hib Eris +// Copyright (C) 2010, 2013 Hib Eris // Copyright (C) 2010 Kenneth Berland // Copyright (C) 2011 Tom Gleason // Copyright (C) 2011 Steven Murdoch @@ -367,7 +367,9 @@ int main(int argc, char *argv[]) { } fprintf(f, "\n"); } - fclose(f); + if (f != stdout) { + fclose(f); + } } else { textOut = new TextOutputDev(textFileName->getCString(), physLayout, fixedPitch, rawOrder, htmlMeta); -- 1.8.1.2