Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-19 Thread Kenneth Wolcott
+infinity

On Sun, Mar 19, 2023 at 3:41 AM David Kastrup  wrote:
>
> Andrew Bernard  writes:
>
> >> On 18/03/2023 11:44 pm, Werner LEMBERG wrote:
>  Hi Werner, With NBN in Australia, the speeds are amazing.  [...]
> >>> Well, a great percentage of the world does not have such amazing
> >>> circumstances...
> >
> > Well as I said, I don't know. I thought America would be way ahead.
>
> The political system in the U.S. considers bribes by lobbyists a First
> Amendment protected variant of free speech.  As a consequence, cable
> companies receiving government subsidies for implementing broadband
> coverage save a lot of money if instead of increasing broadband coverage
> they bribe the politicians responsible for implementing oversight or at
> least ensuring there is a reasonable chance for competitors to get
> access to the market.
>
> The FCC government agency responsible for regulating cable companies has
> currently spent more than a year headless, with lobbyists sabotaging an
> appointment for the leadership position after the last one had left.
>
> Sometimes it is not sufficient to be good at developing technology...
>
> --
> David Kastrup
>



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-19 Thread David Kastrup
Valentin Petzel  writes:

> Am Sonntag, 19. März 2023, 11:40:49 CET schrieb David Kastrup:
>> The political system in the U.S. considers bribes by lobbyists a First
>> Amendment protected variant of free speech.
>
> This deserves to be printed on calendars, t-shirts and mugs ...

I have my own opion what this deserves to be...

At any rate: any large-scale system converges to the loopholes without
constant supervision, whether you are talking humans with religions and
laws and morals, or rats and pest control, or antibiotic-resistant
bacteria.

-- 
David Kastrup



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-19 Thread Valentin Petzel
Am Sonntag, 19. März 2023, 11:40:49 CET schrieb David Kastrup:
> The political system in the U.S. considers bribes by lobbyists a First
> Amendment protected variant of free speech.

This deserves to be printed on calendars, t-shirts and mugs ...

signature.asc
Description: This is a digitally signed message part.


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-19 Thread David Kastrup
Andrew Bernard  writes:

>> On 18/03/2023 11:44 pm, Werner LEMBERG wrote:
 Hi Werner, With NBN in Australia, the speeds are amazing.  [...]
>>> Well, a great percentage of the world does not have such amazing
>>> circumstances...
>
> Well as I said, I don't know. I thought America would be way ahead.

The political system in the U.S. considers bribes by lobbyists a First
Amendment protected variant of free speech.  As a consequence, cable
companies receiving government subsidies for implementing broadband
coverage save a lot of money if instead of increasing broadband coverage
they bribe the politicians responsible for implementing oversight or at
least ensuring there is a reasonable chance for competitors to get
access to the market.

The FCC government agency responsible for regulating cable companies has
currently spent more than a year headless, with lobbyists sabotaging an
appointment for the leadership position after the last one had left.

Sometimes it is not sufficient to be good at developing technology...

-- 
David Kastrup



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard

Well as I said, I don't know. I thought America would be way ahead.


On 18/03/2023 11:44 pm, Werner LEMBERG wrote:

Hi Werner, With NBN in Australia, the speeds are amazing.  [...]

Well, a great percentage of the world does not have such amazing
circumstances...


 Werner




Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard
It's kinda sorta on by default in Frescobaldi. engrave -preview is 
Ctrl-M and engrave - publish -Ctrl-Shift-P. And the engrave icon, when 
you press it, without going through the dropdowns, is preview by default.



|-dembed-source-code| is off by default.


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Jean Abou Samra



> Le 18 mars 2023 à 16:58, David Kastrup  a écrit :
> 
> Different mostly redundant font subsets for thousands of images add up.


That is the problem that appears for LilyPond’s documentation PDFs, which embed 
lots of examples. We are talking about standalone scores here, not 
documentation.





Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread David Kastrup
Paul Hodges  writes:

