Forum

JiFile for Joomla!

JIFile
JiFile is a component for Joomla! that allows you to index file contents (PDF, DOC, etc..) to perform searches in them.

Learn more...  Demo

JoomPhoto Mobile

JPhotoMobile
JoomPhoto Mobile is a component for Joomla! that allows you to share the photos from your Android device to your site Joomla.

Learn more...  Demo

iFile Framework

IFile
IFile is an open source framework written entirely in PHP, allows the indexing of textual content of a document (DOC, PDF, EXCEL, etc.) and a quick search within them.

Learn more...  Demo

Easy Language

EasyLanguage
Easy Language is a plugin for easy and immediate management of multilingual texts in every possible area of joomla, articles, components, modules, metadata, template, other components(example K2) etc.

Learn more...

Article Book Effect

Article Book Effect
View Joomla articles with the effect turns the page of a book. This plugin will display the contents of an article in Joomla as a real book or magazine, using all the benefits of HTML5

Learn more...  Demo

 

Passport photo

Passport photo
The most popular Android app that allows you to print photos cards for your documents with your Android smartphone, in a simple and intuitive way.

Learn more...

 

Crazy Shadow

Crazy Shadow
Crazy Shadow is the 3D fast-paced and fun puzzle Android game! Try to rotate and drag shapes in the position of their shadows without fail! Solve in succession all combinations of levels of the game.

Learn more...

 

Admin Countdown

Admin Countdown
Module for Joomla! 2.5 and 3.x displays in the administration part of the site, a timer with countdown of the time remaining in your session.

Learn more...  Demo

 
Welcome, Guest
Username: Password: Remember me

TOPIC: PDF indexation

PDF indexation 04 Aug 2013 23:12 #1335

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.

PDF indexation 05 Aug 2013 10:43 #1336

  • Giampaolo
  • Giampaolo's Avatar
  • OFFLINE
  • Administrator
  • Posts: 465
  • Thank you received: 43
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.

PDF indexation 05 Aug 2013 22:43 #1337

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.

PDF indexation 06 Aug 2013 11:59 #1340

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.

PDF indexation 06 Aug 2013 16:04 #1343

  • Giampaolo
  • Giampaolo's Avatar
  • OFFLINE
  • Administrator
  • Posts: 465
  • Thank you received: 43
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.