coolwanglu/pdf2htmlEX — pull request #363 by duanyao (2014-06-15 08:40:52+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.

Some notes:

* SplashBackgroundRenderer is broken. The covered text handling requires that text layer is drawn before background, but SplashBackgroundRenderer currently doesn't support this mode, so only SVG bg works for now. Could be fixed soon.

* 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 .