How to sign PDF document with Belgian eid card

I created new open source project swelio-pdf on GitHub:

This project allows to digitally sign PDF documents, using Belgian eid card. The source code is available in C#.


C# Zip library

After the announcement about closing Codeplex, I moved my C# Zip library to GitHub:

Many of today’s applications require the capability of extracting certain files from a ZIP archive, either onto the hard disk or into memory.

Info-ZIP is an Open Source version of Phil Katz’s “deflate” and “inflate” routines used in his popular file compression program, PKZIP. Info-ZIP code has been incorporated into a number of third-party products as well, both commercial and freeware. It offers two dynamic link libraries: one for zipping, and one for unzipping.

The Info-ZIP DLLs are free to use and distribute, but they are designed to be used in C/C++ projects, so they’re not really .NET-friendly. Also, the Info-ZIP package contains almost no documentation showing how to use the Info-ZIP DLLs.

Therefore, I decided to write a small C# wrapper that provides all the required data types and functions in order to give the possibility to work with the Info-ZIP API.

More information about the Info-ZIP project can be found on Info-ZIP’s home site:


Swelio 1.5 – Freeware Belgian eID card SDK

The new release of Swelio – freeware Belgian eID card SDK is available for download.

Whats new in this release:

* Fixed some bugs in C++ code
* Updated C++ documentation
* Added Delphi documentation
* Added Microsoft .NET binding

The C# source code of the .NET binding included. The library supports AnyCPU, x86 and x64 projects. It is compatible with .NET Framework 2.0 – 4.5 and tested with all Windows versions starting from Windows XP.
The provided assembly was compiled for .NET Framework 2.0 using Microsoft Visual Studio 2008, but the project can be easily upgraded to the more recent versions of the .NET Framework and Visual Studio. It was done to cover more possible configuration, because the downgrade of the Visual Studio project is not possible. The sample project is also provided.

Please leave your comments or write a review to help me improve the quality and functionality of the Swelio SDK. If you found a bug – please report it to me using the contact form. The future requests from the active testers will be treated with higher priority.

Download Swelio SDK

EIDNative library version 3.0 is released

EIDNative – the Belgian eID card access library version 3.0 is available for download:
Now it supports x64 and x32 Windows and can be used from Windows XP to Windows 8. This is the last release of the EIDNative library and it will be not updated in the future, because I made the new more advanced and powerful library for reading electronic id cards and the new library will replace EIDNative.

Quricol 2.0 – QR Code generator

The version 2.0 of Quricol – the open source freeware QR code generator library is available for download. 

Download Based on qrencode library version 3.4.2

  • Added Visual Studio project file and external libraries for easy rebuild of quricol.dll. This was asked by Carlos GutierrezAdded possibility to specify the background and foreground colors of the image
  • Removed reference to qrencode.h from quricol.h header file. Now you have to include only one header file to your C++ project
  • Updated Delphi library, included new demo project
  • Compatible with Ansi and Unicode Delphi versions
  • Can be used with 32 and 64 bit Delphi projects
  • Updated Delphi documentation


Krento becomes Open Source

The time has come for KRENTO to be released as open source.You can find the source code on Google Code site:
After 4 years of hard work I understood that I can’t continue the development of such a big project alone. I hope that other developers will show the interest of giving the boost to this project.
More information about Krento project is available on

Quricol – QR code generator library

Quricol is an open source freeware QR code generator library for C++, Microsoft .NET and Delphi based on qrencode – QR Code encoder by Kentaro Fukuchi.The library contains methods to save the generated image to Bitmap or PNG file or generate images on-fly and save it to the stream. Both 32 and 64 bits compiled versions available along with source code.


A QR code (abbreviated from Quick Response code) is a type of matrix barcode (or two-dimensional code).


Generate Excel files without using Microsoft Excel (Part 2)

After publishing my article on CodeProject I received a lot of questions how to change the font, alignment or color of the cells in the resulting Excel file. I improved the code of the ExcelWriter library and added the possibility to format cells. You can download the new release of the ExcelWriter library here:

Update from 31 Jan. 2012:
This code is provided to show the possibility of easy export of the information to Excel files, not to manipulate existing Excel files or performing the complex formatting operations. The aim of this demo is to make the export easy and simple. In case if you do more complex tasks I can recommend to use another library, for example I do not have any plans to extend the provided code in the future.

namespace XLSExportDemo
class Program
static void Main(string[] args)

ExcelDocument document = new ExcelDocument();
document.UserName = "Perevoznyk";
document.CodePage = CultureInfo.CurrentCulture.TextInfo.ANSICodePage;

document.ColumnWidth(0, 120);
document.ColumnWidth(1, 80);

document[0, 0].Value = "ExcelWriter Demo";
document[0 ,0].Font = new System.Drawing.Font("Tahoma", 10, System.Drawing.FontStyle.Bold);
document[0, 0].ForeColor = ExcelColor.DarkRed;
document[0, 0].Alignment = Alignment.Centered;
document[0, 0].BackColor = ExcelColor.Silver;

document.WriteCell(1, 0, "int");
document.WriteCell(1, 1, 10);

document.Cell(2, 0).Value = "double";
document.Cell(2, 1).Value = 1.5;

document.Cell(3, 0).Value = "date";
document.Cell(3, 1).Value = DateTime.Now;
document.Cell(3, 1).Format = @"dd/mm/yyyy";

FileStream stream = new FileStream("demo.xls", FileMode.Create);