With the program Okular it is possible to digitally sign PDF files with your user certificate of the TU Dresden under Linux. Okular version 21.04 or newer is required. If the package manager of the Linux distribution you are using already provides version 21.04 or newer of Okular, you can install Okular directly this way. For Ubuntu 21.10, for example, this would be possible with the following command:

sudo apt-get install okular

You can check which version your distribution offers on the following page:

https://okular.kde.org/de/download/

Since in many cases an older version than 21.04 is still offered, the steps for installation using flatpak are described below, since this way seems to be the most reliable for most distributions.

Alternative ways for the installation can be found on the homepage of Okular or under the following link in the file "Readme.md" :

https://cloudstore.zih.tu-dresden.de/index.php/s/j5BKKyJYZFBzGsB

 Installation of Okular using Flatpak

Screenshot of the Flatpak website with marker on Install
​​​​Screenshot of the Software-App with marker on Install
  1. To install Okular using Flatpak, Flatpak itself must be installed on the system. The steps to install Flatpak for your distribution can be found at:
    https://flatpak.org/setup/ .
  2. If Flatpak is installed, you can start the installation from the following web page:
    https://flathub.org/apps/details/org.kde.okular

    Explanatory screenshot to the previous description with marker on "Install"

    Select "Install". After that, you may still need to run the downloaded file and the software app should open.

  3. In the software app window, select "Install" and the rest of the installation process should happen automatically.

    Explanatory screenshot to the previous description with marker on "Install"
  4. You should now be able to start Okular.

Configuring the certificate in Okular

To be able to use the digital signature in Okular, you still need to store your certificate in Okular. Among other possibilities, this is possible via the certificate store of Mozilla Thunderbird.

Screenshot of Okular with marker on Configure Backends...
Screenshot of Configure Backends -> PDF in Okular 
Screenshot of Configure Backends... with imported certificate
Screenshot of Okular with marker on Digitally Sign...
Screenshot of Okular with rectangle for the signature
Screenshot question about signature size
Screenshot of choosing the certificate in Okular
Screenshot of checking signatures in Okular
  1. If you have not yet imported your certificate into Thunderbird, please follow the steps in the FAQ "Setup of a personal user certificate in Thunderbird".

  2. Thunderbird's certificate store is now located in a directory of the form

    ~/.thunderbird/*.default

    or

    ~/.thunderbird/*.default-release

    Here you must replace the '*' character with the appropriate characters on your system, as the name is different for each user. If both directories exist on your system, please use the directory that contains the file "cert9.db".

  3. Open "Okular" and go to "Settings->Configure Backends...->PDF". Select under "Certificate Database" the item "Custom".
    Insert the path there that you determined in the 2nd step for the location of Thunderbird. Then confirm the data with "Apply".
     

    Explanatory screenshot to the previous description with marker on Configure Backends...

     

    Explanatory screenshot to the previous description with marker on Custom option
  4. After restarting "Okular" go to "Settings->Configure Backends...->PDF" again. Your certificate should now appear in the list under "Available Certificates".Explanatory screenshot to the previous description
  5. Open a PDF file for testing, for example Anforderung Datenschutzcontainer . Select "Tools->Digitally Sign...".
  6. Explanatory screenshot to the previous description with marker on "Digitally Sign..."
  7. Drag a rectangle with the mouse at the place where you want to place the signature.

    Explanatory screenshot to the previous description
  8. Depending on the size of the rectangle, you may receive a message that the signature is too small to read. You can confirm the question with "Sign".

    Explanatory screenshot to the previous description
  9. You can then select your certificate for signing and confirm with "OK".

    Explanatory screenshot to the previous description
  10. You can now check your signatures and any other signatures in the sidebar under "Signatures".

    Explanatory screenshot to the previous description