Thread: Multiple Pages

  1. #1
    Registered User
    Join Date
    Jun 2007
    Location
    Qatar
    Posts
    39

    Multiple Pages

    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.

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    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.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

  4. #4
    Registered User
    Join Date
    Jun 2007
    Location
    Qatar
    Posts
    39
    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.

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    I need some sophisticated stuff.
    is that a question?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Parsing multiple pages of dynamically created Websites
    By Quarlash in forum C Programming
    Replies: 11
    Last Post: 07-07-2009, 04:21 PM
  2. Replies: 16
    Last Post: 06-08-2009, 03:03 PM
  3. To access multiple pages of a file
    By rehan in forum C++ Programming
    Replies: 6
    Last Post: 07-03-2007, 02:15 AM
  4. Linker errors - Multiple Source files
    By nkhambal in forum C Programming
    Replies: 3
    Last Post: 04-24-2005, 02:41 AM
  5. Replies: 1
    Last Post: 05-01-2003, 02:52 PM