public function testCanFillFormFromFile()
{
$form = $this->getForm();
$fdf = $this->getFdf();
$file = $this->getOutFile();
$pdf = new Pdf($form);
$this->assertInstanceOf('mikehaertl\\pdftk\\Pdf', $pdf->fillForm($fdf));
$this->assertInstanceOf('mikehaertl\\pdftk\\Pdf', $pdf->needAppearances());
$this->assertTrue($pdf->saveAs($file));
$this->assertFileExists($file);
$tmpFile = (string) $pdf->getTmpFile();
$this->assertRegExp("#pdftk A='{$form}' fill_form '{$fdf}' output '{$tmpFile}' drop_xfa need_appearances#", (string) $pdf->getCommand());
}