Closed Bug 691430 Opened 13 years ago Closed 2 years ago

[Linux] Stale pref data (possibly "print_to_filename") makes print-to-file default to PS format, which triggers ".ps" hidden-file bug

Categories

(Core :: Printing: Setup, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dholbert, Unassigned)

References

Details

As noted in Bug 485067 comment 21, we now default to PDF format for print-to-file on Linux.

However, as noted the subsequent comments there, there can apparently be stale pref data in existing profiles that makes us default to PS format instead -- and as a result, we hit a GTK bug that makes the default filename ".ps" instead of "mozilla.ps"

Filing this bug on tracking down whatever that stale profile state is that makes us default to PS format.
In one case (my profile), the stale default-to-PS state mysteriously fixed itself.
In another case (Jonathan Kamens), removing "print_to_filename" prefs fixed the issue.

I'm not sure how "print_to_filename" comes into play, though, because his (buggy) profile and my (non-buggy) profile had similar values.  (absolute paths to non-dotfile PS filenames)
(In reply to Daniel Holbert [:dholbert] from comment #0)
> and as a result, we hit a GTK bug that makes the default filename
> ".ps" instead of "mozilla.ps"

(that's https://bugzilla.gnome.org/show_bug.cgi?id=603823 btw)
These setting seem to be loaded/saved by this class src/widget/src/xpwidgets/nsPrintOptionImpl.cpp
It looks to me as if the stale prefs data is an entry in the "prefs.js" file relating to the DEFAULT printer: "printer_<defaultPrinterName>.print_to_filename", not the "printer_Print_to_File" entry. 

This entry isn't used (at least in my Ubuntu 11.10), as printing to file is done via a specific "print to file" profile, not via the profile of an existing printer.

In a pre-existing profile, this had the value: "/home/brian/mozilla.ps", and that profile was exhibiting the behaviour in the Description above. Changing the value to "/home/brian/mozilla.pdf" and restarting Firefox resolved the problem.

In my case the line was:
  user_pref("printer_HL2240D.print_to_filename", "/home/brian/mozilla.ps");
Changing the ".ps" to ".pdf" fixed it.

This worked in both a current merge (firefox-9.0a2.en-US.linux-i686) and the Ubuntu package version (7.0.1) - in both cases, editing the line in the profile.js file of an existing profile caused the "Print to file" dialogue box to present the "PDF" radio button as selected and the offered filename to be a "mozilla.pdf", not just ".pdf".
(In reply to Brian Marriott from comment #4)
> It looks to me as if the stale prefs data is an entry in the "prefs.js" file
> relating to the DEFAULT printer:
> "printer_<defaultPrinterName>.print_to_filename", not the
> "printer_Print_to_File" entry. 
[...]
> In my case the line was:
>   user_pref("printer_HL2240D.print_to_filename", "/home/brian/mozilla.ps");
> Changing the ".ps" to ".pdf" fixed it.

I think you're right -- ddahl had the same experience, as noted in bug 712479 comment 0.

PostScript printing support was removed long ago.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.