OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



PDF to text problem

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

PDF to text problem

Postby carror » Sun Aug 25, 2013 4:41 pm

I have read all the information about PDF TO TEXT command and after 2 days studying it I an still getting an error message!

Before I give up I will give it a try here in the forum. So I have this the my server:

a) found the directory where all my pages are

/files/journals/0/files-pdf/

b) I am running the command to convert the PDF to text:

/files/journals/0/files-pdf/ UTF-8-nopgbrk% s - | /usr/bin/tr '[: cntrl:]' ''

After that nothing happens but in the log appears:

Could not write the PDF on remote host http://www.sitepor500.com.br
Check the permission table

So what? What does this mean? The remote host has the permission 777 which allows reading and writing! What could be the problem?
carror
 
Posts: 2
Joined: Sun Aug 25, 2013 4:35 pm

Re: PDF to text problem

Postby JasonNugent » Mon Aug 26, 2013 6:16 am

Hi carror,

the pdf2text command doesn't actually convert a PDF file to a text one. It just extracts the text from it. OJS uses the command to build search indexes. What exactly are you trying to do with the command?

The command you typed:

Code: Select all
/files/journals/0/files-pdf/ UTF-8-nopgbrk% s - | /usr/bin/tr '[: cntrl:]' ''


Is missing the actual path to pdf2text. Is this exactly what you typed?

regards,
Jason
JasonNugent
Site Admin
 
Posts: 862
Joined: Tue Jan 10, 2006 6:20 am

Re: PDF to text problem

Postby carror » Mon Aug 26, 2013 6:47 pm

Friend,

The command I used is an old command my brother gave me in order to crawl PDF files and insert their content in a protected directory that will allow users to search words in it. The protected directory is daily assigned to a database so I can run queries.

I called my brother and he said me that always when he executed that command, all the files like "01file-pdf.txt" were saved at the destination folder. Only the content in plain text. After asking his help he solved my problem! So I will share with you if someone have the same problem:

if you export the content to a directory it must be in the same domain and must have the 777 permission. I was exporting to another domain (my FTP server) and did not grant the write permission. So, right after that I changed the domain to "localhost" and the files "01file-pdf.txt" started showing up!

I would like to thank Jason for trying to help me since nobody else did!
carror
 
Posts: 2
Joined: Sun Aug 25, 2013 4:35 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests