As of the time of first writing this post, the middleware for the Portuguese ID Card is not fully working with Windows 8.1 (though it works perfectly with Windows 8.0).
The following steps are specific to the Portuguese ID Card but might also be useful or similar with other cards.
1. Install Card Reader middleware software
First, we need to install the middleware available on the website:
http://www.cartaodecidadao.pt/index.php%3Foption=com_content&task=view&id=102&Itemid=44&lang=pt.html
Choose the correct version for your operating system, download and install it as you usually do with other software.
2. Download Digisigner
A nice bit of software that I just now discovered is DigiSigner, which you can download from:
http://www.digisigner.com/downloads.html
The Zip version works with any system that has Java installed.
3. Configure DigiSigner to work with the Smart Card
On Windows, the middleware software will automatically install the certificates and these immediately available to choose. But, using Linux, it requires a manual configuration of the smart card.
For this, when applying your signature, follow these steps:
- Open a pdf document, choose “sign document” and choose the placement for your signature
- Choose “Add existing key store…” option;
- Select “Smartcard or USB stick key store (PKCS#11)“
- Choose a friendly name and input:
/usr/local/lib/libpteidpkcs11.so
[<img title="image" border="0" alt="image" src="//lh6.ggpht.com/-QddBhGHDdkI/Usl5OI2QH3I/AAAAAAAAoB0/nfOCznLBgtY/image_thumb%25255B1%25255D.png?imgmax=800" width="310" height="147" />][5]
4. Personalize your signature
After setting it up you can personalize your signature at will among several fonts, texts, images and so on.
Conclusion
It took me quite a while to find a nice bit of software and to get it to work with my Citizen Card so I hope this might be useful for anyone looking for a way to sign pdf documents for free using any Operating system.