mikehaertl\pdftk\Pdf::getCommand PHP Method

getCommand() public method

public getCommand ( ) : Command
return Command the command instance that executes pdftk
    public function getCommand()
    {
        if ($this->_command === null) {
            $this->_command = new Command();
        }
        return $this->_command;
    }

Usage Example

Exemplo n.º 1
0
 public function testSet40BitEncryption()
 {
     $document = $this->getDocument1();
     $file = $this->getOutFile();
     $pdf = new Pdf($document);
     $this->assertInstanceOf('mikehaertl\\pdftk\\Pdf', $pdf->passwordEncryption(40));
     $this->assertTrue($pdf->saveAs($file));
     $this->assertFileExists($file);
     $tmpFile = (string) $pdf->getTmpFile();
     $this->assertEquals("pdftk A='{$document}' output '{$tmpFile}' encrypt_40bit", (string) $pdf->getCommand());
 }
All Usage Examples Of mikehaertl\pdftk\Pdf::getCommand