public function burst($filepattern = null)
{
$this->constrainSingleFile();
$this->getCommand()->setOperation('burst');
$this->_output = $filepattern === null ? 'pg_%04d.pdf' : $filepattern;
return $this->execute();
}
public function testCanBurstWithFilePattern() { $document = $this->getDocument1(); $dir = __DIR__; $filepattern = $dir . '/burst_page_%d.pdf'; chdir($dir); $pdf = new Pdf($document); $this->assertTrue($pdf->burst($filepattern)); for ($x = 1; $x <= 5; $x++) { $filename = sprintf($filepattern, $x); $this->assertFileExists($filename); @unlink($filename); } @unlink($dir . '/doc_data.txt'); }