LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-09-2023, 06:51 AM   #1
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Rep: Reputation: 15
Have internal links for a TOC of PDF


How do we make internal links for existing TOC of a (text) PDF file ?
 
Old 04-09-2023, 09:07 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,751

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by BudiKusasi View Post
How do we make internal links for existing TOC of a (text) PDF file ?
Lots of ways, but since you provide no details at all what do you think we'll be able to tell you??? There are ways to do this in MS Word, Libreoffice, Acrobat, and a host of other programs.

But you don't tell us version/distro of Linux, what you're attempting, from what source, with what programming languages. Provide those details and we may be able to give you some hints.
 
Old 04-09-2023, 09:24 AM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Is this what you mean?

Make TOC, then write it to the pdf.

toc.txt
Code:
[/Page 4 /View [/XYZ null null null] /Title (Chapter1) /OUT pdfmark
[/Page 40 /View [/XYZ null null null] /Title (Chapter2) /OUT pdfmark
[/Page 60 /View [/XYZ null null null] /Title (Chapter3) /OUT pdfmark
[/Page 85 /View [/XYZ null null null] /Title (Chapter4) /OUT pdfmark
Code:
gs -o Ouput.pdf -sDEVICE=pdfwrite toc.txt -f Input.pdf
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating internal links for TOC on a PDF BudiKusasi Linux - Software 1 01-23-2022 06:07 AM
web page/links links/links vendtagain Linux - Newbie 2 09-19-2009 08:13 PM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 12:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration