473,769 Members | 7,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 15021
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 authentificatio n 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
39356
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: domything() And the regexp search assuming no case restriction would be,
7
1942
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 tables), I'm stuck on deciding what type of comparison happens at each node. Has anyone got any suggestions? Do you think for the first level I could compare just the first characters of the word passed in and the word at the 'current' node, or...
8
1773
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 Hotel Name, Street Address and Postcode. We need to make it as simple as possible for users to pick their hotel, but I don't want to put 1600 hotel names in a drop-down list, and we have to consider the fact that not every user is going to...
4
1939
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 candidate. So how can i search for keywords in each of the word documents. Is there any way like that or Is that a impossible scenario in .net? Or else should i force the candidate to create CV and store in the database so that i can use that info...
3
9559
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 MusicAlbum let you find MP3 and other music files based on the singer and album name; DocAuthor let you find Office documents created by a certain user; DocAppName let you find files of a particular program, and so on. Indexing Service uses plug-ins...
1
5604
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 web. Part of the presentation is that they want to be able to "search" for their favorite dealers. So, this will be a string search. The difficulty is, we dont have .NET, we dont have a SQL server -- all I can use is ASP classic. So, I can...
8
5291
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 them as tiny word docs (usually on a couple of kb's in size) in a standard windows folder. I want to be able to search for say the word pastry and list all the recipes with that word occuring inside that file. The user should then be able to...
3
9686
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 project that is essentially a translation dictionary for conlangs , or constructed languages. It allows the user to enter English words and their translation in the conlang, to search for translations by English, and delete words from the dictionary. ...
1
3273
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 search for certain words.If those stated words are found, then I should print the enire them including the entire line. Below is an example of such a text file Example text file: Possible failures: -> Member=1, FSce=1, MP=13.16%, atching...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10048
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3963
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.