tdclemens/pdf2htmlEX — pull request #7 by tdclemens (2013-10-24 18:38:47+00:00)
Title: initial work on word positioning and pdf spacing problem

This is a super rushed solution for grouping words into spans and solving the spacing problem.

To group characters on a line into words:
* It gathers the the letter state of each character on a line (its position, length, etc)
* While the characters are being outputed on a line:
* * it groups characters into words based on spacing (words are enclosed in spans)
* * tries to detect when a space is supposed to be present and creates a new word
* * calculates the position of a word when it is created.

What it does well:
* positioning the words at the beginning of where the word is displayed in the pdf
* displaying the words correctly even when the spacing problem is wrongly solved

What it does bad:
* detecting spaces due to positions in pdf
* detecting spaces due to positions in pdf when a line has multiple states
* aligning the end of a word in html with the end of the word in the pdf.

I have a similar solution in mind that will most likely work better. I will right up an issue for it next.