> From:   Andrew Bernard  
>
> In this day of gigabyte this an terabyte that, does a large PDF matter  
> very much? What is the issue of concern?
>
> Unnecessary waste of resources is always a poor idea, especially if it
> is unexplained.
>
>
>
> My concern is more wondering that if the ordinary PDF is of the
> required quality (defined how?), what is being changed to increase its
> size so much?

Different mostly redundant font subsets for thousands of images add up.

-- 
David Kastrup



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Jean Abou Samra
Le samedi 18 mars 2023 à 23:19 +1100, Andrew Bernard a écrit :
> I don't have any quantitative data but I image turning off the embedding  
> of the source code would reduce file size in the PDF which may help.

`-dembed-source-code` is off by default.


signature.asc
Description: This is a digitally signed message part


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread kieren

Hi Andrew,

In this day of gigabyte this an terabyte that, does a large PDF matter 
very much? What is the issue of concern?


1. For transferring/emailing, smaller is better for a number of reasons.

2. For those of us (e.g., Music Directors) who store and use multiple 
PDFs of complete musicals or operas (and, in the case of workshops, the 
associated scripts/libretti) on an iPad, the size of each PDF can make a 
huge difference, both in terms of the storage requirements and the 
responsiveness within the workflow.


Hope that helps clarify!
Kieren.



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Werner LEMBERG


> Hi Werner, With NBN in Australia, the speeds are amazing.  [...]

Well, a great percentage of the world does not have such amazing
circumstances...


Werner



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard
Hi Werner, With NBN in Australia, the speeds are amazing. I have a 
'modest' plan at 100Mbps nominal but I get consistently 10 percent plus 
higher. And a _lot_ of people are now moving to the commonly available 
1000Mbs plans, at quite reasonable cost. So for we Aussies down under, 
big PDF's hardly matter in terms of network bandwidth. I have no idea 
what the situation is in Europe or America. The National Broadband 
Network is a government initiative.


Everything gets fatter with time. Including me.

Sure it would be great to have slim PDF's but that does not seem to be 
the trend.


Andrew


On 18/03/2023 5:58 pm, Werner LEMBERG wrote:

In this day of gigabyte this an terabyte that, does a large PDF

matter very much?

IMHO yes.  Today, PDF files are loaded *and* displayed in a browser.
The larger the file, the longer it takes until it gets displayed.
Additionally, an optimized PDF gets (normally) processed faster, which
is thus also of benefit.


 Werner




Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard
I don't have any quantitative data but I image turning off the embedding 
of the source code would reduce file size in the PDF which may help.


Andrew


On 18/03/2023 10:38 pm, Volodymyr Prokopyuk wrote:

I've tried the https://github.com/pdfcpu/pdfcpu with very good results:




Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Volodymyr Prokopyuk
Hello,

I've tried the https://github.com/pdfcpu/pdfcpu with very good results:

   - Lilypond with Ghostscript x1.5 => 5.3 MB PDF v1.5
   - Lilypond with Cairo x4 => 15.0 MB PDF v1.5
   - Lilypond with Cairo + pdfcpu x1 => 3.6 MB PDF v1.7

PDF outlines, hyperlinks and overall document appearance is apparently not
altered after the optimization with the pdfcpu.

The pdfsizeopt has several external dependencies and claims to be slow, so
I have not tried it as I'm happy with the above solution which is easy to
install and runs fast.

Thank you,
Vlad

On Sat, Mar 18, 2023 at 9:19 AM Volodymyr Prokopyuk <
volodymyrprokop...@gmail.com> wrote:

> Good morning Jean and Werner,
>
> The alpha transparency and fonts embedded in SVG along with leaner code
> are important advantages of Cairo. Thank you for outlining this!
>
> I'll investigate ways to reduce PDF size and let you know the outcomes of
> my investigation.
>
> Thank you,
> Vlad
>
> On Sat, Mar 18, 2023 at 6:08 AM Werner LEMBERG  wrote:
>
>>
>> > I can see that the size of the Cairo-generated PDF is around 3 times
>> > bigger compared to the same document generated with Ghostscript?  Is
>> > there is way to reduce the size of the Cairo-generated PDF?
>>
>> You might try `pdfsizeopt`.
>>
>>   https://github.com/pts/pdfsizeopt
>>
>>
>>  Werner
>>
>


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Paul Hodges

