Re: New option for OOoLilyPond: PDF to SVG

2019-10-30 Thread Klaus Blum
Hi Carl, 


Carl Sorensen-3 wrote
> The two big issues I saw were font embedding and clipping the bounding
> box.  It seems like we ought to be able to adjust both of those in the svg
> output.
> Would it be possible to modify the effects of lilypond-book-preamble.ly on
> .svg files?

LilyPond does not embed fonts in svg output. Is this possible in general,
like in pdf files? 
lilypond-book-preamble.ly only works with the eps backend, not with the svg
one. 

AFAIK, there have been questions and discussions on the list about both of
those issues, but no solutions available yet. 


Carl Sorensen-3 wrote
> It seems to me that fixing lilypond svg output to match what we want
> would be a better approach long-term than trying to integrate the call of
> a pdf->svg converter.
> Nevertheless, calling the converter appears to be an immediate workaround.

100% agreed.  :)
Another solution would be a working pdf import for LibreOffice. But that
seems to be still a long way to go as well. 

Cheers, 
Klaus



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



Re: New option for OOoLilyPond: PDF to SVG

2019-10-30 Thread Klaus Blum

Hi Carl,

Am 30.10.2019 um 18:34 schrieb Carl Sorensen:

The two big issues I saw were font embedding and clipping the bounding box.  It 
seems like we ought to be able to adjust both of those in the svg output.
Would it be possible to modify the effects of lilypond-book-preamble.ly on .svg 
files?

LilyPond does not embed fonts in svg output. Is this possible in
general, like in pdf files?
lilypond-book-preamble.ly only works with the eps backend, not with the
svg one.

AFAIK, there have been questions and discussions on the list about both
of those issues, but no solutions available yet.

It seems to me that fixing lilypond svg output to match what we want would be a 
better approach long-term than trying to integrate the call of a pdf->svg 
converter.
Nevertheless, calling the converter appears to be an immediate workaround.

100% agreed.  :)
Another solution would be a working pdf import for LibreOffice. But that
seems to be still a long way to go as well.

Cheers,
Klaus



Re: New option for OOoLilyPond: PDF to SVG

2019-10-30 Thread Klaus Blum
Hi Henning, 

thanks for your hints. 

Henning Hraban Ramm-3 wrote
> You can also use Inkscape on the command line. The call is like
> inkscape -z -f input.pdf -A output.svg

On my PC, this creates a SVG file that even Inkscape cannot read. 
I already experimented with 
inkscape -z -f input.pdf -l output.svg
but the resulting graphic is incomplete.

The thing is that Inkscape should be forced to use Poppler/Cairo instead of
its own internal library. 
Is there a command that can achieve that?

Cheers, 
Klaus



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



Re: New option for OOoLilyPond: PDF to SVG

2019-10-30 Thread Henning Hraban Ramm


> Am 2019-10-30 um 16:35 schrieb Klaus Blum :
> 
> For Mac, I don't have any idea. My knowledge about Macs is exactly zero.

As Nick stated, pfd2svg is available via HomeBrew, but also via MacPorts.
Mac users that are able to use LilyPond should be able to use one of those or 
even compile it on their own.

You can also use Inkscape on the command line. The call is like

inkscape -z -f input.pdf -A output.svg


Greetlings, Hraban
---
fiëé visuëlle
Henning Hraban Ramm
https://www.fiee.net







Re: New option for OOoLilyPond: PDF to SVG

2019-10-30 Thread Carl Sorensen


On 10/30/19, 9:35 AM, "Klaus Blum"  wrote:

Dear OOoLilyPond users, 

I'm planning to add a new option to OOoLilyPond. 

At the moment, we only have the choice between three file formats: 
- PNG is a bitmap format with the obvious quality drawbacks. 
- EPS can only be used with OpenOffice (not LibreOffice) and cannot be
displayed on screen. 
- SVG offers good quality but requires quite some tweaking (described in 
http://lilypondblog.org/2018/02/ooolilypond-part-2-optimizing/
  ). Most
obvious drawback: You cannot use lilypond-book-preamble.ly

The two big issues I saw were font embedding and clipping the bounding box.  It 
seems like we ought to be able to adjust both of those in the svg output.

Would it be possible to modify the effects of lilypond-book-preamble.ly on .svg 
files?


PDF would be the ideal choice for an output format, but LibreOffice cannot
(yet?) import PDF files with satisfying quality. 

Now (why did I take so long?...) I had the idea to call an external program
to convert LilyPond's PDF output into SVG which then can be imported into
LibreOffice. 
Most obvious advantage: You can work with any template, just like it works
with PNG and EPS. No need for dedicated SVG templates.
My first test look very promising. 

In Linux, it seems to be quite easy: You can use pdf2svg which can be
installed with any packet manager. (Am I right?)

With Windows, it looks (as always?) more complicated: 
We need additional software capable to perform a command-line conversion
from PDF to SVG. It must be installed by the user, and OOoLilyPond needs to
know the exact command line to be called. 
In a forum post ( http://www.inkscapeforum.com/viewtopic.php?t=30252
  ) i found that
Inkscape cannot yet do that, but there is a "standalone" version of Poppler
that can be used: 
http://blog.alivate.com.au/wp-content/uploads/2018/10/poppler-0.68.0_x86.7z

  
While I still don't know whether to recommend a software that I don't know,
I've tried it and it performs allright.

For Mac, I don't have any idea. My knowledge about Macs is exactly zero.


Am I still missing something? Do you have any more thoughts, ideas,
recommendations, experiences, ... ?

It seems to me that fixing lilypond svg output to match what we want would be a 
better approach long-term than trying to integrate the call of a pdf->svg 
converter.

Nevertheless, calling the converter appears to be an immediate workaround.

Carl
 



Re: New option for OOoLilyPond: PDF to SVG

2019-10-30 Thread Nicholas Bailey
On Wednesday, 30 October 2019 15:35:34 GMT Klaus Blum wrote:
> For Mac, I don't have any idea. My knowledge about Macs is exactly zero.
> 
> 
> Am I still missing something? Do you have any more thoughts, ideas,
> recommendations, experiences, ... ?
I don't know either, but the thing about MacOS is "it's Unix, Jim, but not as 
we know it".

I'd be very surprised if Mac users couldn't be asked to install pdf2svg via 
one of their pacakge managers such as Homebrew

https://brew.sh/

specifically:

https://formulae.brew.sh/formula/pdf2svg

Nick/.