summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorHib Eris <hib@hiberis.nl>2013-11-15 19:55:19 +0100
committerAlbert Astals Cid <aacid@kde.org>2013-11-15 20:26:54 +0100
commit97910b9eb92df49757915bde02e0d54de04552d4 (patch)
tree6dcd330cb1da178ffbb84fc2d69265615a606022 /utils
parenta23c9ad4c0536d680bedc563444ce3adf6e1ee9e (diff)
Do not close stdout in pdftotext
Bug #71639
Diffstat (limited to 'utils')
-rw-r--r--utils/pdftotext.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc
index f7b2b0e5..f2d72333 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);