hi... everybody

R

Robbie Hatley

how to read PDF files in C++

Same as any other file. Open it with an fstream, like so:

#include <iostream>
#include <fstream>
using std::ios_base;
int main()
{
char buf[505];
ifstream IFS ("nifty.pdf", ios_base::in | ios_base::binary);
IFS.read(buf, 500); // read 500 bytes from file
// use bytes from file somehow
IFS.close(); // close file
return 0;
}

For details, research "fstream" in your C++ book.

For info on the PDF file format, google "PDF", or maybe
find a newsgroup having to do with document file formats.

--
Cheers,
Robbie Hatley
East Tustin, CA, USA
lone wolf intj at pac bell dot net
(put "[usenet]" in subject to bypass spam filter)
http://home.pacbell.net/earnur/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Hi! 0
Hi! 0
Hi! 0
Hi; 33
Hello Everybody 0
Hi 1
The Firefox browser does not display PDF with version 1.7 1
Hi Ppl... Need help customizing a WiFi Driver (RTL8811AU + RTL8189ES) 1

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top