I am not sure how you can do it in pdf or htm files, but in CF, I ran across this bit of code:
<cfset doc = 'this is a Cold Fusion document. Its is stored in a cold place. the coldness of the place is determined by the temperature. and that temperature is cold!'>
Original document:<br><br>
<cfoutput>#doc#</cfoutput>
<br><br>
<cfset key = 'cold'>
<cfset new_doc = replacenocase(doc, "#key#", "<b>#key#</b>",'ALL')>
Changed document:<br><br>
<cfoutput>#new_doc#</cfoutput>
Maybe you could do this on the results page.
HTH,
Tim P.