PDF (Music Book) Assembly

Hi, I’ve got a bunch of arrangements I’ve done as individual projects and would like to compile them into a book. I’ve just tried creating a new Dorico project and importing them as Flows and MusicXML files, but it makes a mess of the formatting on everything and some information/details are missing. Unless there’s some trick I’m unaware of, it seems like way more work to import them all and instead would be better to get some kind of PDF software to assemble the book. It would be nice if it would handle things like page numbers and table of contents. What is the recommended approach to this kind of task among you wonderful experienced professionals?

You can quite easily change a page number in Engrave mode>top right tool (the pages miniatures) by right-clicking the first one and insert a page number change.

There are PDF utilities that can put page numbers on a PDF, which is less effort than ensuring each PDF has the correct page range.

Or you can load each PDF into a DTP app, and add the page numbers there; then export a new PDF.

1 Like

Acrobat Pro can merge individual PDFs and add page numbers.
LaTeX, with some setup, can do it as well (and much, much more).
InDesign, I think, has some “Mount PDF” features. @dan_kreider prob is the expert on Dorico with InDesign and Affinity and how it can be done, in some way, in those programs.
Unfortunately, no software that I know of can generate a separate table of contents (TOC) from the Dorico PDFs. The information may be present on the page, but it is not extractable from the PDF or as meta-data.


I believe it is a limitation in QT.

You can save a Dorico project as CSV and use the output to start a TOC, but page numbers will not be automatic.
If this is a one-time-only case, it’s best/easiest to do it manually. If you don’t want to export CSV, you can easily copy the titles, etc., from the PDF, onto a word processor or layout software.

1 Like

This is something I would like to hear and learn more about also. I notice some others have made some gorgeous music books using InDesign in some way to pull together all the stuff, but I am not sure of what details are involved with that process. Myself, I do not want to go down the Adobe rabbit hole, probably I would be looking at LaTeX or almost anything other than Adobe InDesign, but I’d like to hear more information form people about what works well for that sort of thing and why, and what is involved in the process.

It’s perfectly possible to create “bookmarks” (Table of Contents) in the combined PDF from each component PDF file. E.g. if you have a PDF called “1. Overture” and another PDF named “2. Tableau”, then you can get those names as bookmarks.

But yes, you can’t easily get Flow data from Dorico and auto-make a ToC therefrom.

I’ve made a series of python scripts for Mac which do things like combine PDFs together with a ToC; add page numbers; add “1 of n” to a set of PDFs; and much more besides.

Python used to come with macOS, so nothing else was needed; but Apple have removed it, so you’ll need to install python3 and the pyobjc library.

2 Likes

With LaTeX it is fairly “easy” (nothing is “easy” in TeX…), but there is some manual work involved unless you write a script to parse the CSV and convert it to LaTeX code. I parse it through an SQL database (for other reasons than purely a TOC, which is a ‘side product’). Some who might be experts in Perl or awk could perhaps write some clever scripts. I’ve had ideas for it but never gotten around to it, as the SQL solution is much more powerful and versatile. But, it would be cool with a perl-script. A Perl/awk developer would probably write this in a few minutes.

Edit: I mean Python instead of Perl, but Perl would work as well…

I hate the Adobe tax, but it just works. InDesign is incredibly powerful. And you can just get it for a month if it’s a one-off project.

Can one extract Composer, Title, Sub etc. from a Dorico PDF? I could not find any trace of such information in the PDF, other than what is printed on the actual page as text.

No: as said, it’s easy to make a ToC of the name of each PDF file that gets combined; but you can’t query the PDFs or Dorico for more information.

Dorico can now export the Project Statistics as a .csv file, and I dare say you could extract the Flow names as a list from there; and then use that data to create PDF bookmarks; though it would be “non-trivial”.

I’ve actually signed up for a week and then ended it, and had my fee returned…!

OK. I think the OP wanted to extract information from separate projects which would mean merging information from several CSV files. Yes, as you say, a bit non-tivial. Perhaps I will study some Python this holiday and see what can be done. But, once you are forced into TeX, another problem emerge, you need to know TeX to proceed to get layout one finally want…

My question about InDesign is how much things can be automated with scripting or such things, or do you have to manually design every page by hand or use some templates that you’re always fooling around with in the WYSIWYG editor? I’d like to hear more details about HOW it’s used, the process you go through with it. The Adobe Tax is also annoying, but it’s not a problem if the value is there. But that question is, what is the value?

I have heard mention of a free alternative to InDesign, called Scribus. Anyone worked with that and if so why?

