On Thursday 13 May 2004 11:59 am, Ashley M. Kirchner wrote:
>     Looking for a (open source) solution here: is there some way that I
> can convert an already existing HTML page to a PDF file, by means of a
> script (on a unix box)?  What I'd like to do is have a button on all of
> our pages that, when clicked on, will perform a capture of that page,
> including all images, convert to PDF, and serve it back to the user's
> browser.  I don't just want what the user's viewing (I doubt that's
> possible anyway from a server-side point.)  I want a full page capture,
> and then converted.
>
This is how I do it. (Warning this is psuedo-code!)

http://user.it.uu.se/~jan/html2ps.html
http://www.ps2pdf.com/convert/index.htm

<?php
system ("html2ps http://taget.system.com/target.html";);
system ("ps2pdf target.ps");
echo ("<META HTTP-EQUIV=\"refresh\" content=\"1; URL=target.pdf\">");
?>

James Hicks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to