mikehaertl\pdftk\Pdf::generateFdfFile PHP Method

generateFdfFile() public method

Generate the FDF file for a single PDF file.
public generateFdfFile ( string $name ) : Pdf
$name string name of the FDF file
return Pdf the pdf instance for method chaining
    public function generateFdfFile($name)
    {
        $this->constrainSingleFile();
        $this->getCommand()->setOperation('generate_fdf');
        $this->_output = $name;
        return $this->execute();
    }

Usage Example

Exemplo n.º 1
0
 public function testCanCreateFdfFileFromPdf()
 {
     $form = $this->getFilledForm();
     $file = __DIR__ . '/test.fdf';
     $pdf = new Pdf($form);
     $this->assertTrue($pdf->generateFdfFile($file));
     @unlink($file);
 }