generate a hyperlinked table of contents and insert into existing PDF

I have an existing PDF (with no equivalent resource documents), and also a message documents which is a checklist of things referencing areas within the PDF documents, in addition to a web page number for each and every thing. I would love to create a new PDF which begins with a created tabulation index, adhered to by the materials of the initial PDF. The created index requires to be hyperlinked to make sure that clicking any kind of thing will instantly leap to the web page having the referenced area.

I'm seeking an ideal set of devices (ideally CLI - oriented) to complete this on Linux ; all the devices I've considered until now do not appear to supply a remedy. I'm a seasoned designer, and also am greater than satisfied to write code if called for (ideally in Ruby/Python/Perl/ shell) to parse my message documents and also transform it right into a hyperlinked index, yet I can not locate the right devices to address it. I assume component of the trouble is that the links require to indicate within the very same documents, yet their targets will not exist till later on when the ToC is accompanied the initial PDF.

I'm additionally accustomed to numerous markup languages, as an example Markdown, reStructuredText, TeX, LaTeX, org - setting, and also an excellent remedy would certainly make use of among these as an intermediate action for creating the hyperlinked ToC.

2022-07-25 20:39:54
Source Share
Answers: 1

This is absorbed entire from @Herbert addressing a really comparable inquiry on the TeX StackExchange:

usage plan pdfpages and also then:



\addcontentsline{toc}{section}{The first section name}% or chapter
\addcontentsline{toc}{section}{The second section name}% or chapter
\addcontentsline{toc}{section}{The third section name}% or chapter
\addcontentsline{toc}{section}{The forth section name}% or chapter

2022-07-25 22:36:52