Library FlyPDF.
FlyPDF is a shared object library (.so) which allows to generate PDF files without using any PDF library as dependency. You may use it for any kind of usage and modify it to suit your needs.
FlyPDF has other advantages: high level functions.