You are here

public function TextExtractorPluginBase::getPdfMimeTypes in Search API attachments 8

Same name and namespace in other branches
  1. 9.0.x src/TextExtractorPluginBase.php \Drupal\search_api_attachments\TextExtractorPluginBase::getPdfMimeTypes()

Helper method to get the PDF MIME types.

Return value

array An array of the PDF MIME types.

2 calls to TextExtractorPluginBase::getPdfMimeTypes()
PdftotextExtractor::extract in src/Plugin/search_api_attachments/PdftotextExtractor.php
Extract file with Pdftotext command line tool.
PythonPdf2txtExtractor::extract in src/Plugin/search_api_attachments/PythonPdf2txtExtractor.php
Extract file with python Pdf2txt library.

File

src/TextExtractorPluginBase.php, line 165

Class

TextExtractorPluginBase
Base class for plugins able to extract file content.

Namespace

Drupal\search_api_attachments

Code

public function getPdfMimeTypes() {
  $pdf_mime_types = [];
  $pdf_mime_types[] = $this->mimeTypeGuesser
    ->guess('dummy.pdf');
  return $pdf_mime_types;
}