From:   Andrew Bernard  

In this day of gigabyte this an terabyte that, does a large PDF matter  
very much? What is the issue of concern?

Unnecessary waste of resources is always a poor idea, especially if it is 
unexplained.



My concern is more wondering that if the ordinary PDF is of the required 
quality (defined how?), what is being changed to increase its size so much?  
And if an unexplained change is being which is so visible to us, what changes 
might be happening that we haven't noticed.


Paul

Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Volodymyr Prokopyuk
Good morning Jean and Werner,

The alpha transparency and fonts embedded in SVG along with leaner code are
important advantages of Cairo. Thank you for outlining this!

I'll investigate ways to reduce PDF size and let you know the outcomes of
my investigation.

Thank you,
Vlad

On Sat, Mar 18, 2023 at 6:08 AM Werner LEMBERG  wrote:

>
> > I can see that the size of the Cairo-generated PDF is around 3 times
> > bigger compared to the same document generated with Ghostscript?  Is
> > there is way to reduce the size of the Cairo-generated PDF?
>
> You might try `pdfsizeopt`.
>
>   https://github.com/pts/pdfsizeopt
>
>
>  Werner
>


Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Andrew Bernard

https://www.wikihow.com/Reduce-PDF-File-Size

Was compressed to zero bytes. :-)


On 18/03/2023 5:58 pm, Werner LEMBERG wrote:


Link missing?





Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-18 Thread Werner LEMBERG
> Here's some other compression solutions. This page points out that
> the tradeoff for squishing is lower quality images and text.

Link missing?

> In this day of gigabyte this an terabyte that, does a large PDF
> matter very much?

IMHO yes.  Today, PDF files are loaded *and* displayed in a browser.
The larger the file, the longer it takes until it gets displayed.
Additionally, an optimized PDF gets (normally) processed faster, which
is thus also of benefit.


Werner



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-17 Thread Andrew Bernard
Here's some other compression solutions. This page points out that the 
tradeoff for squishing is lower quality images and text.


In this day of gigabyte this an terabyte that, does a large PDF matter 
very much? What is the issue of concern?


Andrew





Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-17 Thread Andrew Bernard
Nice tool, but don't get your expectations too high. There are 
constraints in how much you can squash PDF's.


Andrew

On 18/03/2023 4:08 pm, Werner LEMBERG wrote:

You might try `pdfsizeopt`.
   https://github.com/pts/pdfsizeopt




Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-17 Thread Werner LEMBERG


> I can see that the size of the Cairo-generated PDF is around 3 times
> bigger compared to the same document generated with Ghostscript?  Is
> there is way to reduce the size of the Cairo-generated PDF?

You might try `pdfsizeopt`.

  https://github.com/pts/pdfsizeopt


 Werner



Re: Benefits of Cairo backend over Ghostscript for PDF

2023-03-17 Thread Jean Abou Samra
Le vendredi 17 mars 2023 à 22:57 +0100, Volodymyr Prokopyuk a écrit :
> Hi,
> 
> What are the benefits of using Cairo backend for PDF generation in Lilypond 
> compared to Ghostscript?


It is very advantageous from the internal point of view (much less code and 
more reliable code), but from the user point of view only:

- It's somewhat faster,

- You can have alpha transparency,

- You can generate SVG and PDF output in one go,

- I know you asked about PDF, but the SVG output is much better (it embeds the 
needed fonts).

> Will the Cairo backend become the recorrended default backend for PDF 
> generation or will Ghostscript remain as the default backend for Lilypond?

The idea is that at some point, the Cairo backend will become the default, then 
later, we'll remove the PostScript backend altogether. We're not yet there, 
though.

> I can see that the size of the Cairo-generated PDF is around 3 times bigger 
> compared to the same document generated with Ghostscript? Is there is way to 
> reduce the size of the Cairo-generated PDF?

I don't know.


signature.asc
Description: This is a digitally signed message part