Preparing documentation for the European Court of Human Rights: Org Mode, pdftk and Latex to the rescue

Autoría: Javier de la Cueva.
Tags: ECHRLatexOrg Modepdftk.

Last week I had to file an application at the European Court of Human Rights. It is really a peculiar system. According to the Court website:

The application form should be downloaded, completed, printed out and sent by post to the Court with the necessary documents. No other form must be used.

https://www.echr.coe.int/apply-to-the-court

The application form is a pdf. It can be downloaded from several links, depending on the language that you will use to initiate the proceeding. This is the link for the English language form:

https://www.echr.coe.int/documents/d/echr/application_form_eng

Once you have downloaded it, it is worth mentioning the admonition you will find at the right top part of the form. It is written inside a red coloured line frame, in a red colour font. It states:

Please note that this form will work correctly only with Adobe Reader 9 Upwards (download available from www.adobe.com).

Please save a copy of this form locally before filling it in using Adobe Reader, then print it and post it to the Court.

I was unable to download Adobe Reader 9 Upwards for Linux, FreeBSD, OpenBSD or NetBSD, the four operating systems I normally use, so I solved this interoperability issue using a Windows 10 I have installed in a Virtual Box inside Debian.

It is really funny (or is it a tragedy?) that the European Court of Human Rights, the pinnacle of the protection of the fundamental rights in the 46 States members of the Council of Europe, forces us to accept the terms and conditions of Adobe in order to exercise our rights. It is interesting to read such terms and conditions to understand the relationship between Adobe and their users’ fundamental right to privacy, task that I leave as an exercise for the reader.

Back to the Org Mode, pdf tool kit (pdftk) and Latex part, in Section I of the form, entitled “List of accompanying documents”, the applicant must enumerate the enclosed documentation that supports the claim.

How to fulfill this requirement is crystal clear in the form:

You MUST:

In my case, I had 22 pdf documents to enclose (around 300 pages in total). A solution was to print them one by one, and then number each document by hand consecutively, but this option is very time consuming. Printing one by one the 22 documents or attaching them to an email is also prone to errors. Thus, the best way is to merge into one pdf, and only one, the 22 files.

I proceeded as follows:

https://unix.stackexchange.com/questions/693863/add-page-numbers-to-pdf

\documentclass[twoside, a4paper, 12pt]{article}
\usepackage{pdfpages}
\usepackage{changepage}
\usepackage{fancyhdr}

\setlength\topmargin{-0.675in}
\setlength\textheight{7.0in}
\setlength\textwidth{7.0in}
\setlength\oddsidemargin{-0.25in}
\setlength\evensidemargin{-0.25in}
\setlength{\headheight}{13.59999pt}

\strictpagecheck

\fancypagestyle{mystyle}{%
\fancyhf{}
\fancyhead[LE,RO]{\small\thepage}
}

\begin{document}
    \includepdf[pages=-,pagecommand={\thispagestyle{mystyle}}]{i-need-numbers.pdf}
\end{document}
#+end_verse
#+end_quote

I obtained a marvellous pdf document with the page number 1 to 301 written on the upper left corner. Impressive.

I printed and signed the application (blue ink, just in case), printed the 301 pages and went to the post office to send the documents by certificate mail, offering a huge いただきます (itadakimasu) to all the developers, forum participants and other unknown people that made my life easier.