473,405 Members | 2,171 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,405 software developers and data experts.

php parser

Hello,
I like to know wheter it is possible with php to do the following
taskes:
- read a file (.txt, .doc, .pdf, ...) word by word to chek if a word
or a sentencs exists...
- chek the form of presentation of a word i.e. chek if the word is
bold, in which size, is it centered or aligned to left,...
thank you for your help
Jul 17 '05 #1
3 1927
Selmi Mourad wrote:
Hello,
I like to know wheter it is possible with php to do the following
taskes:
- read a file (.txt, .doc, .pdf, ...) word by word to chek if a word
or a sentencs exists...
- chek the form of presentation of a word i.e. chek if the word is
bold, in which size, is it centered or aligned to left,...
thank you for your help


.....yes, strictly speaking it's *possible*. But unless you have COM wrappers
for these files which provide this kind of functionality, then you really
don't want to try implementing yourself in PHP.

C.
Jul 17 '05 #2
Selmi Mourad wrote:
Hello,
I like to know wheter it is possible with php to do the following
taskes:
- read a file (.txt, .doc, .pdf, ...) word by word to chek if a word
or a sentencs exists...
- chek the form of presentation of a word i.e. chek if the word is
bold, in which size, is it centered or aligned to left,...
thank you for your help


Hi,

You can probably easily search a plaintextfile, coding it yourself.
But if you enter the (evil) domain of propietary software, like doc, you
need some code (in a com or something) to help you access the file.
Or a friendly guy who backengeneered the stuff.

Have a look a .doc in a plaintext editor and see how that looks...

And then there is a newer Word-version.
Things start over again.

Anyway, I'll stop ranting.

Have a look here:
http://nl2.php.net/manual/en/ref.com.php

You will find some pdf-api at least.

Be sure to read the notes too.
They contain a few examples on M$-based systems with COM.

Good luck

Regards,
Erwin Moller
Jul 17 '05 #3
Selmi Mourad (se**********@laposte.net) wrote:
: Hello,
: I like to know wheter it is possible with php to do the following
: taskes:
: - read a file (.txt, .doc, .pdf, ...) word by word to chek if a word
: or a sentencs exists...
: - chek the form of presentation of a word i.e. chek if the word is
: bold, in which size, is it centered or aligned to left,...
: thank you for your help
for .doc files, google "antiword"
--

This space not for rent.
Jul 17 '05 #4

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

Similar topics

13
by: Paulo Pinto | last post by:
Hi, does anyone know of a Python package that is able to load XML like the XML::Simple Perl package does? For those that don't know it, this package maps the XML file to a dictionary.
11
by: Jean de Largentaye | last post by:
Hi, I need to parse a subset of C (a header file), and generate some unit tests for the functions listed in it. I thus need to parse the code, then rewrite function calls with wrong parameters....
1
by: Karalius, Joseph | last post by:
Can anyone explain what is happening here? I haven't found any useful info on Google yet. Thanks in advance. mmagnet:/home/jkaralius/src/zopeplone/Python-2.3.5 # make gcc -pthread -c...
3
by: Himanshu Garg | last post by:
Hello, I am trying to pinpoint an apparent bug in HTML::Parser. The encoding of the text seems to change incorrectly if the locale isn't set properly. However Parser.pm in the directory...
2
by: Joel Hedlund | last post by:
Hi! I have a possibly dumb question about imports. I've written two python modules: parser.py ------------------------------------ class Parser(object): "my parser"...
5
by: thewarden | last post by:
I've come into a situation where I require to have BBCode parsed, this includes the standard tags supported by PEAR package HTML_BBCodeParser and custom BBCode tags I've added myself. My problem...
28
by: Marc Gravell | last post by:
In Linq, you can apparently get a meaningful body from and expression's .ToString(); random question - does anybody know if linq also includes a parser? It just seemed it might be a handy way to...
0
by: UncleRic | last post by:
Environment: Mac OS X (10.4.10) on MacBook Pro I'm a Perl Neophyte. I've downloaded the XML::Parser module and am attempting to install it in my working directory (referenced via PERL5LIB env): ...
18
by: Just Another Victim of the Ambient Morality | last post by:
Is pyparsing really a recursive descent parser? I ask this because there are grammars it can't parse that my recursive descent parser would parse, should I have written one. For instance: ...
0
by: arvindkgs | last post by:
Iam using c lexer that is flex generated and a c++ parser that is bison generated. i have modified the parser to acccept only string input. I am calling the parser function yyparse in a loop and...
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: 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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.