You can use Adobe Acrobat and one of the libraries for writing PDF files. This will allow you to create a document template in Adobe Acrobat, fill it in code, and print it in code. There are several open source PDF authors and some commercial ones. The differences are in the feature sets.
I have used PDFWriter in the past.
source
share