// Remove old one, just to make sure we are making it afresh @unlink($pdfFile); $pdf = new HTML_ToPDF($htmlFile, $defaultDomain, $pdfFile); // Set that we do not want to use the page's css $pdf->setUseCSS(false); // Give it our own css, in this case it will make it so // the lines are double spaced $pdf->setAdditionalCSS(' p { line-height: 1.8em; font-size: 12pt; }'); // We want to underline links $pdf->setUnderlineLinks(true); // Scale the page down slightly $pdf->setScaleFactor('.9'); // Make the page black and light $pdf->setUseColor(false); // Convert the file $result = $pdf->convert(); // Check if the result was an error if (PEAR::isError($result)) { die($result->getMessage()); } else { echo "PDF file created successfully: {$result}"; echo '<br />Click <a href="' . basename($result) . '">here</a> to view the PDF file'; } ?> </body> </html>