Hi,

The hard way: http://sourceforge.net/projects/pdf995/
The easier way: http://sourceforge.net/projects/pdflibrary/ and reverse-engineer.

Cheers,
NTG