puoi usare fpdf template o simili

http://fpdi.setasign.de/