Wednesday, February 15, 2012

Convert PDF to Text, HTML, Word...

I've put together a small demonstration site to convert pdfs to clean html: you can try it out here.  There are many caveats that go along with this (e.g. the current server is not very stable, it only works with javascript enabled browsers, only 5 documents at a time, limited size on each document, no OCR, etc.).  But I thought I'd get it out there for all the legal data fans to try it out and get a conversation started about data encoding. Do you have a favorite way of getting text out of pdfs?

PDF documents are the only available starting point for a lot of government legal information.  I've discussed some of the problems with this before, and suffice it to say that this is a recurring problem in legal informatics.  To extract useful metadata, and to make the documents web-accessible, it is usually necessary to convert the PDF to a more portable format. The devil is in the details.

While there are many programs available that make the conversion from pdf to text, html or MS Word, there are many trade-offs, the biggest of which is to preserve layout or to make it easier to extract metadata.  Most of the converters to html that I have found, for example, include a huge number of extra tags that clutter up the text, break up sentences and paragraphs and generally make it very hard to extract meaningful metadata from the document.

I've combined a couple of open source programs (pdf2text -> txt2html) and an open source tool to upload documents, to make this small site.  If you find it useful, or need to convert large volumes of pdf documents to clean html, get in touch.

15 comments:

  1. You may find PHPDocX (http://www.phpdocx.com) of interest because you can combine it with your library to generate Word reports.

    ReplyDelete
  2. Bookmarked your fantastic website. Fabulous work, unique way with words! web design manhattan

    ReplyDelete
  3. Hi there! Nice post! Please do inform us when we could see a follow up! new york web designs

    ReplyDelete
  4. Great beat ! I wish to apprentice while you amend your web site, how can i subscribe for a blog website? The account aided me a appropriate deal. I had been a little bit acquainted of this your broadcast provided bright clear idea web design manhattan

    ReplyDelete
  5. I visited a lot of website but I conceive this one holds something extra in it in it web design new york

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Wow! Thank you! I always wanted to write on my site something like that. Can I include a portion of your post to my website? best branding agencies san francisco

    ReplyDelete
  8. hello I was very impressed with the setup you used with this website. I use blogs my self so good job. definatly adding to bookmarks. branding agency sf

    ReplyDelete
  9. The processor or CPU is the brains of the laptop or computer – it does most of the calculations your game titles need to operate (with the video clip card carrying out most of the graphics function). With it staying these kinds of an essential component, you would instinctually go for the fastest – and most high priced – processor you could discover, but there is a far better substitute to blowing funds on anything that will be obsolete in a yr: getting a processor that will play tomorrow’s online games at a minimal amount is the sweet spot for any gaming personal computer. san fran design firms

    ReplyDelete
  10. Can I just say what a aid to find somebody who actually knows what theyre talking about on the internet. You positively know tips on how to deliver a problem to mild and make it important. More folks must learn this and perceive this aspect of the story. I cant believe youre not more common since you undoubtedly have the gift. web design company los angeles

    ReplyDelete
  11. Hello my family member! I want to say that this post is awesome, nice written and include approximately all important infos. I would like to peer more posts like this. design firms los angeles

    ReplyDelete
  12. Whats up, I’ve been gettin my site ranked “free justin bieber stuff”. design firms los angeles

    ReplyDelete
  13. Hello! Good stuff, please keep us posted when you post again something like that! top web design agencies

    ReplyDelete
  14. Looking forward to move into another hous?!… [...]Real estate busines is getting more and more less protitable, check out why[...]… web design tips

    ReplyDelete
  15. I like this blog so much, saved to bookmarks . website design agency

    ReplyDelete