Consider using PDFlib as a PHP library to do this. Refer to This guide to install it. All of the functions I will mention are from php.net
First, you'll need to call PDF_begin_document to begin the document under a specified filename. You may then use PDF_setfont() to set the font to use(Refer to http://www.php.net/manual/en/function.pdf-setfont.php#10254 for the core fonts you don't need to embed, it looks as if they may not support size>12)
Create a page with PDF_begin_page_ext()
You can then use PDF_add_textflow() to add text from strings(Use string manipulation as it is easier then groping 5-subroutine-deep with textflows, I think \n is supported)
End the page after adding your textflows with PDF_end_page_ext()
Be sure to use PDF_end_document() to end the document. When you began the document, it took a filename. You will find the PDF there.