showBrowserHeaderAndFooter()
//->headerHtml($header)
//->footerHtml($footer)
->waitUntilNetworkIdle()
//->margins(10,10,10,10)
->savePdf($pdf);
}
public function testPdfGeneration()
{
$html = file_get_contents(base_path().'/tests/Pdf/invoice.html');
$pdf = base_path().'/tests/Pdf/invoice.pdf';
$header = '
';
$footer = '
';
$this->makePdf($header, $footer, $html, $pdf);
$this->assertTrue(file_exists($pdf));
unlink($pdf);
}
public function testPdfGeneration2()
{
$html = file_get_contents(base_path().'/tests/Pdf/invoice2.html');
$pdf = base_path().'/tests/Pdf/invoice2.pdf';
$header = '
';
$footer = '
';
$this->makePdf($header, $footer, $html, $pdf);
$this->assertTrue(file_exists($pdf));
unlink($pdf);
}
public function testPdfGeneration3()
{
$html = file_get_contents(base_path().'/tests/Pdf/invoice3.html');
$pdf = base_path().'/tests/Pdf/invoice3.pdf';
$header = '
';
$footer = '
';
$this->makePdf($header, $footer, $html, $pdf);
$this->assertTrue(file_exists($pdf));
unlink($pdf);
}
public function testPdfGeneration4()
{
$html = file_get_contents(base_path().'/tests/Pdf/invoice4.html');
$pdf = base_path().'/tests/Pdf/invoice4.pdf';
$header = '
';
$footer = '
';
$this->makePdf($header, $footer, $html, $pdf);
$this->assertTrue(file_exists($pdf));
unlink($pdf);
}
public function testPdfGeneration5()
{
$html = file_get_contents(base_path().'/tests/Pdf/invoice5.html');
$pdf = base_path().'/tests/Pdf/invoice5.pdf';
$header = '
';
$footer = '
';
$this->makePdf($header, $footer, $html, $pdf);
$this->assertTrue(file_exists($pdf));
unlink($pdf);
}
}