I have downloaded the Prince.php class which converts an html/xhtml/xml file into a PDF. It works perfectly as I have done it from the command line without a problem.
The method that I used to do it in the command line was:
Code:
# php index.php > index.xml
# prince index.xml
this creates a file called index.pdf and it works perfectly.
Now... I tried running:
Code:
system('php index.php > index.xml');
This created the xml file but did NOT put the contents of the file into it.
So... I am calling index.php using POST to get some variables into it from a form. I then dynamically determine the output of the page using the value of those variables. Now I need to somehow get the XHTML stream from what is displayed in the browser and send it to the prince method that I'm calling to convert the xml stream to PDF.
I hope this made sense. Any ideas?
|