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 <w...@gnu.org> 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 >> >