Hover over text to reveal it

I have a medical textbook ind PDF format and I want to conceal some words from it because i want to read it more actively.

I'd like to have the words to be revealed when I make some action (e.g. mouse-hovers over or highlights the hidden text).

For example, this is achieved in StackExchange with the ">!" syntax. How can I do this in a PDF editor?

2 Answers

This can be done, and has been possible for a good 20 years already.

What you would do in the document is place a button field over the word(s) you want to reveal. The background color of the field would be the paper color (usually white), and the most important property would be the mousetip help text, which then is the text covered.

There are other possibilities, such as making the field's background color transparent when clicking in the field (or Shift-Click, to make it a little bit less accidental), and to fall back to the standard background color when leaving the field's perimeter.

Creating such fields would be possible either manually, or using some Acrobat JavaScript to parse the document and look out for your keywords. When a keyword is found, that script would create the button field at the place of the found text, and add the required information.

The whole thing is quite straightforward.

PDF is not built for that. There are only a few interactive features supported in the PDF format, such as hyperlinks and embedded media, but it doesn't not have a scripting language the way web browsers do. PDF is primarily intended for printable documents, or nowadays at least readable documents.

However, the PDF format does support annotations, so you may be able to draw black rectangles as annotations and hide them by turning off annotations in the viewer. Not all PDF viewers even show the annotations, however, particularly viewers built into email applications or mobile devices.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like