Acrobat JavaScript only has getPageNthWord so one can only retrieve one word at a time. To retrieve more than one word, one needs to add additional code to get the following words. If you want the word separators you need to include and additional parameter. You also should be aware that PDFs are page and not word or line orientated so the words are retrieved by order the words are placed on the page so it is possible that the words might not be retrieved in the reading order.
Without seeing your code it is hard to determine what the problem is.