I have that...
<?
if(!isset($_POST["html"])){
$html = "<!DOCTYPE html><html xmlns='
http://www.w3.org/1999/
xhtml'>";
$html .= "<head>\n";
$html .= "<meta http-equiv='Content-Type' content='text/html;
charset=utf-8' />\n";
$html .= "<title>Invoice</title>\n";
$html .= "<style>td{font-size:14px;}</style>";
$html .= "</head>\n";
$html .= "<body style='font-size:14px;' >\n";
$html .= "Body stuff goes here";
$html .= "</body>\n";
$html .= "</html>\n";
$html = str_replace('"','"',$html);
?>
<html>
<head><title>Building the Invoice</title></head>
<body onLoad="javascript:fsub();">
<form name="tform" id="tform" action="InvoiceView.php"
method="post">
<input type="hidden" name="html" value="<? echo $html; ?>" />
</form>
<script>function fsub(){document.tform.submit();}</script>
</body>
</html>
<?
} else {
require_once("dompdf/dompdf_config.inc.php");
$html = stripslashes($_POST["html"]);
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_paper("letter", "landscape");
$dompdf->render();
$dompdf->stream("Invoice.pdf" , array("Attachment" =>
0,"paper"=>"letter")); //
}
?>
The only thing that shows up on the title is InvoiceView.php
On Apr 24, 4:05 am, John Bell <
j...@belmix.com> wrote:
> you can set this in the <title> attribute of the html:
> $html = '<!DOCTYPE html><head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> <link rel="stylesheet"
> href="'.JPATH_ROOT.'/media/com_cirrus/css/pdf.css" type="text/css"/>
> *<title>Document title</title>*