I have two PDFs which contain a clickable table of contents. I want to append one to the other while keeping the links in the table of contents. I've tried using preview on macOS. This keeps the links for the first PDF but causes the links on the second PDF to break.

I've also tried using the Automator PDF combiner script on Mac.

I've not managed to find any solutions to this.

I'm looking for a Unix/Mac solution to this problem.

  • This isn’t going to be possible without first converting it to say a Word document or using a PDF program with the ability to author PDF files (I.e Adobe Acrobat)
    – Ramhound
    Mar 22 '18 at 1:17
  • Hi @Ramhound. How would I do this using word or adobe acrobat? I have one of the documents available in word format.
    – user328783
    Mar 23 '18 at 15:11
  • Convert both to word, open both to word, manipulate the document then update the table of contents provided the first word document even registered the table.
    – Ramhound
    Mar 23 '18 at 18:49
  • 1
    You can see if pdftk file1.pdf file2.pdf cat output merged.pdf suits your needs. Standard license for CLI commands is GPL-2+ : pdflabs.com/tools/pdftk-server . Appeared to be doing it fine on Debian
    – A.B
    Mar 24 '18 at 23:04
  • @A.B This worked! If you put this as an answer I will accept.
    – user328783
    Mar 24 '18 at 23:46

pdftk has multiple licenses available, but most prominently for the CLI interface: GPL-2+

pdftk file1.pdf file2.pdf cat output merged.pdf

should keep the ToC coherent. A quick test with a PDF generated from LibreOffice with a table of contents at the end, merged with itself, kept the 2nd ToC links coherent. Tested on Debian with the packaged version.


Sejda's Merge PDF tool will keep the links working, for both files.

Free service for documents up to 200 pages or 50 Mb and 3 tasks per hour.

It also includes an (optional) TOC generation feature, based on filenames or document titles.

The Merge PDF tool is available both as an online service and desktop application (mac, linux, win).

Disclaimer: I'm one of the developers.

  • Hi. Are there any free services available? Is this 200 pages in total or per PDF to be merged?
    – user328783
    Mar 23 '18 at 15:13
  • @KianCross Questions seeking Service recommendations are out of scope
    – Ramhound
    Mar 23 '18 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy