[PHP] HTML2pdf
[NB Got trigger-happy on the delete again. Sorry.] convert HTML to PDF with CSS intact There's a 'webthumb' application from the GD guys that would, in theory, let you snatch the way a URL looks to your web-server's X + Mozilla setup, and then you'd have that as a JPEG, which you could then cram into a PDF... Probably not the ideal solution, but it should work You'd have to have 'webthumb', X, and a webthumb-compatible browser installed on your server -- or wherever you intend to generate the PDFs... Or, at least, somewhere that you could generate JPEGs and then get them to the machine where you generate PDFs. I haven't even gotten around to installing webthumb, so now you know as much as I do about it. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML2PDF on the fly
Hi all, Can anybody tell me how can I convert the HTML to PDF on the fly. I have a HTML form which should be converted into PDF after filling and submitting it. Please give me your valuable suggestions. I have been using HTMLDOC-1.8.23. executing the below code giving error.This code is given in HTMLDOC. ?php function topdf($filename, $options = ) { # Write the content type to the client... header(Content-Type: application/pdf); flush(); # Run HTMLDOC to provide the PDF file to the user... passthru(htmldoc --no-localfiles --no-compression -t pdf14 --quiet --jpeg --webpage .$options $filename); } // // 'bad_url()' - See if the URL contains bad characters... // function bad_url($url) { // See if the URL starts with http: or https:... if (strncmp($url, http://;, 7) != 0 strncmp($url, https://;, 8) != 0) { return 1; } // Check for bad characters in the URL... $len = strlen($url); for ($i = 0; $i $len; $i ++) { if (!strchr(~_*()/:%?+-@;=,$., $url[$i]) !ctype_alnum($url[$i])) { return 1; } } return 0; } // // MAIN ENTRY - Pass the trailing path info in to HTMLDOC... // global $SERVER_NAME; global $SERVER_PORT; global $PATH_INFO; global $QUERY_STRING; if ($QUERY_STRING != ) { $url = ${QUERY_STRING}; //$url=http://${SERVER_NAME}:${SERVER_PORT}${PATH_INFO}?${QUERY_STRING} } else { $url = http://${SERVER_NAME}:${SERVER_PORT}$PATH_INFO;; } if (bad_url($url)) { print(HTMLHEADTITLEBad URL/TITLE/HEAD\n .BODYH1Bad URL/H1\n .PThe URL BTT$url/TT/B is bad./P\n ./BODY/HTML\n); } else { topdf($url); } ? -- Thanks Regards Praveen Kumar SoftPro Systems Ltd ---SOFTPRO DISCLAIMER-- Information contained in this E-MAIL and any attachments are confidential being proprietary to SOFTPRO SYSTEMS is 'privileged' and 'confidential'. If you are not an intended or authorised recipient of this E-MAIL or have received it in error, You are notified that any use, copying or dissemination of the information contained in this E-MAIL in any manner whatsoever is strictly prohibited. Please delete it immediately and notify the sender by E-MAIL. In such a case reading, reproducing, printing or further dissemination of this E-MAIL is strictly prohibited and may be unlawful. SOFTPRO SYSYTEMS does not REPRESENT or WARRANT that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this E-MAIL and any ATTACHEMENTS may be those of the author and are not necessarily those of SOFTPRO SYSTEMS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML2PDF on the fly
K. Praveen Kumar wrote: Hi all, Can anybody tell me how can I convert the HTML to PDF on the fly. I have a HTML form which should be converted into PDF after filling and submitting it. Please give me your valuable suggestions. I have been using HTMLDOC-1.8.23. http://www.fpdf.org http://www.php.net/pdf executing the below code giving error.This code is given in HTMLDOC. What error? -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com --- Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML2PDF on the fly
This is the error I am getting while executing the script. File does not begin with '%PDF-'. -- Thanks Regards Praveen Kumar SoftPro Systems Ltd On Tue, 2003-11-11 at 16:29, Burhan Khalid wrote: K. Praveen Kumar wrote: Hi all, Can anybody tell me how can I convert the HTML to PDF on the fly. I have a HTML form which should be converted into PDF after filling and submitting it. Please give me your valuable suggestions. I have been using HTMLDOC-1.8.23. http://www.fpdf.org http://www.php.net/pdf executing the below code giving error.This code is given in HTMLDOC. What error? ---SOFTPRO DISCLAIMER-- Information contained in this E-MAIL and any attachments are confidential being proprietary to SOFTPRO SYSTEMS is 'privileged' and 'confidential'. If you are not an intended or authorised recipient of this E-MAIL or have received it in error, You are notified that any use, copying or dissemination of the information contained in this E-MAIL in any manner whatsoever is strictly prohibited. Please delete it immediately and notify the sender by E-MAIL. In such a case reading, reproducing, printing or further dissemination of this E-MAIL is strictly prohibited and may be unlawful. SOFTPRO SYSYTEMS does not REPRESENT or WARRANT that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this E-MAIL and any ATTACHEMENTS may be those of the author and are not necessarily those of SOFTPRO SYSTEMS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML2PDF on the fly
Save the file and look at its content, you might have php errors in it. K. Praveen Kumar wrote: This is the error I am getting while executing the script. File does not begin with '%PDF-'. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html2pdf
On Tue, 6 Nov 2001, Valentin V. Petruchek wrote: Hello everyone! I'm looking for powerful (e.g. table and css support) generator html2pdf, preferable written in php. Well it's not written in PHP, but it works well enough with it: http://www.easysw.com/htmldoc It's a good package, the table support was good enough for my uses, though I don't know how well css is supported. -burk -- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]