Okular for Windows 11: PKCS certificates not detected

Recently, I have been trying to find an open source alternative to pdf signing instead of using Adobe Acrobat. It has been much tougher than I thought.

I made a PKCS key using CACert and XCA and I added that to the Windows certification directory. But when it came to programs to sign documents with it, I struggled to find good options.

Libreoffice was one, but when I imported the document it did not seem to recognize that the pdf was a form and did not let me sign the areas specified in the form I was trying to sign.

So I went to Okular, which was easier at first. It recognized the QT fields, but when I tried to sign in the specified locations, it said “There are no available signing certificates.” When I checked the manual it said that the Poppler library is used to sign PDFs. I tried downloading “Poppler” through the unofficial Windows setup, but I have no clue how to set up my PKCS key so that it is recognized by the program.

I’m feeling kind of lost here and I have not been able to find helpful documentation on how to continue. Does anyone have any advice? Thank you!

1 Like

I found next way to use Okular for Windows to sign pdfs:

  1. You need to have certificate in *.pfx format. Depending on your specific situation (need to convert existing certificate or create a new one via PowerShell), the easiest way is to ask AI for detailed “how-to” guide. I used perplexity for guidance of creation self-signed certificate using PowerShell.
  2. Okular reads certificates from an NSS database (used by Firefox or Thunderbird), not directly from PFX files or Windows certificate stores. It expects certificates to be imported into the NSS database prior you can see them in Okular. I was unsuccessful to connect Okular to Firefox NSS certificates database, but successful with Thunderbird. You can also ask AI how to create NSS database if you don’t use Thunderbird.
  3. After steps 1 and 2 you point Okular to your NSS-database and you see available certificates. You can place digital signature into pdf. The big con is that there are NO any possibility to change visual appearance of signature, just use it as is. I tried to use background picture for digital signature (like in Acrobat or any other advanced pdf editors), but it disappears exactly after finishing signature. As this behavior is same in three different builds for Windows (which I tested), we can only be content with what we have - a poor text signature without any way to change it.