Re: PHP: convert a page to pdf [message #180948 is a reply to message #180945] |
Thu, 28 March 2013 13:14 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 3/28/2013 4:40 AM, badmus aliu wrote:
> can anyone help me on how to convert a database driven page to pdf using php
>
There are a number of packages which will allow you to create a PDF.
Did you try googling for "php pdf" (without the quotes)? I happen to
like fpdf (www.fpdf.org).
But if you're looking for an easy way to do it, there isn't. The page
is rendered by the browser, and PHP as no access to the rendered page.
You'll need to generate the page as a pdf (you can start with your
existing code). You won't be able to just "scrape" the browser.
Another option would be one of the HTML to PDF generators - these can
take the HTML you've already generated and create a PDF from that.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|