Pls suggest me any inbuilt command or package?
Asked
Active
Viewed 1,673 times
3 Answers
2
well, it shouldn't be too hard to find something from the net. Here's one for Python called pyPDF. Check PyPi also for such modules. As for reading doc,ppt,xls files, one way is to use COM.

ghostdog74
- 327,991
- 56
- 259
- 343
1
The content as in "binary" or the actual text?
To read the file as "binary" in php: http://php.net/manual/en/function.file.php
In python: http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-files
Actually reading the contents of the file is a lot more difficult and requires additonall libraries. For instance have a look at this question on SO (Python): python convert microsoft office docs to plain text on linux
0
Try this:
$data = fopen('myfile.png', 'rb'); // read in binary mode.
if ($data) {
header('Content-Type: image/png');
fpassthru($data);
}
You should change content-type
accordingly.

Sarfraz
- 377,238
- 77
- 533
- 578