From e9b4a684b1f0faba2019b16000bc4e049173308a Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 15 Aug 2003 10:11:27 +0000 Subject: Fix bug #119818. 2003-08-15 Christian Persch * embed/mozilla/MozillaPrivate.cpp: (MozillaCollatePrintSettings): Fix bug #119818. --- embed/mozilla/MozillaPrivate.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'embed/mozilla') diff --git a/embed/mozilla/MozillaPrivate.cpp b/embed/mozilla/MozillaPrivate.cpp index 46ece8418..48d29fc10 100644 --- a/embed/mozilla/MozillaPrivate.cpp +++ b/embed/mozilla/MozillaPrivate.cpp @@ -87,7 +87,20 @@ NS_METHOD MozillaCollatePrintSettings (const EmbedPrintInfo *info, options->SetPrintCommand (NS_ConvertUTF8toUCS2(info->printer).get()); - options->SetPrintToFile (info->print_to_file); + /** + * Work around a mozilla bug where paper size & orientation are ignored + * and the specified file is created (containing invalid postscript) + * in print preview mode if we set "print to file" to true. + * See epiphany bug #119818. + */ + if (info->preview) + { + options->SetPrintToFile (PR_FALSE); + } + else + { + options->SetPrintToFile (info->print_to_file); + } /* native paper size formats. Our dialog does not support custom yet */ options->SetPaperSize (nsIPrintSettings::kPaperSizeNativeData); -- cgit v1.2.3