I want to create a link on my ajax/php driven website that can be clicked on and will take the current page and convert it to pdf.

I have tried using dompdf but from what I can tell, it doesn't have the ability to render something dynamic with ajax. It only takes the whole file on the server and converts it and since the page being viewed is actually made up of several files it doesn't know how to preform the same results like the web browser.

I am wondering if there would be some kind of work around for this?

Any suggestions?

Spudhead

01-26-2011, 02:16 PM

Well.. there's got to be a better way than this, but one approach might be just to grab the entire generated contents of your HTML tag, and fire that at your PHP script. In jquery: