[Mac] Page layout incorrect when printing via CMD-P (does not match Page Settings)

• Apr 5, 2013 - 15:51
S5 - Suggestion

If I print using CMD-P on the Mac, I get different results than when using Export > PDF.

Using CMD-P, the margins are off and the title is off the page. See attachments:

- title-print.pdf : result of CMD-P
- title-export.pdf : result of Export > PDF

Attachment Size
title-print.pdf 22.79 KB
title-export.pdf 20.19 KB


Could this be simply a problem related to page size?
The pdf from export ("title-export.pdf") is A4, while the pdf from CMD-P ("title-print.pdf") is Letter.
Can you try to change the page size of the score and see if it gives the same problem?
[ Layout -> Page Settings ]

I'll try setting the page size this evening. Printing the same file from the non-development version on this machine has been fine so I didn't think to check the settings.

OK - changing the page to "Letter" in Layout > Page Settings did the trick.

So, maybe the bug is that Export > PDF used something other than the settings from Layout > Page Settings?

This is on OS X 10.8.3. I was printing to PDF so no printer involved.

OK - here's what I see.

Creating a new project from a template, say "Jazz Lead Sheet" creates a project that is formatted for "Letter" pages.
Creating a new project from "scratch" creates a project that is formatted for "A4" pages.

However, when I print using CMD-P, it is set to "US Letter" regardless of the setting in Layout > Page Settings...

I think the bug is that the OS print panel should be initialized to the same value as set in Layout > Page Settings... so that the page prints / generates PDF properly from this panel.

As an example, try these steps in TextEdit.app on the Mac:

1. launch TextEdit
2. create a new document
3. go to File > Page Setup...
4. select a different page size than is displayed and press OK
5. bring up the print panel using File > Print... (CMD-P)
6. enable details by clicking "Show Details" if needed
7. observe the "Paper Size" setting, it should match what you selected in step #4

Title [Mac] Page layout incorrect when printing via CMD-P but correct when using Export > PDF [Mac] Page layout incorrect when printing via CMD-P (does not match Page Settings)

Updated title

Difference between the jazz leadsheet and a newly created score is on purpose. The Jazz leadsheet is configured to be Letter and new document default to A4.

The page size is set by MuseScore when printing, at least is in the code... Maybe there is a bug in Qt. I couldn't find a reference yet. Something worth to try would be to pass a PaperSize when not custom instead of QSizeF.

See https://bugreports.qt-project.org/browse/QTBUG-8149

It is somewhat unfortunate, I guess, that templates are tied to specific page sizes. No matter which size you use in a template, it's wrong for part of the world. Is this worth a separate discussion somewhere? I wonder how other programs that deal with the printed page deal with this?