Results 1 to 2 of 2

Thread: read pdf file

  1. #1
    Join Date
    Nov 2005

    read pdf file


    The following code reads a text file and it displays the content.
    Is it possible to read and display a pdf file as a string?

                Dim s As String
                Dim fileName As String
                fileName = "test.txt"
                Dim stream As IO.StreamReader
                stream = New IO.StreamReader(fileName)
                s = stream.ReadToEnd().ToString

  2. #2
    Join Date
    Sep 2004
    Northeast, FL
    There is something called an IFilter that can be used to read most text based files, office documents, some PDFs, images, etc.

    IFilters are either installed with the OS or get installed with software. For example, MS Office Pro 2003 installs an IFilter to OCR tiff images and return the text.

    As for a PDF, a PDF can be composed of images and text. Usually PDFs created directly from productivity software like MS Office, Open Office, etc. are composed of text and can readily be parsed using an IFilter. However some PDFs are composed of strictly images, scanned documents for example. These can't be easily parsed.

    There may be other ways, but maybe this will help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles