views:

28

answers:

1

I need to take a ZF rendered view and create a PDF that should look pretty much exactly the same, and email it.

The major issue I have right now is getting the HTML created by the view into a string that I can then process with the Zend_PDF::parse method.

The view I need to turn into a PDF is the result of a posted form. I've tried grabbing the contents of ob_get_contents into a string after a successful post, but for some reason its not in there. Should I press on with this angle?

Any help would be greatly appreciated!

+1  A: 

If you're looking to take the HTML that your view generates and dump that into function and get a PDF out you might try dompdf. It's designed to do exactly that.

smack0007
I have checked out dompdf, and while it does look somewhat promising, I'd much rather use a supplied ZF class, if it works like I hope it does, however. I finally got the view into a string using ob_get_contents, and I'm hoping the various Zend_Pdf functions can work with this string. I'm about to find out :)Also, dompdf doesn't support nested tables, and there are several in my form view. I greatly appreciate the response, however!
deaddancer