While there exists a couple of freeware PDF programs that allow you to combine several PDFs into one, few of them allow you to keep existing bookmarks or generate new ones for that matter.
Typically, these features are either not included or are offered as a premium feature. A good example of the latter case is the popular PDFill PDF Tools of which I’m a long-time user of.
Nevertheless, there’s one stand out program I came across recently while looking for a tool to merge several PDFs that I had batch converted from HTML files. I had created these PDFs with wkhtmltopdf which automatically generates bookmarks from heading tags (H2, H3, H4 etc.) in the HTML.
The program am referring to is PDFSam Basic — a free, open source and cross-platform software which besides merging also supports splitting, mixing, rotating and extracting pages from PDFs.
When merging PDFs with bookmarks, the program gives you the options to keep the bookmarks, discard them or alternatively create new bookmarks with an entry for each merged PDF file. If that’s not enough, the program also has an option to automatically generate a table of contents at the beginning of the merged PDF.
Here’s how to use it for this tasks.
How to Merge PDFs with Bookmarks using PDFSam Basic
- Download and install PDFSam Basic from the official site. The software is available for Windows, macOS and Linux distributions. An installer and portable version is provided for Windows users.
- Launch the program and click on the Merge tab in the sidebar menu.
- Drag and drop your PDFs into the merge window or use the Add button.
- Arrange the PDF in the order you wish them to appear in the merged PDF file. You can also sort them automatically in ascending or descending order according to their names, size, number of pages and modified date using the corresponding columns at the top of the table.
- In the Merge settings, go to Bookmarks handling and select the Retain Bookmarks option. Adjust any other settings as you wish, including generating of a table of content.
- Below the settings choose the folder where to save the merged PDF and give it a name. Otherwise, the program will by default use the folder where the individual PDF files are located.
- In the Advanced settings choose whether to compress the files or not and which PDF version to use. Otherwise, just use the default options if you are not sure.
- Click the Run button to start the job.
The PDFs will be merged as instructed. When done, open the merged PDF and ensure all the bookmarks have been retained and link to the correct pages. That’s all.