Port80 Forums Fast Hit Web Hosting

Our Platinum Sponsors:


Go Back   Port80 Forums > Development & Code > php & mySQL

Reply
 
Thread Tools Display Modes
  #1  
Old 24-06-2009, 12:07 PM
Vee Vee is offline
Senior Member
AWIA Member
 
Join Date: Jul 2008
Location: Mandurah, WA
Posts: 425
Vee is on a distinguished road
Default html2pdf?

Hi peeps,

html2pdf in PHP - what are the cool kids using these days?

Cheers
Reply With Quote
  #2  
Old 26-06-2009, 08:58 AM
Vee Vee is offline
Senior Member
AWIA Member
 
Join Date: Jul 2008
Location: Mandurah, WA
Posts: 425
Vee is on a distinguished road
Default

Nobody has done html2pdf with PHP lately?

I bet it's one line in RoR
Reply With Quote
  #3  
Old 26-06-2009, 09:24 AM
kay's Avatar
kay kay is offline
Senior Member
AWIA Member Site Admin
 
Join Date: Oct 2002
Location: Perth
Posts: 3,669
kay has disabled reputation
Default

Quote:
Originally Posted by Vee View Post
Nobody has done html2pdf with PHP lately?

I bet it's one line in RoR
This is it in ColdFusion:

Code:
<cfdocument format="PDF">
    <h1>UR HTML GOES HERE</h1>
</cfdocument>
__________________
buy my monaro!
Reply With Quote
  #4  
Old 26-06-2009, 11:26 AM
madpilot's Avatar
madpilot madpilot is offline
Senior Member
AWIA Member
 
Join Date: Nov 2002
Location: Perth
Posts: 1,743
madpilot is on a distinguished road
Default

Quote:
Originally Posted by Vee View Post
Nobody has done html2pdf with PHP lately?

I bet it's one line in RoR
Nah, not quite (Although I haven't look at prawn yet, which is supposed to be wikid.)

Have a look at tcpdf for PHP - it has a basic HTML parser.
Reply With Quote
  #5  
Old 26-06-2009, 11:47 AM
Franki's Avatar
Franki Franki is offline
Senior Member
AWIA Member
 
Join Date: Oct 2002
Location: Perth
Posts: 2,261
Franki is on a distinguished road
Default

Code:
<?
require('html2fpdf.php');
$pdf=new HTML2FPDF();
$pdf->AddPage();
$fp = fopen("sample.html","r");
$strContent = fread($fp, filesize("sample.html"));
fclose($fp);
$pdf->WriteHTML($strContent);
$pdf->Output("sample.pdf");
echo "PDF file is generated successfully!";
?>
Reply With Quote
  #6  
Old 26-06-2009, 03:28 PM
Vee Vee is offline
Senior Member
AWIA Member
 
Join Date: Jul 2008
Location: Mandurah, WA
Posts: 425
Vee is on a distinguished road
Default

Thanks, I'll look into them both.
Reply With Quote
  #7  
Old 29-06-2009, 01:55 PM
benmay benmay is offline
Senior Member
AWIA Member
 
Join Date: Jul 2007
Location: Hervey Bay, QLD
Posts: 164
benmay is on a distinguished road
Default

I use domfpdf which is now on google code, and for CodeIgniter - handles MOST css elements, some things you need to gear it back to basic HTML, but very nice otherwise
__________________
Alyte Creative | Ben May
Reply With Quote
  #8  
Old 29-06-2009, 04:58 PM
stevebramley's Avatar
stevebramley stevebramley is offline
Senior Member
AWIA Member
 
Join Date: Jun 2006
Location: Applecross, Perth
Age: 43
Posts: 179
stevebramley is on a distinguished road
Default

I did a bunch of html2pdf for a client year before last, autogenerating reciepts for online payments. what you after? I'd be happy to dig it up and pass it on if it's suitable.
__________________
EITS Global Pty Ltd - Head of Product Development
Reply With Quote
  #9  
Old 29-06-2009, 05:05 PM
Vee Vee is offline
Senior Member
AWIA Member
 
Join Date: Jul 2008
Location: Mandurah, WA
Posts: 425
Vee is on a distinguished road
Default

This should be fairly straightforward - it's an online application form that needs to be delivered to the client by email in a ready to print format for offline processing and storage.

Their current system has the client downloading an ever increasing CSV file before manually performing a mail merge on the latest entries. It takes the client a whole couple of minutes but it's just a lame way of doing things.

The project hasn't started yet but I'd love to see some existing code, if only to get an idea of another way of doing things. I'll PM you my email address, Steve.
Reply With Quote
  #10  
Old 29-06-2009, 05:35 PM
patricktt's Avatar
patricktt patricktt is offline
Senior Member
AWIA Member
 
Join Date: May 2009
Location: Waroona, WA, Australia
Posts: 341
patricktt is on a distinguished road
Default

I have used dompdf quite a bit and recommend it, it's very easy to use and the results are impressive
__________________
Templeman Twells
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +8. The time now is 10:30 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.