I want to convert a html page to pdf format. and the pdf file should get saved in a desired location fixed by the coder.
how to do so? plz help !
I want to convert a html page to pdf format. and the pdf file should get saved in a desired location fixed by the coder.
how to do so? plz help !
Hi Sanhita
There are quite a few html to pdf converters, you can google them out. The problem is it's difficult to find a tool that converts "as it is". The better bet would be, probably, to recreate the pdf files separately with a look you desire.
Install Mozilla Firefox, if you don't have it already, and get this addon; http://www.pdfdownload.org/
It copys the page as-is to PDF,, straight from Mozilla.
try to use Xml2PDF
refer http://www.alt-soft.com
This may help you:
HTML to PDF with PHP, Java or ASP:
dancrintea.ro/html-to-pdf/
PDF specifies static, printed, visual documents, while HTML specifies fluid, on-screen, semantic documents. They aren't literally convertible. You may be able to get a possible conversion, but there's no guarantee that it'll be the one you want, or even one that looks decent.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Please don't spam the forum. As for creating PDF documents on the fly, I posted code to someone who had a similar inquiry, here:
http://www.dynamicdrive.com/forums/s...ad.php?t=47714
anjd you'd need this extension:PHP Code:<?php
$html= "<h1>hello</h1>"; //To add more html code use $html.= yourcode; in the next line
define('HTML2FPDF_VERSION','3.0(beta)');
define('RELATIVE_PATH','fpdf/');
define('FPDF_FONTPATH','font/');
require_once(RELATIVE_PATH.'fpdf.php');
require_once(RELATIVE_PATH.'htmltoolkit.php');
require_once(RELATIVE_PATH.'html2fpdf.php');
$pdf = new HTML2FPDF();
$pdf->WriteHTML($html);
$name="doc.pdf";
$pdf->Output($name);
?>
http://sourceforge.net/projects/html2fpdf/files/
HTH![]()
- Josh
Bookmarks