fix pdf page numbering
This commit is contained in:
		| @@ -242,13 +242,23 @@ | ||||
|       `(line-width . ,(* (chain-assoc-get 'header:songinfo-size-factor props songInfoLineWidthFraction) (ly:output-def-lookup layout 'line-width))) | ||||
|       arg))) | ||||
|  | ||||
| #(define pdf-encode (@@ (lily framework-ps) pdf-encode)) | ||||
| % PDF tags | ||||
| #(define-markup-command (page-number-to-pdf-label layout props) () | ||||
|      (ly:make-stencil | ||||
|       (list 'embedded-ps | ||||
|              (ly:format | ||||
|               "[ /Label (~a) /PAGELABEL pdfmark\n" (pdf-encode (chain-assoc-get 'page:page-number-string props "?")))) | ||||
|       empty-interval empty-interval | ||||
|       )) | ||||
|  | ||||
| \paper { | ||||
|   print-first-page-number = ##t | ||||
|   first-page-number = #0 | ||||
|  | ||||
|   oddFooterMarkup = \markup { | ||||
|     \fill-line { | ||||
|       \line { \null } | ||||
|       \line { \page-number-to-pdf-label \null } | ||||
|       \line { \if \on-last-page-of-part \general-align #Y #DOWN \fractional-line-width \print-songinfo } | ||||
|       \line { \if \should-print-page-number \print-pagenumber } | ||||
|     } | ||||
| @@ -257,7 +267,7 @@ | ||||
|     \fill-line { | ||||
|       \line { \if \should-print-page-number \print-pagenumber } | ||||
|       \line { \if \on-last-page-of-part \general-align #Y #DOWN \fractional-line-width \print-songinfo } | ||||
|       \line { \null } | ||||
|       \line { \page-number-to-pdf-label \null } | ||||
|     } | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user