EDocman PDF Indexer plugin

The EDocman Indexer plugin is used to extract text content from supported document files and store it in the document's indexed_content field. This allows users to search documents by the actual content inside uploaded files, instead of only searching by document title, description, category, or other metadata.

For example, when a PDF file is uploaded, the plugin reads the text inside the PDF and saves that text into the database. After that, both EDocman Search and Joomla Smart Search can use this indexed content to return more accurate search results.

This is especially useful for document libraries, legal archives, manuals, reports, policies, contracts, technical files, and any website where users need to search inside uploaded documents without downloading them first.

If the plugin is configured to use the PHP popen function, popen must be enabled on your server. If popen is disabled, you can configure the plugin to use the PHP PDF Parser instead.

Main Features

The plugin provides automatic document content indexing for EDocman documents.

Key Features

  • Extracts text content from supported document files.
  • Stores extracted content into the document's indexed_content field.
  • Allows users to search inside file contents.
  • Supports PDF content indexing.
  • Supports additional document formats depending on available adapters, such as DOC, DOCX, XLS, and XLSX.
  • Supports PDF indexing by using either:
    • pdftotext through the PHP popen function.
    • PHP PDF Parser when popen is not available.
  • Works with EDocman's own search feature.
  • Works with Joomla Smart Search.
  • Can automatically trigger Joomla Smart Search indexing when documents are uploaded.
  • Supports excluding selected documents from indexing.
  • Supports excluding documents from indexing based on document/category configuration, depending on your EDocman setup.

Practical Use of indexed_content

The most important result of this plugin is the generated indexed_content value.
When a document is uploaded, the plugin extracts readable text from the file and stores it in the database. This stored text becomes searchable data for the website.

Example

Suppose you upload a PDF file named: employee-handbook.pdf
The document title may only be: Employee Handbook
But inside the PDF, there may be text such as: annual leave policy, remote working rules, expense reimbursement, employee benefits

After the plugin indexes the file, users can search for: remote working rules or: expense reimbursement and still find the document, even if those words are not in the document title or description.
This makes document search much more useful and accurate. After the plugin indexes the file, users can search for: remote working rules or: expense reimbursement and still find the document, even if those words are not in the document title or description.

This makes document search much more useful and accurate.

Search Integration

The indexed_content generated by this plugin can be used by two search systems:

  • EDocman Search
  • Joomla Smart Search

Both search systems can search inside the value of indexed_content.

EDocman Search

EDocman has its own document search feature. Once the plugin has extracted the document content and saved it into indexed_content, EDocman Search can use that value to find matching documents.

How It Works

When users search documents through EDocman Search, the search can include:

  • Document title.
  • Description.
  • Metadata.
  • Category-related information.
  • Indexed file content stored in indexed_content.

This allows users to find documents based on words or phrases contained inside the uploaded files.

Typical Workflow

  • Administrator enables the EDocman Indexer plugin.
  • Administrator uploads a document.
  • The plugin extracts text from the uploaded file.
  • The extracted text is saved into the document's indexed_content field.
  • Users can search for terms contained inside the file.
  • EDocman Search returns matching documents.

Joomla Smart Search Integration

The plugin also works with Joomla Smart Search.

When a document is uploaded, EDocman runs the Indexer plugin to extract content from the document file. The extracted content is saved into the database. Then EDocman can trigger Joomla Smart Search indexing so that the document data, including the extracted file content, is indexed for Smart Search.

This allows Joomla Smart Search to find EDocman documents based on the actual content inside uploaded files.

Automatic Smart Search Indexing on Upload

When you upload a document through EDocman:

  • EDocman saves the uploaded document.
  • The EDocman Indexer plugin extracts text content from the file.
  • The extracted content is stored in the document's indexed_content field.
  • EDocman triggers Joomla Smart Search indexing for the document.
  • Joomla Smart Search indexes the document data, including the indexed file content.
  • Users can find the document through Joomla Smart Search.

This means that for normal document uploads, the search index can be updated automatically.

Indexing Documents from Documents List

If the administrator chooses to index document content manually from the Documents List, the workflow is different.
In this case, EDocman can extract the file content and update the indexed_content value in the database. However, Joomla Smart Search may still have old indexed data until its index is rebuilt or updated.

Therefore, after indexing documents from the Documents List, the administrator must run Joomla Smart Search indexing again before users can search the updated document content through Joomla Smart Search.

Important Note

If you use Joomla Smart Search and manually re-index EDocman documents from the Documents List, you should also re-run Joomla Smart Search indexing.

Otherwise, the newly generated or updated indexed_content may not appear in Joomla Smart Search results yet.

Search Workflow Comparison

The following table explains how document content indexing works in different search scenarios.

Scenario What EDocman Indexer Does What Joomla Smart Search Needs
Upload a new document Extracts file content and saves it to indexed_content Smart Search indexing can be triggered automatically by EDocman
Search through EDocman Search Uses the saved indexed_content directly No separate Joomla Smart Search indexing is required
Search through Joomla Smart Search after upload Uses Joomla's indexed search data Document is indexed by Smart Search after upload
Manually index documents from Documents List Updates indexed_content in the database Administrator must run Joomla Smart Search indexing again
Update or replace document file indexed_content should be regenerated Smart Search index should be updated again

Supported File Types

The plugin is designed to extract text from supported document files.

Depending on the installed adapters and your server configuration, it can support file types such as:

  • PDF
  • DOC
  • DOCX
  • XLS
  • XLSX

PDF is the main supported format. Other file types depend on the available adapter files in the plugin. Notes:

  • PDF files are processed by either pdftotext or PHP PDF Parser.
  • DOCX files are processed by reading the internal XML content of the document.
  • DOC, XLS, and XLSX support depends on the corresponding adapter files.
  • The plugin can only index text that can be extracted from the file.

Plugin Parameters

After installing the plugin, go to: Extensions → Plugins Then search for: EDocman - Indexer plugin

Open the plugin to configure its parameters.

File Extensions This parameter is used to enter the file extensions that should be indexed. Use comma-separated values without dots.

Notes

  • Enter only the file types you want the plugin to index.
  • The corresponding adapter must be available for each file type.
  • If an adapter does not exist for a file type, the plugin cannot extract content from that file type.

Use POPEN Function

This parameter controls how PDF files are processed.

Yes When Use POPEN function is set to Yes, the plugin uses the PHP popen function to run the pdftotext command-line tool. This method usually provides better performance and better PDF text extraction quality. Depending on the server operating system, the plugin can use different binaries.

Requirements when using POPEN

  • PHP popen function must be enabled.
  • The pdftotext binary must exist.
  • The binary must have execute permission.
  • On Linux, installing poppler-utils is recommended if /usr/bin/pdftotext is used.

No When Use POPEN function is set to No, the plugin uses a PHP PDF Parser library to read PDF content. This option is useful for hosting environments where popen is disabled.

How the Plugin Works

The plugin works during the document saving and indexing process. It extracts readable text from supported document files and stores that text in the document's indexed_content field.

When Uploading a New Document

When a new document is uploaded, EDocman can automatically process the uploaded file and prepare its content for searching.

  1. EDocman receives the uploaded file.
  2. The plugin checks whether the file type is supported.
  3. The plugin extracts text from the file.
  4. The extracted text is saved into the document's indexed_content field.
  5. The document is saved.
  6. If Joomla Smart Search integration is used, EDocman can also trigger Joomla Smart Search indexing for that document.

This allows newly uploaded documents to become searchable by file content without requiring users to download the files manually.

When Saving an Existing Document

When an existing document is saved, the plugin can check and update its indexed content.

  1. The plugin checks the document file.
  2. If the file exists and the file type is supported, the plugin can extract its content.
  3. The extracted content is stored in the indexed_content field.
  4. The document is saved with updated searchable content.

This is useful when a document file is replaced or when the document information is updated.

When Indexing from Documents List

Administrators can also index document content manually from the Documents List.

When this action is used:

  1. EDocman processes the selected documents.
  2. The plugin extracts text from the document files.
  3. The extracted content is stored in the indexed_content field.
  4. EDocman Search can use the updated content.
  5. Joomla Smart Search must be indexed again to recognize the updated content.

If document content is indexed manually from the Documents List, administrators should run Joomla Smart Search indexing again. Otherwise, Joomla Smart Search may still use old indexed data.


