How Can I Highlight Each Instance of a Word?

Does anyone know how to highlight (in yellow) each instance of a particular word that occurs in a PDF document? It's very easy in MS Word but I was told (another Forum) that I would need a Java script to do this in Acrobat.
If that is so, can anyone share the script with me as I do not know Java?
Thanks very much!

Cate,
This code works in Acrobat 8.x and takes a bit of configuring the client in 9.0.
Cheers,
Rocky
//Begin Code
/* A search dialogue that highlights the words you designate in the dialog box. */
app.addMenuItem({ cName: "Find Highlighter", cParent: "Tools", nPos: 0, cExec: "highlighterFind()"});
function highlighterFind()
var wordFind = app.response({
cQuestion:"Enter the word you wish to search for",
cTitle:"Quick Search"
if(wordFind != null)
search.query(wordFind, "ActiveDoc")
var ckWord, numWords;
for (var i = 0; i < this.numPages; i++ )
numWords = this.getPageNumWords(i);
for (var j = 0; j < numWords; j++)
ckWord = ckWord = this.getPageNthWord(i,j);
if (ckWord == wordFind) {
/* then highlight it */
this.addAnnot({
page: i,
strokeColor: color.yellow,
type: "Highlight",
quads: this.getPageNthWordQuads(i, j),
author: "Acrobat JavaScript Highlighter",
contents: wordFind.toString()
app.alert ("Acrobat is done highlighting the current document",3)
//End Code

Similar Messages

  • How do I highlight multiple instance of a word or phrase in Acrobat XI

    I would like to highlight multiple instance of a word or phrase.  I have worked with the  redactions but I cannot find a way to save the changes or change the highlight color using the scripts.
    Thanks

    1. Open the Document in Acrobat XI
    2. Open the 'Comments' Pane on your right hand side.
    3.  There are a variety of tools avaialbe to highlight, underline and add text.

  • We have 6 ipods and 1 iphone in our house. We have different itunes accounts. We use one computer. How can we share each others music? I moved everybodies itunes media folder to the public folder but when I open itunes I only see that accounts music.

    We have 6 ipods and 1 iphone in our house. We have different itunes accounts. We use one computer. How can we share each others music? I moved everybodies itunes media folder to the public music folder but when I open itunes I only see that accounts music. We need different itunes accounts. We share 1 computer but we have different user accounts on the computer.

    Adding media directly to the media folder does not make it appear in the library.  iTunes doesn't really 'look' at that folder except to go to specific files when you call upon them from a library. You have to drag new content to each user's library, that is assuming each user has their own library.

  • Using one email for both husband and wife, how can we FaceTime each other

    My husband and I share an email account and Apple ID  How can we FaceTime each other since it seems to be based on our shared identity?  I am on a MacBook and he is on an iPad 2.

    have to use a different apple id.  sorry
    Peace, Clyde

  • How can I get an instance of my customize cell in tableview?

    Hi,I'd like to generate a customize tablecell in my tableview.but How can I get an instance of my customize cell in tableview when selected item changes?
    public class Person {
              private javafx.beans.property.BooleanProperty active;
              private StringProperty firstName;
              private StringProperty lastName;
              private StringProperty email;
              private Person(String fName, String lName, String email) {
                   this.active = new SimpleBooleanProperty(true);
                   this.firstName = new SimpleStringProperty(fName);
                   this.lastName = new SimpleStringProperty(lName);
                   this.email = new SimpleStringProperty(email);
              public javafx.beans.property.BooleanProperty activeProperty() { return active; }
              public StringProperty firstNameProperty() { return firstName; }
              public StringProperty lastNameProperty() { return lastName; }
              public StringProperty emailProperty() { return email; }
    final ObservableList<Person> data = FXCollections.observableArrayList(
                             new Person("Jacob", "Smith", "[email protected]"),
                             new Person("Isabella", "Johnson", "[email protected]"),
                             new Person("Ethan", "Williams", "[email protected]"),
                             new Person("Emma", "Jones", "[email protected]"),
                             new Person("Michael", "Brown", "[email protected]")
    public class RatingCell extends TableCell<Person,String> {
        private NabiSyncRating rating;//NabiSyncRating is a customize control.it has some method ,like change backgroud-color,value,etc.
        public RatingCell() {
             rating = new NabiSyncRating(-1);
        @Override
        public void startEdit() {
            super.startEdit();
            if (isEmpty()) {
                return;
            rating.setDisable(false);
            rating.requestFocus();
        @Override
        public void cancelEdit() {
            super.cancelEdit();
            rating.setDisable(true);
        public void commitEdit(String value) {
            super.commitEdit(value);
            rating.setDisable(true);
        @Override
        public void updateItem(String item, boolean empty) {
            super.updateItem(item, empty);
    Callback<TableColumn<Person, String>, TableCell<Person, String>> ratingCellFactory = new Callback<TableColumn<Person, String>, TableCell<Person, String>>() {
                        @Override
                        public TableCell<Person, String> call(
                                  TableColumn<Person, String> p) {
                             return new RatingCell();
    TableColumn firstNameCol = new TableColumn();
    firstNameCol.setCellFactory(ratingCellFactory);
    firstNameCol.setMinWidth(100);
    firstNameCol.setMaxWidth(224);
    firstNameCol.setResizable(true);
    tableView.getColumns().addAll(firstNameCol);
    tableView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
                  @Override
                  public void changed(ObservableValue observable, Object oldvalue, Object newValue)
                               Person person=(Person)newValue;
                               //I'd like to get the instance of my customize control 'RatingCell' ,How can I get the RatingCell instance which in current row?
                         System.out.println("selected row is : " + newValue );
                  });

    HI,
    I have found a solution to find it
    First ,you need to set person property 'id' as the input parameter for your customized component method 'public void updateItem(String item, boolean empty)'
    ratingCol.setCellValueFactory(new PropertyValueFactory<Person,String>("id"));
    firstNameCol.setCellFactory(ratingCellFactory);and then you need to implement your customize component like this:
    import javafx.scene.control.ContentDisplay;
    import javafx.scene.control.TableCell;
    public class RatingCell extends TableCell<Person,String> {
        private NabiSyncRating rating;
        public RatingCell() {
             rating = new NabiSyncRating(5);
            this.setGraphic(rating);
            this.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
            this.setEditable(true);
        public void updateRating()
             if(rating!=null)
                  rating.selectRating();
        @Override
        public void startEdit() {
            super.startEdit();
            if (isEmpty()) {
                return;
            rating.setDisable(false);
            rating.requestFocus();
        @Override
        public void cancelEdit() {
            super.cancelEdit();
            rating.setDisable(true);
        public void commitEdit(String value) {
            super.commitEdit(value);
            rating.setDisable(true);
        @Override
        public void updateItem(String item, boolean empty) {
             if(item!=null && item.length()>0)
                  if(rating!=null)
                       rating.setId("NR"+item);
                       this.setId("NC"+item);
                super.updateItem(item, empty);
    } and find the current like this :
    tableView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
                       @Override
                       public void changed(ObservableValue observable, Object oldvalue, Object newValue)
                            Person person=(Person)newValue;
                            Set<Node> colNodes=tableView.lookupAll("RatingCell");
                            for(Node nod:colNodes)
                                 System.out.println("person.email:"+"NC"+person.email.getValue()+"|nodId: " + nod.getId()+"\r\n" );
                                 if(("NC"+person.email.getValue()).equals(nod.getId()))
                                       System.out.println("get current instance" );
                                      ((RatingCell)nod).updateRating();
                       });Edited by: noob on Apr 20, 2012 4:49 PM

  • How can i highlight a text item

    hi to every body
    i am using oracle forms 6i and I have many of text item which includes numbers of different format such as 12345 ,12-3-456,1-2345-12-23
    as you know when the user doubleclick on the text item it will highlight the value .
    only for the values which is not include A '-' .
    my question is How can I highlight the values which is include '-' when A user doubleclick

    DEAR ALL,
    I have an date block and in that date block there the display items are dates in tabular forms there are many dates display when user double click on the current date or any date it show the data of that date in the next block. i want to create a (when button pressed) in my Control Block that when button press the current date color changed automatically so for that what should i wirte in when button pressed.
    Thanks for you cooperation
    Regards,
    Kamran J. Chaudhry
    Message was edited by:
    Kamran J. Chaudhry

  • How can I highlight more than one song to transfer to my playlist?

    How can I highlight more than one song to transfer to my playlist?

    Standard method in OSX to select multiple items from a list:
    For blocks of items - click on first, shift click on last.
    For selecting multiple items at random - click on first command click on others.

  • How can i highlight text in the Adobe Difital Editions?

    How can i highlight text in the Adobe Difital Editions?

    You have to remember that Digital Editions was never designed to have 'text
    editor' capabilities.  BTW: Bluefire and Overdrive also have such
    limitations.  Put in another frame of reference, DE presents you with the
    ebook, as you would be presented with a physical printed book.
    ==============

  • How can I highlight text in a document scanned in pdf format?

    How can I highlight text in a document scanned in a pdf format?

    If it wasn't OCRed in Acrobat then you can only use the non-text commenting tools, like the Square or Polygon. Press Ctrl+E to open the Properties bad and you could make it look like a text highlight annotation.

  • How can I highlight with a PDF file?

    How can I highlight text in a PDF file?

    You buy a PDF app like PDF Pen or any number of others that have this feature built-in.

  • How can I highlight text in iPages with a 'virtual' fluorescent marker

    How can I highlight text in iPages with a virtual fluorescent marker?

    The text highlight option is the little box on the toolbar with the "a" and a diagonal line through it (That is the default transparent highlight option).
    Peter

  • How can I highlight pdf texts in adobe reader 9?

    I am using adobe reader 9 . How can I highlight pdf texts?

    With the commenting tools. But they will only be available if the author of the PDF enabled that option in Acrobat.

  • How can I have an instance of mx.controls.List in a SWF from Flash?

    How can I have an instance of mx.controls.List component in a Flash, and import its SWF into a Flex application so it can controll it?  Is it possible to do this either at author-time or runtime?
    I see plenty of examples of how you can import a SWC into Flex, but how can I have my Flash interface, with Flex components already in place to be consumed by Flex?
    Thanks

    Hallo, here is more code for my problem:
    class Login {
       Devisen dev=new Devisen();
    class Devisen {
       JTextField field2;
       if (!Check.check_field2()) return; // if value not okay than return
    class Check {
       public static void check_field2()
         HOW TO GET THE CONTENT OF field2 HERE ?
    One solution ist to give the instance to the static function, with the keyword "this"
    if (!Check.check_field2(this)) return;and get the instance
    public static void check_field2(Devisen dev)BUT is that a problem for memory to give every method an instance of the class ? I have 50 fields to control and I dont want do give every check_method an instance of Devisen, if this is a problem for performance.
    Or do I only give the place where the existing instance is.
    Hmm...?
    Thank you Wolfgang

  • How can I highlight text

    How can I highlight text in PDFs on adobe.ccom?

    Hi hervorheben,
    If the file is saved on Acobat.com, you need to download it and open it in Reader (or Acrobat) to use the commenting tools (including the Highlight tool). To download a file, log in to your account at https://cloud.acrobat.com/files, select the file that you want to work on, and click the Download link at the top of the page.
    Best,
    Sara

  • How can I highlight a web address so that someone can simply click on it to go directly to the designated address?

    When composing an email, how can I highlight a web address and convert it into a link such that someone can simply click on it to go to the designated address?

    According to the help article ([[Hyperlinks in Messages Not Working]]), Thunderbird should convert the URL to a clickable link while it is sending the message. Can you confirm this by composing a message to yourself and seeing whether it works?

Maybe you are looking for

  • Verizon OUTRAGEOUS with forced data plans

    I've used Palm products since the pilot. I've had a centro for 2 yrs with verizon...now I want to upgrade to Palm Pre 2, but verizon is forcing me to buy a $30/month data plan that I don't want and will never use. I love my palm devices for reasons o

  • Download iOS 7 and iTunes

    My iPhone 5 will not open iTunes since yesterday after iOS 7 was installed. have tried different things to no avail. Help

  • Best practices for creating application schema

    All, Can anyone recommend best practices (or pointer to a url) for creating application schema. A novice installer created a schema and the tablespace ran out of disk space in 2 days and the system came to a halt at a production site. The tablespace

  • Restored Iphone

    I restored my iphone 4s to a backup that was a year ago. I lost my text messages, pictures, and contacts. is there anyway to get all that back? I think I know the answer but I want to make sure. The problem started when my sister deleted my contacts

  • Wireless dial up

    Like to buy laptop computer and perate from dialup wirelessly. Do roputers work for this. I am computer illiterate and would appreciate any help. Thanks