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

2 comments:

Andreas Bischoff said...

Is this still true with the version 22.08.1? Okular crashes every time I try to sign a PDF.
It doesn't ask for the certificate password and alwas leaves a okular_*****.pdf with size 0 bytes behind.

It calls c:\Windows\system32\ucrtbase.dll which is the cause of the crash. Do you have other KDE-APPs (or perl?) installed? Or a custom ucrtbase.dll in the path?

Albert Astals Cid said...

I don't know what makes you think reporting a bug in my blog is a good idea. But it's not.