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: XPDF Unexecutable

Re: XPDF Unexecutable 15 May 2012 18:46 #405

  • Antonio
  • Antonio's Avatar
  • OFFLINE
  • Administrator
  • Posts: 486
  • Thank you received: 66
Try making this change on the file:
libraries/ifile/adapter/Adapter_Search_Lucene_Document_PDF.php

about the line 97:
// rimane vuoto e questo impedisce di parserizzare contenuti inesatti
/*if(file_exists("/usr/bin/pdftotext")){
	$handle = popen("/usr/bin/pdftotext -q -htmlmeta \"{$this->getFilename()}\" - 2>/dev/null", 'r');
}else*/ if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
	$handle = popen($pathBinaryFile .  "helpers/binaries/windows/pdftotext.exe -q -htmlmeta \"{$this->getFilename()}\" - 2>nul", 'r');

about the line 178:
$handle2 = null;
 
// si potrebbero verificare degli errori per sistemi operativi sconosciuti
/*if(file_exists("/usr/bin/pdftotext")){
	$handle2 = popen("/usr/bin/pdftotext -q \"{$this->getFilename()}\" - 2>/dev/null", 'r');
}else*/ if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
	$handle2 = popen($pathBinaryFile .  "helpers/binaries/windows/pdftotext.exe -q \"{$this->getFilename()}\" - 2>nul", 'r');
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.

Re: XPDF Unexecutable 15 May 2012 20:58 #409

Hello Antonio,

Thank you. I'm a little confused about how to edit the file. Also, we're using Linux not Windows. I changed the name of \usr\bin\pdftotext and I now get:

XPDF Binaries File Executable CHMOD 0755 Permission XPDF Binaries File (adapter/helpers/binaries/linux/pdftotext): 0755

However, it still will not index - when I click on the "Manual Indexing" floppy icon I get a blank window with "helpers" in it.
The administrator has disabled public write access.

Re: XPDF Unexecutable 15 May 2012 21:08 #410

Okay, I have it working now.

I realized I'd made some changes to the " Adapter_Search_Lucene_Document_PDF.php" so I restored the original copy.

Then I got this error:

"error recovery document: empty body"

So I went to "Configuration" and set the "Server Bit" to 32-Bit and it worked.

This work around will probably be okay but I still would like to figure out how to get this to work without renaming my /usr/bin/pdftotext file but.

Thank you very much!!
The administrator has disabled public write access.

Re: XPDF Unexecutable 16 May 2012 09:55 #411

  • Antonio
  • Antonio's Avatar
  • OFFLINE
  • Administrator
  • Posts: 486
  • Thank you received: 66
By editing the file libraries/ifile/adapter/Adapter_Search_Lucene_Document_PDF.php, no need to rename the file /usr/bin/pdftotext.
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.

Re: XPDF Unexecutable 27 May 2012 00:44 #423

Hi,
Same problem. I've made the script changes as suggested in your work-around solution and I have changed file permissions on the binaries to 755. No luck.

I don't know if it matters but, in the script changes suggested, the binaries include an .exe extension but the pdftotxt files they point to have no extensions at all.

I added .exe to the file names to test but that had no apparent effect.

Thanks
The administrator has disabled public write access.

Re: XPDF Unexecutable 30 May 2012 23:12 #424

Here is the configuration.

Thanks,
Chris

The administrator has disabled public write access.
The following user(s) said Thank You: lexi

Re: XPDF Unexecutable 31 May 2012 11:11 #425

  • Giampaolo
  • Giampaolo's Avatar
  • OFFLINE
  • Administrator
  • Posts: 465
  • Thank you received: 43
Hi,
in attachment the patch, for not use the XPDF installed in linux Server.
Copying the files in IFile library (yourjoomla/libraries/ifile).

The file (XPDF) present in folder ifile/adapter/helpers/binaries have extension .exe only for Windows version.

The PDF files, are transforms to text only XPDF is executable to apache.


This attachment is hidden for guests. Please log in or register to see it.
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.

Re: XPDF Unexecutable 31 May 2012 17:41 #426

Thanks, that's wonderful ... so far. The patch made the XPDF Binaries File executable. I was almost about to celebrate.

Now, though, when I try to index PDF files, I get this error:
Error recovery document: Empty body
The administrator has disabled public write access.