> [...] I don't see an immediate connection between the new PDF > interpreter and file size increase (this is what "perfectly fine" > was referring to).
Too much info is floating around, so here is a table that shows the various possibilities we are currently investigating. * Everything is based on commit 056784fcb9. * All eight compilations were started from scratch using LuaTeX; `notation.pdf` was produced by `make bytecode; make doc`. * To produce Cairo output I used `make doc ... LOCAL_LILYPOND_FLAGS="-dbackend=cairo"`. * For the `-dNEWPDF=false` and `-dPreserveMarkedContent` builds I used the attached patches, which are mutually exclusive. LilyPond extract GS size backend pdfmark GS option of NR comments ------------------------------------------------------------------ standard no 9.56.1 -- 44MB ok standard yes 9.56.1 -- 6MB many links missing standard yes 9.56.1 [1] NEWPDF= 8MB ok false standard yes 10.1 [2] Preserve 29MB ok Marked Content cairo no 9.56.1 -- 17MB ok cairo yes 9.56.1 -- 16MB many links missing cairo yes 9.56.1 NEWPDF= 21MB ok false cairo yes 10.1 Preserve 21MB ok Marked Content Werner [1] The next GS version (appearing in March 2023) will no longer contain the old PDF engine. [2] This is a self-compiled version 10.0.0 with a very small patch (already in the GS repository) that enables `-dPreserveMarkedContent`.
diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 3670e82546..c1f994480a 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -488,6 +488,7 @@ ifeq ($(USE_EXTRACTPDFMARK),yes) -sDEVICE=pdfwrite \ -dAutoRotatePages=/None \ -dPrinted=false \ + -dNEWPDF=false \ -dColorConversionStrategy=/LeaveColorUnchanged \ -dDownsampleMonoImages=false \ -dDownsampleGrayImages=false \ @@ -794,6 +795,7 @@ $(outdir)/%.png: %.eps mkdir -p $(dir $@) gs -dAutoRotatePages=/None \ -dPrinted=false \ + -dNEWPDF=false \ -dTextAlphaBits=4 \ -dGraphicsAlphaBits=4 \ -q \ @@ -809,6 +811,7 @@ $(outdir)/%.pdf: %.eps mkdir -p $(dir $@) gs -dAutoRotatePages=/None \ -dPrinted=false \ + -dNEWPDF=false \ -q \ -sDEVICE=pdfwrite \ -dNOPAUSE \
diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 3670e82546..53d5f15277 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -488,6 +488,7 @@ ifeq ($(USE_EXTRACTPDFMARK),yes) -sDEVICE=pdfwrite \ -dAutoRotatePages=/None \ -dPrinted=false \ + -dPreserveMarkedContent=true \ -dColorConversionStrategy=/LeaveColorUnchanged \ -dDownsampleMonoImages=false \ -dDownsampleGrayImages=false \ @@ -792,8 +793,10 @@ $(outdir)/%.jpg: %.jpg $(outdir)/%.png: %.eps $(call ly_progress,Making,$@,< eps) mkdir -p $(dir $@) - gs -dAutoRotatePages=/None \ + $(GHOSTSCRIPT) \ + -dAutoRotatePages=/None \ -dPrinted=false \ + -dPreserveMarkedContent=true \ -dTextAlphaBits=4 \ -dGraphicsAlphaBits=4 \ -q \ @@ -807,8 +810,10 @@ $(outdir)/%.png: %.eps $(outdir)/%.pdf: %.eps $(call ly_progress,Making,$@,< eps) mkdir -p $(dir $@) - gs -dAutoRotatePages=/None \ + $(GHOSTSCRIPT) \ + -dAutoRotatePages=/None \ -dPrinted=false \ + -dPreserveMarkedContent=true \ -q \ -sDEVICE=pdfwrite \ -dNOPAUSE \ diff --git a/config.make.in b/config.make.in index 346df53ebe..39e9844409 100644 --- a/config.make.in +++ b/config.make.in @@ -34,6 +34,7 @@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FONTFORGE = @FONTFORGE@ FONTFORGE_QUIET_OPTION = @FONTFORGE_QUIET_OPTION@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GHOSTSCRIPT = @GHOSTSCRIPT@ GLIB_LIBS = @GLIB_LIBS@ @GOBJECT_LIBS@ GS_API = @GS_API@ GS920 = @GS920@