Excluding Documents from Indexing

Some documents may not need to be searchable by file content. Depending on your EDocman configuration, documents or categories can be marked as excluded from indexing.

When a document is excluded from indexing:

  • The plugin does not extract file content.
  • The indexed_content value is not generated or updated.
  • The document content will not be searchable by file content.

This is useful for:

  • Private files.
  • Temporary files.
  • Internal-only files.
  • Very large files that should not be indexed.
  • Files with sensitive text content.

Limitations

The plugin can only index text that can be extracted from the document file. If the file does not contain readable text, the plugin may not be able to generate useful indexed content.

Common Limitations

  • Scanned PDF files may not be searchable because they contain images instead of text.
  • OCR is required before scanned documents can be indexed as searchable text.
  • Password-protected PDF files may not be readable.
  • Corrupted files may fail during extraction.
  • Very large documents may take longer to process.
  • Complex PDF layouts may produce imperfect extracted text.
  • Some special characters or formatting may be removed during extraction.
  • Image content inside documents is not indexed.
  • File types without a matching adapter cannot be indexed.

Troubleshooting

This section lists common issues and the recommended checks when document content is not searchable.

PDF Content Is Not Indexed

If PDF content is not indexed, check the following:

  • The EDocman Indexer plugin is enabled.
  • The file is a supported PDF file.
  • The PDF contains real text, not only scanned images.
  • The document is not excluded from indexing.
  • The category is not excluded from indexing.
  • If Use POPEN function is set to Yes, make sure the PHP popen function is enabled.
  • Make sure the pdftotext binary exists and has execute permission.
  • If popen is not available on your server, set Use POPEN function to No.

Joomla Smart Search Does Not Show Updated Document Content

If document content was indexed manually from the Documents List, Joomla Smart Search may not show the updated content immediately.

In this case, run Joomla Smart Search indexing again.

Go to: Components → Smart Search → Index

Then rebuild or update the index.

After that, Joomla Smart Search can return results based on the updated indexed_content.

EDocman Search Does Not Show Document Content Results

If EDocman Search does not return results from document content, check the following:

  • The document has a value in the indexed_content field.
  • The document is published.
  • The document is accessible to the current user.
  • The search keyword exists in the extracted content.
  • The document is not excluded from indexing.
  • The document category is not excluded from indexing.

Recommended Workflow

For best results, use the following workflow depending on whether you are adding new documents or indexing existing ones.

For New Documents

  1. Enable the EDocman Indexer plugin.
  2. Configure the supported file extensions.
  3. Upload documents normally through EDocman.
  4. Let EDocman extract and save the document content into indexed_content.
  5. Let Joomla Smart Search index the document automatically if Smart Search integration is used.

For Existing Documents

  1. Use the indexing action from the Documents List to generate indexed_content for existing files.
  2. Confirm that the document content has been saved.
  3. Re-run Joomla Smart Search indexing.
  4. Test searching through both EDocman Search and Joomla Smart Search.

For existing documents, updating indexed_content alone is not always enough for Joomla Smart Search. Joomla Smart Search must rebuild or update its own search index to include the latest document content.


Best Practices

To get better indexing and search results, follow these recommendations.

  • Use text-based PDFs instead of scanned image PDFs.
  • Run OCR on scanned documents before uploading them.
  • Keep document file names and titles meaningful.
  • Configure only the file extensions you actually need to index.
  • Avoid indexing unnecessary very large files.
  • Rebuild Joomla Smart Search after bulk indexing existing documents.
  • Use Use POPEN function = Yes when your server supports it.
  • Use Use POPEN function = No on restricted hosting environments.
  • Test a few sample documents after setup to confirm the extracted content is searchable.

Summary

The EDocman Indexer plugin improves document search by extracting text from uploaded files and saving it into the document's indexed_content field.

This indexed content can be used by both:

  • EDocman Search
  • Joomla Smart Search

For newly uploaded documents, EDocman can extract the file content and trigger Joomla Smart Search indexing automatically.

For documents indexed manually from the Documents List, administrators should run Joomla Smart Search indexing again so the updated document content becomes available in Joomla Smart Search results.

This plugin is especially helpful for websites that manage large document libraries and need full-text search inside uploaded PDF and office documents.