Bug 1005071 - firefox does not print to a pdf file when the default file name is just accepted and not edited
Summary: firefox does not print to a pdf file when the default file name is just acce...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk2
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-06 07:50 UTC by Mike FABIAN
Modified: 2015-06-29 12:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 12:20:15 UTC
Type: Bug


Attachments (Terms of Use)
firefox-does-not-print-to-pdf-file-when-file-name-is-not-edited.ogv (3.17 MB, video/ogg)
2013-09-06 07:50 UTC, Mike FABIAN
no flags Details

Description Mike FABIAN 2013-09-06 07:50:44 UTC
Created attachment 794604 [details]
firefox-does-not-print-to-pdf-file-when-file-name-is-not-edited.ogv

When trying to print a page to a pdf file from firefox

the file name is by default:

     mozilla.pdf

and the folder is my home directory.

When I just accept these default and click on “print”, the file
~mfabian/mozilla.pdf is not created though.

However, when I edit the “mozilla.pdf” slightly (removing the last “f”
by typing backspace and then adding the “f” again) the printing
works and the file mozilla.pdf is created.

When I try to print yet another page, the problem repeats.
One *always* has to do some editing of the file name, otherwise
the file will not be created when clicking on “print”.

For example, if I change mozilla.pdf to mfabian.pdf I can print
once to mfabian.pdf successfully. When trying to print the
next page, one can see that the new default filename "mfabian.pdf"
has been remembered. But just clicking on “print” does not print to
the file. Again one has to edit the filename a bit to be able to print.

I can reproduce this on Fedora-20-Alpha-TC4-x86_64-netinst.iso
with firefox-23.0.1-4.fc20.x86_64.

See attached video.

I can also reproduce this on Fedora 19 with firefox-23.0.1-3.fc19.x86_64.

Comment 1 Martin Stransky 2013-09-06 08:51:05 UTC
Good catch, Thanks! Jan, could you look at it? IIRC you have similar bug somewhere.

Comment 2 Jan Horak 2013-09-10 15:09:20 UTC
This is actually bug in gtk2. 
The 
gtk_print_settings_set(mPrintSettings, "output-uri", "file:///home/jhorak/mozilla.pdf");
is called before print dialog appears and it seems to be correctly initialized because Name and Save in folder inputs are filled but subsequent call of gtk_print_settings_get(mPrintSettings, "output-uri") without changing Name or Save in folder inputs returns empty string.

When gtk_print_unix_dialog_get_settings is used to get settings from dialog to store them to browser preferences (to be able to restore it next time) the dialog only returns following options:
    [0x7fffc0250400 "gtk-main-page-custom-input"] = 0x7fffc04168c0, 
    [0x7fffbd8ff0c0 "gtk-n-up"] = 0x7fffc04fa300,
    [0x7fffc0250b00 "output-file-format"] = 0x7fffc0417f60
There's no "output-uri" so when later the file_printer_get_settings_from_options is trying to set printer settings an empty string is used. Maybe it's because output-uri is part of gtkprintbackendfile?

I can reproduce on Fedora 19 with gtk2-2.24.19-3.fc19.x86_64.

Comment 3 Reik Red 2014-12-14 21:58:23 UTC
The bug is still there in fedora 19 with gtk2 upgraded to gtk2-2.24.22-2.fc19. It's been 15 months, I'm surpised it has not been fixed yet in gtk2.

Comment 4 Mike FABIAN 2015-04-20 14:40:55 UTC
It works in Fedora 22 Beta with gtk2-2.24.27:

[mfabian@Fedora-Live-Workstation-x86_64-2 LC_MESSAGES]$ rpm -q gtk2
gtk2-2.24.27-1.fc22.x86_64
[mfabian@Fedora-Live-Workstation-x86_64-2 LC_MESSAGES]$

Comment 5 Fedora End Of Life 2015-05-29 09:22:20 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2015-06-29 12:20:15 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.