You are here

public function PdfBackendInterface::parseFile in FillPDF 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Plugin/PdfBackendInterface.php \Drupal\fillpdf\Plugin\PdfBackendInterface::parseFile()

Parse a PDF and return a list of its fields.

@todo Replace output array by a value object.

Parameters

\Drupal\file\FileInterface $template_file: The PDF template whose fields are to be parsed.

Return value

string[][] An array of associative arrays. Each sub-array contains a 'name' key with the name of the field and a 'type' key with the type. These can be iterated over and saved by the caller.

See also

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

4 methods override PdfBackendInterface::parseFile()
FillPdfServicePdfBackend::parseFile in src/Plugin/PdfBackend/FillPdfServicePdfBackend.php
Parse a PDF and return a list of its fields.
LocalServerPdfBackend::parseFile in src/Plugin/PdfBackend/LocalServerPdfBackend.php
Parse a PDF and return a list of its fields.
PdftkPdfBackend::parseFile in src/Plugin/PdfBackend/PdftkPdfBackend.php
Parse a PDF and return a list of its fields.
TestPdfBackend::parseFile in tests/modules/fillpdf_test/src/Plugin/PdfBackend/TestPdfBackend.php
Parse a PDF and return a list of its fields.

File

src/Plugin/PdfBackendInterface.php, line 27

Class

PdfBackendInterface
Defines an interface for FillPDF PdfBackend plugins.

Namespace

Drupal\fillpdf\Plugin

Code

public function parseFile(FileInterface $template_file);