diff options
author | Hib Eris <hib@hiberis.nl> | 2013-11-15 19:55:19 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2013-11-15 19:55:19 +0100 |
commit | f905d804c0d1c715d8423938f41b5a002c0ef15d (patch) | |
tree | 3652c1ae7ea0a29838d62961e7b78a7d778d4042 | |
parent | 7c74bccdf514cce05987dde7fb1cce4ac65ff025 (diff) |
Do not close stdout in pdftotext
Bug #71639
-rw-r--r-- | utils/pdftotext.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc index 3b8b69f2..c5923298 100644 --- a/utils/pdftotext.cc +++ b/utils/pdftotext.cc @@ -18,7 +18,7 @@ // Copyright (C) 2006 Dominic Lachowicz <cinamod@hotmail.com> // Copyright (C) 2007-2008, 2010, 2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009 Jan Jockusch <jan@jockusch.de> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> +// Copyright (C) 2010, 2013 Hib Eris <hib@hiberis.nl> // Copyright (C) 2010 Kenneth Berland <ken@hero.com> // Copyright (C) 2011 Tom Gleason <tom@buildadam.com> // Copyright (C) 2011 Steven Murdoch <Steven.Murdoch@cl.cam.ac.uk> @@ -367,7 +367,9 @@ int main(int argc, char *argv[]) { } fprintf(f, "</doc>\n"); } - fclose(f); + if (f != stdout) { + fclose(f); + } } else { textOut = new TextOutputDev(textFileName->getCString(), physLayout, fixedPitch, rawOrder, htmlMeta); |