Apache FOP2 is awesome, I embed it in Java, but it can also run on its own which means PHP can call it externally and simply forward the generated PDF / PNG / SVG / etc.
It also handles page breaks all by itself, you can specify the templates in millimeters / inches if you want to take an on-paper design and replicate it onto a template inch by inch, encrypt / password protect PDFs and so forth. I can't think of anything PDF-wise it can't do.