Last year I did a project with PDF files, and I just studied the PDF format, which I am very happy about.
The PDF specification is freely available, and the PDF is reasonably accessible and easy to understand as a programmer. PDF is a text document that can be compressed. Each page is a Cartesian plane on which you draw geometric shapes one by one. It is low level and adapted for creating software. Obviously there are advanced things like glyphs and things, but like any well-designed technology, you can stick to layers of abstraction if you want.
Whether direct PDF depends on the complexity of your documents. For basic materials with simple graphics, text and images (for example, an invoice is a good candidate), then I will just write the PDF directly. You will get a good experience and you will be in full control.
For more complex things like tables and pie charts (for which the PDF is too low level for direct recording), I would look into a library or some toolkit.
Jason smith
source share