Suggestion for converting PDF files to HTML/txt files

Discussion in 'Python' started by srinivasan srinivas, Aug 11, 2008.

  1. srinivasan srinivas, Aug 11, 2008
    #1
    1. Advertisements

  2. srinivasan srinivas

    brad Guest

    Unless there is some recent development, the answer is no, it's not
    possible. Getting text out of PDF is difficult (to say the least) and at
    times impossible... i.e. a PDF can be an image that contains some text, etc.
     
    brad, Aug 11, 2008
    #2
    1. Advertisements

  3. srinivasan srinivas

    alex23 Guest

    PDFMiner is a set of CLI tools written in Python, one of which
    converts PDF to text, HTML and more:
    http://www.unixuser.org/~euske/python/pdfminer/index.html
     
    alex23, Aug 12, 2008
    #3
  4. srinivasan srinivas

    brad Guest

    Very neat program. Would be cool if it could easily integrate into other
    py apps instead of being a standalone CLI tool.
     
    brad, Aug 12, 2008
    #4
  5. srinivasan srinivas

    alex23 Guest

    Perhaps, but I think you could get a long way using os.system().
     
    alex23, Aug 12, 2008
    #5
  6. srinivasan srinivas

    brad Guest

    Yes, that is possible, but there's a lot of overhead when doing that...
    unfortunately. Also, if using os.system() is the answer, then one could
    just use the xpdf pdftotext program. A native Python solution that could
    be called from other PY apps naturally, would be awesome.
     
    brad, Aug 12, 2008
    #6
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.