Friday, February 18, 2022

Okular: Signature verification User Interface added to Okular mobile interface

Okular has two user interfaces, you can control which one you get when compiling okular by setting the OKULAR_UI cmake variable to desktop (the default) or to mobile (which you can build just fine on the desktop too, there's nothing "mobile only" in it).


The mobile one is built on top of Kirigami and is more oriented to use with touch screens. It also has fewer features, for example, you can't add annotations nor fill forms. I could say it's less likely you need those features on a mobile form factor but that's less and less true as time goes and computing shifts to mobile devices, but that's a story for another day.


One of the features that was missing until today is the user interface parts related to Digital Signature verification, that is, those parts that say if a PDF is signed, if the signature is valid, let you see the certificate, etc.


Now the same as with the desktop version, you get 

the "This document is signed" (and it's variations) banner



The Signature tree on the sidebar/drawer



The Signature properties dialog



And the Certificate properties dialog


The last two are not super great looking but there's not much more you can do when you have to dump lots of data to the user.

Friday, February 04, 2022

Okular: Signature support now works on Windows

Since a few hours ago the Okular version available in the Microsoft Store for Windows has the same signature support than the Linux/FreeBSD versions.

 

Some screenshots, though it's nothing impressive, it's the same User Interface that we already have had for a while


A file I just signed, showing the Signature and Certificate panels


The PDF backend settings


This "new feature" has been delivered with the update of the just released Okular 21.12.2.

The interesting part is that adding Signature support for Okular on Windows didn't actually require *any* change in Okular itself, its code was already good.

 

What we needed was to add NSS [1] to Craft [2] and also some tweaks to poppler [3], because sadly NSS doesn't behave exactly the same on Linux than on Windows, and once that was in, just start Okular again and voilĂ  everything was working as expected :)


Relevant Merge Requests:

https://invent.kde.org/packaging/craft-blueprints-kde/-/merge_requests/301

https://invent.kde.org/packaging/craft-blueprints-kde/-/merge_requests/304

https://invent.kde.org/packaging/craft-blueprints-kde/-/merge_requests/305

https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1038

https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1042

https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1044

https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1056

https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1057

https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1059

 

[1] NSS = the library poppler uses for signature support

[2] Craft = the meta build system we use for building KDE software on Windows

[3] poppler = the library that Okular uses for PDF support