Welcome,
Guest
|
|
PDF indexation doesn't work for Windows 8 - 64 bits.
I have setup server as 64 bits in config page. I have the following message "empty body". But manual conversion from pdf to text works with pdftotext.exe. |
The administrator has disabled public write access.
|
|
Hi,
we do not understand your problem. You can send us more detail, with screen and use case? Thanks |
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie Help us by voting our extensions on Joomla.org: JiFile JoomPhoto Mobile Easy Language
The administrator has disabled public write access.
|
|
I couldn't index PDF files. I thought that ist was due to the fact that my computer is a windows 8 64bits. I tried to understand how ifile works and I have found 2 bugs in PDF adapter: Adapter_Search_Lucene_Document_PDF.php.
-1) popen doesn't work if there is a space in the path of the pdftotext exe. Set " at the beginning and the end of the exe path for WIN servers: Change: $handle = popen($pathBinaryFile . "helpers/binaries/windows/pdftotext.exe -q -htmlmeta \"{$this->getFilename()}\" - 2>nul", 'r'); By: $handle = popen("\"".$pathBinaryFile . "helpers/binaries/windows/pdftotext.exe\" -q -htmlmeta \"{$this->getFilename()}\" - 2>nul", 'r'); -2) $contents variable is set to blank in getTxtFromBinaries() before updating body: $contents = ''; if($handle2){ while (!feof($handle2)) { set_time_limit(0); $contents .= fread($handle2, 8192); } } $this->indexValues->setBody($contents); Commentarize the line: $contents = ''; |
The administrator has disabled public write access.
|
|
BONNICHON-DAUBINS wrote:
I couldn't index PDF files. I thought that ist was due to the fact that my computer is a windows 8 64bits. I tried to understand how ifile works and I have found 2 bugs in PDF adapter: Adapter_Search_Lucene_Document_PDF.php. -1) popen doesn't work if there is a space in the path of the pdftotext exe. Set " at the beginning and the end of the exe path for WIN servers: Change: $handle = popen($pathBinaryFile . "helpers/binaries/windows/pdftotext.exe -q -htmlmeta \"{$this->getFilename()}\" - 2>nul", 'r'); By: $handle = popen("\"".$pathBinaryFile . "helpers/binaries/windows/pdftotext.exe\" -q -htmlmeta \"{$this->getFilename()}\" - 2>nul", 'r'); -2) $contents variable is set to blank in getTxtFromBinaries() before updating body: $contents = ''; if($handle2){ while (!feof($handle2)) { set_time_limit(0); $contents .= fread($handle2, 8192); } } $this->indexValues->setBody($contents); Commentarize the line: $contents = ''; We can keep $contents='' if we change $handle2 update: $handle2 = popen("\"".$pathBinaryFile . "helpers/binaries/windows/pdftotext.exe\" -cfg \"{$configXpdf}\" -q \"{$this->getFilename()}\" - 2>nul", 'r'); instead of $handle2 = popen($pathBinaryFile . "helpers/binaries/windows/pdftotext.exe -cfg {$configXpdf} -q \"{$this->getFilename()}\" - 2>nul", 'r'); You put "- 2>nul" with only one "l". For other OS, it is "null" instead of "nul". Is it right ? |
The administrator has disabled public write access.
|
|
Hi,
thanks for you topic. For first problem, we solve in next release. Another user had the same problem. For "nul" is used in Windows NT 4 and later and in OS/2 for redirect Standard Error, which was in turn redirected to the NUL device by 2>NUL. For another OS, the device redirect is NULL. This is used for not indexing the messagge error in the Body. |
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie Help us by voting our extensions on Joomla.org: JiFile JoomPhoto Mobile Easy Language
The administrator has disabled public write access.
|
If you not change browser settings, you agree to it. Learn more