-
Notifications
You must be signed in to change notification settings - Fork 3
LaTeX
We use LaTeX to generate enormous pdf files for the CITES Checklist. The reason for that technological choice is that we were required to follow the format of the original files, which had document properties such as "same page footnotes", which were beyond whatever we managed to get out of either Prawn or html -> pdf solutions.
The introduction pages to Checklist's pdf outputs come from external pdf files, which are included into in the master document. Problem is, LaTeX does not preserve hyperlinks from an included pdf document. There is a workaround to get this to work in order to be able to embed the intro pages correctly in the checklist pdfs. The following tools are required to be able to proceed:
-
pdfannotextractor.pl
- should be in texlive-extra package, installed with texlive-full -
libfile-which-perl
-
run this command to install PDFBox (that's a Java jar required by pdfannotextractor that needs to be v. 0.7.2 or 0.7.3 -- not the current from apt-get))
pdfannotextractor --install
The following needs to be done whenever the intro pdfs are changed:
-
run this command on every
.pdf
file to be included, this will generate a corresponding.pax
file:pdfannotextractor static_index.pdf
-
check both the updated
.pdf
andpax
files into source control -
pdflatex
should pick the.pax
files and use them to reinsert hyperlinks into the included.pdf
files. It's considered an experimental feature but has been working for us so far.
More info: http://anorien.csc.warwick.ac.uk/mirrors/CTAN/macros/latex/contrib/pax/README
The "skip intro" link on the first page of checklist pdf downloads is created with eso-pic package, which allows to overlay the link on static page (imported via pdfpages). The required version of that package is 2.0d, which seems to be unavailable in the texlive distribution at the time of writing. Therefore, the package might need to be installed manually (a copy can be found in public/latex/eso-pic.sty)
sudo mv /usr/share/texmf-texlive/tex/latex/eso-pic/ /usr/share/texmf-texlive/tex/latex/eso-pic-old
sudo mkdir /usr/share/texmf-texlive/tex/latex/eso-pic
sudo cp eso-pic.sty /usr/share/texmf-texlive/tex/latex/eso-pic/