public multiStamp ( string $file ) : |
||
$file | string | name of the PDF file to add as overlay |
return | the pdf instance for method chaining |
public function multiStamp($file)
{
$this->getCommand()->setOperation('multistamp')->setOperationArgument($file, true);
return $this;
}
public function testCanMultiStamp() { $document1 = $this->getDocument1(); $document2 = $this->getDocument2(); $file = $this->getOutFile(); $pdf = new Pdf($document1); $this->assertInstanceOf('mikehaertl\\pdftk\\Pdf', $pdf->multiStamp($document2)); $this->assertTrue($pdf->saveAs($file)); $this->assertFileExists($file); $tmpFile = (string) $pdf->getTmpFile(); $this->assertEquals("pdftk A='{$document1}' multistamp '{$document2}' output '{$tmpFile}'", (string) $pdf->getCommand()); }