getPdfFilename() public method

public getPdfFilename ( ) : string
return string the filename of the temporary PDF file
Beispiel #1
0
 public function testCanUseXvfbRun()
 {
     $inFile = $this->getHtmlAsset();
     $outFile = $this->getOutFile();
     $binary = $this->getBinary();
     $pdf = new Pdf(array('binary' => $binary, 'commandOptions' => array('enableXvfb' => true)));
     $this->assertInstanceOf('mikehaertl\\wkhtmlto\\Pdf', $pdf->addPage($inFile));
     $this->assertTrue($pdf->saveAs($outFile));
     $tmpFile = $pdf->getPdfFilename();
     $this->assertEquals("xvfb-run -a --server-args=\"-screen 0, 1024x768x24\" {$binary} '{$inFile}' '{$tmpFile}'", (string) $pdf->getCommand());
     unlink($outFile);
 }