i am new user of dompdf
how can i set the directory path to save pdf generated file and
attache to send mail
If you want to save a file you need code like this:
$html = ''; // load your HTML into this variable
$filename = '/path/to/pdffile.pdf';
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_paper('a4', 'portrait'); // change these if you need to
$dompdf->render();
file_put_contents($filename, $dompdf->output());
You will need to make sure that the web server (or PHP if you're running
on the command line) has permission to write to the directory where you
want to store the file.
As for attaching files to emails, there are a number of ways in which
you can achieve this. Personally I prefer to use the addAttachment
method of the PEAR::Mail_Mime class:
http://pear.php.net/manual/en/package.mail.mail-mime.addattachment.php
--
Paul Waring
http://www.pwaring.com