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:
arrange the documents in order by date and by set of proceedings;
number the pages consecutively; and
NOT staple, bind or tape the documents.
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:
As I drafted the facts in the application, I copied the relevant documents inside a new directory and renamed the file with the pattern doc-01.pdf to doc-22.pdf.
Some documents have an odd number of pages which will then produce that a document would begin in an even page. To avoid this, I created a blank pdf with Libreoffice, exporting a blank odt file into pdf. I named it blank.pdf
Insted of using the pdftk command in a terminal to produce the final pdf containing all the documents, I wrote it in an org mode file. In this way I could check the final pdf and if it was not correct, I would just change the org file without having to tinker with the command. Furthermore, I would always be able to repeat how to obtain the final document. The command I used was something like this:
#+begin_src sh
cd ~/work/included-documentation;
pdftk doc-01.pdf \
doc-02.pdf \
doc-03.pdf blank.pdf \
doc-04.pdf \
doc-05.pdf blank.pdf \
doc-06.pdf \
doc-07.pdf \
...
doc-22.pdf \
cat output all-documents.pdf
#+end_src
Typing C-c C-c (Control-c Control-c) inside the above block will execute the command. The output will be the file all-documents.pdf.
Once I checked that the all-documents.pdf was correct (301 pages in my case), instead of handwriting the numbers, I used Latex. The script I needed came from Neverdimed (based on an initial solution of Soul Singin’ in Debian Forums) which I copied from the following link:
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.