header("Content-Type: application/pdf");
header("Content-Disposition:inline;filename=\"invoice.pdf\"");
header("Content-Transfer-Encoding: binary");
if (isset($_POST['submit'])) {
$name = $_POST['name'];
}
ob_start();
include 'pdfInvoice.php';
$html = ob_get_contents();
ob_end_clean();
include("mpdf60/mpdf.php");
$mpdf = new mPDF('utf-8', 'A4', '12', '', 10, 10, 7, 7, 10, 10);
$stylesheet = file_get_contents('css/invoice.css'); //подключаем css
$mpdf->WriteHTML($stylesheet, 1);
$mpdf->WriteHTML($html, 2); //формируем pdf
$mpdf->Output('invoice.pdf', 'I');
if (isset($_POST['submit'])) {
$name = $_POST['name'];
}
ob_start();
include 'pdfInvoice.php';
$html = ob_get_contents();
ob_end_clean();
include("mpdf60/mpdf.php");
$mpdf = new mPDF('utf-8', 'A4', '12', '', 10, 10, 7, 7, 10, 10);
$stylesheet = file_get_contents('css/invoice.css'); //подключаем css
$mpdf->WriteHTML($stylesheet, 1);
$mpdf->WriteHTML($html, 2); //формируем pdf
$mpdf->Output('invoice.pdf', 'I');
<form action="pdf.php" method="post">
<input type="text" name="name" value="Vasya">
<input type="text" name="password" value="pupkin">
<input id="form-save" type="submit" value="Отправить">
</form>
<form action="pdfToEmail.php" method="post">
<form action="pdf.php" method="post">
<input type="text" name="name" value="Vasya">
<input type="text" name="password" value="pupkin">
<input id="form-save" type="submit" value="Отправить">
</form>
<input id="form-email" type="submit" value="Отправить">
</form>
Вот помещается по три слова
А на печати по 2