f



pdf to text

I am looking for a way to convert PDF files into text content. I don't 
care about layout or formatting, just the plain text that I can use to 
search against in a database.

I've look into the pdftotext tool from:
http://www.foolabs.com/xpdf/download.html

However, when I use it via the command line, it works fine. If I issue 
the same command via a system() call, there are major problems that 
cause the server to crash. (Don't know why, there aren't any error 
messages been generated anywhere.)

I am looking to use this when a PDF file is uploaded via a form and 
store the text in a database for a search function.

TIA

-- Justin
0
justin4335 (310)
3/8/2006 5:07:57 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

3 Replies
1309 Views

Similar Articles

[PageSpeed] 18

Justin Koivisto wrote:
>
> I am looking for a way to convert PDF files into text content.

I vaguely remember using Ghostscript for that... 

Cheers, 
NC

0
nc (1051)
3/8/2006 5:50:06 PM
I have not used pdftotext via system(). However you could try different
versions of pdftotext. In my experience the version you use can have
quite different effects. Different versions should be easily available.
It's also possible to use ascii2txt, which depends on Ghostscript I
think. When I tried it I got into a muddle of versions though, and
pdftotext was much easier.

0
3/8/2006 6:47:06 PM
Justin Koivisto <justin@koivi.com> wrote:
> I am looking for a way to convert PDF files into text content. I don't 
> care about layout or formatting, just the plain text that I can use to 
> search against in a database.
> 
> I've look into the pdftotext tool from:
> http://www.foolabs.com/xpdf/download.html
> 
> However, when I use it via the command line, it works fine. If I issue 
> the same command via a system() call, there are major problems that 
> cause the server to crash. (Don't know why, there aren't any error 
> messages been generated anywhere.)

What do you mean when you say the server crashes? The Apache process 
dies? The entire machine locks up? The server physically falls off the 
rack and lands on the floor?

How about doing an experiment where you use system() to call a shell 
script that sets up some debugging and dumps the environment, and see 
what you come up with?

miguel
-- 
Photos from 38 countries on 5 continents: http://travel.u.nu
Latest photos: Australia; Malaysia; Burma; Thailand; Hong Kong
Airports of the world: http://airport.u.nu
0
Miguel
3/16/2006 6:10:12 AM
Reply:

Web resources about - pdf to text - comp.lang.php

Text - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Texts between schoolgirl terror suspect and co-accused Milad Atai released in court
A Sydney schoolgirl charged with sending $5000 to Islamic State was used as a middleman by her relative who is believed to be overseas fighting ...

Education letters: year 12 English text, No Sugar, a giant stretch for EAL students
The Year 12 English syllabus needs to include texts that are challenging and interesting but also with a level and style of English that migrant ...

Strangers deliver gifts to newborn baby after receiving wrong-number text
Everyone has a great ‘wrong number’ text story, but this one takes the cake.

Scanner Pro for iOS updated to version 7 w/ text recognition, workflows, more
... for iOS has today received a hefty update. The latest update brings the app to version 7 and includes a host of new features, including text ...

Cola Messenger Looks to Simplify Text Messaging on iOS
... with friends by allowing them to send interactive ‘Cola Bubbles’ in the chat window. When chatting in Cola Messenger, users can send text messages, ...

WhatsApp testing text formatting to include bold and italics in messages
The latest beta release of WhatsApp features some basic text formatting options including bold and italics. While features in beta versions of ...

Android N Multi-Window Includes Ability To Drag & Drop Text
Now that Android N is officially here in a preview form and everyone has had a chance to digest its arrival, the details on what is on offer ...

Recruiters Using Text To Contact Job Seekers. Really?!
More and more job seekers are receiving texts from recruiters/head-hunters when contacted for the first time. " Found your resume online. Have ...

Text Messages: Lewandowski Never ‘Acknowledged’ Grabbing Michelle Fields, Despite Erroneous Daily Beast ...
Text messages between myself and Corey Lewandowski, Donald Trump’s campaign manager, prove that an article in The Daily Beast that alleged Lewandowski ...

Resources last updated: 3/23/2016 11:38:30 PM