Skip to content

Commit

Permalink
Issue #150 Use tempDir for Fdf, Xfdf and Info files
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehaertl committed Jan 9, 2020
1 parent daf2037 commit 007a63d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public function fillForm($data, $encoding = 'UTF-8', $dropXfa = true, $format =
$this->constrainSingleFile();
if (is_array($data)) {
$className = '\mikehaertl\pdftk\\' . ($format === 'xfdf' ? 'XfdfFile' : 'FdfFile');
$data = new $className($data, null, null, null, $encoding);
$data = new $className($data, null, null, $this->tempDir, $encoding);
}
$this->getCommand()
->setOperation('fill_form')
Expand All @@ -282,7 +282,7 @@ public function updateInfo($data, $encoding = 'UTF-8')
{
$this->constrainSingleFile();
if (is_array($data)) {
$data = new InfoFile($data, null, null, null, $encoding);
$data = new InfoFile($data, null, null, $this->tempDir, $encoding);
}
$this->getCommand()
->setOperation($encoding == 'UTF-8' ? 'update_info_utf8' : 'update_info')
Expand Down

0 comments on commit 007a63d

Please sign in to comment.