Importing Musescore into Libreoffice writer
I am using MuseScore 3 and trying to import examples into Libreoffice writer following these directions.
https://extensions.libreoffice.org/en/extensions/show/musescore-example….
However when I try it I get this message:
BASIC syntax error.
Variable abc already defined.
If I click "OK" and go ahead to open a MuseScore file, I get this message:
The file '01.1 Notes.mscz' is corrupt and therefore cannot be opened. LibreOffice can try to repair the file.
The corruption could be the result of document manipulation or of structural document damage due to data transmission.
We recommend that you do not trust the content of the repaired document.
Execution of macros is disabled for this document.
Should LibreOffice repair the file?
Whether I say yes or no, the result is the same:
The file '01.1 Notes.mscz' could not be repaired and therefore cannot be opened
Help?
Thanks in advance!
Comments
I wrote that extension very long ago, for a much older version of MuseScore and a much older version of LibreOffice. I stopped updating the extension once the built-in image capture tool within MuseScore got sophisticated enough to not need the extension anymore. So recommend not bothering with the extension, and instead simply using the built-in image capture tool. Right-click the region and use the option to Auto-resize to page if desired, then "Copy with Link to Score". Paste in LibreOffice and it's basically the same as the extension would have done, where you can then click the example within LibreOffice and it opens the original score automatically.
In reply to I wrote that extension very… by Marc Sabatella
Wow thanks for the fast reply! I don't understand what you mean by "Right-click the region." What is the region? I assume you mean the part I want to copy...but how do I select it? It only lets me select notes (not the whole staff with clefs, key signature, etc. and when I tried right-clicking on a selected group of measures just to test it, "Auto-resize" wasn't an option.
In reply to Wow thanks for the fast… by elizabethalic1
See:
https://musescore.org/en/handbook/3/image-capture
In reply to Wow thanks for the fast… by elizabethalic1
As noted in the Handbook page above, click the Image Capture button to start the process.
You can also use the screen capture feature that comes with your computer (all systems have one as far as I know). But then you miss out on the nice ability to copy the link as well, which is kind of nice. On the other hand, that link only seems to work in LibreOffice, not in Word or Google Docs etc.
In reply to As noted in the Handbook… by Marc Sabatella
Thanks! This kind of worked. However I had a couple of serious issues when I printed it from LibreOffice:
- The music excerpt has a box around it.
- The print is not as sharp and clear as when I print directly from MuseScore.
And some minor issues (I can live with these if there's not a solution):
- It was fiddly to format it on the page (sometimes it wanted to go off the edge of the margins).
- It didn't seem to let me click on the excerpt and then edit in MuseScore.
Any tips? At least for my major issues?
In reply to Thanks! This kind of worked… by elizabethalic1
I can't think of any reason the excerpt should have a box around it, unless you added it in LibreOffice. The image from MuseScore shouldn't have a box. Maybe you made a setting in LibreOffice3 to add boxes around images?
Be sure to set a reasonable DPI value when you right-click the image capture region - 300 DPI or higher. That should always come out at publication-ready quality. You only have to make that setting once.
If you still have trouble, please attach one such image here so we can understand and assist better.
Not sure what you mean about "it was fiddly to format it on the page". If you're referring to an issue with LibreOffice, you'd have to ask about that on their forums; I'm not really an expert at using LibreOffice. But, images are images, so whatever you were doing to format your images before, should still work exactly the same way now.
As I recall, in LibreOffice, you need to use Ctrl+click to follow a link. nd be sure you are using the "Copy with Link to Score" command when capturing the image in MuseScore, not the plain Copy command.
In reply to I can't think of any reason… by Marc Sabatella
Thanks! Are you sure 300+ DPI is adequate? It was already set to over 300. I tried 1000 and although it's much better, it is still not as sharp as printing from the MuseScore original...did you maybe mean 3000 or is it possible something else is wrong?
Yes I found a way to get the box away from around the image. I didn't turn it on and it's never done that before for me in LibreOffice but it was turned on for some reason and I found a way to turn it off! :-)
And the link does seem to be working after all.
In reply to Thanks! Are you sure 300+… by elizabethalic1
300 DPI should be so sharp you can’t detect any individual pixels. It’s higher resolution than most printing presses. There is no way you should be seeing a noticeable difference in prints from LibreOffice compared to MuseScore. Unless you are judging only by how it looks on screen? It’s possible LibreOffice shows only low resolution previews by default.
In reply to 300 DPI should be so sharp… by Marc Sabatella
That is so weird. I actually printed it off to test it. I wonder if LibreOffice might be automatically downsizing it?
In reply to Thanks! Are you sure 300+… by elizabethalic1
hI,
how you managed to turn box off? I have a box too, if i save the image in ms in svg. With png i have no box around it.
In reply to hI, how you managed to turn… by Pentatonus
It was in LibreOffice. I had to click on Image Properties and turn off the "border" that LibreOffice was putting around it.
In reply to It was in LibreOffice. I had… by elizabethalic1
Could be, but that would be very strange. What if you export the LibreOffice document to PDF? Can you attach an example here? Use 300 DPI - I doubt LibreOffice was designed to handle 1000 DPI.
In reply to Could be, but that would be… by Marc Sabatella
Ok here is an example exported from MuseScore at 300 DPI and pasted into LibreOffice, then exported from LiberOffice as a PDF.
I just test printed it as well. It's definitely not as sharp and clear as printing straight from MuseScore.
In reply to Ok here is an example… by elizabethalic1
Here's how that looks at max zoom on my screen - it certainly appears to be pretty high resolution:
Is it possible LibreOffice has a setting to print at only draft quality, and you need to disable that too? Have you tried printing the PDF?
BTW, for simple documents like this, it's actually quite a but easier to just do it all within MuseScore. It only makes sense to get LibreOffice involves if it's mostly text with a few short musical examples, not if it's mostly music with a few short text blocks.
In reply to Here's how that looks at max… by Marc Sabatella
It was the PDF I sent you that I tried printing most recently. And no I don't think the printer is on draft mode - I just checked and the printer was automatically set on 2400 DPI (both for printing from the PDF or from LibreOffice).
This is only one page of a very large document I'm creating - there will be upwards of 100 pages and some are text while others have music examples.
In reply to It was the PDF I sent you… by elizabethalic1
Try capturing as SVG - that should have lossless quality, and from memory Libreoffice can deal with SVGs just like any other image.
In reply to Try capturing as SVG - that… by llui85
Yes, Libreoffice does handle SVG - I have used this technique to produce an illustrated article.
And, for what it's worth, I used a graphics editor (Inkscape) to add additional graphics and text to the musical illustrations.
In reply to It was the PDF I sent you… by elizabethalic1
Could be that the program you are using to print the PDF is downscaling the images? It certainly looks as I expect both in full zoom on my screen and when I print.
Could also be you are just seeing the normal effects of the scaling that is being performed if your score is not exactly the same size in MuseScore as you want it within LibreOffice. Normally unless you are creating a tiny score and blowing it up huge within LibreOffice, those scaling differences would be practically invisible to the the naked eye, and certainly I can't see any obvious difference. But in some cases, switching to SVG instead of PNG might help.
If you still have difficulty, could you maybe show a picture of your PDF printed, and of the score printed directly? Maybe your eyes are just more sensitive to small differences than mine.
In reply to Could be that the program… by Marc Sabatella
Hmm. I will look into your suggestions. At the moment I'm feeling pretty frustrated and almost ready just to print off pages straight from MuseScore, write in page numbers by hand (!!!) and then scan them in as PDFs! I know I'd lose quality that way too, though, plus the hand-written page numbers seem pretty unprofessional.
I think I'm going to get my husband involved - he's better with technology. I'll be in touch if I need more tips.
In reply to Hmm. I will look into your… by elizabethalic1
Two questions.
What OS are you on, and do you have to use Libreoffice?
Windows comes with Word Pad that is a scaled back Word. I just saved some music in MuseScore as a png and opened it in Wordpad and printed. It looks as good as Word. I don't know if Mac has anything like it though.
In reply to Hmm. I will look into your… by elizabethalic1
Quote : 'write in page numbers by hand (!!!) '
To print page numbers (and many other things), did you ever know about headers and footers ? (in Musescore): https://musescore.org/en/handbook/3/score-properties#header-footer
In reply to Hmm. I will look into your… by elizabethalic1
Definitely no need to resort to such things. if LibreOffice is presenting problems, personally I'd recommend just switching to something more reliable. But definitely, your PDF is just fine, any problems you are seeing printing it are probably something about your printer driver. I printed that PDF and it looks perfect.