You are here

public function PdftkPdfBackend::populateWithFieldData in FillPDF 8.4

Overrides FillPdfBackendPluginInterface::populateWithFieldData

Deprecated

in fillpdf:8.x-4.9 and is removed from fillpdf:8.x-5.0. Instead use PdfBackendInterface::mergeFile().

See also

https://www.drupal.org/node/3059476

\Drupal\fillpdf\Plugin\PdfBackendInterface::mergeFile()

File

src/Plugin/PdfBackend/PdftkPdfBackend.php, line 191

Class

PdftkPdfBackend
Pdftk PdfBackend plugin.

Namespace

Drupal\fillpdf\Plugin\PdfBackend

Code

public function populateWithFieldData(FillPdfFormInterface $fillpdf_form, array $field_mapping, array $context) {
  $template_file = File::load($fillpdf_form->file->target_id);
  return $this
    ->mergeFile($template_file, $field_mapping, $context);
}