musescore / musescore/MuseScore
Exporting SVG - differs between CLI and GUI
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Issue type
Import/export issue
Bug description
When exporting to SVG, the result is sligtly different between using CLI "mscore -o output.svg input.mscz" and the Export/SVG dialog in the GUI. When opening the CLI-SVG in Inkscape and selecting all (CTRL-A) not only the printed area is selected but the whole page including blank areas. When doing the same with the GUI-generated SVG, only the musical output is selected. With the GUI-SVG file, I can simply press CTRL-SHIFT-G to "crop" (set page-size to selection) to selection. With the CLI-SVG file, I need to delete that empty background-like object, to be able to reduce the page-size.
The only difference in exported SVG files is an additional line after the <desc> in CLI-SVG file, which gets converted to object "path1" once opened and saved with Inkscape. Example:
<path class="" fill="#ffffff" fill-rule="evenodd" d="M0,0 L1672.44,0 L1672.44,4251.96 L0,4251.96 L0,0 "/>
Steps to reproduce
- mscore -o output-cli.svg input.mscz
- Export/SVG dialog in the GUI, save as output-gui.svg
- compare files
Screenshots/Screen recordings
No response
MuseScore Version
4.1.1-232071203, revision: github-musescore-musescore-e4d1ddf
Regression
I don't know
Operating system
Windows 10
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CLI SVG export command and the GUI Export/SVG dialog, then compare their generated SVG files as described. Reproduce with MuseScore 4.1.1 and inspect the extra page-sized path after the element. Done means both export paths produce equivalent SVG selection bounds without the unwanted blank background object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, computer-graphics, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100