public function configure(array $config = [])
{
$this->extension = '.pdf';
$defaultConfig = $this->getDefaultConfiguration();
$this->config = array_replace_recursive($defaultConfig['pdf'], $config);
$this->setConfigDefaultOptions($this->config['phantom']);
$this->commandOptions = $this->configDefaultOptions;
$this->setBinaryPath((new PhantomBinary())->getBin());
return $this;
}
public function testGetHeaderHeight() { $exporter = new PdfExporter(); $exporter->configure(['header' => ['height' => '0px']]); $this->assertEquals('0px', $exporter->getHeaderHeight()); $exporter->configure(['header' => ['height' => '100px']]); $this->assertEquals('100px', $exporter->getHeaderHeight()); }