Jump to content

Convert database or webpage information into a PDF document


ded

Recommended Posts

Good Morning,

 

I want to allow the user to be able to click a link to print webpage information into a PDF document.  The webpage information is created from an sql database.

 

Ideas?

 

Regards,

DED

Link to comment
Share on other sites

well i dont know if PEAR has the functionality probably has

 

http://pear.php.net/package/File_PDF

 

but the ZEND framework has it zend_pdf

 

 

$pdf = new Zend_Pdf();

$pdfString = $pdf->render();

header('Content-type: application/pdf');

// Add new page

$pdf->pages[] = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);

// Add new page

$pdf->pages[] = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);

$pdfPage = $pdf->pages[1];

$pdfPage->drawText('Hello world!', 72, 720);

echo $pdfString;

exit;

 

 

usualy people implament this whole directory structure bootstrapped with stuff but you can take teh zend framework library and put it in ur site and just pick classes from it.

 

http://framework.zend.com

http://framework.zend.com/manual/en/zend.pdf.html

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.