coolwanglu/pdf2htmlEX — pull request #365 by duanyao (2014-06-17 09:40:09+00:00)
Title: Covered text handling

I have implemented "covered text handling" initially.

Characters covered by images, paths(filling/stroke), or clipped are detected and (1) are made transparent in text layer, (2) are drawn in background layer. An option --process-covered-text is added. SplashBackgroundRenderer now works, as well as CairoBackgroundRenderer.

Some notes:

* CSS drawing is disabled. It could be quite messy to make CSS drawing and process-covered-text work together. I noticed that CSS drawing is "not supported" in man page, is that OK to remove it?

* Stroked path handling. Now stroked paths are treated almost the same as filled paths, i.e. covering all texts in their bounding boxes. This is "safe" but not efficient.

* Speed. The hitting test algorithm is naive, may be slow for complicated pages. @coolwanglu suggested rtree in boost.

* Merge neighboring transparent chars. Now each char has a ``.