What is the easiest way to add internal links to a PDF?
You can do this with Ghostscript using the pdfmark some introduction to the pdfmark topic see also Thomas Merz's PDFmark Primer .nFor an example to achieve a similar thing see this answer Merge PDF's with PDFTK with Bookmarks? nAlternatively you ...use qpdf to expand all pressed) internal PDFstreams into ASCII ...use qpdf again to repress the PDF streams. ordered-list
How do I write and deploy a Linux script for Ubuntu?
Thanks for the A2A. Im going to assume you want to write a shell script rather than a script in some other scripting language. In this con Im using the term scripting language in themon meaning of an interpreted language often used for small programs that are distributed as scripts that is files containing the source code. First you write the actual script. You edit it with a editor. Emacs Vim gedit nano pico and any of a number of others will do fine. There is no such thing as a file extension in Linux in the sense that Windows uses them. That not to say that various tools on a Linux system won make assumptions about file naming conventions but shells really don care what you name your shell scripts. So for example I have this one PDFNAME=`basename $PWD` code pdftk $@ cat output ..$ code It uses the pdftk tool to concatenate a set of PDF files into a single multipage PDF file. I use it to reassemble things Ive scanned like notes from classes. The file name is pdfcat code . There are multiple ways to run a shell script. You can actually run it from themand line in one of two ways. First you can source it. I put that in quotes because there is amand source code in some shells that does this but it isn done that way in every shell and it isnmonly spelled out in bash because bash provides . as a synonym for it. So I could run this as either source pdfcat *.pdf code or . pdfcat *.pdf code The second way is to make the script executable. That requires three things. First the file itself has to have its executable permission turned on. Assuming this is just for your personal use the user executable permission is all you need. You do that with chmod u+x pdfcat code Thatmand assumes that you are in the directory containing the script when you execute it obviously. The second thing it will require is that the script is in a directory which is on your PATH or that you provide either a relative or absolute path to it. I chose to put this script in my ~ directory which is on my PATH. I add it to my PATH in my .profile script. Finally any script that has to be run by an interpreter will be fed to the user shell. That fine if the script is for personal use and is written for your shell. Otherwise you need to include a shebang line at the beginning. It called that because that is how many people pronounce #!. The appropriate line is #! followed immediately by the fully qualified path name for the interpreter and any flags to be passed to it. Your script will be fed to its standard input. So for bash you would add #! code For Perl itmon to add the -w flag as well so this line would be #! -w code It has to be the first line of the file with #! being the first two bytes of the file. There are also some limits on the length of themand line it will support. Assuming you have done this you can execute the shell script as if it were just like any other executablemand. So I can now pdfcat *.pdf code The other way to run a script is to put it on your menu or create a desktop icon for it. Yes you really can do that. It specific to the desktop environment you are using. It also means that themand will generally execute with your home directory as its working directory and there won be a mechanism for passing it differentmand line arguments each time you click on it. As for deploying a script that depends on whether it for personal use use by all users on your system or part of a package you want to distribute. For personal use simply do what I described above. For system-wide use on your own system put it in a directory that will be accessible to everyone and on everyone PATH and be sure that the permissions make it readable and executable by everyone but not writeable by the world. So you might put it in and set the permissions like this chmod 755 code Deploy it as part of a package for use on other systems will require creating a package for it with appropriate installation scripts. That depends on how you want it to be installed and is beyond the scope of a simple answer.