Currently it is possible during a merge to
a) Keep the existing bookmarks, this is the default option
b) Create new bookmarks from the filenames, option -b one_entry_each file
Often files don't have meaningful names, but the user knows better and can specify better bookmarks on the command line.
I suggest adding an option to do so:
sejda-console merge -f c1.pdf c2.pdf -o out.pdf -bookmarks Chapter 1:Chapter 2:
The default behavior would retain existing bookmarks and put them one level below the user specified ones. If c1.pdf contains OldBookmark1 and OldBookmark2, the resulting bookmark tree would be
A 2nd option, -overwrite-existing-bookmarks would discard the pre-existing bookmarks, in this case out.pdf would have only Chapter 1 and Chapter 2,
This suggestion is an enhancement to #110
Renaming c1.pdf to Chapter 1.pdf would qualify as a workaround?
Merge has now a -b retain_as_one_entry option to retain existing bookmarks under a new entry based on the filename.