In my world, writing a script is much preferable to manually editing a WYSIWYG document of some kind. I’m still learning about LateX but the crux of the matter seems to be that it’s hard in LateX to create custom layouts. Much easier in a tool like InDesign or Scribus. however once you have a good layout designed…perhaps the hard way…then its very easy and trivial to construct repeat documents following the same layout. Since its drive by markup you can script all kinds of things into the markup…providng you have some source you can parse…which is pretty easy these days with python, javascript, perl, pick your poison. Particularly if you were going to parse some CSV in order to get information that is contained inside the PDF to build TOC or index or something…I dont’ know just thinking out loud.

I’ve even thought of switching musical work over to lily pond or converting from Dorico to Lilypond so that I have more complete control in the LaTeX environment. TeX doesn’t scare me. but it’s just verbose. LaTeX is really just a bunch of TeX macros. if those macros do what you want then you’re golden. if they aren’t quite there then you have to search endlessly for a LateX package which is most likely a bunch more TeX macros and find one that does what you want…or create your own TeX macro and then use it combination with perhaps LaTeX so that mostly you can markup at a higher level…

But anyway I guess I’m answering my own question if music books seem to need their own custom layout which LaTeX an all currently none LaTeX packages don’t really provide a great solution for…it very well might be easier to just build up an InDesign or Scribus document with PDF’s from Dorico and move everything around on the page exactly as you want…

If you want a custom design for each publication (La)TeX is not recommended. However, if you need a (consistent) “scholar/academic” layout, TeX is the only tool (unless you are a meticulous, OCD-driven, editor).

Let’s have a look at a section from Bach Organ Works, Breitkopf & Härtel [2023];


Do you spot the “errors”?

Thankfully, music publishing is a rather “slow” process. Once the music is “engraved,” very little changes, and one can take the time to write a high-quality TOC.

Mac, PDF Expert, you can create TOC, but only manually AFAIK. Page numbers and links are further down that page.

Personally I think LateX is useful for a lot more than just academic works. It is popular with that community because it’s free and does math well, but it has much more to offer. Novels, books, newsletters, technical manuals, and all manner of things can be produced with LaTex and gorgeously so. There are advantages even for one-off’s in that since you’re doing everything with a data driven approach you can be precise and consistent throughout the document. The main downside is that it’s not WYSIWYG while you’re trying to artistically layout a unique layout design.

And I think certain things are probably not even possible with a WYSIWYG approach particularly if you need to parse some info to generate other info…that is exactly where LaTeX provides real adbantages.

In the case of Lilypond you can also check in all revisions to source control. Presumably that could be done with PDF or PS from Dorico too I suppose.

so those of you that have made books with Dorico, are you saying your typical process is

  1. make your Dorico scores… flows, etc.
  2. export each individual PDF from all that
  3. import those PDF documents into InDesign and then construct an InDesign layout around them that makes sense.
  4. Produce something final for publishing house coming out of InDesign or send them your InDesign then or do you send them a final PDF or what?

What sorts of things do you typically need to do inside InDesign for the act of creating a layout around the PDF’s exported from Dorico? What do you have to do for each imported PDF? What is involved?

I heard you say one reason for bringing it all into InDesign is order to generate book page numbers, TOC and index. Presumably there is some other kind of chapter organizing that can be done with InDesign also?

It gets a bad rap from the hardcore LaTeX community but LyX is great for assembly, TOC, adding figure-numbers, titles, chapters etc.

There is a ‘sweet spot’ of users and use-cases that clearly falls outside of ‘I really need LaTeX’ or ‘I really need InDesign’, so just throwing it out there. Learning curve is steep but short.

Here’s a Tip I posted a while ago, about the workflow of using PDFs from Dorico within Affinity Publisher.

5 Likes

Hi Sunny16. I have ther same problem and solved it by doing the page numbering with pdf as you suggested. First I assembled all the pdf music into one file. I used Corel pdf Fusion for that, but there is a free tool from pdf24 (PDF24 Tools: Free PDF solutions for all PDF problems). This tool can be used on-line or downloaded to your computer. It can do many things. Once you have your project (book) in one pdf file, PDF24 can also number the pages. You can change the default settings to position the number,select font etc. This also let me overlay 2 pdf files which was nice as I could add crop marks to text pages. I hope this helps.

This is an excellent ‘use case’. It’s been a while since I used these DTP programs. I did a lot in PageMaker and early versions of InDesign.

I got invited to the London ‘launch’ of InDesign, where they were showing off some of the things it could do. Having been used to Quark XPress, things like foreign text plates as separate layers **in the same document ** were mind-blowing.

It’s one of the rare occasions when I actually got excited about software that truly empowered you to get stuff done.

Trying to think of another example … Hang on … it’ll come to me. :thinking: