Exported PDF files can have wrong page size

• Nov 20, 2022 - 16:52
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
needs info
Regression
No
Workaround
No
Project

When exporting a PDF file from MuseScore, the resulting PDF file can have a slightly wrong page size. For example, A4 is 210x297mm, but the exported file has 209,9x297mm. With Letter this seems to not occur.

(Could it be the case that MuseScore calculates page size in inches instead of milimeters?)

Steps to reprodute:
1) Open MuseScore
2) Create an empty score
3) Set page size
4) Export to PDF
5) Open the PDF file in a PDF reader that can show file properties

Why is this important?
This can be problematic (or at least not ideal) if you're assembling pages from different sources. For example, I'm assembling a teaching material with parts made in other apps, and a central part with scores from MuseScore. When merging the various PDF files, they'll have slightly different page sizes.

Reported also in https://github.com/musescore/MuseScore/issues/14666 for MS4.


Comments

I couldn't reproduce:
1] done, 2] done, 3] size set to A4, 4] exported as PDF
5] opened with Okular - page is unchanged (A4 210x297mm)
rubb_A4.png

I think you'll find different behavior depending on whether A4 is already your default as per your default printer's default paper size, or whether you explicitly set A4 in Format / Page Settings. Also, there was likely a change around 3.5 or 3.6. That's because the page size is represented in inches, and A4 size is based on cm, and there will always be some roundoff error there. Probably some programs will round off when showing the page size, others will show it as 210.03 mm or whatever.