Input from non-text file
I was just wondering if it was possible to read in data from a non-text file using ifstreams (or indeed any other method) ?
Basically I've gotten a pdf file and I wish to extract certain parts of data from it. (not graphics, just text).
I'm guessing that I'd need to do some sort of conversion on the input data in order to be able to read the data correctly ?
Any ideas would be greatly appreciated.
ps btw, great site and a great resource. I've not posted much simply because I've managed to find most answers to my problems on the FAQ or via the search function. :) :)
Just open the file in binary mode and use the stream's get or read member functions to read data into an appropriate sized buffer for further parsing.
If you need to, you can get information on the format of PDF files from wotsit.org which might help.[/edit]
// Now you can parse what's in the buffer