1

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.

7
  • 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
    Commented Mar 22, 2018 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
    Commented Mar 23, 2018 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
    Commented Mar 23, 2018 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
    Commented Mar 24, 2018 at 23:04
  • 1
    Does this answer your question? How can I append two PDFs that have links
    – user202729
    Commented Mar 26, 2023 at 11:41

2 Answers 2

2

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.

0

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.

3
  • Hi. Are there any free services available? Is this 200 pages in total or per PDF to be merged?
    – user328783
    Commented Mar 23, 2018 at 15:13
  • @KianCross Questions seeking Service recommendations are out of scope
    – Ramhound
    Commented Mar 23, 2018 at 18:48
  • Sejda is an amazing PDF-editor, just used it for major operation and everything went smooth.
    – user486359
    Commented Apr 4, 2023 at 7:10

You must log in to answer this question.