toolsmith Posted September 26, 2007 Share Posted September 26, 2007 Here's my conundrum: I have a php page that I need to export to pdf, so I'm using html2ps.php which works quite well. Unfortunately the php script requires an html file so I'm trying to export the html portion of the php page from the client side back to the server and haven't had much luck. I've gone down the path of using javascript to view the source but this only happens on the client side. I need a way to render the php page to html and then save the source on the server so I can pass it along to html2ps.php. Any thoughts? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/70768-php-to-pdf/ Share on other sites More sharing options...
rarebit Posted September 26, 2007 Share Posted September 26, 2007 Write it out to a text file named with '*.html' extension on the server and use (reference) that... Quote Link to comment https://forums.phpfreaks.com/topic/70768-php-to-pdf/#findComment-355803 Share on other sites More sharing options...
toolsmith Posted September 26, 2007 Author Share Posted September 26, 2007 Write it out to a text file named with '*.html' extension on the server and use (reference) that... You mean write the .php code out to .html on the server? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/70768-php-to-pdf/#findComment-355814 Share on other sites More sharing options...
rarebit Posted September 26, 2007 Share Posted September 26, 2007 I'm not sure exactly what you want, and i've never seen 'html2ps.php' so I don't know how it works. If you want the php code to be displayed, then you'll need to format it as if it's a tutorial. Write a html page with the php code written on it. Instead of having < or > replace them with < or > and other things like it. If it's true php, it will be interpreted by the server... Quote Link to comment https://forums.phpfreaks.com/topic/70768-php-to-pdf/#findComment-355819 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.