BML: Fixed text selection in pdf and text formatting/snippet creation