473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Search inside PDF or MS Word with PHP, possible?

Is it possible to search inside a PDF-flie, using PHP?
Same question for MS Word documents?
Searched for it, but I cannot find anything about it, there are also no
PEAR-packages available...
anyone?

Nov 22 '05 #1
3 14999
er************@gmail.com wrote:
Is it possible to search inside a PDF-flie, using PHP?
Same question for MS Word documents?
Searched for it, but I cannot find anything about it, there are also no
PEAR-packages available...
anyone?


Hi,

Partial answer: for pdf:
http://nl3.php.net/manual/en/ref.pdf.php

read the comments, especially the one of:
jorromer at uchile dot cl -- Krash
07-Jun-2005 07:51

Regards,
Erwin Moller
Nov 22 '05 #2
Thanx man,
Someone got an answer for me for the MS Word?

Nov 22 '05 #3
er************@gmail.com wrote:
Thanx man,
Someone got an answer for me for the MS Word?


Hi,

I remembered some package at phpclasses.org

Here is the link:
http://phpclasses.chimit.nl/browse/package/1352.html

That package can make html from MS Word.
I expect if you browse through the sourcecode you will find all relevant
tricks to do stuff yourself.
I didn't study it at all, so maybe I talk bull. Check yourself. :-)
summary:
----------------------

This class can be used to convert a Microsoft Word document to HTML, RTF or
plain text using COM objects.

The input document formats can be Microsoft Word DOC, RTF and plain text.

The class can also clean the generated HTML to remove unnecessary markup
that Microsoft Word adds.

Of course, you need MsWord installed on the server, and Windows OS.

It doesn't works ? Look below =>

1- your server must be running Win32
2- Microsoft Word must be installed on the server (I tested with Word2000)
3- readfile() is not available under PHP 4.3. You can use the following code
to replace it with PHP<4.3
if (str_replace(".", "", phpversion())<"430")
{
function readFile( $f ) {
$out = ""; $lines = file ($f); foreach( $lines as $l ) $out .= $l."\n";
return $out;
}
}
4- try to not open a file on the netword (ie \\server\doc...) unless you
fully understand the authentification process
------------------------------------

Regards,
Erwin Moller
Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Anand Pillai | last post by:
To search a word in a group of words, say a paragraph or a web page, would a string search or a regexp search be faster? The string search would of course be, if str.find(substr) != -1:...
7
by: Bonj | last post by:
In making a ternary search tree to identify as fast as possible the type of word passed in to the algorithm, for instance sp_help -> 1 (procedures), select -> 2 (keywords), sysobjects -> 3 (system...
8
by: Ben Fidge | last post by:
Hi I'm working on a site which requires the users to specify a hotel at which they're staying in London. The complete list of hotels comes to something like 1600 records. Each record consists of...
4
by: savvy | last post by:
I'm designing a Job Recruitment Website, in which the admin person searches for the right candidate for the job using certain keywords . The only kind of candidate info is the ms word cv of each...
3
by: Chung Leong | last post by:
Here's the rest of the tutorial I started earlier: Aside from text within a document, Indexing Service let you search on meta information stored in the files. For example, MusicArtist and...
1
by: lejason | last post by:
Hello, I am looking for a way to do a string search inside an xml. Basically, I work for a company that wants to export an XML file from and excel sheet and then have that data be presented on the...
8
by: sheppyonline | last post by:
Im new here, but Im looking to create a program which can search a user-specified directory for any occurance of a specified phrase or word. Im a chef who has umpting number of recipes and I store...
3
by: galadhad | last post by:
Okay, here goes. I'm new to Python (and relatively new to programming/scripting in general - I understand basics, but complex concepts are still beyond my limited knowledge). I am working on a...
1
by: nganglove | last post by:
C++ string search -------------------------------------------------------------------------------- Hello, please can any one help me? I am given an assigment in C++ to read a text file and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.