Implements #934
Fixes highlighing issue with textual PDF