public function TextExtractorPluginBase::getPdfMimeTypes in Search API attachments 9.0.x
Same name and namespace in other branches
- 8 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_attachmentsCode
public function getPdfMimeTypes() {
$pdf_mime_types = [];
$pdf_mime_types[] = $this->mimeTypeGuesser
->guessMimeType('dummy.pdf');
return $pdf_mime_types;
}