https://bugs.winehq.org/show_bug.cgi?id=55852
Bug ID: 55852 Summary: can't print, even from notepad to pdf Product: Wine Version: 8.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: kadlecf@fzu.cz Distribution: ---
Created attachment 75360 --> https://bugs.winehq.org/attachment.cgi?id=75360 output from notepad, printing to CUPS-PDF with option "[X] Print to file" checked
My wine is packed within the OpenSuse Tumbleweed distribution. I realized I was not able to print from my custom application which has always worked. In the past, printing from the custom application worked - it simply uses the appropriate windows call, and nothing changed in the way printing is implemented there. In the meantime, I only updated wine through distribution updates.
Then I tried notepad. Printing to CUPS printers - which do work otherwise - fails. Sending a print output to a connected printer does not even create an entry in the print queue. Also, I installed the cups-pdf printer and tried to print to a file. The output is attached but the postscript does not render anything else than an empty page.
https://bugs.winehq.org/show_bug.cgi?id=55852
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- cups pdf seems to be working fine for me, I can print from notepad. wine 8.19 on Arch
https://bugs.winehq.org/show_bug.cgi?id=55852
--- Comment #2 from kadlecf@fzu.cz --- With version 8.18, I have tried to print text from notepad as a freshly created testuser; it worked, the text was successfully sent to the printer.
Then I updated to 8.19, after which the printing from notepad for that testuser account stopped working, too (which was perhaps not linked to the version update).
I created another account and was able to print from notepad... but only once. When I restarted notepad, again, printing no longer works.
It seems therefore that printing is possible only once from an account which has not printed before.
https://bugs.winehq.org/show_bug.cgi?id=55852
--- Comment #3 from Fabian Maurer dark.shadow4@web.de --- Did you try a clean WINEPREFIX? I also had print issues right now, but a clean WINEPREFIX seemed to have fixed it.
https://bugs.winehq.org/show_bug.cgi?id=55852
--- Comment #4 from kadlecf@fzu.cz --- (In reply to Fabian Maurer from comment #3)
Did you try a clean WINEPREFIX? I also had print issues right now, but a clean WINEPREFIX seemed to have fixed it.
As you suggested, I have tried that. The result is essentially the same as before: notepad will print only after the first run on a clean WINEPREFIX. Stopping and restarting notepad is sufficient for the printing to stop working. Clearing the WINEPREFIX directory restores the print functionality again.
https://bugs.winehq.org/show_bug.cgi?id=55852
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #5 from Bernhard Übelacker bernhardu@mailbox.org --- I could reproduce the issue with notepad with the following steps: - Create fresh wineprefix - Start notepad once, enter some text, print to the cups PDF printer. This creates a PDF with the entered text and the page footer. - Close notepad. This stores a value iPointSize=0x5a to the registry. - Start notepad a second time. This reads the iPointSize=0x5a from registry. Unfortunately the main window is not yet created, therefore GetDpiForWindow returns 0, which makes Globals.lfFont.lfHeight being 0 too. - Entering some text now and printing to the cups PDF printer produces now just a PDF containing one empty page.
For this issue I created this MR: https://gitlab.winehq.org/wine/wine/-/merge_requests/4442
But this should not affect other "custom applications", except if they query the notepad configuration.
https://bugs.winehq.org/show_bug.cgi?id=55852
--- Comment #6 from kadlecf@fzu.cz --- (In reply to Bernhard Übelacker from comment #5)
I could reproduce the issue with notepad with the following steps:
- Create fresh wineprefix
- Start notepad once, enter some text, print to the cups PDF printer. This creates a PDF with the entered text and the page footer.
- Close notepad. This stores a value iPointSize=0x5a to the registry.
- Start notepad a second time. This reads the iPointSize=0x5a from registry. Unfortunately the main window is not yet created, therefore GetDpiForWindow returns 0, which makes Globals.lfFont.lfHeight being 0 too.
- Entering some text now and printing to the cups PDF printer produces now just a PDF containing one empty page.
For this issue I created this MR: https://gitlab.winehq.org/wine/wine/-/merge_requests/4442
But this should not affect other "custom applications", except if they query the notepad configuration.
Thank you for confirming the behavior of notepad I noticed. Obviously, you are right that this can hardly affect other applications, so I think that this bug issue can be closed. In the meantime, an inquiry into the reasons of my printing problems has shown other problems in the code which do not seem quite easy to pinpoint yet. If I am able to advance further, I will file another bug report.
https://bugs.winehq.org/show_bug.cgi?id=55852
--- Comment #7 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to kadlecf from comment #6)
Thank you for confirming the behavior of notepad I noticed. Obviously, you are right that this can hardly affect other applications, so I think that this bug issue can be closed. In the meantime, an inquiry into the reasons of my printing problems has shown other problems in the code which do not seem quite easy to pinpoint yet. If I am able to advance further, I will file another bug report.
Thanks, the merge request got commited, maybe you can check with the patch or with the wine release, and if notepad works as expected change this bug to resolved fixed, as I don't have permission to.
https://gitlab.winehq.org/wine/wine/-/commit/feda122578890c28d3b02bed1c4d9ec...
https://bugs.winehq.org/show_bug.cgi?id=55852
--- Comment #8 from kadlecf@fzu.cz --- (In reply to Bernhard Übelacker from comment #7)
(In reply to kadlecf from comment #6)
Thank you for confirming the behavior of notepad I noticed. Obviously, you are right that this can hardly affect other applications, so I think that this bug issue can be closed. In the meantime, an inquiry into the reasons of my printing problems has shown other problems in the code which do not seem quite easy to pinpoint yet. If I am able to advance further, I will file another bug report.
Thanks, the merge request got commited, maybe you can check with the patch or with the wine release, and if notepad works as expected change this bug to resolved fixed, as I don't have permission to.
https://gitlab.winehq.org/wine/wine/-/commit/ feda122578890c28d3b02bed1c4d9ec91098f05b
Sorry, but as a simple wine user I do not know how to apply the patch. It would be easier for me to wait until the patch is included in the next release, is that OK?
https://bugs.winehq.org/show_bug.cgi?id=55852
--- Comment #9 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to kadlecf from comment #8)
Thanks, the merge request got commited, maybe you can check with the patch or with the wine release, and if notepad works as expected change this bug to resolved fixed, as I don't have permission to.
Sorry, but as a simple wine user I do not know how to apply the patch. It would be easier for me to wait until the patch is included in the next release, is that OK?
Sorry, that was my mistake, I wanted to write "or with the next wine release".
https://bugs.winehq.org/show_bug.cgi?id=55852
--- Comment #10 from kadlecf@fzu.cz --- (In reply to Bernhard Übelacker from comment #9)
(In reply to kadlecf from comment #8)
Thanks, the merge request got commited, maybe you can check with the patch or with the wine release, and if notepad works as expected change this bug to resolved fixed, as I don't have permission to.
Sorry, but as a simple wine user I do not know how to apply the patch. It would be easier for me to wait until the patch is included in the next release, is that OK?
Sorry, that was my mistake, I wanted to write "or with the next wine release".
I see, OK. I will check, it should be the 8.21 release if I am correct.
https://bugs.winehq.org/show_bug.cgi?id=55852
--- Comment #11 from kadlecf@fzu.cz --- (In reply to kadlecf from comment #10)
(In reply to Bernhard Übelacker from comment #9)
(In reply to kadlecf from comment #8)
Thanks, the merge request got commited, maybe you can check with the patch or with the wine release, and if notepad works as expected change this bug to resolved fixed, as I don't have permission to.
Sorry, but as a simple wine user I do not know how to apply the patch. It would be easier for me to wait until the patch is included in the next release, is that OK?
Sorry, that was my mistake, I wanted to write "or with the next wine release".
I see, OK. I will check, it should be the 8.21 release if I am correct.
After an update, in my wine-8.21, the bug is resolved indeed.
https://bugs.winehq.org/show_bug.cgi?id=55852
kadlecf@fzu.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #12 from kadlecf@fzu.cz --- After an update, in my wine-8.21, the bug is resolved indeed.
https://bugs.winehq.org/show_bug.cgi?id=55852
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.0-rc1.