3

We need to regularly check for changes to airline schedule data from Low Cost Carriers. Their schedules are available as pdf files, and as far as we can find out, no other way that is freely available.

Example of a Pdf is here

We have tried a few different software packages that Convert PDF to Excel files, but they do not appear to be intended to really obtain the data, creating up to 50 columns on some occasions.

We want to automate this process if at all possible.

Can anyone recommend the best approach that will obtain consistent results and output a table of data, assuming that the pdf is formatted the same every time.

  • It would help to provide some links to the kinds of PDFs you are trying to scrape. – fgregg Aug 25 '13 at 14:45
  • Added a link to the question – Mark Cupitt Aug 25 '13 at 18:43
  • See this answer for command line utility pdftotext – philshem Mar 30 '15 at 14:06
4

If the pdfs are very similar each time you check them, then the best path may be to write a custom pdf scraper for each low cost carrier. Check out this tutorial, http://blog.scraperwiki.com/2012/06/25/pdf-table-extraction-of-a-table/.

You should also keep your eye on https://github.com/jazzido/tabula, It's not quite there yet, but may be a solution soon.

  • Thanks. Looks like I have to add Python to the programming toolbox. – Mark Cupitt Aug 25 '13 at 20:09
  • Tabula looks promising but you are right, now quite there yet. – Mark Cupitt Aug 28 '13 at 9:51
3

I had some good experience with pdftohtml, i.e. using the command line to convert to xml and then parse and analyse the XML.

  • I'm afraid the Windows Gui Link is broken on that page. Looks like the guiguy website went away and it is now an add click generator. – Mark Cupitt Aug 28 '13 at 9:49
  • 1
    That's bad news. The commandline utility however is still there and was updated 4 months ago. sourceforge.net/projects/pdftohtml – Karsten W. Aug 28 '13 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.