Skip to content

Conversation

@juli27
Copy link
Contributor

@juli27 juli27 commented Oct 14, 2025

Resolves: #30515

I was in this area of the code somewhat recently (while experimenting with a Windows print provider1), so I immediately had an idea which line could be causing the behavior mentioned in the issue. However, I couldn't verify the fix because none of my printers support the system color setting.

The call to QPrinter::setColorMode seems unnecessary (it stems from the initial commit2)

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

Footnotes

  1. https://github.com/juli27/MuseScore/tree/modernizePrintingWindows

  2. https://github.com/musescore/MuseScore/blame/v3.6.2/mscore/file.cpp#L1831

@cbjeukendrup
Copy link
Member

@DmitryArefiev It was reported here that this indeed fixes the linked issue, but it would be good to do a quick regression check (check that scores are not unexpectedly printed in black and white instead of in colour)
It seems highly unlikely to me that there are regressions, but let's check it anyway, so that we can add it to 4.6.3 (it's a Hal Leonard requirement)

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 16, 2025
@Jojo-Schmitz
Copy link
Contributor

Maybe it should even default to GrayScale?
Or get set to GrayScale if the score doesn't use any colors (expect black and maybe shades of gray)? Would certainly save precious ink.

@juli27
Copy link
Contributor Author

juli27 commented Oct 19, 2025

I don't think defaulting to greyscale is a good idea. A user who is used to their default settings might be surprised by the lack of color (which is much more noticeable than printing a grayscale score with color) and might result in them needing to print again with corrected settings.
If there were a method to quickly check that no colors are used in the score, then yes, that would be nice. But I don't think there's a way to easily check that.

@Jojo-Schmitz
Copy link
Contributor

True, this should be done for b/w scores only

@cbjeukendrup
Copy link
Member

If I understand correctly how cymk works, I think it would make more sense to ensure that rgb(0, 0, 0) is always converted to cymk(0%, 0%, 0%, 100%) rather than cymk(100%, 100%, 100%, 100%), regardless of whether the score also contains elements that are not black.
(But needles to say, that's for a different PR)

@Jojo-Schmitz
Copy link
Contributor

Ah, yes, that should sort the ink waste

@cbjeukendrup cbjeukendrup mentioned this pull request Oct 20, 2025
@DmitryArefiev
Copy link
Contributor

DmitryArefiev commented Oct 20, 2025

It was reported #30515 (comment) that this indeed fixes the linked issue, but it would be good to do a quick regression check (check that scores are not unexpectedly printed in black and white instead of in colour)

@cbjeukendrup Printed on physical printer or virtual printer?
On all OSs?

@cbjeukendrup
Copy link
Member

If we want to be really sure, we should perhaps check physical and virtual printer on each OS...

But maybe it's enough to check just physical printer on Windows & Mac.

@DmitryArefiev
Copy link
Contributor

I have only black and white printer..

Checked on built-in virtual printer on Win10, Mac13.7.8, LinuxUbuntu24.04.3. All fine

@DmitryArefiev DmitryArefiev merged commit bc5c5cb into musescore:master Oct 20, 2025
12 checks passed
@juli27 juli27 deleted the fixPrinterColorModeDefault branch October 20, 2025 18:13
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Printing to PDF (using Adobe PDF as the printer option) doesn't follow all of the set printing preferences

4 participants