i want to use different pages of a document (book.pdf/.doc/.txt) to jump at in my program.for example if i want to use page 10 of the book,how i will go there and read its contents.
i want to use different pages of a document (book.pdf/.doc/.txt) to jump at in my program.for example if i want to use page 10 of the book,how i will go there and read its contents.
These are radically different file contents, and unless you have a reader with an API that you can interface (i.e. tell to jump to page ten), then you, you, have to define what a page is, and read the document types appropriately.
It is possible that there is function of the Microsoft Word COM server that can seek from page to page, and perhaps also of an API that allows the reading of PDFs, but for a text document you have to formalize the logic, conceptualize what a page is, yourself.
I think I would begin by creating an index of some sort by scanning the whole file.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
i managed a book of 43 pages,each page with exactly 2600 characters.And each page is headed by page number (e.g. page 1 ,page 2 etc) and copied it in a text file.From here i can access the desired page containing 2600 characters(though it does not print 2600 characters).But it works in some sense in my program.Its quite a rough idea.
I need some sophisticated stuff.
is that a question?I need some sophisticated stuff.